Merge remote-tracking branch 'misskey-original/develop' into develop

# Conflicts:
#	package.json
This commit is contained in:
mattyatea 2023-11-17 18:33:39 +09:00
commit 9e9c76fa57
7 changed files with 33 additions and 11 deletions

View File

@ -12,7 +12,7 @@
--> -->
## 2023.x.x (unreleased) ## 2023.11.1
### General ### General
- Feat: 管理者がコントロールパネルからメールアドレスの照会を行えるようになりました - Feat: 管理者がコントロールパネルからメールアドレスの照会を行えるようになりました

View File

@ -299,7 +299,7 @@ light: "淺色"
dark: "深色" dark: "深色"
lightThemes: "淺色主題" lightThemes: "淺色主題"
darkThemes: "深色主題" darkThemes: "深色主題"
syncDeviceDarkMode: "同步至此裝置的深色模式設定" syncDeviceDarkMode: "與設備的深色模式同步"
drive: "雲端硬碟" drive: "雲端硬碟"
fileName: "檔案名稱" fileName: "檔案名稱"
selectFile: "選擇檔案" selectFile: "選擇檔案"
@ -1819,6 +1819,14 @@ _ago:
monthsAgo: "{n} 個月前" monthsAgo: "{n} 個月前"
yearsAgo: "{n} 年前" yearsAgo: "{n} 年前"
invalid: "無" invalid: "無"
_timeIn:
seconds: "{n} 秒後"
minutes: "{n} 分後"
hours: "{n} 小時後"
days: "{n} 日後"
weeks: "{n} 週後"
months: "{n} 個月後"
years: "{n} 年後"
_time: _time:
second: "秒" second: "秒"
minute: "分鐘" minute: "分鐘"

View File

@ -1,6 +1,6 @@
{ {
"name": "misskey", "name": "misskey",
"version": "2023.11.1-beta.2-PrisMisskey.1", "version": "2023.11.1-PrisMisskey.1",
"codename": "nasubi", "codename": "nasubi",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -276,9 +276,18 @@ export class MfmService {
}, },
fn: (node) => { fn: (node) => {
const el = doc.createElement('i'); if (node.props.name === 'unixtime') {
appendChildren(node.children, el); const text = node.children[0]!.type === 'text' ? node.children[0].props.text : '';
return el; 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) => { blockCode: (node) => {

View File

@ -333,7 +333,11 @@ export default function(props: MfmProps) {
class: 'ti ti-clock', class: 'ti ti-clock',
style: 'margin-right: 0.25em;', style: 'margin-right: 0.25em;',
}), }),
h(MkTime, { time: unixtime * 1000, mode: 'detail' }), h(MkTime, {
key: Math.random(),
time: unixtime * 1000,
mode: 'detail',
}),
]); ]);
} }
} }

View File

@ -49,15 +49,14 @@ const relative = $computed<string>(() => {
ago >= 3600 ? i18n.t('_ago.hoursAgo', { n: Math.round(ago / 3600).toString() }) : ago >= 3600 ? i18n.t('_ago.hoursAgo', { n: Math.round(ago / 3600).toString() }) :
ago >= 60 ? i18n.t('_ago.minutesAgo', { n: (~~(ago / 60)).toString() }) : ago >= 60 ? i18n.t('_ago.minutesAgo', { n: (~~(ago / 60)).toString() }) :
ago >= 10 ? i18n.t('_ago.secondsAgo', { 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 < -31536000 ? i18n.t('_timeIn.years', { n: Math.round(-ago / 31536000).toString() }) :
ago < -2592000 ? i18n.t('_timeIn.months', { n: Math.round(-ago / 2592000).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 < -604800 ? i18n.t('_timeIn.weeks', { n: Math.round(-ago / 604800).toString() }) :
ago < -86400 ? i18n.t('_timeIn.days', { n: Math.round(-ago / 86400).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 < -3600 ? i18n.t('_timeIn.hours', { n: Math.round(-ago / 3600).toString() }) :
ago < -60 ? i18n.t('_timeIn.minutes', { n: (~~(-ago / 60)).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() })
'?'
); );
}); });

View File

@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<FormSection first> <FormSection first>
<template #label>{{ i18n.ts.notificationRecieveConfig }}</template> <template #label>{{ i18n.ts.notificationRecieveConfig }}</template>
<div class="_gaps_s"> <div class="_gaps_s">
<MkFolder v-for="type in notificationTypes" :key="type"> <MkFolder v-for="type in notificationTypes.filter(x => !nonConfigurableNotificationTypes.includes(x))" :key="type">
<template #label>{{ i18n.t('_notification._types.' + type) }}</template> <template #label>{{ i18n.t('_notification._types.' + type) }}</template>
<template #suffix> <template #suffix>
{{ {{
@ -68,6 +68,8 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
import MkPushNotificationAllowButton from '@/components/MkPushNotificationAllowButton.vue'; import MkPushNotificationAllowButton from '@/components/MkPushNotificationAllowButton.vue';
import { notificationTypes } from '@/const.js'; import { notificationTypes } from '@/const.js';
const nonConfigurableNotificationTypes = ['note'];
let allowButton = $shallowRef<InstanceType<typeof MkPushNotificationAllowButton>>(); let allowButton = $shallowRef<InstanceType<typeof MkPushNotificationAllowButton>>();
let pushRegistrationInServer = $computed(() => allowButton?.pushRegistrationInServer); let pushRegistrationInServer = $computed(() => allowButton?.pushRegistrationInServer);
let sendReadMessage = $computed(() => pushRegistrationInServer?.sendReadMessage || false); let sendReadMessage = $computed(() => pushRegistrationInServer?.sendReadMessage || false);