Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

fix(share): shorten secondary action labels

Timothy Yin0c41d63de616
diff --git a/app/components/photo/ShareModal.vue b/app/components/photo/ShareModal.vue
index 353a965b..29720560 100644
--- a/app/components/photo/ShareModal.vue
+++ b/app/components/photo/ShareModal.vue
@@ -394,7 +394,6 @@ const socialPlatforms = computed(() => [
onEscapeKeyDown: (event: KeyboardEvent) => event.stopPropagation(),
}"
:title="$t('ui.action.share.title')"
- :close="{ 'aria-label': $t('ui.action.share.actions.close') }"
:description="photo.title || $t('ui.action.share.fallback.photoTitle')"
:ui="{
overlay: 'z-[60] bg-black/50 backdrop-blur-sm',
@@ -412,6 +411,15 @@ const socialPlatforms = computed(() => [
}
"
>
+ <template #close>
+ <UButton
+ icon="tabler:x"
+ color="neutral"
+ variant="ghost"
+ class="shrink-0"
+ :aria-label="$t('ui.action.share.actions.close')"
+ />
+ </template>
<template #body>
<div class="space-y-4">
<section :aria-label="$t('ui.action.share.ogImage.title')">
@@ -495,50 +503,78 @@ const socialPlatforms = computed(() => [
</UButton>
</div>
<div
- class="grid p-1.5 [&>button+button]:relative [&>button+button]:before:absolute [&>button+button]:before:inset-y-2 [&>button+button]:before:left-0 [&>button+button]:before:w-px [&>button+button]:before:bg-black/8 dark:[&>button+button]:before:bg-white/10"
+ class="grid p-1.5 [&>div+div]:relative [&>div+div]:before:absolute [&>div+div]:before:inset-y-2 [&>div+div]:before:left-0 [&>div+div]:before:w-px [&>div+div]:before:bg-black/8 dark:[&>div+div]:before:bg-white/10"
:class="canNativeShare ? 'grid-cols-3' : 'grid-cols-2'"
>
- <UButton
+ <div
v-if="canNativeShare"
- block
- size="sm"
- class="min-w-0 justify-center gap-1 px-0 py-2 text-[11px] [&>span]:whitespace-normal [&>span]:text-center"
- :ui="{ leadingIcon: 'size-3.5' }"
- color="neutral"
- variant="ghost"
- icon="tabler:share-2"
- @click="nativeShare"
- >
- {{ $t('ui.action.share.actions.nativeShare') }}
- </UButton>
- <UButton
- block
- size="sm"
- class="min-w-0 justify-center gap-1 px-0 py-2 text-[11px] [&>span]:whitespace-normal [&>span]:text-center"
- :ui="{ leadingIcon: 'size-3.5' }"
- color="neutral"
- variant="ghost"
- icon="tabler:download"
- :loading="downloadingOriginal"
- :disabled="!photo.originalUrl"
- @click="downloadOriginalImage"
+ class="min-w-0"
>
- {{ $t('ui.action.share.actions.downloadOriginalImage') }}
- </UButton>
- <UButton
- block
- size="sm"
- class="min-w-0 justify-center gap-1 px-0 py-2 text-[11px] [&>span]:whitespace-normal [&>span]:text-center"
- :ui="{ leadingIcon: 'size-3.5' }"
- color="neutral"
- variant="ghost"
- icon="tabler:photo-down"
- :loading="downloadingPreview"
- :disabled="ogImageLoading || ogImageError"
- @click="downloadOgImage"
- >
- {{ $t('ui.action.share.actions.downloadOgImage') }}
- </UButton>
+ <UTooltip
+ :text="$t('ui.action.share.actions.nativeShare')"
+ :ui="{ content: 'z-[80]' }"
+ >
+ <UButton
+ :aria-label="$t('ui.action.share.actions.nativeShare')"
+ block
+ size="sm"
+ class="min-w-0 justify-center gap-1 px-1 py-2 text-xs"
+ :ui="{ leadingIcon: 'size-3.5' }"
+ color="neutral"
+ variant="ghost"
+ icon="tabler:share-2"
+ @click="nativeShare"
+ >
+ {{ $t('ui.action.share.actions.nativeShareShort') }}
+ </UButton>
+ </UTooltip>
+ </div>
+ <div class="min-w-0">
+ <UTooltip
+ :text="$t('ui.action.share.actions.downloadOriginalImage')"
+ :ui="{ content: 'z-[80]' }"
+ >
+ <UButton
+ :aria-label="
+ $t('ui.action.share.actions.downloadOriginalImage')
+ "
+ block
+ size="sm"
+ class="min-w-0 justify-center gap-1 px-1 py-2 text-xs"
+ :ui="{ leadingIcon: 'size-3.5' }"
+ color="neutral"
+ variant="ghost"
+ icon="tabler:download"
+ :loading="downloadingOriginal"
+ :disabled="!photo.originalUrl"
+ @click="downloadOriginalImage"
+ >
+ {{ $t('ui.action.share.actions.originalShort') }}
+ </UButton>
+ </UTooltip>
+ </div>
+ <div class="min-w-0">
+ <UTooltip
+ :text="$t('ui.action.share.actions.downloadOgImage')"
+ :ui="{ content: 'z-[80]' }"
+ >
+ <UButton
+ :aria-label="$t('ui.action.share.actions.downloadOgImage')"
+ block
+ size="sm"
+ class="min-w-0 justify-center gap-1 px-1 py-2 text-xs"
+ :ui="{ leadingIcon: 'size-3.5' }"
+ color="neutral"
+ variant="ghost"
+ icon="tabler:photo-down"
+ :loading="downloadingPreview"
+ :disabled="ogImageLoading || ogImageError"
+ @click="downloadOgImage"
+ >
+ {{ $t('ui.action.share.actions.shareCardShort') }}
+ </UButton>
+ </UTooltip>
+ </div>
</div>
</div>
</section>
diff --git a/i18n/locales/en.json b/i18n/locales/en.json
index 231b21b7..8abd589f 100644
--- a/i18n/locales/en.json
+++ b/i18n/locales/en.json
@@ -85,6 +85,9 @@
"linkedin": "LinkedIn"
},
"actions": {
+ "nativeShareShort": "Share",
+ "originalShort": "Original",
+ "shareCardShort": "Share Card",
"nativeShare": "Use System Share",
"copyLink": "Copy Link",
"copied": "Copied",
diff --git a/i18n/locales/ja.json b/i18n/locales/ja.json
index 3f851f4d..76326d7d 100644
--- a/i18n/locales/ja.json
+++ b/i18n/locales/ja.json
@@ -85,6 +85,9 @@
"linkedin": "LinkedIn"
},
"actions": {
+ "nativeShareShort": "共有",
+ "originalShort": "元画像",
+ "shareCardShort": "共有カード",
"nativeShare": "システム共有を使用",
"copyLink": "リンクをコピー",
"copied": "コピー済み",
diff --git a/i18n/locales/ru.json b/i18n/locales/ru.json
index 4c17a18e..a7f6db2d 100644
--- a/i18n/locales/ru.json
+++ b/i18n/locales/ru.json
@@ -85,6 +85,9 @@
"linkedin": "LinkedIn"
},
"actions": {
+ "nativeShareShort": "Поделиться",
+ "originalShort": "Оригинал",
+ "shareCardShort": "Карточка",
"nativeShare": "Поделиться через систему",
"copyLink": "Копировать ссылку",
"copied": "Скопировано",
diff --git a/i18n/locales/zh-Hans.json b/i18n/locales/zh-Hans.json
index 38e546c2..7f946443 100644
--- a/i18n/locales/zh-Hans.json
+++ b/i18n/locales/zh-Hans.json
@@ -100,6 +100,9 @@
"linkedin": "LinkedIn"
},
"actions": {
+ "nativeShareShort": "系统分享",
+ "originalShort": "原图",
+ "shareCardShort": "分享卡片",
"nativeShare": "使用系统分享",
"copyLink": "复制链接",
"copied": "已复制",
diff --git a/i18n/locales/zh-Hant-HK.json b/i18n/locales/zh-Hant-HK.json
index 1360d937..10810e1d 100644
--- a/i18n/locales/zh-Hant-HK.json
+++ b/i18n/locales/zh-Hant-HK.json
@@ -100,6 +100,9 @@
"linkedin": "LinkedIn"
},
"actions": {
+ "nativeShareShort": "系統分享",
+ "originalShort": "原圖",
+ "shareCardShort": "分享卡片",
"nativeShare": "使用系統分享",
"copyLink": "複製連結",
"copied": "已複製",
diff --git a/i18n/locales/zh-Hant-TW.json b/i18n/locales/zh-Hant-TW.json
index 6284bcb5..a1598b98 100644
--- a/i18n/locales/zh-Hant-TW.json
+++ b/i18n/locales/zh-Hant-TW.json
@@ -100,6 +100,9 @@
"linkedin": "LinkedIn"
},
"actions": {
+ "nativeShareShort": "系統分享",
+ "originalShort": "原圖",
+ "shareCardShort": "分享卡片",
"nativeShare": "使用系統分享",
"copyLink": "複製連結",
"copied": "已複製",