replaced ti-file*

and some simplification
This commit is contained in:
dakkar 2024-06-21 17:37:08 +01:00
parent e1bf3e2fff
commit ad56e745c8
6 changed files with 15 additions and 10 deletions

View file

@ -8,12 +8,12 @@ SPDX-License-Identifier: AGPL-3.0-only
<ImgWithBlurhash v-if="isThumbnailAvailable" :hash="file.blurhash" :src="file.thumbnailUrl" :alt="file.name" :title="file.name" :cover="fit !== 'contain'"/> <ImgWithBlurhash v-if="isThumbnailAvailable" :hash="file.blurhash" :src="file.thumbnailUrl" :alt="file.name" :title="file.name" :cover="fit !== 'contain'"/>
<i v-else-if="is === 'image'" class="ti ti-photo" :class="$style.icon"></i> <i v-else-if="is === 'image'" class="ti ti-photo" :class="$style.icon"></i>
<i v-else-if="is === 'video'" class="ti ti-video" :class="$style.icon"></i> <i v-else-if="is === 'video'" class="ti ti-video" :class="$style.icon"></i>
<i v-else-if="is === 'audio' || is === 'midi'" class="ph-file-audio ph-bold ph-lg" :class="$style.icon"></i> <i v-else-if="is === 'audio' || is === 'midi'" class="ti ti-file-music" :class="$style.icon"></i>
<i v-else-if="is === 'csv'" class="ph-file-text ph-bold ph-lg" :class="$style.icon"></i> <i v-else-if="is === 'csv'" class="ti ti-file-text" :class="$style.icon"></i>
<i v-else-if="is === 'pdf'" class="ph-file-text ph-bold ph-lg" :class="$style.icon"></i> <i v-else-if="is === 'pdf'" class="ti ti-file-text" :class="$style.icon"></i>
<i v-else-if="is === 'textfile'" class="ph-file-text ph-bold ph-lg" :class="$style.icon"></i> <i v-else-if="is === 'textfile'" class="ti ti-file-text" :class="$style.icon"></i>
<i v-else-if="is === 'archive'" class="ph-file-zip ph-bold ph-lg" :class="$style.icon"></i> <i v-else-if="is === 'archive'" class="ti ti-file-zip" :class="$style.icon"></i>
<i v-else class="ph-file ph-bold ph-lg" :class="$style.icon"></i> <i v-else class="ti ti-file" :class="$style.icon"></i>
<i v-if="isThumbnailAvailable && is === 'video'" class="ti ti-video" :class="$style.iconSub"></i> <i v-if="isThumbnailAvailable && is === 'video'" class="ti ti-video" :class="$style.iconSub"></i>
</div> </div>

View file

@ -142,7 +142,7 @@ const headerTabs = computed(() => [{
definePageMetadata(() => ({ definePageMetadata(() => ({
title: file.value ? `${i18n.ts.file}: ${file.value.name}` : i18n.ts.file, title: file.value ? `${i18n.ts.file}: ${file.value.name}` : i18n.ts.file,
icon: 'ph-file ph-bold ph-lg', icon: 'ti ti-file',
})); }));
</script> </script>

View file

@ -50,6 +50,6 @@ const headerTabs = computed(() => [{
definePageMetadata(() => ({ definePageMetadata(() => ({
title: i18n.ts._fileViewer.title, title: i18n.ts._fileViewer.title,
icon: 'ph-file-text ph-bold ph-lg', icon: 'ti ti-file',
})); }));
</script> </script>

View file

@ -82,7 +82,7 @@ export function getDriveFileMenu(file: Misskey.entities.DriveFile, folder?: Miss
type: 'link', type: 'link',
to: `/my/drive/file/${file.id}`, to: `/my/drive/file/${file.id}`,
text: i18n.ts._fileViewer.title, text: i18n.ts._fileViewer.title,
icon: 'ph-file-text ph-bold ph-lg', icon: 'ti ti-info-circle',
}, { type: 'divider' }, { }, { type: 'divider' }, {
text: i18n.ts.rename, text: i18n.ts.rename,
icon: 'ti ti-forms', icon: 'ti ti-forms',

View file

@ -86,7 +86,7 @@ export function openInstanceMenu(ev: MouseEvent) {
to: '/contact', to: '/contact',
}, (instance.impressumUrl) ? { }, (instance.impressumUrl) ? {
text: i18n.ts.impressum, text: i18n.ts.impressum,
icon: 'ph-newspaper-clipping ph-bold ph-lg', icon: 'ti ti-file-invoice',
action: () => { action: () => {
window.open(instance.impressumUrl, '_blank', 'noopener'); window.open(instance.impressumUrl, '_blank', 'noopener');
}, },

View file

@ -201,6 +201,11 @@ export function getConfig(): UserConfig {
'ti ti-cloud': 'ph-cloud ph-bold ph-lg', 'ti ti-cloud': 'ph-cloud ph-bold ph-lg',
'ti ti-upload': 'ph-upload ph-bold ph-lg', 'ti ti-upload': 'ph-upload ph-bold ph-lg',
'ti ti-video': 'ph-video ph-bold ph-lg', 'ti ti-video': 'ph-video ph-bold ph-lg',
'ti ti-file': 'ph-file ph-bold ph-lg',
'ti ti-file-music': 'ph-file-audio ph-bold ph-lg',
'ti ti-file-text': 'ph-file-text ph-bold ph-lg',
'ti ti-file-zip': 'ph-file-zip ph-bold ph-lg',
'ti ti-file-invoice': 'ph-newspaper-clipping ph-bold ph-lg',
}, },
}), }),
...process.env.NODE_ENV === 'production' ...process.env.NODE_ENV === 'production'