mirror of
https://github.com/immich-app/immich.git
synced 2025-11-16 12:12:37 +09:00
feat(web): rework context menus: add icons and reorder items (#8090)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user