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
- Feat: 管理者がコントロールパネルからメールアドレスの照会を行えるようになりました

View file

@ -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: "分鐘"

View file

@ -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",

View file

@ -276,9 +276,18 @@ export class MfmService {
},
fn: (node) => {
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) => {

View file

@ -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',
}),
]);
}
}

View file

@ -49,15 +49,14 @@ const relative = $computed<string>(() => {
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() })
);
});

View file

@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<FormSection first>
<template #label>{{ i18n.ts.notificationRecieveConfig }}</template>
<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 #suffix>
{{
@ -68,6 +68,8 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
import MkPushNotificationAllowButton from '@/components/MkPushNotificationAllowButton.vue';
import { notificationTypes } from '@/const.js';
const nonConfigurableNotificationTypes = ['note'];
let allowButton = $shallowRef<InstanceType<typeof MkPushNotificationAllowButton>>();
let pushRegistrationInServer = $computed(() => allowButton?.pushRegistrationInServer);
let sendReadMessage = $computed(() => pushRegistrationInServer?.sendReadMessage || false);