Merge branch 'develop' into schedule-note

This commit is contained in:
かっこかり 2023-11-18 00:21:56 +09:00 committed by GitHub
commit 3413b394e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 1011 additions and 834 deletions

View File

@ -12,7 +12,7 @@
--> -->
## 2023.x.x (unreleased) ## 2023.11.1
### General ### General
- Feat: 管理者がコントロールパネルからメールアドレスの照会を行えるようになりました - Feat: 管理者がコントロールパネルからメールアドレスの照会を行えるようになりました
@ -20,6 +20,10 @@
- Enhance: 依存関係の更新 - Enhance: 依存関係の更新
### Client ### Client
- Enhance: MFMでルビを振れるように
- 例: `$[ruby 三須木 みすき]`
- Enhance: MFMでUNIX時間を指定して日時を表示できるように
- 例: `$[unixtime 1701356400]`
- Enhance: プラグインでエラーが発生した場合のハンドリングを強化 - Enhance: プラグインでエラーが発生した場合のハンドリングを強化
- Enhance: 細かなUIのブラッシュアップ - Enhance: 細かなUIのブラッシュアップ
- Fix: 効果音が再生されるとデバイスで再生している動画や音声が停止する問題を修正 #12339 - Fix: 効果音が再生されるとデバイスで再生している動画や音声が停止する問題を修正 #12339
@ -32,9 +36,11 @@
- Fix: 特定の条件下でートがnyaizeされない問題を修正 - Fix: 特定の条件下でートがnyaizeされない問題を修正
### Server ### Server
- Enhance: FTTのデータベースへのフォールバック処理を行うかどうかを設定可能に
- Fix: トークンのないプラグインをアンインストールするときにエラーが出ないように - Fix: トークンのないプラグインをアンインストールするときにエラーが出ないように
- Fix: 投稿通知がオンでもダイレクト投稿はユーザーに通知されないようにされました - Fix: 投稿通知がオンでもダイレクト投稿はユーザーに通知されないようにされました
- Fix: ユーザタイムラインの「ノート」選択時にリノートが混ざり込んでしまうことがある問題の修正 #12306 - Fix: ユーザタイムラインの「ノート」選択時にリノートが混ざり込んでしまうことがある問題の修正 #12306
- Fix: LTLに特定条件下にてチャンネルへの投稿が混ざり込む現象を修正
- Fix: ActivityPub: 追加情報のカスタム絵文字がユーザー情報のtagに含まれない問題を修正 - Fix: ActivityPub: 追加情報のカスタム絵文字がユーザー情報のtagに含まれない問題を修正
- Fix: ActivityPubに関するセキュリティの向上 - Fix: ActivityPubに関するセキュリティの向上
- Fix: 非公開の投稿に対して返信できないように - Fix: 非公開の投稿に対して返信できないように

View File

@ -764,7 +764,7 @@ inUse: "utilisé"
editCode: "Modifier le code" editCode: "Modifier le code"
apply: "Appliquer" apply: "Appliquer"
receiveAnnouncementFromInstance: "Recevoir les messages d'information de l'instance" receiveAnnouncementFromInstance: "Recevoir les messages d'information de l'instance"
emailNotification: "Notifications par mail" emailNotification: "Notifications par courriel"
publish: "Public" publish: "Public"
inChannelSearch: "Chercher dans le canal" inChannelSearch: "Chercher dans le canal"
useReactionPickerForContextMenu: "Clic-droit pour ouvrir le panneau de réactions" useReactionPickerForContextMenu: "Clic-droit pour ouvrir le panneau de réactions"
@ -998,6 +998,7 @@ license: "Licence"
myClips: "Mes clips" myClips: "Mes clips"
retryAllQueuesConfirmText: "Cela peut augmenter temporairement la charge du serveur." retryAllQueuesConfirmText: "Cela peut augmenter temporairement la charge du serveur."
showClipButtonInNoteFooter: "Ajouter « Clip » au menu d'action de la note" showClipButtonInNoteFooter: "Ajouter « Clip » au menu d'action de la note"
reactionsDisplaySize: "Taille de l'affichage des réactions"
noteIdOrUrl: "Identifiant de la note ou URL" noteIdOrUrl: "Identifiant de la note ou URL"
video: "Vidéo" video: "Vidéo"
videos: "Vidéos" videos: "Vidéos"
@ -1053,6 +1054,7 @@ pastAnnouncements: "Annonces passées"
replies: "Répondre" replies: "Répondre"
renotes: "Renoter" renotes: "Renoter"
loadReplies: "Inclure les réponses" loadReplies: "Inclure les réponses"
loadConversation: "Afficher la conversation"
pinnedList: "Liste épinglée" pinnedList: "Liste épinglée"
notifyNotes: "Notifier à propos des nouvelles notes" notifyNotes: "Notifier à propos des nouvelles notes"
authentication: "Authentification" authentication: "Authentification"
@ -1144,7 +1146,7 @@ _initialTutorial:
direct: "Uniquement visible aux utilisateurs de votre choix. Les récipients seront notifiés. Cette option peut être utilisée comme alternative aux messages directs." direct: "Uniquement visible aux utilisateurs de votre choix. Les récipients seront notifiés. Cette option peut être utilisée comme alternative aux messages directs."
doNotSendConfidencialOnDirect1: "Faites attention quand vous envoyez vos informations sensibles !" doNotSendConfidencialOnDirect1: "Faites attention quand vous envoyez vos informations sensibles !"
doNotSendConfidencialOnDirect2: "Les administrateurs de l'instance destinataire peuvent voir toutes les notes publiées. Soyez prudent·e avec vos informations sensibles quand vous envoyez des notes directes aux utilisateurs dont vous ne vous fiez pas aux instances." doNotSendConfidencialOnDirect2: "Les administrateurs de l'instance destinataire peuvent voir toutes les notes publiées. Soyez prudent·e avec vos informations sensibles quand vous envoyez des notes directes aux utilisateurs dont vous ne vous fiez pas aux instances."
localOnly: "Désactiver la fédération de la note à d'autres instances. Les utilisateurs d'autres instances ne pourront pas voir directement la note quelle que soit l'étendue de la publication mentionnée ci-dessus." localOnly: "Désactiver la fédération de la note aux autres instances. Les utilisateurs des autres instances ne pourront pas voir directement la note quelle que soit l'étendue de la publication mentionnée ci-dessus."
_cw: _cw:
title: "Masquer le contenu (CW)" title: "Masquer le contenu (CW)"
description: "Au lieu du corps du texte, le contenu du champ « commentaires » s'affichera. Appuyez sur « afficher le contenu » pour voir le corps du texte." description: "Au lieu du corps du texte, le contenu du champ « commentaires » s'affichera. Appuyez sur « afficher le contenu » pour voir le corps du texte."
@ -1171,7 +1173,12 @@ _timelineDescription:
global: "Sur le fil global, vous pouvez voir les notes de toutes les instances connectées." global: "Sur le fil global, vous pouvez voir les notes de toutes les instances connectées."
_serverSettings: _serverSettings:
iconUrl: "URL de licône" iconUrl: "URL de licône"
appIconResolutionMustBe: "La résolution doit être au moins {resolution}."
shortName: "Nom court"
shortNameDescription: "Si le nom officiel de l'instance est long, cette abréviation peut être affichée à la place."
fanoutTimelineDescription: "Si activée, la performance de la récupération de la chronologie augmentera considérablement et la charge sur la base de données sera réduite. En revanche, l'utilisation de la mémoire de Redis augmentera. Considérez désactiver cette option si le serveur est bas en mémoire ou instable." fanoutTimelineDescription: "Si activée, la performance de la récupération de la chronologie augmentera considérablement et la charge sur la base de données sera réduite. En revanche, l'utilisation de la mémoire de Redis augmentera. Considérez désactiver cette option si le serveur est bas en mémoire ou instable."
fanoutTimelineDbFallback: "Recours à la base de données"
fanoutTimelineDbFallbackDescription: "Si activée, une demande supplémentaire à la base de données est effectuée comme solution de rechange quand le fil n'est pas mis en cache. Si désactivée, la demande à la base de données n'est pas effectuée, ce qui réduit davantage la charge du serveur mais limite l'étendue du fil récupérable."
_accountMigration: _accountMigration:
moveFrom: "Migrer un autre compte vers le présent compte" moveFrom: "Migrer un autre compte vers le présent compte"
moveFromSub: "Créer un alias vers un autre compte" moveFromSub: "Créer un alias vers un autre compte"
@ -1304,6 +1311,9 @@ _achievements:
flavor: "Attendez une minute, vous êtes sur le mauvais site web ?" flavor: "Attendez une minute, vous êtes sur le mauvais site web ?"
_brainDiver: _brainDiver:
flavor: "Misskey-Misskey La-Tu-Ma" flavor: "Misskey-Misskey La-Tu-Ma"
_smashTestNotificationButton:
title: "Débordement de tests"
description: "Détruire le bouton de test de notifications dans un intervalle extrêmement court"
_tutorialCompleted: _tutorialCompleted:
title: "Diplôme de la course élémentaire de Misskey" title: "Diplôme de la course élémentaire de Misskey"
description: "Terminer le tutoriel" description: "Terminer le tutoriel"
@ -1332,6 +1342,7 @@ _role:
canManageCustomEmojis: "Gestion des émojis personnalisés" canManageCustomEmojis: "Gestion des émojis personnalisés"
canManageAvatarDecorations: "Gestion des décorations d'avatar" canManageAvatarDecorations: "Gestion des décorations d'avatar"
wordMuteMax: "Nombre maximal de caractères dans le filtre de mots" wordMuteMax: "Nombre maximal de caractères dans le filtre de mots"
canUseTranslator: "Usage de la fonctionnalité de traduction"
_sensitiveMediaDetection: _sensitiveMediaDetection:
description: "L'apprentissage automatique peut être utilisé pour détecter automatiquement les médias sensibles à modérer. La sollicitation des serveurs augmente légèrement." description: "L'apprentissage automatique peut être utilisé pour détecter automatiquement les médias sensibles à modérer. La sollicitation des serveurs augmente légèrement."
sensitivity: "Sensibilité de la détection" sensitivity: "Sensibilité de la détection"
@ -1819,6 +1830,7 @@ _notification:
unreadAntennaNote: "Antenne {name}" unreadAntennaNote: "Antenne {name}"
emptyPushNotificationMessage: "Les notifications push ont été mises à jour" emptyPushNotificationMessage: "Les notifications push ont été mises à jour"
achievementEarned: "Accomplissement" achievementEarned: "Accomplissement"
testNotification: "Tester la notification"
reactedBySomeUsers: "{n} utilisateur·rice·s ont réagi" reactedBySomeUsers: "{n} utilisateur·rice·s ont réagi"
renotedBySomeUsers: "{n} utilisateur·rice·s ont renoté" renotedBySomeUsers: "{n} utilisateur·rice·s ont renoté"
followedBySomeUsers: "{n} utilisateur·rice·s se sont abonné·e·s à vous" followedBySomeUsers: "{n} utilisateur·rice·s se sont abonné·e·s à vous"

11
locales/index.d.ts vendored
View File

@ -1286,6 +1286,8 @@ export interface Locale {
"shortName": string; "shortName": string;
"shortNameDescription": string; "shortNameDescription": string;
"fanoutTimelineDescription": string; "fanoutTimelineDescription": string;
"fanoutTimelineDbFallback": string;
"fanoutTimelineDbFallbackDescription": string;
}; };
"_accountMigration": { "_accountMigration": {
"moveFrom": string; "moveFrom": string;
@ -1948,6 +1950,15 @@ export interface Locale {
"yearsAgo": string; "yearsAgo": string;
"invalid": string; "invalid": string;
}; };
"_timeIn": {
"seconds": string;
"minutes": string;
"hours": string;
"days": string;
"weeks": string;
"months": string;
"years": string;
};
"_time": { "_time": {
"second": string; "second": string;
"minute": string; "minute": string;

View File

@ -1273,6 +1273,8 @@ _serverSettings:
shortName: "略称" shortName: "略称"
shortNameDescription: "サーバーの正式名称が長い場合に、代わりに表示することのできる略称や通称。" shortNameDescription: "サーバーの正式名称が長い場合に、代わりに表示することのできる略称や通称。"
fanoutTimelineDescription: "有効にすると、各種タイムラインを取得する際のパフォーマンスが大幅に向上し、データベースへの負荷を軽減することが可能です。ただし、Redisのメモリ使用量は増加します。サーバーのメモリ容量が少ない場合、または動作が不安定な場合は無効にすることができます。" fanoutTimelineDescription: "有効にすると、各種タイムラインを取得する際のパフォーマンスが大幅に向上し、データベースへの負荷を軽減することが可能です。ただし、Redisのメモリ使用量は増加します。サーバーのメモリ容量が少ない場合、または動作が不安定な場合は無効にすることができます。"
fanoutTimelineDbFallback: "データベースへのフォールバック"
fanoutTimelineDbFallbackDescription: "有効にすると、タイムラインがキャッシュされていない場合にDBへ追加で問い合わせを行うフォールバック処理を行います。無効にすると、フォールバック処理を行わないことでさらにサーバーの負荷を軽減することができますが、タイムラインが取得できる範囲に制限が生じます。"
_accountMigration: _accountMigration:
moveFrom: "別のアカウントからこのアカウントに移行" moveFrom: "別のアカウントからこのアカウントに移行"
@ -1853,6 +1855,15 @@ _ago:
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

@ -59,7 +59,7 @@ copyFileId: "Скопировать ID файла"
copyFolderId: "Скопировать ID папки" copyFolderId: "Скопировать ID папки"
copyProfileUrl: "Скопировать URL профиля " copyProfileUrl: "Скопировать URL профиля "
searchUser: "Поиск людей" searchUser: "Поиск людей"
reply: "Ответить" reply: "Ответ"
loadMore: "Показать еще" loadMore: "Показать еще"
showMore: "Показать еще" showMore: "Показать еще"
showLess: "Закрыть" showLess: "Закрыть"
@ -1069,7 +1069,7 @@ unused: "Неиспользуемый"
expired: "Срок действия приглашения истёк" expired: "Срок действия приглашения истёк"
doYouAgree: "Согласны?" doYouAgree: "Согласны?"
icon: "Аватар" icon: "Аватар"
replies: "Ответить" replies: "Ответы"
renotes: "Репост" renotes: "Репост"
flip: "Переворот" flip: "Переворот"
_initialAccountSetting: _initialAccountSetting:
@ -1899,7 +1899,7 @@ _notification:
app: "Уведомления из приложений" app: "Уведомления из приложений"
_actions: _actions:
followBack: "отвечает взаимной подпиской" followBack: "отвечает взаимной подпиской"
reply: "Ответить" reply: "Ответ"
renote: "Репост" renote: "Репост"
_deck: _deck:
alwaysShowMainColumn: "Всегда показывать главную колонку" alwaysShowMainColumn: "Всегда показывать главную колонку"

View File

@ -299,7 +299,7 @@ light: "淺色"
dark: "深色" dark: "深色"
lightThemes: "淺色主題" lightThemes: "淺色主題"
darkThemes: "深色主題" darkThemes: "深色主題"
syncDeviceDarkMode: "同步至此裝置的深色模式設定" syncDeviceDarkMode: "與設備的深色模式同步"
drive: "雲端硬碟" drive: "雲端硬碟"
fileName: "檔案名稱" fileName: "檔案名稱"
selectFile: "選擇檔案" selectFile: "選擇檔案"
@ -1266,6 +1266,8 @@ _serverSettings:
shortName: "簡稱" shortName: "簡稱"
shortNameDescription: "如果伺服器的正式名稱很長,可用簡稱或通稱代替。" shortNameDescription: "如果伺服器的正式名稱很長,可用簡稱或通稱代替。"
fanoutTimelineDescription: "如果啟用的話檢索各個時間軸的性能會顯著提昇資料庫的負荷也會減少。不過Redis 的記憶體使用量會增加。如果伺服器的記憶體容量比較少或者運行不穩定,可以停用。" fanoutTimelineDescription: "如果啟用的話檢索各個時間軸的性能會顯著提昇資料庫的負荷也會減少。不過Redis 的記憶體使用量會增加。如果伺服器的記憶體容量比較少或者運行不穩定,可以停用。"
fanoutTimelineDbFallback: "資料庫的回退"
fanoutTimelineDbFallbackDescription: "若啟用,在時間軸沒有快取的情況下將執行回退處理以額外查詢資料庫。若停用,可以透過不執行回退處理來進一步減少伺服器的負荷,但會限制可取得的時間軸範圍。"
_accountMigration: _accountMigration:
moveFrom: "從其他帳戶遷移到這個帳戶" moveFrom: "從其他帳戶遷移到這個帳戶"
moveFromSub: "為另一個帳戶建立別名" moveFromSub: "為另一個帳戶建立別名"
@ -1817,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.1", "version": "2023.11.1",
"codename": "nasubi", "codename": "nasubi",
"repository": { "repository": {
"type": "git", "type": "git",
@ -55,9 +55,9 @@
"@typescript-eslint/eslint-plugin": "6.11.0", "@typescript-eslint/eslint-plugin": "6.11.0",
"@typescript-eslint/parser": "6.11.0", "@typescript-eslint/parser": "6.11.0",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"cypress": "13.5.0", "cypress": "13.5.1",
"eslint": "8.53.0", "eslint": "8.53.0",
"start-server-and-test": "2.0.2" "start-server-and-test": "2.0.3"
}, },
"optionalDependencies": { "optionalDependencies": {
"@tensorflow/tfjs-core": "4.4.0" "@tensorflow/tfjs-core": "4.4.0"

View File

@ -0,0 +1,16 @@
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export class EnableFanoutTimelineDbFallback1700096812223 {
name = 'EnableFanoutTimelineDbFallback1700096812223'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ADD "enableFanoutTimelineDbFallback" boolean NOT NULL DEFAULT true`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableFanoutTimelineDbFallback"`);
}
}

View File

@ -64,7 +64,7 @@
"@bull-board/ui": "5.9.1", "@bull-board/ui": "5.9.1",
"@discordapp/twemoji": "14.1.2", "@discordapp/twemoji": "14.1.2",
"@fastify/accepts": "4.2.0", "@fastify/accepts": "4.2.0",
"@fastify/cookie": "9.1.0", "@fastify/cookie": "9.2.0",
"@fastify/cors": "8.4.1", "@fastify/cors": "8.4.1",
"@fastify/express": "2.3.0", "@fastify/express": "2.3.0",
"@fastify/http-proxy": "9.3.0", "@fastify/http-proxy": "9.3.0",
@ -78,7 +78,7 @@
"@simplewebauthn/server": "8.3.5", "@simplewebauthn/server": "8.3.5",
"@sinonjs/fake-timers": "11.2.2", "@sinonjs/fake-timers": "11.2.2",
"@smithy/node-http-handler": "2.1.5", "@smithy/node-http-handler": "2.1.5",
"@swc/cli": "0.1.62", "@swc/cli": "0.1.63",
"@swc/core": "1.3.96", "@swc/core": "1.3.96",
"accepts": "1.3.8", "accepts": "1.3.8",
"ajv": "8.12.0", "ajv": "8.12.0",
@ -87,7 +87,7 @@
"bcryptjs": "2.4.3", "bcryptjs": "2.4.3",
"blurhash": "2.0.5", "blurhash": "2.0.5",
"body-parser": "1.20.2", "body-parser": "1.20.2",
"bullmq": "4.13.2", "bullmq": "4.13.3",
"cacheable-lookup": "7.0.0", "cacheable-lookup": "7.0.0",
"cbor": "9.0.1", "cbor": "9.0.1",
"chalk": "5.3.0", "chalk": "5.3.0",
@ -99,7 +99,7 @@
"date-fns": "2.30.0", "date-fns": "2.30.0",
"deep-email-validator": "0.1.21", "deep-email-validator": "0.1.21",
"fastify": "4.24.3", "fastify": "4.24.3",
"fastify-raw-body": "^4.2.2", "fastify-raw-body": "4.3.0",
"feed": "4.2.2", "feed": "4.2.2",
"file-type": "18.7.0", "file-type": "18.7.0",
"fluent-ffmpeg": "2.1.2", "fluent-ffmpeg": "2.1.2",
@ -132,7 +132,7 @@
"oauth2orize": "1.12.0", "oauth2orize": "1.12.0",
"oauth2orize-pkce": "0.1.2", "oauth2orize-pkce": "0.1.2",
"os-utils": "0.0.14", "os-utils": "0.0.14",
"otpauth": "9.1.5", "otpauth": "9.2.0",
"parse5": "7.1.2", "parse5": "7.1.2",
"pg": "8.11.3", "pg": "8.11.3",
"pkce-challenge": "4.0.1", "pkce-challenge": "4.0.1",
@ -144,14 +144,14 @@
"qrcode": "1.5.3", "qrcode": "1.5.3",
"random-seed": "0.3.0", "random-seed": "0.3.0",
"ratelimiter": "3.4.1", "ratelimiter": "3.4.1",
"re2": "1.20.5", "re2": "1.20.8",
"redis-lock": "0.1.4", "redis-lock": "0.1.4",
"reflect-metadata": "0.1.13", "reflect-metadata": "0.1.13",
"rename": "1.0.4", "rename": "1.0.4",
"rss-parser": "3.13.0", "rss-parser": "3.13.0",
"rxjs": "7.8.1", "rxjs": "7.8.1",
"sanitize-html": "2.11.0", "sanitize-html": "2.11.0",
"secure-json-parse": "^2.4.0", "secure-json-parse": "2.7.0",
"sharp": "0.32.6", "sharp": "0.32.6",
"sharp-read-bmp": "github:misskey-dev/sharp-read-bmp", "sharp-read-bmp": "github:misskey-dev/sharp-read-bmp",
"slacc": "0.0.10", "slacc": "0.0.10",
@ -192,7 +192,7 @@
"@types/jsrsasign": "10.5.12", "@types/jsrsasign": "10.5.12",
"@types/mime-types": "2.1.4", "@types/mime-types": "2.1.4",
"@types/ms": "0.7.34", "@types/ms": "0.7.34",
"@types/node": "20.9.0", "@types/node": "20.9.1",
"@types/node-fetch": "3.0.3", "@types/node-fetch": "3.0.3",
"@types/nodemailer": "6.4.14", "@types/nodemailer": "6.4.14",
"@types/oauth": "0.9.4", "@types/oauth": "0.9.4",

View File

@ -276,9 +276,18 @@ export class MfmService {
}, },
fn: (node) => { 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'); const el = doc.createElement('i');
appendChildren(node.children, el); appendChildren(node.children, el);
return el; return el;
}
}, },
blockCode: (node) => { blockCode: (node) => {

View File

@ -494,6 +494,11 @@ export class MiMeta {
}) })
public enableFanoutTimeline: boolean; public enableFanoutTimeline: boolean;
@Column('boolean', {
default: true,
})
public enableFanoutTimelineDbFallback: boolean;
@Column('integer', { @Column('integer', {
default: 300, default: 300,
}) })

View File

@ -295,6 +295,10 @@ export const meta = {
type: 'boolean', type: 'boolean',
optional: false, nullable: false, optional: false, nullable: false,
}, },
enableFanoutTimelineDbFallback: {
type: 'boolean',
optional: false, nullable: false,
},
perLocalUserUserTimelineCacheMax: { perLocalUserUserTimelineCacheMax: {
type: 'number', type: 'number',
optional: false, nullable: false, optional: false, nullable: false,
@ -424,6 +428,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
policies: { ...DEFAULT_POLICIES, ...instance.policies }, policies: { ...DEFAULT_POLICIES, ...instance.policies },
manifestJsonOverride: instance.manifestJsonOverride, manifestJsonOverride: instance.manifestJsonOverride,
enableFanoutTimeline: instance.enableFanoutTimeline, enableFanoutTimeline: instance.enableFanoutTimeline,
enableFanoutTimelineDbFallback: instance.enableFanoutTimelineDbFallback,
perLocalUserUserTimelineCacheMax: instance.perLocalUserUserTimelineCacheMax, perLocalUserUserTimelineCacheMax: instance.perLocalUserUserTimelineCacheMax,
perRemoteUserUserTimelineCacheMax: instance.perRemoteUserUserTimelineCacheMax, perRemoteUserUserTimelineCacheMax: instance.perRemoteUserUserTimelineCacheMax,
perUserHomeTimelineCacheMax: instance.perUserHomeTimelineCacheMax, perUserHomeTimelineCacheMax: instance.perUserHomeTimelineCacheMax,

View File

@ -121,6 +121,7 @@ export const paramDef = {
preservedUsernames: { type: 'array', items: { type: 'string' } }, preservedUsernames: { type: 'array', items: { type: 'string' } },
manifestJsonOverride: { type: 'string' }, manifestJsonOverride: { type: 'string' },
enableFanoutTimeline: { type: 'boolean' }, enableFanoutTimeline: { type: 'boolean' },
enableFanoutTimelineDbFallback: { type: 'boolean' },
perLocalUserUserTimelineCacheMax: { type: 'integer' }, perLocalUserUserTimelineCacheMax: { type: 'integer' },
perRemoteUserUserTimelineCacheMax: { type: 'integer' }, perRemoteUserUserTimelineCacheMax: { type: 'integer' },
perUserHomeTimelineCacheMax: { type: 'integer' }, perUserHomeTimelineCacheMax: { type: 'integer' },
@ -485,6 +486,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
set.enableFanoutTimeline = ps.enableFanoutTimeline; set.enableFanoutTimeline = ps.enableFanoutTimeline;
} }
if (ps.enableFanoutTimelineDbFallback !== undefined) {
set.enableFanoutTimelineDbFallback = ps.enableFanoutTimelineDbFallback;
}
if (ps.perLocalUserUserTimelineCacheMax !== undefined) { if (ps.perLocalUserUserTimelineCacheMax !== undefined) {
set.perLocalUserUserTimelineCacheMax = ps.perLocalUserUserTimelineCacheMax; set.perLocalUserUserTimelineCacheMax = ps.perLocalUserUserTimelineCacheMax;
} }

View File

@ -93,7 +93,19 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const serverSettings = await this.metaService.fetch(); const serverSettings = await this.metaService.fetch();
if (serverSettings.enableFanoutTimeline) { if (!serverSettings.enableFanoutTimeline) {
return await this.getFromDb({
untilId,
sinceId,
limit: ps.limit,
includeMyRenotes: ps.includeMyRenotes,
includeRenotedMyNotes: ps.includeRenotedMyNotes,
includeLocalRenotes: ps.includeLocalRenotes,
withFiles: ps.withFiles,
withReplies: ps.withReplies,
}, me);
}
const [ const [
userIdsWhoMeMuting, userIdsWhoMeMuting,
userIdsWhoMeMutingRenotes, userIdsWhoMeMutingRenotes,
@ -173,19 +185,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}); });
return await this.noteEntityService.packMany(redisTimeline, me); return await this.noteEntityService.packMany(redisTimeline, me);
} else { // fallback to db
return await this.getFromDb({
untilId,
sinceId,
limit: ps.limit,
includeMyRenotes: ps.includeMyRenotes,
includeRenotedMyNotes: ps.includeRenotedMyNotes,
includeLocalRenotes: ps.includeLocalRenotes,
withFiles: ps.withFiles,
withReplies: ps.withReplies,
}, me);
}
} else { } else {
if (serverSettings.enableFanoutTimelineDbFallback) { // fallback to db
return await this.getFromDb({ return await this.getFromDb({
untilId, untilId,
sinceId, sinceId,
@ -196,6 +197,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
withFiles: ps.withFiles, withFiles: ps.withFiles,
withReplies: ps.withReplies, withReplies: ps.withReplies,
}, me); }, me);
} else {
return [];
}
} }
}); });
} }

View File

@ -84,7 +84,16 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const serverSettings = await this.metaService.fetch(); const serverSettings = await this.metaService.fetch();
if (serverSettings.enableFanoutTimeline) { if (!serverSettings.enableFanoutTimeline) {
return await this.getFromDb({
untilId,
sinceId,
limit: ps.limit,
withFiles: ps.withFiles,
withReplies: ps.withReplies,
}, me);
}
const [ const [
userIdsWhoMeMuting, userIdsWhoMeMuting,
userIdsWhoMeMutingRenotes, userIdsWhoMeMutingRenotes,
@ -152,16 +161,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}); });
return await this.noteEntityService.packMany(redisTimeline, me); return await this.noteEntityService.packMany(redisTimeline, me);
} else { // fallback to db
return await this.getFromDb({
untilId,
sinceId,
limit: ps.limit,
withFiles: ps.withFiles,
withReplies: ps.withReplies,
}, me);
}
} else { } else {
if (serverSettings.enableFanoutTimelineDbFallback) { // fallback to db
return await this.getFromDb({ return await this.getFromDb({
untilId, untilId,
sinceId, sinceId,
@ -169,6 +170,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
withFiles: ps.withFiles, withFiles: ps.withFiles,
withReplies: ps.withReplies, withReplies: ps.withReplies,
}, me); }, me);
} else {
return [];
}
} }
}); });
} }
@ -182,7 +186,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}, me: MiLocalUser | null) { }, me: MiLocalUser | null) {
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'),
ps.sinceId, ps.untilId) ps.sinceId, ps.untilId)
.andWhere('(note.visibility = \'public\') AND (note.userHost IS NULL)') .andWhere('(note.visibility = \'public\') AND (note.userHost IS NULL) AND (note.channelId IS NULL)')
.innerJoinAndSelect('note.user', 'user') .innerJoinAndSelect('note.user', 'user')
.leftJoinAndSelect('note.reply', 'reply') .leftJoinAndSelect('note.reply', 'reply')
.leftJoinAndSelect('note.renote', 'renote') .leftJoinAndSelect('note.renote', 'renote')

View File

@ -76,7 +76,19 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const serverSettings = await this.metaService.fetch(); const serverSettings = await this.metaService.fetch();
if (serverSettings.enableFanoutTimeline) { if (!serverSettings.enableFanoutTimeline) {
return await this.getFromDb({
untilId,
sinceId,
limit: ps.limit,
includeMyRenotes: ps.includeMyRenotes,
includeRenotedMyNotes: ps.includeRenotedMyNotes,
includeLocalRenotes: ps.includeLocalRenotes,
withFiles: ps.withFiles,
withRenotes: ps.withRenotes,
}, me);
}
const [ const [
followings, followings,
userIdsWhoMeMuting, userIdsWhoMeMuting,
@ -134,19 +146,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}); });
return await this.noteEntityService.packMany(redisTimeline, me); return await this.noteEntityService.packMany(redisTimeline, me);
} else { // fallback to db
return await this.getFromDb({
untilId,
sinceId,
limit: ps.limit,
includeMyRenotes: ps.includeMyRenotes,
includeRenotedMyNotes: ps.includeRenotedMyNotes,
includeLocalRenotes: ps.includeLocalRenotes,
withFiles: ps.withFiles,
withRenotes: ps.withRenotes,
}, me);
}
} else { } else {
if (serverSettings.enableFanoutTimelineDbFallback) { // fallback to db
return await this.getFromDb({ return await this.getFromDb({
untilId, untilId,
sinceId, sinceId,
@ -157,6 +158,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
withFiles: ps.withFiles, withFiles: ps.withFiles,
withRenotes: ps.withRenotes, withRenotes: ps.withRenotes,
}, me); }, me);
} else {
return [];
}
} }
}); });
} }

View File

@ -4,7 +4,8 @@
*/ */
import { Inject, Injectable } from '@nestjs/common'; import { Inject, Injectable } from '@nestjs/common';
import type { MiNote, NotesRepository, UserListMembershipsRepository, UserListsRepository } from '@/models/_.js'; import { Brackets } from 'typeorm';
import type { MiNote, MiUserList, NotesRepository, UserListMembershipsRepository, UserListsRepository } from '@/models/_.js';
import { Endpoint } from '@/server/api/endpoint-base.js'; import { Endpoint } from '@/server/api/endpoint-base.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import ActiveUsersChart from '@/core/chart/charts/active-users.js'; import ActiveUsersChart from '@/core/chart/charts/active-users.js';
@ -14,8 +15,9 @@ import { IdService } from '@/core/IdService.js';
import { isUserRelated } from '@/misc/is-user-related.js'; import { isUserRelated } from '@/misc/is-user-related.js';
import { FunoutTimelineService } from '@/core/FunoutTimelineService.js'; import { FunoutTimelineService } from '@/core/FunoutTimelineService.js';
import { QueryService } from '@/core/QueryService.js'; import { QueryService } from '@/core/QueryService.js';
import { MiLocalUser } from '@/models/User.js';
import { MetaService } from '@/core/MetaService.js';
import { ApiError } from '../../error.js'; import { ApiError } from '../../error.js';
import { Brackets } from 'typeorm';
export const meta = { export const meta = {
tags: ['notes', 'lists'], tags: ['notes', 'lists'],
@ -81,7 +83,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private idService: IdService, private idService: IdService,
private funoutTimelineService: FunoutTimelineService, private funoutTimelineService: FunoutTimelineService,
private queryService: QueryService, private queryService: QueryService,
private metaService: MetaService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null); const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
@ -96,6 +98,21 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw new ApiError(meta.errors.noSuchList); throw new ApiError(meta.errors.noSuchList);
} }
const serverSettings = await this.metaService.fetch();
if (!serverSettings.enableFanoutTimeline) {
return await this.getFromDb(list, {
untilId,
sinceId,
limit: ps.limit,
includeMyRenotes: ps.includeMyRenotes,
includeRenotedMyNotes: ps.includeRenotedMyNotes,
includeLocalRenotes: ps.includeLocalRenotes,
withFiles: ps.withFiles,
withRenotes: ps.withRenotes,
}, me);
}
const [ const [
userIdsWhoMeMuting, userIdsWhoMeMuting,
userIdsWhoMeMutingRenotes, userIdsWhoMeMutingRenotes,
@ -145,7 +162,35 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
if (redisTimeline.length > 0) { if (redisTimeline.length > 0) {
this.activeUsersChart.read(me); this.activeUsersChart.read(me);
return await this.noteEntityService.packMany(redisTimeline, me); return await this.noteEntityService.packMany(redisTimeline, me);
} else { // fallback to db } else {
if (serverSettings.enableFanoutTimelineDbFallback) { // fallback to db
return await this.getFromDb(list, {
untilId,
sinceId,
limit: ps.limit,
includeMyRenotes: ps.includeMyRenotes,
includeRenotedMyNotes: ps.includeRenotedMyNotes,
includeLocalRenotes: ps.includeLocalRenotes,
withFiles: ps.withFiles,
withRenotes: ps.withRenotes,
}, me);
} else {
return [];
}
}
});
}
private async getFromDb(list: MiUserList, ps: {
untilId: string | null,
sinceId: string | null,
limit: number,
includeMyRenotes: boolean,
includeRenotedMyNotes: boolean,
includeLocalRenotes: boolean,
withFiles: boolean,
withRenotes: boolean,
}, me: MiLocalUser) {
//#region Construct query //#region Construct query
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId)
.innerJoin(this.userListMembershipsRepository.metadata.targetName, 'userListMemberships', 'userListMemberships.userId = note.userId') .innerJoin(this.userListMembershipsRepository.metadata.targetName, 'userListMemberships', 'userListMemberships.userId = note.userId')
@ -232,6 +277,4 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
return await this.noteEntityService.packMany(timeline, me); return await this.noteEntityService.packMany(timeline, me);
} }
});
}
} }

View File

@ -52,7 +52,7 @@ class LocalTimelineChannel extends Channel {
if (note.user.host !== null) return; if (note.user.host !== null) return;
if (note.visibility !== 'public') return; if (note.visibility !== 'public') return;
if (note.channelId != null && !this.followingChannels.has(note.channelId)) return; if (note.channelId != null) return;
// 関係ない返信は除外 // 関係ない返信は除外
if (note.reply && this.user && !this.following[note.userId]?.withReplies && !this.withReplies) { if (note.reply && this.user && !this.following[note.userId]?.withReplies && !this.withReplies) {

View File

@ -94,6 +94,7 @@ describe('ActivityPub', () => {
cacheRemoteFiles: true, cacheRemoteFiles: true,
cacheRemoteSensitiveFiles: true, cacheRemoteSensitiveFiles: true,
enableFanoutTimeline: true, enableFanoutTimeline: true,
enableFanoutTimelineDbFallback: true,
perUserHomeTimelineCacheMax: 100, perUserHomeTimelineCacheMax: 100,
perLocalUserUserTimelineCacheMax: 100, perLocalUserUserTimelineCacheMax: 100,
perRemoteUserUserTimelineCacheMax: 100, perRemoteUserUserTimelineCacheMax: 100,

View File

@ -24,8 +24,8 @@
"@rollup/pluginutils": "5.0.5", "@rollup/pluginutils": "5.0.5",
"@syuilo/aiscript": "0.16.0", "@syuilo/aiscript": "0.16.0",
"@tabler/icons-webfont": "2.37.0", "@tabler/icons-webfont": "2.37.0",
"@vitejs/plugin-vue": "4.4.1", "@vitejs/plugin-vue": "4.5.0",
"@vue-macros/reactivity-transform": "0.3.23", "@vue-macros/reactivity-transform": "0.4.0",
"@vue/compiler-sfc": "3.3.8", "@vue/compiler-sfc": "3.3.8",
"astring": "1.8.6", "astring": "1.8.6",
"autosize": "6.0.1", "autosize": "6.0.1",
@ -57,7 +57,7 @@
"photoswipe": "5.4.2", "photoswipe": "5.4.2",
"punycode": "2.3.1", "punycode": "2.3.1",
"querystring": "0.2.1", "querystring": "0.2.1",
"rollup": "4.4.0", "rollup": "4.4.1",
"sanitize-html": "2.11.0", "sanitize-html": "2.11.0",
"shiki": "^0.14.5", "shiki": "^0.14.5",
"sass": "1.69.5", "sass": "1.69.5",
@ -101,7 +101,7 @@
"@types/estree": "1.0.5", "@types/estree": "1.0.5",
"@types/matter-js": "0.19.4", "@types/matter-js": "0.19.4",
"@types/micromatch": "4.0.5", "@types/micromatch": "4.0.5",
"@types/node": "20.9.0", "@types/node": "20.9.1",
"@types/punycode": "2.1.2", "@types/punycode": "2.1.2",
"@types/sanitize-html": "2.9.4", "@types/sanitize-html": "2.9.4",
"@types/throttle-debounce": "5.0.2", "@types/throttle-debounce": "5.0.2",
@ -115,7 +115,7 @@
"@vue/runtime-core": "3.3.8", "@vue/runtime-core": "3.3.8",
"acorn": "8.11.2", "acorn": "8.11.2",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"cypress": "13.5.0", "cypress": "13.5.1",
"eslint": "8.53.0", "eslint": "8.53.0",
"eslint-plugin-import": "2.29.0", "eslint-plugin-import": "2.29.0",
"eslint-plugin-vue": "9.18.1", "eslint-plugin-vue": "9.18.1",
@ -128,7 +128,7 @@
"prettier": "3.1.0", "prettier": "3.1.0",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"start-server-and-test": "2.0.2", "start-server-and-test": "2.0.3",
"storybook": "7.5.3", "storybook": "7.5.3",
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme", "storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
"summaly": "github:misskey-dev/summaly", "summaly": "github:misskey-dev/summaly",

View File

@ -45,12 +45,12 @@ import contains from '@/scripts/contains.js';
import { char2twemojiFilePath, char2fluentEmojiFilePath } from '@/scripts/emoji-base.js'; import { char2twemojiFilePath, char2fluentEmojiFilePath } from '@/scripts/emoji-base.js';
import { acct } from '@/filters/user.js'; import { acct } from '@/filters/user.js';
import * as os from '@/os.js'; import * as os from '@/os.js';
import { MFM_TAGS } from '@/scripts/mfm-tags.js';
import { defaultStore } from '@/store.js'; import { defaultStore } from '@/store.js';
import { emojilist, getEmojiName } from '@/scripts/emojilist.js'; import { emojilist, getEmojiName } from '@/scripts/emojilist.js';
import { i18n } from '@/i18n.js'; import { i18n } from '@/i18n.js';
import { miLocalStorage } from '@/local-storage.js'; import { miLocalStorage } from '@/local-storage.js';
import { customEmojis } from '@/custom-emojis.js'; import { customEmojis } from '@/custom-emojis.js';
import { MFM_TAGS } from '@/const.js';
type EmojiDef = { type EmojiDef = {
emoji: string; emoji: string;

View File

@ -7,6 +7,7 @@ import { VNode, h } from 'vue';
import * as mfm from 'mfm-js'; import * as mfm from 'mfm-js';
import * as Misskey from 'misskey-js'; import * as Misskey from 'misskey-js';
import MkUrl from '@/components/global/MkUrl.vue'; import MkUrl from '@/components/global/MkUrl.vue';
import MkTime from '@/components/global/MkTime.vue';
import MkLink from '@/components/MkLink.vue'; import MkLink from '@/components/MkLink.vue';
import MkMention from '@/components/MkMention.vue'; import MkMention from '@/components/MkMention.vue';
import MkEmoji from '@/components/global/MkEmoji.vue'; import MkEmoji from '@/components/global/MkEmoji.vue';
@ -238,6 +239,34 @@ export default function(props: MfmProps) {
style = `background-color: #${color};`; style = `background-color: #${color};`;
break; break;
} }
case 'ruby': {
if (token.children.length === 1) {
const child = token.children[0];
const text = child.type === 'text' ? child.props.text : '';
return h('ruby', {}, [text.split(' ')[0], h('rt', text.split(' ')[1])]);
} else {
const rt = token.children.at(-1)!;
const text = rt.type === 'text' ? rt.props.text : '';
return h('ruby', {}, [...genEl(token.children.slice(0, token.children.length - 1), scale), h('rt', text.trim())]);
}
}
case 'unixtime': {
const child = token.children[0];
const unixtime = parseInt(child.type === 'text' ? child.props.text : '');
return h('span', {
style: 'display: inline-block; font-size: 90%; border: solid 1px var(--divider); border-radius: 999px; padding: 4px 10px 4px 6px;',
}, [
h('i', {
class: 'ti ti-clock',
style: 'margin-right: 0.25em;',
}),
h(MkTime, {
key: Math.random(),
time: unixtime * 1000,
mode: 'detail',
}),
]);
}
} }
if (style == null) { if (style == null) {
return h('span', {}, ['$[', token.props.name, ' ', ...genEl(token.children, scale), ']']); return h('span', {}, ['$[', token.props.name, ' ', ...genEl(token.children, scale), ']']);

View File

@ -49,8 +49,15 @@ 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 :
i18n.ts._ago.future); 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() }) :
i18n.t('_timeIn.seconds', { n: (~~(-ago % 60)).toString() })
);
}); });
let tickId: number; let tickId: number;

View File

@ -93,3 +93,5 @@ export const CURRENT_STICKY_BOTTOM = 'CURRENT_STICKY_BOTTOM';
export const DEFAULT_SERVER_ERROR_IMAGE_URL = 'https://xn--931a.moe/assets/error.jpg'; export const DEFAULT_SERVER_ERROR_IMAGE_URL = 'https://xn--931a.moe/assets/error.jpg';
export const DEFAULT_NOT_FOUND_IMAGE_URL = 'https://xn--931a.moe/assets/not-found.jpg'; export const DEFAULT_NOT_FOUND_IMAGE_URL = 'https://xn--931a.moe/assets/not-found.jpg';
export const DEFAULT_INFO_IMAGE_URL = 'https://xn--931a.moe/assets/info.jpg'; export const DEFAULT_INFO_IMAGE_URL = 'https://xn--931a.moe/assets/info.jpg';
export const MFM_TAGS = ['tada', 'jelly', 'twitch', 'shake', 'spin', 'jump', 'bounce', 'flip', 'x2', 'x3', 'x4', 'scale', 'position', 'fg', 'bg', 'font', 'blur', 'rainbow', 'sparkle', 'rotate', 'ruby', 'unixtime'];

View File

@ -38,6 +38,7 @@ import { } from 'vue';
import XHeader from './_header_.vue'; import XHeader from './_header_.vue';
import MkInput from '@/components/MkInput.vue'; import MkInput from '@/components/MkInput.vue';
import MkButton from '@/components/MkButton.vue'; import MkButton from '@/components/MkButton.vue';
import MkSwitch from '@/components/MkSwitch.vue';
import FormSuspense from '@/components/form/suspense.vue'; import FormSuspense from '@/components/form/suspense.vue';
import FormSection from '@/components/form/section.vue'; import FormSection from '@/components/form/section.vue';
import * as os from '@/os.js'; import * as os from '@/os.js';

View File

@ -95,6 +95,11 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #caption>{{ i18n.ts._serverSettings.fanoutTimelineDescription }}</template> <template #caption>{{ i18n.ts._serverSettings.fanoutTimelineDescription }}</template>
</MkSwitch> </MkSwitch>
<MkSwitch v-model="enableFanoutTimelineDbFallback">
<template #label>{{ i18n.ts._serverSettings.fanoutTimelineDbFallback }}</template>
<template #caption>{{ i18n.ts._serverSettings.fanoutTimelineDbFallbackDescription }}</template>
</MkSwitch>
<MkInput v-model="perLocalUserUserTimelineCacheMax" type="number"> <MkInput v-model="perLocalUserUserTimelineCacheMax" type="number">
<template #label>perLocalUserUserTimelineCacheMax</template> <template #label>perLocalUserUserTimelineCacheMax</template>
</MkInput> </MkInput>
@ -171,6 +176,7 @@ let enableServiceWorker: boolean = $ref(false);
let swPublicKey: any = $ref(null); let swPublicKey: any = $ref(null);
let swPrivateKey: any = $ref(null); let swPrivateKey: any = $ref(null);
let enableFanoutTimeline: boolean = $ref(false); let enableFanoutTimeline: boolean = $ref(false);
let enableFanoutTimelineDbFallback: boolean = $ref(false);
let perLocalUserUserTimelineCacheMax: number = $ref(0); let perLocalUserUserTimelineCacheMax: number = $ref(0);
let perRemoteUserUserTimelineCacheMax: number = $ref(0); let perRemoteUserUserTimelineCacheMax: number = $ref(0);
let perUserHomeTimelineCacheMax: number = $ref(0); let perUserHomeTimelineCacheMax: number = $ref(0);
@ -192,6 +198,7 @@ async function init(): Promise<void> {
swPublicKey = meta.swPublickey; swPublicKey = meta.swPublickey;
swPrivateKey = meta.swPrivateKey; swPrivateKey = meta.swPrivateKey;
enableFanoutTimeline = meta.enableFanoutTimeline; enableFanoutTimeline = meta.enableFanoutTimeline;
enableFanoutTimelineDbFallback = meta.enableFanoutTimelineDbFallback;
perLocalUserUserTimelineCacheMax = meta.perLocalUserUserTimelineCacheMax; perLocalUserUserTimelineCacheMax = meta.perLocalUserUserTimelineCacheMax;
perRemoteUserUserTimelineCacheMax = meta.perRemoteUserUserTimelineCacheMax; perRemoteUserUserTimelineCacheMax = meta.perRemoteUserUserTimelineCacheMax;
perUserHomeTimelineCacheMax = meta.perUserHomeTimelineCacheMax; perUserHomeTimelineCacheMax = meta.perUserHomeTimelineCacheMax;
@ -214,6 +221,7 @@ async function save(): void {
swPublicKey, swPublicKey,
swPrivateKey, swPrivateKey,
enableFanoutTimeline, enableFanoutTimeline,
enableFanoutTimelineDbFallback,
perLocalUserUserTimelineCacheMax, perLocalUserUserTimelineCacheMax,
perRemoteUserUserTimelineCacheMax, perRemoteUserUserTimelineCacheMax,
perUserHomeTimelineCacheMax, perUserHomeTimelineCacheMax,

View File

@ -18,16 +18,16 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkSpacer v-else-if="tab === 'users'" :contentMax="1200"> <MkSpacer v-else-if="tab === 'users'" :contentMax="1200">
<div class="_gaps_s"> <div class="_gaps_s">
<div v-if="role">{{ role.description }}</div> <div v-if="role">{{ role.description }}</div>
<MkUserList v-if="visiable" :pagination="users" :extractor="(item) => item.user"/> <MkUserList v-if="visible" :pagination="users" :extractor="(item) => item.user"/>
<div v-else-if="!visiable" class="_fullinfo"> <div v-else-if="!visible" class="_fullinfo">
<img :src="infoImageUrl" class="_ghost"/> <img :src="infoImageUrl" class="_ghost"/>
<div>{{ i18n.ts.nothing }}</div> <div>{{ i18n.ts.nothing }}</div>
</div> </div>
</div> </div>
</MkSpacer> </MkSpacer>
<MkSpacer v-else-if="tab === 'timeline'" :contentMax="700"> <MkSpacer v-else-if="tab === 'timeline'" :contentMax="700">
<MkTimeline v-if="visiable" ref="timeline" src="role" :role="props.role"/> <MkTimeline v-if="visible" ref="timeline" src="role" :role="props.role"/>
<div v-else-if="!visiable" class="_fullinfo"> <div v-else-if="!visible" class="_fullinfo">
<img :src="infoImageUrl" class="_ghost"/> <img :src="infoImageUrl" class="_ghost"/>
<div>{{ i18n.ts.nothing }}</div> <div>{{ i18n.ts.nothing }}</div>
</div> </div>
@ -55,7 +55,7 @@ const props = withDefaults(defineProps<{
let tab = $ref(props.initialTab); let tab = $ref(props.initialTab);
let role = $ref(); let role = $ref();
let error = $ref(); let error = $ref();
let visiable = $ref(false); let visible = $ref(false);
watch(() => props.role, () => { watch(() => props.role, () => {
os.api('roles/show', { os.api('roles/show', {
@ -63,7 +63,7 @@ watch(() => props.role, () => {
}).then(res => { }).then(res => {
role = res; role = res;
document.title = `${role?.name} | ${instanceName}`; document.title = `${role?.name} | ${instanceName}`;
visiable = res.isExplorable && res.isPublic; visible = res.isExplorable && res.isPublic;
}).catch((err) => { }).catch((err) => {
if (err.code === 'NO_SUCH_ROLE') { if (err.code === 'NO_SUCH_ROLE') {
error = i18n.ts.noRole; error = i18n.ts.noRole;

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);

View File

@ -1,6 +0,0 @@
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export const MFM_TAGS = ['tada', 'jelly', 'twitch', 'shake', 'spin', 'jump', 'bounce', 'flip', 'x2', 'x3', 'x4', 'scale', 'position', 'fg', 'bg', 'font', 'blur', 'rainbow', 'sparkle', 'rotate'];

View File

@ -23,7 +23,7 @@
"@microsoft/api-extractor": "7.38.3", "@microsoft/api-extractor": "7.38.3",
"@swc/jest": "0.2.29", "@swc/jest": "0.2.29",
"@types/jest": "29.5.8", "@types/jest": "29.5.8",
"@types/node": "20.9.0", "@types/node": "20.9.1",
"@typescript-eslint/eslint-plugin": "6.11.0", "@typescript-eslint/eslint-plugin": "6.11.0",
"@typescript-eslint/parser": "6.11.0", "@typescript-eslint/parser": "6.11.0",
"eslint": "8.53.0", "eslint": "8.53.0",
@ -38,7 +38,7 @@
"built" "built"
], ],
"dependencies": { "dependencies": {
"@swc/cli": "0.1.62", "@swc/cli": "0.1.63",
"@swc/core": "1.3.96", "@swc/core": "1.3.96",
"eventemitter3": "5.0.1", "eventemitter3": "5.0.1",
"reconnecting-websocket": "4.4.0" "reconnecting-websocket": "4.4.0"

File diff suppressed because it is too large Load Diff