mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat(web): rework context menus: add icons and reorder items (#8090)
This commit is contained in:
parent
1abb0bdae8
commit
8ed6ed4d2b
23 changed files with 204 additions and 84 deletions
|
|
@ -12,6 +12,7 @@ import {
|
|||
unlinkOAuthAccount,
|
||||
type UserResponseDto,
|
||||
} from '@immich/sdk';
|
||||
import { mdiCogRefreshOutline, mdiDatabaseRefreshOutline, mdiImageRefreshOutline } from '@mdi/js';
|
||||
|
||||
interface DownloadRequestOptions<T = unknown> {
|
||||
method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
||||
|
|
@ -196,6 +197,16 @@ export const getAssetJobMessage = (job: AssetJobName) => {
|
|||
return messages[job];
|
||||
};
|
||||
|
||||
export const getAssetJobIcon = (job: AssetJobName) => {
|
||||
const names: Record<AssetJobName, string> = {
|
||||
[AssetJobName.RefreshMetadata]: mdiDatabaseRefreshOutline,
|
||||
[AssetJobName.RegenerateThumbnail]: mdiImageRefreshOutline,
|
||||
[AssetJobName.TranscodeVideo]: mdiCogRefreshOutline,
|
||||
};
|
||||
|
||||
return names[job];
|
||||
};
|
||||
|
||||
export const copyToClipboard = async (secret: string) => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(secret);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue