From dfe12d4ecb5e175ae3b0b040cbef25c6c13b5bb8 Mon Sep 17 00:00:00 2001 From: "Calum H." Date: Fri, 5 Jun 2026 15:54:27 +0100 Subject: [PATCH] feat: server access post release QA (#6316) * fix: clicking users in table in app takes you to blank page instead of website * fix: wrong loader icon on server panel * fix: surface var misalignment * fix: password managers still detecting username field as something to autofill * feat: show users on backupitem components * feat: seperators for filter sections * fix: lint + change remove -> revoke * fix: copy * feat: align copy --- .../src/pages/hosting/manage/Access.vue | 7 +- .../api-client/src/modules/archon/types.ts | 18 +++-- packages/ui/src/components/base/Combobox.vue | 12 +++- .../src/components/base/DropdownFilterBar.vue | 10 ++- .../ui/src/components/base/StyledInput.vue | 3 + packages/ui/src/components/base/Table.vue | 18 ++--- .../components/servers/access/AccessTable.vue | 43 +++++++---- .../servers/access/AuditLogTable.vue | 8 +-- .../servers/access/GrantAccessModal.vue | 13 +++- .../servers/access/RemoveAccessModal.vue | 12 ++-- .../servers/access/events/UserAccessEvent.vue | 2 +- .../ui/src/components/servers/access/types.ts | 6 ++ .../components/servers/backups/BackupItem.vue | 71 ++++++++++++++++++- .../components/servers/icons/LoaderIcon.vue | 25 ++++--- .../server-header/ServerManageHeader.vue | 9 ++- .../hosting/manage/[id]/access/access.vue | 3 + .../hosting/manage/[id]/access/audit-log.ts | 1 + .../hosting/manage/[id]/access/messages.ts | 10 +-- .../wrapped/hosting/manage/backups.vue | 10 +++ packages/ui/src/locales/en-US/index.json | 34 +++++---- .../src/stories/servers/BackupItem.stories.ts | 27 ++++++- packages/ui/src/utils/loaders.ts | 1 + standards/frontend/SURFACE_SYSTEM.md | 25 +++++++ 23 files changed, 287 insertions(+), 81 deletions(-) create mode 100644 standards/frontend/SURFACE_SYSTEM.md diff --git a/apps/app-frontend/src/pages/hosting/manage/Access.vue b/apps/app-frontend/src/pages/hosting/manage/Access.vue index 59a3b82e3..59e1f8e5c 100644 --- a/apps/app-frontend/src/pages/hosting/manage/Access.vue +++ b/apps/app-frontend/src/pages/hosting/manage/Access.vue @@ -5,6 +5,7 @@ import { ServersManageAccessPage, } from '@modrinth/ui' import { useQueryClient } from '@tanstack/vue-query' +import { openUrl } from '@tauri-apps/plugin-opener' const client = injectModrinthClient() const { serverId } = injectModrinthServerContext() @@ -26,8 +27,12 @@ try { } catch { // Let mounted layouts' useQuery surface errors; do not fail route setup. } + +function userProfileLink(username: string) { + return () => openUrl(`https://modrinth.com/user/${encodeURIComponent(username)}`) +} diff --git a/packages/api-client/src/modules/archon/types.ts b/packages/api-client/src/modules/archon/types.ts index 31b1a7224..7add0d5a8 100644 --- a/packages/api-client/src/modules/archon/types.ts +++ b/packages/api-client/src/modules/archon/types.ts @@ -858,6 +858,12 @@ export namespace Archon { id: string } + export type UserInfo = { + id: string + username: string + avatar_url: string | null + } + export type DeleteManyBackupRequest = { backup_ids: string[] } @@ -865,22 +871,26 @@ export namespace Archon { export type ActiveOperation = { backup_id: string operation_type: BackupQueueOperationType - operation_id?: number | null + operation_id: number | null has_parent: boolean scheduled_for: string + started_at: string | null synthetic_legacy: boolean + user_info: UserInfo | null } export type BackupQueueOperation = { operation_type: BackupQueueOperationType - operation_id?: number | null + operation_id: number | null state: BackupQueueState scheduled_for: string - completed_at?: string | null + started_at: string | null + completed_at: string | null has_parent: boolean - error?: string | null + error: string | null should_prompt: boolean synthetic_legacy: boolean + user_info: UserInfo | null } export type BackupQueueBackup = { diff --git a/packages/ui/src/components/base/Combobox.vue b/packages/ui/src/components/base/Combobox.vue index b04a197f9..be06b0acc 100644 --- a/packages/ui/src/components/base/Combobox.vue +++ b/packages/ui/src/components/base/Combobox.vue @@ -20,13 +20,16 @@ ref="searchTriggerRef" v-model="searchQuery" :icon="showSearchIcon ? SearchIcon : undefined" - type="text" + :type="searchType" + :name="searchName" :placeholder="searchPlaceholder || placeholder" :disabled="disabled" :autocomplete="searchAutocomplete" :autocorrect="searchAutocorrect" :autocapitalize="searchAutocapitalize" :spellcheck="searchSpellcheck" + :inputmode="searchInputmode" + :input-attrs="searchInputAttrs" wrapper-class="w-full !bg-transparent" :input-class="searchableInputClass" class="relative z-[1]" @@ -281,8 +284,6 @@ const props = withDefaults( forceDirection?: 'up' | 'down' noOptionsMessage?: string disableSearchFilter?: boolean - dropdownClass?: string - dropdownMinWidth?: string minSearchLengthToOpen?: number /** Keep the selected option's label in the input after selection, and show all options on focus */ syncWithSelection?: boolean @@ -290,10 +291,14 @@ const props = withDefaults( selectSearchTextOnFocus?: boolean /** Show a search icon in the searchable input */ showSearchIcon?: boolean + searchType?: 'text' | 'search' + searchName?: string + searchInputmode?: 'text' | 'search' searchAutocomplete?: string searchAutocorrect?: 'on' | 'off' searchAutocapitalize?: 'none' | 'off' | 'sentences' | 'words' | 'characters' searchSpellcheck?: boolean + searchInputAttrs?: Record }>(), { placeholder: 'Select an option', @@ -309,6 +314,7 @@ const props = withDefaults( syncWithSelection: true, selectSearchTextOnFocus: false, showSearchIcon: false, + searchType: 'text', outsideClickIgnore: () => [], }, ) diff --git a/packages/ui/src/components/base/DropdownFilterBar.vue b/packages/ui/src/components/base/DropdownFilterBar.vue index b8f38ccf7..e7acd5e06 100644 --- a/packages/ui/src/components/base/DropdownFilterBar.vue +++ b/packages/ui/src/components/base/DropdownFilterBar.vue @@ -269,8 +269,13 @@ >
}>(), { type: 'text', diff --git a/packages/ui/src/components/base/Table.vue b/packages/ui/src/components/base/Table.vue index 743f6da81..ebe779e84 100644 --- a/packages/ui/src/components/base/Table.vue +++ b/packages/ui/src/components/base/Table.vue @@ -1,14 +1,14 @@