diff --git a/CHANGELOG.md b/CHANGELOG.md index 60965ec744..19eb9c4289 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ --> -## 2023.x.x (unreleased) +## 2023.11.1 ### General - Feat: 管理者がコントロールパネルからメールアドレスの照会を行えるようになりました diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index 2028e9c9e0..ad0741693f 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -299,7 +299,7 @@ light: "淺色" dark: "深色" lightThemes: "淺色主題" darkThemes: "深色主題" -syncDeviceDarkMode: "同步至此裝置的深色模式設定" +syncDeviceDarkMode: "與設備的深色模式同步" drive: "雲端硬碟" fileName: "檔案名稱" selectFile: "選擇檔案" @@ -1819,6 +1819,14 @@ _ago: monthsAgo: "{n} 個月前" yearsAgo: "{n} 年前" invalid: "無" +_timeIn: + seconds: "{n} 秒後" + minutes: "{n} 分後" + hours: "{n} 小時後" + days: "{n} 日後" + weeks: "{n} 週後" + months: "{n} 個月後" + years: "{n} 年後" _time: second: "秒" minute: "分鐘" diff --git a/package.json b/package.json index 4bcdb47c50..8fd0401aa5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "2023.11.1-beta.2-PrisMisskey.1", + "version": "2023.11.1-PrisMisskey.1", "codename": "nasubi", "repository": { "type": "git", diff --git a/packages/backend/src/core/MfmService.ts b/packages/backend/src/core/MfmService.ts index b275d1b142..af602168d4 100644 --- a/packages/backend/src/core/MfmService.ts +++ b/packages/backend/src/core/MfmService.ts @@ -276,9 +276,18 @@ export class MfmService { }, fn: (node) => { - const el = doc.createElement('i'); - appendChildren(node.children, el); - return el; + if (node.props.name === 'unixtime') { + const text = node.children[0]!.type === 'text' ? node.children[0].props.text : ''; + const date = new Date(parseInt(text, 10) * 1000); + const el = doc.createElement('time'); + el.setAttribute('datetime', date.toISOString()); + el.textContent = date.toISOString(); + return el; + } else { + const el = doc.createElement('i'); + appendChildren(node.children, el); + return el; + } }, blockCode: (node) => { diff --git a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts index cd5a8d41aa..3e3475f7d6 100644 --- a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts +++ b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts @@ -333,7 +333,11 @@ export default function(props: MfmProps) { class: 'ti ti-clock', style: 'margin-right: 0.25em;', }), - h(MkTime, { time: unixtime * 1000, mode: 'detail' }), + h(MkTime, { + key: Math.random(), + time: unixtime * 1000, + mode: 'detail', + }), ]); } } diff --git a/packages/frontend/src/components/global/MkTime.vue b/packages/frontend/src/components/global/MkTime.vue index 61e65a8dcf..f08d538fc0 100644 --- a/packages/frontend/src/components/global/MkTime.vue +++ b/packages/frontend/src/components/global/MkTime.vue @@ -49,15 +49,14 @@ const relative = $computed(() => { ago >= 3600 ? i18n.t('_ago.hoursAgo', { n: Math.round(ago / 3600).toString() }) : ago >= 60 ? i18n.t('_ago.minutesAgo', { n: (~~(ago / 60)).toString() }) : ago >= 10 ? i18n.t('_ago.secondsAgo', { n: (~~(ago % 60)).toString() }) : - ago >= -1 ? i18n.ts._ago.justNow : + ago >= -3 ? i18n.ts._ago.justNow : ago < -31536000 ? i18n.t('_timeIn.years', { n: Math.round(-ago / 31536000).toString() }) : ago < -2592000 ? i18n.t('_timeIn.months', { n: Math.round(-ago / 2592000).toString() }) : ago < -604800 ? i18n.t('_timeIn.weeks', { n: Math.round(-ago / 604800).toString() }) : ago < -86400 ? i18n.t('_timeIn.days', { n: Math.round(-ago / 86400).toString() }) : ago < -3600 ? i18n.t('_timeIn.hours', { n: Math.round(-ago / 3600).toString() }) : ago < -60 ? i18n.t('_timeIn.minutes', { n: (~~(-ago / 60)).toString() }) : - ago < -10 ? i18n.t('_timeIn.seconds', { n: (~~(-ago % 60)).toString() }) : - '?' + i18n.t('_timeIn.seconds', { n: (~~(-ago % 60)).toString() }) ); }); diff --git a/packages/frontend/src/pages/settings/notifications.vue b/packages/frontend/src/pages/settings/notifications.vue index 88e02af1f4..0e65865fa0 100644 --- a/packages/frontend/src/pages/settings/notifications.vue +++ b/packages/frontend/src/pages/settings/notifications.vue @@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- +