diff --git a/apps/web/src/components/FileViewer.tsx b/apps/web/src/components/FileViewer.tsx index 6b5afa0d43..9d63957349 100644 --- a/apps/web/src/components/FileViewer.tsx +++ b/apps/web/src/components/FileViewer.tsx @@ -4367,18 +4367,40 @@ function FileVersionManagerModal({ ); } +// O7: 刚刚 / N 分钟前 / N 小时前(同一天)/ 昨天 / 短日期(跨年补年份). The hour +// bucket is keyed on calendar day, not elapsed duration, so a same-day +// comment never reads as "N 天前"; days-ago/weeks-ago buckets are dropped. function formatCommentTime(ts: number, t: TranslateFn): string { - const diff = Date.now() - ts; + const now = Date.now(); + const diff = now - ts; if (diff < 60_000) return t('common.justNow'); const mins = Math.floor(diff / 60_000); if (mins < 60) return t('common.minutesAgo', { n: mins }); - const hours = Math.floor(mins / 60); - if (hours < 24) return t('common.hoursAgo', { n: hours }); - const days = Math.floor(hours / 24); - if (days < 7) return t('common.daysAgo', { n: days }); - const weeks = Math.floor(days / 7); - if (weeks < 5) return t('common.weeksAgo', { n: weeks }); - return new Date(ts).toLocaleDateString(); + const date = new Date(ts); + const today = new Date(now); + const isSameDay = + date.getFullYear() === today.getFullYear() && + date.getMonth() === today.getMonth() && + date.getDate() === today.getDate(); + if (isSameDay) { + return t('common.hoursAgo', { n: Math.floor(diff / 3_600_000) }); + } + const yesterday = new Date(today); + yesterday.setDate(yesterday.getDate() - 1); + const isYesterday = + date.getFullYear() === yesterday.getFullYear() && + date.getMonth() === yesterday.getMonth() && + date.getDate() === yesterday.getDate(); + if (isYesterday) return t('common.yesterday'); + const crossYear = date.getFullYear() !== today.getFullYear(); + try { + return date.toLocaleDateString( + undefined, + crossYear ? { year: 'numeric', month: 'short', day: 'numeric' } : { month: 'short', day: 'numeric' }, + ); + } catch { + return date.toISOString(); + } } function commentActivityAt(comment: PreviewComment): number { @@ -4443,6 +4465,16 @@ export function commentAuthorAvatarColor(seed: string) { return COMMENT_AUTHOR_AVATAR_COLORS[hash % COMMENT_AUTHOR_AVATAR_COLORS.length] ?? COMMENT_AUTHOR_AVATAR_COLORS[0]; } +// Same author-key precedence as CommentAuthorIdentityContent's seed, minus the +// directory-resolved member-id fallback (not available outside that component's +// hook): canvas pins pick their color from this so a pin and its author's +// sidebar avatar always match. +function commentAuthorPinSeed(comment: PreviewComment): string { + return comment.authorKind === 'user' + ? (comment.authorKey ?? comment.authorAppUserId ?? '') + : (comment.authorKey ?? comment.authorMemberId ?? ''); +} + // First glyph of the display name (code-point aware so a CJK name shows its // first character and an emoji is not split). Falls back to '?'. function commentAuthorInitials(name: string): string { @@ -4877,7 +4909,9 @@ export function CommentSidePanel({ displayNumber={displayCommentNumber(comment, index)} t={t} /> - {formatCommentTime(commentActivityAt(comment), t)} + + {formatCommentTime(commentActivityAt(comment), t)} + {sendable ? ( +
+
+ {t('fileViewer.linkAccessTitle')} + +
+

{t('fileViewer.linkAccessDescription')}

{filePublished && publishProgress !== null ? ( diff --git a/apps/web/src/i18n/locales/ar.ts b/apps/web/src/i18n/locales/ar.ts index d5a356acdf..e7e6a90392 100644 --- a/apps/web/src/i18n/locales/ar.ts +++ b/apps/web/src/i18n/locales/ar.ts @@ -273,6 +273,7 @@ export const ar: Dict = { 'common.justNow': 'الآن', 'common.minutesAgo': 'منذ {n} دقيقة', 'common.hoursAgo': 'منذ {n} ساعة', + 'common.yesterday': 'أمس', 'common.daysAgo': 'منذ {n} يوم', 'common.weeksAgo': 'قبل {n} أسبوع', 'common.now': 'الآن', @@ -3269,7 +3270,9 @@ export const ar: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': 'إنشاء رابط مشاركة', "fileViewer.generateAndCopyLink": "إنشاء الرابط ونسخه", - 'fileViewer.publishSingleFileDescription': 'يمكن لأي شخص لديه الرابط عرضه عبر الإنترنت. حاليًا يمكن مشاركة ملف واحد فقط — الموارد المحلية المضمّنة مثل الصور غير مدعومة بعد.', + "fileViewer.linkAccessTitle": "الوصول عبر الرابط", + "fileViewer.linkAccessDescription": "يمكن للمستلمين عرض المعاينة والتعليقات الحالية، دون المحادثة أو الكود.", + 'fileViewer.publishSingleFileDescription': 'يمكن لأي شخص لديه الرابط عرضه عبر الإنترنت.', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': 'جارٍ إنشاء الرابط…', diff --git a/apps/web/src/i18n/locales/de.ts b/apps/web/src/i18n/locales/de.ts index a166295f04..763edd7e0a 100644 --- a/apps/web/src/i18n/locales/de.ts +++ b/apps/web/src/i18n/locales/de.ts @@ -273,6 +273,7 @@ export const de: Dict = { 'common.justNow': 'gerade eben', 'common.minutesAgo': 'vor {n} Min.', 'common.hoursAgo': 'vor {n} Std.', + 'common.yesterday': 'Gestern', 'common.daysAgo': 'vor {n} T.', 'common.weeksAgo': 'vor {n} Wo.', 'common.now': 'jetzt', @@ -3269,7 +3270,9 @@ export const de: Dict = { 'fileViewer.workspaceAccessMembers': 'Teammitglieder', 'fileViewer.publishSingleFileTitle': 'Freigabelink erstellen', "fileViewer.generateAndCopyLink": "Link erstellen und kopieren", - 'fileViewer.publishSingleFileDescription': 'Jeder mit dem Link kann sie online ansehen. Derzeit kann nur eine einzelne Datei geteilt werden — eingebettete lokale Assets wie Bilder werden noch nicht unterstützt.', + "fileViewer.linkAccessTitle": "Linkzugriff", + "fileViewer.linkAccessDescription": "Empfänger können die Vorschau und vorhandene Kommentare sehen – nicht die Unterhaltung oder den Code.", + 'fileViewer.publishSingleFileDescription': 'Jeder mit dem Link kann sie online ansehen.', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': 'Link wird erstellt…', diff --git a/apps/web/src/i18n/locales/en.ts b/apps/web/src/i18n/locales/en.ts index b6f4c6d209..ff4456e848 100644 --- a/apps/web/src/i18n/locales/en.ts +++ b/apps/web/src/i18n/locales/en.ts @@ -273,6 +273,7 @@ export const en: Dict = { 'common.justNow': 'just now', 'common.minutesAgo': '{n}m ago', 'common.hoursAgo': '{n}h ago', + 'common.yesterday': 'Yesterday', 'common.daysAgo': '{n}d ago', 'common.weeksAgo': '{n}w ago', 'common.now': 'now', @@ -3283,7 +3284,9 @@ export const en: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': 'Get a share link', "fileViewer.generateAndCopyLink": "Generate and copy link", - 'fileViewer.publishSingleFileDescription': 'Anyone with the link can view it online. Only a single file can be shared for now — embedded local assets such as images aren\'t supported yet.', + "fileViewer.linkAccessTitle": "Link access", + "fileViewer.linkAccessDescription": "Recipients can view the preview and existing comments — not the conversation or code.", + 'fileViewer.publishSingleFileDescription': 'Anyone with the link can view it online.', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': 'Creating link…', diff --git a/apps/web/src/i18n/locales/es-ES.ts b/apps/web/src/i18n/locales/es-ES.ts index 3418187aa2..7b8a38a37e 100644 --- a/apps/web/src/i18n/locales/es-ES.ts +++ b/apps/web/src/i18n/locales/es-ES.ts @@ -273,6 +273,7 @@ export const esES: Dict = { 'common.justNow': 'justo ahora', 'common.minutesAgo': 'hace {n} min', 'common.hoursAgo': 'hace {n} h', + 'common.yesterday': 'Ayer', 'common.daysAgo': 'hace {n} d', 'common.weeksAgo': 'hace {n} sem', 'common.now': 'ahora', @@ -3269,7 +3270,9 @@ export const esES: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': 'Obtener enlace para compartir', "fileViewer.generateAndCopyLink": "Generar y copiar enlace", - 'fileViewer.publishSingleFileDescription': 'Cualquiera con el enlace puede verlo en línea. Por ahora solo se puede compartir un único archivo; los recursos locales incrustados, como imágenes, aún no son compatibles.', + "fileViewer.linkAccessTitle": "Acceso por enlace", + "fileViewer.linkAccessDescription": "Los destinatarios pueden ver la vista previa y los comentarios existentes, no la conversación ni el código.", + 'fileViewer.publishSingleFileDescription': 'Cualquiera con el enlace puede verlo en línea.', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': 'Creando enlace…', diff --git a/apps/web/src/i18n/locales/fa.ts b/apps/web/src/i18n/locales/fa.ts index 2f68efa707..13eba54700 100644 --- a/apps/web/src/i18n/locales/fa.ts +++ b/apps/web/src/i18n/locales/fa.ts @@ -273,6 +273,7 @@ export const fa: Dict = { 'common.justNow': 'همین الان', 'common.minutesAgo': '{n} دقیقه پیش', 'common.hoursAgo': '{n} ساعت پیش', + 'common.yesterday': 'دیروز', 'common.daysAgo': '{n} روز پیش', 'common.weeksAgo': '{n} هفته پیش', 'common.now': 'الان', @@ -3269,7 +3270,9 @@ export const fa: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': 'ایجاد پیوند اشتراک‌گذاری', "fileViewer.generateAndCopyLink": "ایجاد و کپی پیوند", - 'fileViewer.publishSingleFileDescription': 'هر کسی که پیوند را داشته باشد می‌تواند آن را آنلاین ببیند. در حال حاضر فقط یک فایل قابل اشتراک‌گذاری است — منابع محلی جاسازی‌شده مانند تصاویر هنوز پشتیبانی نمی‌شوند.', + "fileViewer.linkAccessTitle": "دسترسی از طریق پیوند", + "fileViewer.linkAccessDescription": "دریافت‌کنندگان می‌توانند پیش‌نمایش و نظرات موجود را ببینند، نه گفتگو یا کد را.", + 'fileViewer.publishSingleFileDescription': 'هر کسی که پیوند را داشته باشد می‌تواند آن را آنلاین ببیند.', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': 'در حال ایجاد پیوند…', diff --git a/apps/web/src/i18n/locales/fr.ts b/apps/web/src/i18n/locales/fr.ts index d78cdc19c3..8eb9d7d5bf 100644 --- a/apps/web/src/i18n/locales/fr.ts +++ b/apps/web/src/i18n/locales/fr.ts @@ -273,6 +273,7 @@ export const fr: Dict = { 'common.justNow': 'à l\'instant', 'common.minutesAgo': 'il y a {n} min', 'common.hoursAgo': 'il y a {n} h', + 'common.yesterday': 'Hier', 'common.daysAgo': 'il y a {n} j', 'common.weeksAgo': 'il y a {n} sem.', 'common.now': 'maintenant', @@ -3262,7 +3263,9 @@ export const fr: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': 'Obtenir un lien de partage', "fileViewer.generateAndCopyLink": "Générer et copier le lien", - 'fileViewer.publishSingleFileDescription': 'Toute personne disposant du lien peut la voir en ligne. Pour l\'instant, seul un fichier unique peut être partagé — les ressources locales intégrées comme les images ne sont pas encore prises en charge.', + "fileViewer.linkAccessTitle": "Accès par lien", + "fileViewer.linkAccessDescription": "Les destinataires peuvent voir l'aperçu et les commentaires existants, pas la conversation ni le code.", + 'fileViewer.publishSingleFileDescription': 'Toute personne disposant du lien peut la voir en ligne.', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': 'Création du lien…', diff --git a/apps/web/src/i18n/locales/hu.ts b/apps/web/src/i18n/locales/hu.ts index c193a877ee..dea3e61a69 100644 --- a/apps/web/src/i18n/locales/hu.ts +++ b/apps/web/src/i18n/locales/hu.ts @@ -273,6 +273,7 @@ export const hu: Dict = { 'common.justNow': 'az imént', 'common.minutesAgo': '{n} perce', 'common.hoursAgo': '{n} órája', + 'common.yesterday': 'Tegnap', 'common.daysAgo': '{n} napja', 'common.weeksAgo': '{n} hete', 'common.now': 'most', @@ -3262,7 +3263,9 @@ export const hu: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': 'Megosztási link létrehozása', "fileViewer.generateAndCopyLink": "Link létrehozása és másolása", - 'fileViewer.publishSingleFileDescription': 'A linkkel bárki megtekintheti online. Egyelőre csak egyetlen fájl osztható meg — a beágyazott helyi erőforrások, például képek, még nem támogatottak.', + "fileViewer.linkAccessTitle": "Hozzáférés linkkel", + "fileViewer.linkAccessDescription": "A címzettek megtekinthetik az előnézetet és a meglévő megjegyzéseket, de nem a beszélgetést vagy a kódot.", + 'fileViewer.publishSingleFileDescription': 'A linkkel bárki megtekintheti online.', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': 'Link létrehozása…', diff --git a/apps/web/src/i18n/locales/id.ts b/apps/web/src/i18n/locales/id.ts index 15647f630c..83aa7c743c 100644 --- a/apps/web/src/i18n/locales/id.ts +++ b/apps/web/src/i18n/locales/id.ts @@ -273,6 +273,7 @@ export const id: Dict = { 'common.justNow': 'baru saja', 'common.minutesAgo': '{n}m lalu', 'common.hoursAgo': '{n}j lalu', + 'common.yesterday': 'Kemarin', 'common.daysAgo': '{n}h lalu', 'common.weeksAgo': '{n} mgg lalu', 'common.now': 'sekarang', @@ -3262,7 +3263,9 @@ export const id: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': 'Dapatkan tautan berbagi', "fileViewer.generateAndCopyLink": "Buat dan salin tautan", - 'fileViewer.publishSingleFileDescription': 'Siapa pun dengan tautan dapat melihatnya secara online. Saat ini hanya satu file yang dapat dibagikan — aset lokal tersemat seperti gambar belum didukung.', + "fileViewer.linkAccessTitle": "Akses tautan", + "fileViewer.linkAccessDescription": "Penerima dapat melihat pratinjau dan komentar yang ada, bukan percakapan atau kode.", + 'fileViewer.publishSingleFileDescription': 'Siapa pun dengan tautan dapat melihatnya secara online.', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': 'Membuat tautan…', diff --git a/apps/web/src/i18n/locales/it.ts b/apps/web/src/i18n/locales/it.ts index 368fb84a7a..a757055b7e 100644 --- a/apps/web/src/i18n/locales/it.ts +++ b/apps/web/src/i18n/locales/it.ts @@ -273,6 +273,7 @@ export const it: Dict = { 'common.justNow': 'proprio ora', 'common.minutesAgo': '{n} min fa', 'common.hoursAgo': '{n} h fa', + 'common.yesterday': 'Ieri', 'common.daysAgo': '{n} g fa', 'common.weeksAgo': '{n} sett. fa', 'common.now': 'ora', @@ -3262,7 +3263,9 @@ export const it: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': 'Ottieni un link di condivisione', "fileViewer.generateAndCopyLink": "Genera e copia il link", - 'fileViewer.publishSingleFileDescription': 'Chiunque abbia il link può vederlo online. Per ora è possibile condividere solo un singolo file — le risorse locali incorporate come le immagini non sono ancora supportate.', + "fileViewer.linkAccessTitle": "Accesso tramite link", + "fileViewer.linkAccessDescription": "I destinatari possono vedere l'anteprima e i commenti esistenti, non la conversazione o il codice.", + 'fileViewer.publishSingleFileDescription': 'Chiunque abbia il link può vederlo online.', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': 'Creazione del link…', diff --git a/apps/web/src/i18n/locales/ja.ts b/apps/web/src/i18n/locales/ja.ts index 6965c4d6e1..6df4343f40 100644 --- a/apps/web/src/i18n/locales/ja.ts +++ b/apps/web/src/i18n/locales/ja.ts @@ -273,6 +273,7 @@ export const ja: Dict = { 'common.justNow': 'たった今', 'common.minutesAgo': '{n}分前', 'common.hoursAgo': '{n}時間前', + 'common.yesterday': '昨日', 'common.daysAgo': '{n}日前', 'common.weeksAgo': '{n}週間前', 'common.now': '今', @@ -3262,7 +3263,9 @@ export const ja: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': '共有リンクを作成', "fileViewer.generateAndCopyLink": "リンクを作成してコピー", - 'fileViewer.publishSingleFileDescription': 'リンクを知っている人は誰でもオンラインで閲覧できます。現在は単一ファイルのみ共有でき、画像などの埋め込みローカルアセットには未対応です。', + "fileViewer.linkAccessTitle": "リンクアクセス", + "fileViewer.linkAccessDescription": "受け取った人はプレビューと既存のコメントを閲覧できます。会話やコードは含まれません。", + 'fileViewer.publishSingleFileDescription': 'リンクを知っている人は誰でもオンラインで閲覧できます。', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': '作成中…', diff --git a/apps/web/src/i18n/locales/ko.ts b/apps/web/src/i18n/locales/ko.ts index afa5ecbddd..e24c4198f9 100644 --- a/apps/web/src/i18n/locales/ko.ts +++ b/apps/web/src/i18n/locales/ko.ts @@ -273,6 +273,7 @@ export const ko: Dict = { 'common.justNow': '방금 전', 'common.minutesAgo': '{n}분 전', 'common.hoursAgo': '{n}시간 전', + 'common.yesterday': '어제', 'common.daysAgo': '{n}일 전', 'common.weeksAgo': '{n}주 전', 'common.now': '지금', @@ -3262,7 +3263,9 @@ export const ko: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': '공유 링크 만들기', "fileViewer.generateAndCopyLink": "링크 생성 및 복사", - 'fileViewer.publishSingleFileDescription': '링크가 있는 사람은 누구나 온라인으로 볼 수 있습니다. 현재는 단일 파일만 공유할 수 있으며, 이미지 등 내장 로컬 리소스는 아직 지원되지 않습니다.', + "fileViewer.linkAccessTitle": "링크 액세스", + "fileViewer.linkAccessDescription": "받는 사람은 미리보기와 기존 댓글을 볼 수 있습니다. 대화나 코드는 포함되지 않습니다.", + 'fileViewer.publishSingleFileDescription': '링크가 있는 사람은 누구나 온라인으로 볼 수 있습니다.', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': '만드는 중…', diff --git a/apps/web/src/i18n/locales/pl.ts b/apps/web/src/i18n/locales/pl.ts index 65b5916249..1c98951862 100644 --- a/apps/web/src/i18n/locales/pl.ts +++ b/apps/web/src/i18n/locales/pl.ts @@ -273,6 +273,7 @@ export const pl: Dict = { 'common.justNow': 'przed chwilą', 'common.minutesAgo': '{n} min temu', 'common.hoursAgo': '{n} godz. temu', + 'common.yesterday': 'Wczoraj', 'common.daysAgo': '{n} dni temu', 'common.weeksAgo': '{n} tyg. temu', 'common.now': 'teraz', @@ -3262,7 +3263,9 @@ export const pl: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': 'Uzyskaj link do udostępniania', "fileViewer.generateAndCopyLink": "Wygeneruj i skopiuj link", - 'fileViewer.publishSingleFileDescription': 'Każdy z linkiem może obejrzeć online. Na razie można udostępnić tylko pojedynczy plik — osadzone zasoby lokalne, np. obrazy, nie są jeszcze obsługiwane.', + "fileViewer.linkAccessTitle": "Dostęp przez link", + "fileViewer.linkAccessDescription": "Odbiorcy mogą zobaczyć podgląd i istniejące komentarze, ale nie rozmowę ani kod.", + 'fileViewer.publishSingleFileDescription': 'Każdy z linkiem może obejrzeć online.', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': 'Tworzenie linku…', diff --git a/apps/web/src/i18n/locales/pt-BR.ts b/apps/web/src/i18n/locales/pt-BR.ts index 99601ffa33..c068300f16 100644 --- a/apps/web/src/i18n/locales/pt-BR.ts +++ b/apps/web/src/i18n/locales/pt-BR.ts @@ -273,6 +273,7 @@ export const ptBR: Dict = { 'common.justNow': 'agora mesmo', 'common.minutesAgo': 'há {n} min', 'common.hoursAgo': 'há {n} h', + 'common.yesterday': 'Ontem', 'common.daysAgo': 'há {n} d', 'common.weeksAgo': 'há {n}sem', 'common.now': 'agora', @@ -3262,7 +3263,9 @@ export const ptBR: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': 'Obter link de compartilhamento', "fileViewer.generateAndCopyLink": "Gerar e copiar link", - 'fileViewer.publishSingleFileDescription': 'Qualquer pessoa com o link pode vê-lo online. Por enquanto só é possível compartilhar um único arquivo — recursos locais incorporados, como imagens, ainda não são suportados.', + "fileViewer.linkAccessTitle": "Acesso por link", + "fileViewer.linkAccessDescription": "Os destinatários podem ver a prévia e os comentários existentes, não a conversa nem o código.", + 'fileViewer.publishSingleFileDescription': 'Qualquer pessoa com o link pode vê-lo online.', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': 'Criando link…', diff --git a/apps/web/src/i18n/locales/ru.ts b/apps/web/src/i18n/locales/ru.ts index 612b6bf469..4aeb655be7 100644 --- a/apps/web/src/i18n/locales/ru.ts +++ b/apps/web/src/i18n/locales/ru.ts @@ -273,6 +273,7 @@ export const ru: Dict = { 'common.justNow': 'только что', 'common.minutesAgo': '{n} мин. назад', 'common.hoursAgo': '{n} ч. назад', + 'common.yesterday': 'Вчера', 'common.daysAgo': '{n} д. назад', 'common.weeksAgo': '{n} нед. назад', 'common.now': 'сейчас', @@ -3262,7 +3263,9 @@ export const ru: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': 'Получить ссылку для доступа', "fileViewer.generateAndCopyLink": "Создать и скопировать ссылку", - 'fileViewer.publishSingleFileDescription': 'Любой, у кого есть ссылка, может открыть её онлайн. Пока можно поделиться только одним файлом — встроенные локальные ресурсы, например изображения, ещё не поддерживаются.', + "fileViewer.linkAccessTitle": "Доступ по ссылке", + "fileViewer.linkAccessDescription": "Получатели могут видеть предпросмотр и существующие комментарии, но не переписку и не код.", + 'fileViewer.publishSingleFileDescription': 'Любой, у кого есть ссылка, может открыть её онлайн.', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': 'Создание ссылки…', diff --git a/apps/web/src/i18n/locales/th.ts b/apps/web/src/i18n/locales/th.ts index e374b35c69..7f37e447b0 100644 --- a/apps/web/src/i18n/locales/th.ts +++ b/apps/web/src/i18n/locales/th.ts @@ -273,6 +273,7 @@ export const th: Dict = { 'common.justNow': 'เมื่อครู่นี้', 'common.minutesAgo': '{n} นาทีที่แล้ว', 'common.hoursAgo': '{n} ชั่วโมงที่แล้ว', + 'common.yesterday': 'เมื่อวาน', 'common.daysAgo': '{n} วันที่แล้ว', 'common.weeksAgo': '{n} สัปดาห์ที่แล้ว', 'common.now': 'ตอนนี้', @@ -3262,7 +3263,9 @@ export const th: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': 'สร้างลิงก์แชร์', "fileViewer.generateAndCopyLink": "สร้างและคัดลอกลิงก์", - 'fileViewer.publishSingleFileDescription': 'ทุกคนที่มีลิงก์สามารถดูออนไลน์ได้ ขณะนี้แชร์ได้ครั้งละไฟล์เดียวเท่านั้น ยังไม่รองรับทรัพยากรในเครื่องที่ฝังอยู่ เช่น รูปภาพ', + "fileViewer.linkAccessTitle": "การเข้าถึงลิงก์", + "fileViewer.linkAccessDescription": "ผู้รับสามารถดูตัวอย่างและความคิดเห็นที่มีอยู่ได้ แต่ไม่รวมบทสนทนาและโค้ด", + 'fileViewer.publishSingleFileDescription': 'ทุกคนที่มีลิงก์สามารถดูออนไลน์ได้', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': 'กำลังสร้างลิงก์…', diff --git a/apps/web/src/i18n/locales/tr.ts b/apps/web/src/i18n/locales/tr.ts index ee6f8ccbc6..b1429f576b 100644 --- a/apps/web/src/i18n/locales/tr.ts +++ b/apps/web/src/i18n/locales/tr.ts @@ -273,6 +273,7 @@ export const tr: Dict = { 'common.justNow': 'şimdi', 'common.minutesAgo': '{n} dakika önce', 'common.hoursAgo': '{n} saat önce', + 'common.yesterday': 'Dün', 'common.daysAgo': '{n} gün önce', 'common.weeksAgo': '{n}h önce', 'common.now': 'şimdi', @@ -3262,7 +3263,9 @@ export const tr: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': 'Paylaşım bağlantısı al', "fileViewer.generateAndCopyLink": "Bağlantı oluştur ve kopyala", - 'fileViewer.publishSingleFileDescription': 'Bağlantıya sahip olan herkes çevrimiçi görüntüleyebilir. Şimdilik yalnızca tek bir dosya paylaşılabilir; görseller gibi gömülü yerel kaynaklar henüz desteklenmiyor.', + "fileViewer.linkAccessTitle": "Bağlantı erişimi", + "fileViewer.linkAccessDescription": "Alıcılar önizlemeyi ve mevcut yorumları görebilir; sohbeti veya kodu göremez.", + 'fileViewer.publishSingleFileDescription': 'Bağlantıya sahip olan herkes çevrimiçi görüntüleyebilir.', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': 'Bağlantı oluşturuluyor…', diff --git a/apps/web/src/i18n/locales/uk.ts b/apps/web/src/i18n/locales/uk.ts index 6ce01cafb1..35a218bde7 100644 --- a/apps/web/src/i18n/locales/uk.ts +++ b/apps/web/src/i18n/locales/uk.ts @@ -273,6 +273,7 @@ export const uk: Dict = { 'common.justNow': 'щойно', 'common.minutesAgo': '{n}хв тому', 'common.hoursAgo': '{n}г тому', + 'common.yesterday': 'Вчора', 'common.daysAgo': '{n}дн тому', 'common.weeksAgo': '{n} тиж. тому', 'common.now': 'тепер', @@ -3262,7 +3263,9 @@ export const uk: Dict = { 'fileViewer.workspaceAccessMembers': 'Workspace members', 'fileViewer.publishSingleFileTitle': 'Отримати посилання для доступу', "fileViewer.generateAndCopyLink": "Створити й скопіювати посилання", - 'fileViewer.publishSingleFileDescription': 'Будь-хто з посиланням може переглянути онлайн. Наразі можна поділитися лише одним файлом — вбудовані локальні ресурси, як-от зображення, ще не підтримуються.', + "fileViewer.linkAccessTitle": "Доступ за посиланням", + "fileViewer.linkAccessDescription": "Отримувачі можуть переглядати попередній перегляд і наявні коментарі, але не переписку чи код.", + 'fileViewer.publishSingleFileDescription': 'Будь-хто з посиланням може переглянути онлайн.', 'fileViewer.openFileRequired': 'Open a file to use this.', 'fileViewer.publishFile': 'Publish file', 'fileViewer.publishingFile': 'Створення посилання…', diff --git a/apps/web/src/i18n/locales/zh-CN.ts b/apps/web/src/i18n/locales/zh-CN.ts index 2cf96177d1..5bfa6076e8 100644 --- a/apps/web/src/i18n/locales/zh-CN.ts +++ b/apps/web/src/i18n/locales/zh-CN.ts @@ -281,6 +281,7 @@ export const zhCN: Dict = { "common.justNow": "刚刚", "common.minutesAgo": "{n} 分钟前", "common.hoursAgo": "{n} 小时前", + "common.yesterday": "昨天", "common.daysAgo": "{n} 天前", "common.weeksAgo": "{n} 周前", "common.now": "刚刚", @@ -3434,7 +3435,9 @@ export const zhCN: Dict = { "fileViewer.workspaceAccessMembers": "团队成员", "fileViewer.publishSingleFileTitle": "生成分享链接", "fileViewer.generateAndCopyLink": "生成并复制链接", - "fileViewer.publishSingleFileDescription": "任何拿到链接的人都可在线查看。目前仅支持分享单个文件,内嵌图片等本地资源暂不支持。", + "fileViewer.linkAccessTitle": "链接访问", + "fileViewer.linkAccessDescription": "接收者可查看预览和已有评论,不包含对话和代码。", + "fileViewer.publishSingleFileDescription": "任何拿到链接的人都可在线查看。", "fileViewer.openFileRequired": "打开文件后可用。", "fileViewer.publishFile": "发布文件", "fileViewer.publishingFile": "生成中…", diff --git a/apps/web/src/i18n/locales/zh-TW.ts b/apps/web/src/i18n/locales/zh-TW.ts index c9cfcade91..c3121655d3 100644 --- a/apps/web/src/i18n/locales/zh-TW.ts +++ b/apps/web/src/i18n/locales/zh-TW.ts @@ -281,6 +281,7 @@ export const zhTW: Dict = { "common.justNow": "剛剛", "common.minutesAgo": "{n} 分鐘前", "common.hoursAgo": "{n} 小時前", + "common.yesterday": "昨天", "common.daysAgo": "{n} 天前", "common.weeksAgo": "{n}w ago", "common.now": "剛剛", @@ -3443,7 +3444,9 @@ export const zhTW: Dict = { "fileViewer.workspaceAccessMembers": "團隊成員", "fileViewer.publishSingleFileTitle": "產生分享連結", "fileViewer.generateAndCopyLink": "產生並複製連結", - "fileViewer.publishSingleFileDescription": "任何取得連結的人都可以線上查看。目前僅支援分享單一檔案,內嵌圖片等本地資源暫不支援。", + "fileViewer.linkAccessTitle": "連結存取", + "fileViewer.linkAccessDescription": "收件者可查看預覽與現有留言,不含對話與程式碼。", + "fileViewer.publishSingleFileDescription": "任何取得連結的人都可以線上查看。", "fileViewer.openFileRequired": "打开文件后可用。", "fileViewer.publishFile": "發布檔案", "fileViewer.publishingFile": "產生中…", diff --git a/apps/web/src/i18n/types.ts b/apps/web/src/i18n/types.ts index 0f59298b49..91febf19ec 100644 --- a/apps/web/src/i18n/types.ts +++ b/apps/web/src/i18n/types.ts @@ -173,6 +173,7 @@ export interface Dict { 'common.justNow': string; 'common.minutesAgo': string; 'common.hoursAgo': string; + 'common.yesterday': string; 'common.daysAgo': string; 'common.weeksAgo': string; 'common.now': string; @@ -4177,6 +4178,8 @@ export interface Dict { 'fileViewer.workspaceAccessMembers': string; 'fileViewer.publishSingleFileTitle': string; 'fileViewer.generateAndCopyLink': string; + 'fileViewer.linkAccessTitle': string; + 'fileViewer.linkAccessDescription': string; 'fileViewer.publishSingleFileDescription': string; 'fileViewer.openFileRequired': string; 'fileViewer.publishFile': string; diff --git a/apps/web/src/styles/viewer/core.css b/apps/web/src/styles/viewer/core.css index 53352c1458..97b0d5c667 100644 --- a/apps/web/src/styles/viewer/core.css +++ b/apps/web/src/styles/viewer/core.css @@ -1673,20 +1673,19 @@ left: 0; top: 0; box-sizing: border-box; - width: 20px; - height: 20px; + width: 28px; + height: 28px; padding: 0; border: 0; border-radius: 50% 50% 50% 4px; background: #282828; color: #FFFFFF; - font-size: 10px; - font-weight: 600; + font-size: 12px; + font-weight: 500; line-height: 1; display: inline-flex; align-items: center; justify-content: center; - box-shadow: 0 0 0 2px #FFFFFF; pointer-events: auto; transform: translate(-50%, -50%); } @@ -1704,7 +1703,6 @@ } .comment-saved-pin:hover, .comment-active-pin:hover { - background: #282828; transform: translate(-50%, -50%); } /* The lost marker keeps the exact same geometry as the resolved pin while