diff --git a/client/src/locales/en-US.json b/client/src/locales/en-US.json index ddf4c5f5ab8..aabb0ede85a 100644 --- a/client/src/locales/en-US.json +++ b/client/src/locales/en-US.json @@ -365,6 +365,7 @@ "createWorkspace": "New workspace", "itemCount": "No items | 1 item | {count} items", "noWorkspaces": "You do not have access to any workspace yet. Workspaces that you create or have been shared with you will be listed here.", + "loading": "Loading your workspaces...", "noMatchingWorkspaces": "No workspace match this search filter.", "listError": "Failed to list the workspaces.", "newWorkspaceError": "Failed to create a new workspace.", @@ -430,6 +431,7 @@ "itemCount": "No items | 1 item | {count} items", "itemSelectedCount": "No selected items | 1 selected item | {count} selected items", "emptyFolder": "This folder is empty.", + "loading": "Loading the folder...", "listDisplayTitles": { "name": "Name", "updatedBy": "Updated By", diff --git a/client/src/locales/fr-FR.json b/client/src/locales/fr-FR.json index 3d82f74853b..80366f900d5 100644 --- a/client/src/locales/fr-FR.json +++ b/client/src/locales/fr-FR.json @@ -365,6 +365,7 @@ "createWorkspace": "Nouvel espace de travail", "itemCount": "Aucun élément | 1 élément | {count} éléments", "noWorkspaces": "Vous n'avez pas encore accès à un espace de travail. Les espaces de travail que vous créerez ou qui vous seront partagés s'afficheront ici.", + "loading": "Chargement de vos espaces de travail...", "noMatchingWorkspaces": "Aucun espace de travail ne correspond à cette recherche.", "listError": "Impossible de lister les espaces de travail.", "newWorkspaceError": "Impossible de créer le nouvel espace de travail.", @@ -430,6 +431,7 @@ "itemCount": "Aucun élément | Un élément | {count} éléments", "itemSelectedCount": "Aucun élément sélectionné | 1 élément sélectionné | {count} éléments sélectionnés", "emptyFolder": "Ce dossier est vide.", + "loading": "Chargement du dossier...", "listDisplayTitles": { "name": "Nom", "updatedBy": "Modifié par", diff --git a/client/src/views/files/FoldersPage.vue b/client/src/views/files/FoldersPage.vue index 5a2c472a506..4c6f5c93857 100644 --- a/client/src/views/files/FoldersPage.vue +++ b/client/src/views/files/FoldersPage.vue @@ -131,7 +131,20 @@ @files-added="startImportFiles" />
+ +
+ +
-
+
()); const files = ref(new EntryCollection()); const displayView = ref(DisplayState.List); const workspaceInfo: Ref = ref(null); +// Init at true to avoid blinking while we're mounting the component +// but we're not loading the files yet. +const querying = ref(true); const fileInputsRef = ref(); let eventCbId: string | null = null; @@ -702,6 +719,7 @@ async function listFolder(): Promise { if (!currentRouteIs(Routes.Documents)) { return; } + querying.value = true; const result = await parsec.statFolderChildren(workspaceInfo.value.handle, currentPath.value); if (result.ok) { const newFolders: FolderModel[] = []; @@ -761,6 +779,7 @@ async function listFolder(): Promise { PresentationMode.Toast, ); } + querying.value = false; } async function onEntryClick(entry: EntryModel, _event: Event): Promise { @@ -1199,14 +1218,13 @@ async function openEntryContextMenu(event: Event, entry: EntryModel, onFinished? diff --git a/client/src/views/workspaces/WorkspacesPage.vue b/client/src/views/workspaces/WorkspacesPage.vue index f2c601b56ba..a81c3af6e71 100644 --- a/client/src/views/workspaces/WorkspacesPage.vue +++ b/client/src/views/workspaces/WorkspacesPage.vue @@ -42,7 +42,17 @@
+ +
+ +
@@ -161,6 +171,7 @@ import { MsSorter, MsSorterChangeEvent, MsSearchInput, + MsSpinner, } from 'megashark-lib'; import { WORKSPACES_PAGE_DATA_KEY, @@ -223,6 +234,7 @@ const workspaceList: Ref> = ref([]); const displayView = ref(DisplayState.Grid); const favorites: Ref = ref([]); const filterWorkspaceName = ref(''); +const querying = ref(true); const informationManager: InformationManager = inject(InformationManagerKey)!; const storageManager: StorageManager = inject(StorageManagerKey)!; @@ -396,6 +408,7 @@ async function refreshWorkspacesList(): Promise { if (!currentRouteIs(Routes.Workspaces)) { return; } + querying.value = true; const result = await parsecListWorkspaces(); if (result.ok) { for (const wk of result.value) { @@ -424,6 +437,7 @@ async function refreshWorkspacesList(): Promise { PresentationMode.Toast, ); } + querying.value = false; } const filteredWorkspaces = computed(() => { @@ -532,12 +546,19 @@ async function onOpenWorkspaceContextMenu(workspace: WorkspaceInfo, event: Event &-content { border-radius: var(--parsec-radius-8); display: flex; - height: fit-content; + height: 100%; text-align: center; flex-direction: column; gap: 1rem; align-items: center; padding: 2rem 1rem; + justify-content: center; + + .loading-spinner { + display: flex; + flex-direction: column-reverse; + gap: 1rem; + } #new-workspace { display: flex; diff --git a/newsfragments/8617.misc.rst b/newsfragments/8617.misc.rst new file mode 100644 index 00000000000..fe606dddf95 --- /dev/null +++ b/newsfragments/8617.misc.rst @@ -0,0 +1 @@ +Added spinners when listing workspaces and folders