-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Re-arrange admin docs layout. * chore: Update admin docs UI layout. * chore: Rename consolidated space to Admin Spaces. * Enhancement/make selector sticky (#84) * feat: Make the space selector box stick to the top of the page. * chore: Add custom styling for personal ask. * chore: Remove unused imports. * chore: Add an avatar to chat messages * chore: Added script to format avatars. * feat: Make the space selector box stick to the top of the page. * chore: Remove unused imports. * Update user avatar settings. * chore: Attach event listeners to space selector. * chore: Cleanup imports. * chore: Update chat_ui script. * feat: Make the space selector box stick to the top of the page. * chore: Use username as email for gravatar requests. * chore: Use identicon as avatar default * chore: Set username in auth session state. * chore: Bump llama-index to 0.8.5.post2 * Update get username function
- Loading branch information
Showing
4 changed files
with
133 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,16 @@ | ||
"""Page: Admin / Manage Documents.""" | ||
|
||
import streamlit as st | ||
from docq.config import SpaceType | ||
from docq.domain import SpaceKey | ||
from st_pages import add_page_title | ||
from utils.handlers import list_shared_spaces | ||
from utils.layout import auth_required, documents_ui, show_space_details_ui | ||
from utils.layout import admin_docs_ui, auth_required, create_space_ui | ||
|
||
auth_required(requiring_admin=True) | ||
|
||
add_page_title() | ||
|
||
PARAM_NAME = "sid" | ||
st.session_state["admin_docs_alert"] = st.empty() | ||
|
||
if PARAM_NAME in st.experimental_get_query_params(): | ||
space = SpaceKey(SpaceType.SHARED, int(st.experimental_get_query_params()[PARAM_NAME][0])) | ||
|
||
tab_spaces, tab_docs = st.tabs(["Space Details", "Manage Documents"]) | ||
|
||
with tab_docs: | ||
documents_ui(space) | ||
|
||
with tab_spaces: | ||
show_space_details_ui(space) | ||
|
||
|
||
else: | ||
st.subheader("Select a space from below:") | ||
spaces = list_shared_spaces() | ||
selected = st.selectbox("Spaces", spaces, format_func=lambda x: x[1]) | ||
## Create Space UI | ||
create_space_ui() | ||
|
||
if selected: | ||
st.experimental_set_query_params(**{PARAM_NAME: selected[0]}) | ||
admin_docs_ui(PARAM_NAME) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
"""Page: Admin / Manage Spaces.""" | ||
|
||
"""Page: Admin / Manage Documents.""" | ||
import streamlit as st | ||
from st_pages import add_page_title | ||
from utils.layout import auth_required, create_space_ui, list_spaces_ui | ||
from utils.layout import admin_docs_ui, auth_required, create_space_ui | ||
|
||
auth_required(requiring_admin=True) | ||
|
||
add_page_title() | ||
|
||
PARAM_NAME = "sid" | ||
st.session_state["admin_docs_alert"] = st.empty() | ||
|
||
## Create Space UI | ||
create_space_ui() | ||
list_spaces_ui(True) | ||
|
||
admin_docs_ui(PARAM_NAME) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters