+
{{ i18n.ts.instance }}
@@ -20,7 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.host }}
-
@@ -105,9 +108,14 @@ const $i = signinRequired();
const reportError = computed(defaultStore.makeGetterSetter('reportError'));
const enableCondensedLine = computed(defaultStore.makeGetterSetter('enableCondensedLine'));
+const skipNoteRender = computed(defaultStore.makeGetterSetter('skipNoteRender'));
const devMode = computed(defaultStore.makeGetterSetter('devMode'));
const defaultWithReplies = computed(defaultStore.makeGetterSetter('defaultWithReplies'));
+watch(skipNoteRender, async () => {
+ await reloadAsk({ reason: i18n.ts.reloadToApplySetting, unison: true });
+});
+
async function deleteAccount() {
{
const { canceled } = await os.confirm({
diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts
index cb52938980..4f641e7513 100644
--- a/packages/frontend/src/store.ts
+++ b/packages/frontend/src/store.ts
@@ -468,6 +468,10 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'device',
default: 'app' as 'app' | 'appWithShift' | 'native',
},
+ skipNoteRender: {
+ where: 'device',
+ default: false,
+ },
sound_masterVolume: {
where: 'device',
From 521d92014db757192b09d62f627f5f1b3ae7c5f5 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Mon, 14 Oct 2024 11:22:51 +0900
Subject: [PATCH 052/147] New Crowdin updates (#14753)
* New translations ja-jp.yml (Chinese Traditional)
* New translations ja-jp.yml (Chinese Traditional)
* New translations ja-jp.yml (Chinese Traditional)
* New translations ja-jp.yml (Korean)
* New translations ja-jp.yml (Chinese Simplified)
* New translations ja-jp.yml (Catalan)
* New translations ja-jp.yml (Chinese Simplified)
* New translations ja-jp.yml (Chinese Traditional)
* New translations ja-jp.yml (Korean)
* New translations ja-jp.yml (Chinese Traditional)
* New translations ja-jp.yml (Chinese Simplified)
* New translations ja-jp.yml (Italian)
* New translations ja-jp.yml (Italian)
---
locales/ca-ES.yml | 2 ++
locales/it-IT.yml | 32 ++++++++++++++++++++++++++------
locales/ko-KR.yml | 9 +++++++++
locales/zh-CN.yml | 11 ++++++++++-
locales/zh-TW.yml | 38 +++++++++++++++++++++++++++++---------
5 files changed, 76 insertions(+), 16 deletions(-)
diff --git a/locales/ca-ES.yml b/locales/ca-ES.yml
index 7b668e5ce9..b9f3fecc76 100644
--- a/locales/ca-ES.yml
+++ b/locales/ca-ES.yml
@@ -1286,6 +1286,7 @@ passkeyVerificationFailed: "La verificació a fallat"
passkeyVerificationSucceededButPasswordlessLoginDisabled: "La verificació de la passkey a estat correcta, però s'ha deshabilitat l'inici de sessió sense contrasenya."
messageToFollower: "Missatge als meus seguidors"
target: "Assumpte "
+testCaptchaWarning: "És una característica dissenyada per a la prova de CAPTCHA.
No l'utilitzes en l'entorn real."
_abuseUserReport:
forward: "Reenviar "
forwardDescription: "Reenvia l'informe a una altra instància com un compte del sistema anònima."
@@ -1430,6 +1431,7 @@ _serverSettings:
reactionsBufferingDescription: "Quan s'activa aquesta opció millora bastant el rendiment en recuperar les línies de temps reduint la càrrega de la base. Com a contrapunt, augmentarà l'ús de memòria de Redís. Desactiva aquesta opció en cas de tenir un servidor amb poca memòria o si tens problemes d'inestabilitat."
inquiryUrl: "URL de consulta "
inquiryUrlDescription: "Escriu adreça URL per al formulari de consulta per al mantenidor del servidor o una pàgina web amb el contacte d'informació."
+ thisSettingWillAutomaticallyOffWhenModeratorsInactive: "Si no es detecta activitat per part del moderador durant un període de temps, aquesta opció es desactiva automàticament per evitar el correu brossa."
_accountMigration:
moveFrom: "Migrar un altre compte a aquest"
moveFromSub: "Crear un àlies per un altre compte"
diff --git a/locales/it-IT.yml b/locales/it-IT.yml
index d42fff326c..bcabf1bdb6 100644
--- a/locales/it-IT.yml
+++ b/locales/it-IT.yml
@@ -454,6 +454,7 @@ totpDescription: "Puoi autenticarti inserendo un codice OTP tramite la tua App d
moderator: "Moderatore"
moderation: "moderazione"
moderationNote: "Promemoria di moderazione"
+moderationNoteDescription: "Puoi scrivere promemoria condivisi solo tra moderatori."
addModerationNote: "Aggiungi promemoria di moderazione"
moderationLogs: "Cronologia di moderazione"
nUsersMentioned: "{n} profili ne parlano"
@@ -841,7 +842,7 @@ onlineStatus: "Stato di connessione"
hideOnlineStatus: "Modalità invisibile"
hideOnlineStatusDescription: "Attivando questa opzione potresti ridurre l'usabilità di alcune funzioni, come la ricerca."
online: "Online"
-active: "Attività"
+active: "Attivo"
offline: "Offline"
notRecommended: "Sconsigliato"
botProtection: "Protezione contro i bot"
@@ -1086,6 +1087,7 @@ retryAllQueuesConfirmTitle: "Vuoi ritentare adesso?"
retryAllQueuesConfirmText: "Potrebbe sovraccaricare il server temporaneamente."
enableChartsForRemoteUser: "Abilita i grafici per i profili remoti"
enableChartsForFederatedInstances: "Abilita i grafici per le istanze federate"
+enableStatsForFederatedInstances: "Informazioni statistiche sui server federati"
showClipButtonInNoteFooter: "Aggiungi il bottone Clip tra le azioni delle Note"
reactionsDisplaySize: "Grandezza delle reazioni"
limitWidthOfReaction: "Limita la larghezza delle reazioni e ridimensionale"
@@ -1285,6 +1287,19 @@ unknownWebAuthnKey: "Questa è una passkey sconosciuta."
passkeyVerificationFailed: "La verifica della passkey non è riuscita."
passkeyVerificationSucceededButPasswordlessLoginDisabled: "La verifica della passkey è riuscita, ma l'accesso senza password è disabilitato."
messageToFollower: "Messaggio ai follower"
+target: "Riferimento"
+testCaptchaWarning: "Questa funzione è destinata al test CAPTCHA.
Da non utilizzare in ambiente di produzione."
+prohibitedWordsForNameOfUser: "Parole proibite (nome utente)"
+prohibitedWordsForNameOfUserDescription: "Il sistema rifiuta di rinominare un utente, se il nome contiene qualsiasi parola nell'elenco. Sono esenti i profili con privilegi di moderazione."
+yourNameContainsProhibitedWords: "Il nome che hai scelto contiene una o più parole vietate"
+yourNameContainsProhibitedWordsDescription: "Se desideri comunque utilizzare questo nome, contatta l''amministrazione."
+_abuseUserReport:
+ forward: "Inoltra"
+ forwardDescription: "Inoltra il report al server remoto, per mezzo di account di sistema, anonimo."
+ resolve: "Risolvi"
+ accept: "Approva"
+ reject: "Rifiuta"
+ resolveTutorial: "Se moderi una segnalazione legittima, scegli \"Approva\" per risolvere positivamente.\nSe la segnalazione non è legittima, seleziona \"Rifiuta\" per risolvere negativamente."
_delivery:
status: "Stato della consegna"
stop: "Sospensione"
@@ -1312,16 +1327,16 @@ _bubbleGame:
_announcement:
forExistingUsers: "Solo ai profili attuali"
forExistingUsersDescription: "L'annuncio sarà visibile solo ai profili esistenti in questo momento. Se disabilitato, sarà visibile anche ai profili che verranno creati dopo la pubblicazione di questo annuncio."
- needConfirmationToRead: "Richiede la conferma di lettura"
- needConfirmationToReadDescription: "Sarà visualizzata una finestra di dialogo che richiede la conferma di lettura. Inoltre, non è soggetto a conferme di lettura massicce."
+ needConfirmationToRead: "Conferma di lettura obbligatoria"
+ needConfirmationToReadDescription: "I profili riceveranno una finestra di dialogo che richiede di accettare obbligatoriamente per procedere. Tale richiesta è esente da \"conferma tutte\"."
end: "Archivia l'annuncio"
tooManyActiveAnnouncementDescription: "L'esperienza delle persone può peggiorare se ci sono troppi annunci attivi. Considera anche l'archiviazione degli annunci conclusi."
readConfirmTitle: "Segnare come già letto?"
readConfirmText: "Hai già letto \"{title}˝?"
shouldNotBeUsedToPresentPermanentInfo: "Ti consigliamo di utilizzare gli annunci per pubblicare informazioni tempestive e limitate nel tempo, anziché informazioni importanti a lungo andare nel tempo, poiché potrebbero risultare difficili da ritrovare e peggiorare la fruibilità del servizio, specialmente alle nuove persone iscritte."
dialogAnnouncementUxWarn: "Ti consigliamo di usarli con cautela, poiché è molto probabile che avere più di un annuncio in stile \"finestra di dialogo\" peggiori sensibilmente la fruibilità del servizio, specialmente alle nuove persone iscritte."
- silence: "Silenziare gli annunci"
- silenceDescription: "Se attivi questa opzione, non riceverai notifiche sugli annunci, evitando di contrassegnarle come già lette."
+ silence: "Annuncio silenzioso"
+ silenceDescription: "Attivando questa opzione, non invierai la notifica, evitando che debba essere contrassegnata come già letta."
_initialAccountSetting:
accountCreated: "Il tuo profilo è stato creato!"
letsStartAccountSetup: "Per iniziare, impostiamo il tuo profilo."
@@ -1422,6 +1437,7 @@ _serverSettings:
reactionsBufferingDescription: "Attivando questa opzione, puoi migliorare significativamente le prestazioni durante la creazione delle reazioni e ridurre il carico sul database. Tuttavia, aumenterà l'impiego di memoria Redis."
inquiryUrl: "URL di contatto"
inquiryUrlDescription: "Specificare l'URL al modulo di contatto, oppure le informazioni con i dati di contatto dell'amministrazione."
+ thisSettingWillAutomaticallyOffWhenModeratorsInactive: "Per prevenire SPAM, questa impostazione verrà disattivata automaticamente, se non si rileva alcuna attività di moderazione durante un certo periodo di tempo."
_accountMigration:
moveFrom: "Migra un altro profilo dentro a questo"
moveFromSub: "Crea un alias verso un altro profilo remoto"
@@ -2187,7 +2203,7 @@ _widgets:
_userList:
chooseList: "Seleziona una lista"
clicker: "Cliccaggio"
- birthdayFollowings: "Chi nacque oggi"
+ birthdayFollowings: "Compleanni del giorno"
_cw:
hide: "Nascondere"
show: "Continua la lettura..."
@@ -2476,6 +2492,8 @@ _webhookSettings:
abuseReport: "Quando arriva una segnalazione"
abuseReportResolved: "Quando una segnalazione è risolta"
userCreated: "Quando viene creato un profilo"
+ inactiveModeratorsWarning: "Quando un profilo moderatore rimane inattivo per un determinato periodo"
+ inactiveModeratorsInvitationOnlyChanged: "Quando la moderazione è rimasta inattiva per un determinato periodo e il sistema è cambiato in modalità \"solo inviti\""
deleteConfirm: "Vuoi davvero eliminare il Webhook?"
testRemarks: "Clicca il bottone a destra dell'interruttore, per provare l'invio di un webhook con dati fittizi."
_abuseReport:
@@ -2521,6 +2539,8 @@ _moderationLogTypes:
markSensitiveDriveFile: "File nel Drive segnato come esplicito"
unmarkSensitiveDriveFile: "File nel Drive segnato come non esplicito"
resolveAbuseReport: "Segnalazione risolta"
+ forwardAbuseReport: "Segnalazione inoltrata"
+ updateAbuseReportNote: "Ha aggiornato la segnalazione"
createInvitation: "Genera codice di invito"
createAd: "Banner creato"
deleteAd: "Banner eliminato"
diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml
index 973140dca2..414202adab 100644
--- a/locales/ko-KR.yml
+++ b/locales/ko-KR.yml
@@ -1087,6 +1087,7 @@ retryAllQueuesConfirmTitle: "지금 다시 시도하시겠습니까?"
retryAllQueuesConfirmText: "일시적으로 서버의 부하가 증가할 수 있습니다."
enableChartsForRemoteUser: "리모트 유저의 차트를 생성"
enableChartsForFederatedInstances: "리모트 서버의 차트를 생성"
+enableStatsForFederatedInstances: "리모트 서버 정보 받아오기"
showClipButtonInNoteFooter: "노트 동작에 클립을 추가"
reactionsDisplaySize: "리액션 표시 크기"
limitWidthOfReaction: "리액션의 최대 폭을 제한하고 작게 표시하기"
@@ -1287,6 +1288,11 @@ passkeyVerificationFailed: "패스키 검증을 실패했습니다."
passkeyVerificationSucceededButPasswordlessLoginDisabled: "패스키를 검증했으나, 비밀번호 없이 로그인하기가 꺼져 있습니다."
messageToFollower: "팔로워에 보낼 메시지"
target: "대상"
+testCaptchaWarning: "CAPTCHA를 테스트하기 위한 기능입니다.
실제 환경에서는 사용하지 마세요."
+prohibitedWordsForNameOfUser: "금지 단어 (사용자 이름)"
+prohibitedWordsForNameOfUserDescription: "이 목록에 포함되는 키워드가 사용자 이름에 있는 경우, 일반 사용자는 이름을 바꿀 수 없습니다. 모더레이터 권한을 가진 사용자는 제한 대상에서 제외됩니다."
+yourNameContainsProhibitedWords: "바꾸려는 이름에 금지된 키워드가 포함되어 있습니다."
+yourNameContainsProhibitedWordsDescription: "이름에 금지된 키워드가 있습니다. 이름을 사용해야 하는 경우, 서버 관리자에 문의하세요."
_abuseUserReport:
forward: "전달"
forwardDescription: "익명 시스템 계정을 사용하여 리모트 서버에 신고 내용을 전달할 수 있습니다."
@@ -1431,6 +1437,7 @@ _serverSettings:
reactionsBufferingDescription: "활성화 한 경우, 리액션 작성 퍼포먼스가 대폭 향상되어 DB의 부하를 줄일 수 있으나, Redis의 메모리 사용량이 많아집니다."
inquiryUrl: "문의처 URL"
inquiryUrlDescription: "서버 운영자에게 보내는 문의 양식의 URL이나 운영자의 연락처 등이 적힌 웹 페이지의 URL을 설정합니다."
+ thisSettingWillAutomaticallyOffWhenModeratorsInactive: "일정 기간동안 모더레이터의 활동이 감지되지 않는 경우, 스팸 방지를 위해 이 설정은 자동으로 꺼집니다."
_accountMigration:
moveFrom: "다른 계정에서 이 계정으로 이사"
moveFromSub: "다른 계정에 대한 별칭을 생성"
@@ -2485,6 +2492,8 @@ _webhookSettings:
abuseReport: "유저롭"
abuseReportResolved: "받은 신고를 처리했을 때"
userCreated: "유저가 생성되었을 때"
+ inactiveModeratorsWarning: "모더레이터가 일정 기간동안 활동하지 않은 경우"
+ inactiveModeratorsInvitationOnlyChanged: "모더레이터가 일정 기간 활동하지 않아 시스템에 의해 초대제로 바뀐 경우"
deleteConfirm: "Webhook을 삭제할까요?"
testRemarks: "스위치 오른쪽에 있는 버튼을 클릭하여 더미 데이터를 사용한 테스트용 웹 훅을 보낼 수 있습니다."
_abuseReport:
diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml
index 8b681efb13..b81018cc1f 100644
--- a/locales/zh-CN.yml
+++ b/locales/zh-CN.yml
@@ -1087,6 +1087,7 @@ retryAllQueuesConfirmTitle: "要再尝试一次吗?"
retryAllQueuesConfirmText: "可能会使服务器负荷在一定时间内增加"
enableChartsForRemoteUser: "生成远程用户的图表"
enableChartsForFederatedInstances: "生成远程服务器的图表"
+enableStatsForFederatedInstances: "获取远程服务器的信息"
showClipButtonInNoteFooter: "在贴文下方显示便签按钮"
reactionsDisplaySize: "回应显示大小"
limitWidthOfReaction: "限制回应的最大宽度,并将其缩小显示"
@@ -1287,6 +1288,11 @@ passkeyVerificationFailed: "验证通行密钥失败。"
passkeyVerificationSucceededButPasswordlessLoginDisabled: "通行密钥验证成功,但账户未开启无密码登录。"
messageToFollower: "给关注者的消息"
target: "对象"
+testCaptchaWarning: "此功能为测试 CAPTCHA 用。
请勿在正式环境中使用。"
+prohibitedWordsForNameOfUser: "用户名中禁止的词"
+prohibitedWordsForNameOfUserDescription: "更改用户名时,如果用户名中包含此列表里的词汇,用户的改名请求将被拒绝。持有管理员权限的用户不受此限制。"
+yourNameContainsProhibitedWords: "目标用户名包含违禁词"
+yourNameContainsProhibitedWordsDescription: "用户名内含有违禁词。若想使用此用户名,请联系服务器管理员。"
_abuseUserReport:
forward: "转发"
forwardDescription: "目标是匿名系统账户,将把举报转发给远程服务器。"
@@ -1431,6 +1437,7 @@ _serverSettings:
reactionsBufferingDescription: "开启时可显著提高发送回应时的性能,及减轻数据库负荷。但 Redis 的内存用量会相应增加。"
inquiryUrl: "联络地址"
inquiryUrlDescription: "用来指定诸如向服务运营商咨询的论坛地址,或记载了运营商联系方式之类的网页地址。"
+ thisSettingWillAutomaticallyOffWhenModeratorsInactive: "若在一段时间内没有检测到管理活动,为防止垃圾信息,此设定将自动关闭。"
_accountMigration:
moveFrom: "从别的账号迁移到此账户"
moveFromSub: "为另一个账户建立别名"
@@ -2262,7 +2269,7 @@ _profile:
avatarDecorationMax: "最多可添加 {max} 个挂件"
followedMessage: "被关注时显示的消息"
followedMessageDescription: "可以设置被关注时向对方显示的短消息。"
- followedMessageDescriptionForLockedAccount: "需要批准才能关注的情况下,消息是在被请求被批准后显示。"
+ followedMessageDescriptionForLockedAccount: "需要批准才能关注的情况下,消息是在请求被批准后显示。"
_exportOrImport:
allNotes: "所有帖子"
favoritedNotes: "收藏的帖子"
@@ -2485,6 +2492,8 @@ _webhookSettings:
abuseReport: "当收到举报时"
abuseReportResolved: "当举报被处理时"
userCreated: "当用户被创建时"
+ inactiveModeratorsWarning: "当管理员在一段时间内不活跃时"
+ inactiveModeratorsInvitationOnlyChanged: "当因为管理员在一段时间内不活跃,导致服务器变为邀请制时"
deleteConfirm: "要删除 webhook 吗?"
testRemarks: "点击开关右侧的按钮,可以发送使用假数据的测试 Webhook。"
_abuseReport:
diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml
index 55b504e8fb..de18342bbf 100644
--- a/locales/zh-TW.yml
+++ b/locales/zh-TW.yml
@@ -454,6 +454,7 @@ totpDescription: "以驗證應用程式輸入一次性密碼"
moderator: "審查員"
moderation: "審查"
moderationNote: "管理筆記"
+moderationNoteDescription: "您可以編寫僅在審查員之間共用的註解。"
addModerationNote: "新增管理筆記"
moderationLogs: "管理日誌"
nUsersMentioned: "被 {n} 個人提及"
@@ -519,7 +520,7 @@ menuStyle: "選單風格"
style: "風格"
drawer: "側邊欄"
popup: "彈出式視窗"
-showNoteActionsOnlyHover: "僅在游標停留時顯示貼文的操作選項"
+showNoteActionsOnlyHover: "僅在游標停留時顯示貼文的"
showReactionsCount: "顯示貼文的反應數目"
noHistory: "沒有歷史紀錄"
signinHistory: "登入歷史"
@@ -1018,7 +1019,7 @@ show: "檢視"
neverShow: "不再顯示"
remindMeLater: "以後再說"
didYouLikeMisskey: "您喜歡 Misskey 嗎?"
-pleaseDonate: "Misskey 是由 {host} 使用的免費軟體。請贊助我們,讓開發得以持續!"
+pleaseDonate: "Misskey是由{host}使用的免費軟體。請贊助我們,讓開發的工作能夠持續!"
correspondingSourceIsAvailable: "對應的原始碼可以在 {anchor} 處找到。"
roles: "角色"
role: "角色"
@@ -1086,6 +1087,7 @@ retryAllQueuesConfirmTitle: "要現在重試嗎?"
retryAllQueuesConfirmText: "伺服器的負荷可能會暫時增加。"
enableChartsForRemoteUser: "生成遠端使用者的圖表"
enableChartsForFederatedInstances: "生成遠端伺服器的圖表"
+enableStatsForFederatedInstances: "取得遠端伺服器資訊"
showClipButtonInNoteFooter: "新增摘錄按鈕至貼文"
reactionsDisplaySize: "反應的顯示尺寸"
limitWidthOfReaction: "限制反應的最大寬度,並縮小顯示尺寸。"
@@ -1194,7 +1196,7 @@ showRenotes: "顯示其他人的轉發貼文"
edited: "已編輯"
notificationRecieveConfig: "接受通知的設定"
mutualFollow: "互相追隨"
-followingOrFollower: "追隨中或追隨者"
+followingOrFollower: "追隨中或者追隨者"
fileAttachedOnly: "只顯示包含附件的貼文"
showRepliesToOthersInTimeline: "顯示給其他人的回覆"
hideRepliesToOthersInTimeline: "在時間軸上隱藏給其他人的回覆"
@@ -1265,7 +1267,7 @@ useNativeUIForVideoAudioPlayer: "使用瀏覽器的 UI 播放影片與音訊"
keepOriginalFilename: "保留原始檔名"
keepOriginalFilenameDescription: "如果關閉此設置,上傳時檔案名稱會自動替換為隨機字串。"
noDescription: "沒有說明文字"
-alwaysConfirmFollow: "點擊追隨時總是顯示確認訊息"
+alwaysConfirmFollow: "跟隨時總是確認"
inquiry: "聯絡我們"
tryAgain: "請再試一次。"
confirmWhenRevealingSensitiveMedia: "要顯示敏感媒體時需確認"
@@ -1285,6 +1287,19 @@ unknownWebAuthnKey: "未註冊的金鑰。"
passkeyVerificationFailed: "驗證金鑰失敗。"
passkeyVerificationSucceededButPasswordlessLoginDisabled: "雖然驗證金鑰成功,但是無密碼登入的方式是停用的。"
messageToFollower: "給追隨者的訊息"
+target: "目標 "
+testCaptchaWarning: "此功能用於 CAPTCHA 的測試。
請勿在正式環境中使用。"
+prohibitedWordsForNameOfUser: "禁止使用的字詞(使用者名稱)"
+prohibitedWordsForNameOfUserDescription: "如果使用者名稱包含此清單中的任何字串,則拒絕重新命名使用者。 具有審查員權限的使用者不受此限制的影響。"
+yourNameContainsProhibitedWords: "您嘗試更改的名稱包含禁止的字串"
+yourNameContainsProhibitedWordsDescription: "名稱中包含禁止使用的字串。 如果您想使用此名稱,請聯絡您的伺服器管理員。"
+_abuseUserReport:
+ forward: "轉發"
+ forwardDescription: "以匿名系統帳戶將檢舉轉發至遠端伺服器。"
+ resolve: "解決"
+ accept: "接受"
+ reject: "拒絕"
+ resolveTutorial: "如果您已回覆正當的檢舉,請選擇「接受」以將案件標記為已解決。\n 如果檢舉的內容不正當,請選擇「拒絕」將案件標記為已解決。"
_delivery:
status: "傳送狀態"
stop: "停止發送"
@@ -1422,6 +1437,7 @@ _serverSettings:
reactionsBufferingDescription: "啟用時,可以顯著提高建立反應時的效能並減少資料庫的負載。 但是,Redis 記憶體使用量會增加。"
inquiryUrl: "聯絡表單網址"
inquiryUrlDescription: "指定伺服器運營者的聯絡表單網址,或包含運營者聯絡資訊網頁的網址。"
+ thisSettingWillAutomaticallyOffWhenModeratorsInactive: "為了防止 spam,如果一段期間內沒有偵測到審查員的活動,此設定將自動關閉。"
_accountMigration:
moveFrom: "從其他帳戶遷移到這個帳戶"
moveFromSub: "為另一個帳戶建立別名"
@@ -1435,7 +1451,7 @@ _accountMigration:
startMigration: "遷移"
migrationConfirm: "確定要將這個帳戶遷移至 {account} 嗎?一旦遷移就無法撤銷,也就無法以原來的狀態使用這個帳戶。\n另外,請確認在要遷移到的帳戶已經建立了一個別名。"
movedAndCannotBeUndone: "帳戶已遷移。\n遷移無法撤消。"
- postMigrationNote: "在完成遷移的 24 小時後解除此帳戶的追隨。此帳戶的追隨中、追隨者數量變為 0。由於不會解除追隨者,你的追隨者仍然可以繼續檢視這個帳戶發布給追隨者的貼文。"
+ postMigrationNote: "取消追蹤此帳戶將在遷移操作後 24 小時執行。\n 此帳戶有 0 個關注者/關注者。 您的關注者仍然可以看到此帳戶的關注者帖子,因為您不會被取消關注。"
movedTo: "要遷移到的帳戶:"
_achievements:
earnedAt: "獲得日期"
@@ -1555,7 +1571,7 @@ _achievements:
_markedAsCat:
title: "我是貓"
description: "已將帳戶設定為貓"
- flavor: "還沒有名字。"
+ flavor: "沒有名字。"
_following1:
title: "首次追隨"
description: "首次追隨了"
@@ -1569,7 +1585,7 @@ _achievements:
title: "一百位朋友"
description: "追隨超過100人了"
_following300:
- title: "朋友過多"
+ title: "朋友太多"
description: "追隨超過300人了"
_followers1:
title: "第一個追隨者"
@@ -1895,7 +1911,7 @@ _channel:
following: "追隨中"
usersCount: "有 {n} 人參與"
notesCount: "有 {n} 篇貼文"
- nameAndDescription: "名稱與說明"
+ nameAndDescription: "名稱"
nameOnly: "僅名稱"
allowRenoteToExternal: "允許在頻道外轉發和引用"
_menuDisplay:
@@ -2476,6 +2492,8 @@ _webhookSettings:
abuseReport: "當使用者檢舉時"
abuseReportResolved: "當處理了使用者的檢舉時"
userCreated: "使用者被新增時"
+ inactiveModeratorsWarning: "當審查員在一段時間內沒有活動時"
+ inactiveModeratorsInvitationOnlyChanged: "當審查員在一段時間內不活動時,系統會將模式變更為邀請制"
deleteConfirm: "請問是否要刪除 Webhook?"
testRemarks: "按下切換開關右側的按鈕,就會將假資料發送至 Webhook。"
_abuseReport:
@@ -2490,7 +2508,7 @@ _abuseReport:
mail: "寄送到擁有監察員權限的使用者電子郵件地址(僅在收到檢舉時)"
webhook: "向指定的 SystemWebhook 發送通知(在收到檢舉和解決檢舉時發送)"
keywords: "關鍵字"
- notifiedUser: "被通知的使用者"
+ notifiedUser: "通知的使用者"
notifiedWebhook: "使用的 Webhook"
deleteConfirm: "確定要刪除通知對象嗎?"
_moderationLogTypes:
@@ -2521,6 +2539,8 @@ _moderationLogTypes:
markSensitiveDriveFile: "標記為敏感檔案"
unmarkSensitiveDriveFile: "撤銷標記為敏感檔案"
resolveAbuseReport: "解決檢舉"
+ forwardAbuseReport: "轉發檢舉"
+ updateAbuseReportNote: "更新檢舉的審查備註"
createInvitation: "建立邀請碼"
createAd: "建立廣告"
deleteAd: "刪除廣告"
From 8b7290d6b0aca61d8c57f294a40fd5bd3b19c235 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?=
<67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Mon, 14 Oct 2024 11:23:26 +0900
Subject: [PATCH 053/147] =?UTF-8?q?enhance(backend):=20=E5=80=8B=E4=BA=BA?=
=?UTF-8?q?=E5=AE=9B=E3=81=AE=E3=81=8A=E7=9F=A5=E3=82=89=E3=81=9B=E3=81=AF?=
=?UTF-8?q?=E3=82=8F=E3=81=8B=E3=81=A3=E3=81=9F=E3=82=92=E6=8A=BC=E3=81=99?=
=?UTF-8?q?=E3=81=A8=E3=82=A2=E3=83=BC=E3=82=AB=E3=82=A4=E3=83=96=E3=81=99?=
=?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=20(#14762)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* enhance(backend): 個人宛のお知らせはわかったを押すとアーカイブするように
* Update Changelog
* enhance(frontend): アーカイブ済みのものを読み込めるように
* Update Changelog
* fix changelog
* :art:
---
CHANGELOG.md | 2 ++
packages/backend/src/core/AnnouncementService.ts | 7 +++++++
packages/frontend/src/pages/admin-user.vue | 10 ++++++++++
3 files changed, 19 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 22b5506f28..9e42d0448e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,10 +9,12 @@
### Client
- Enhance: l10nの更新
+- Enhance: アーカイブした個人宛のお知らせを表示・編集できるように
- Fix: メールアドレス不要でCaptchaが有効な場合にアカウント登録完了後自動でのログインに失敗する問題を修正
### Server
- Feat: モデレータ権限を持つユーザが全員7日間活動しなかった場合は自動的に招待制へと移行するように ( #13437 )
+- Enhance: 個人宛のお知らせは「わかった」を押すと自動的にアーカイブされるように
- Fix: `admin/emoji/update`エンドポイントのidのみ指定した時不正なエラーが発生するバグを修正
- Fix: RBT有効時、リノートのリアクションが反映されない問題を修正
diff --git a/packages/backend/src/core/AnnouncementService.ts b/packages/backend/src/core/AnnouncementService.ts
index 40a9db01c0..d4fcf19439 100644
--- a/packages/backend/src/core/AnnouncementService.ts
+++ b/packages/backend/src/core/AnnouncementService.ts
@@ -209,6 +209,13 @@ export class AnnouncementService {
return;
}
+ const announcement = await this.announcementsRepository.findOneBy({ id: announcementId });
+ if (announcement != null && announcement.userId === user.id) {
+ await this.announcementsRepository.update(announcementId, {
+ isActive: false,
+ });
+ }
+
if ((await this.getUnreadAnnouncements(user)).length === 0) {
this.globalEventService.publishMainStream(user.id, 'readAllAnnouncements');
}
diff --git a/packages/frontend/src/pages/admin-user.vue b/packages/frontend/src/pages/admin-user.vue
index d33b116059..948e7a3cce 100644
--- a/packages/frontend/src/pages/admin-user.vue
+++ b/packages/frontend/src/pages/admin-user.vue
@@ -153,6 +153,12 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.new }}
+
+ {{ i18n.ts.filter }}
+
+
+
+
@@ -254,11 +260,15 @@ const filesPagination = {
userId: props.userId,
})),
};
+
+const announcementsStatus = ref<'active' | 'archived'>('active');
+
const announcementsPagination = {
endpoint: 'admin/announcements/list' as const,
limit: 10,
params: computed(() => ({
userId: props.userId,
+ status: announcementsStatus.value,
})),
};
const expandedRoles = ref([]);
From ddca6bdc0171918a0c5b5d8dc61320bd65e4af06 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Mon, 14 Oct 2024 02:34:17 +0000
Subject: [PATCH 054/147] Bump version to 2024.10.1-beta.5
---
package.json | 2 +-
packages/misskey-js/package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index 4b477aba4b..37a11fb20b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "misskey",
- "version": "2024.10.1-beta.4",
+ "version": "2024.10.1-beta.5",
"codename": "nasubi",
"repository": {
"type": "git",
diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json
index a59385dc10..590d2367db 100644
--- a/packages/misskey-js/package.json
+++ b/packages/misskey-js/package.json
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "misskey-js",
- "version": "2024.10.1-beta.4",
+ "version": "2024.10.1-beta.5",
"description": "Misskey SDK for JavaScript",
"license": "MIT",
"main": "./built/index.js",
From 64bbce4cf4f6d17c7d3309968d95815f177d9544 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Mon, 14 Oct 2024 12:32:59 +0900
Subject: [PATCH 055/147] perf(frontend): improve notification rendering
performance
---
packages/frontend/src/components/MkNotification.vue | 2 ++
1 file changed, 2 insertions(+)
diff --git a/packages/frontend/src/components/MkNotification.vue b/packages/frontend/src/components/MkNotification.vue
index bef425097e..093bdb8b4c 100644
--- a/packages/frontend/src/components/MkNotification.vue
+++ b/packages/frontend/src/components/MkNotification.vue
@@ -220,6 +220,8 @@ function getActualReactedUsersCount(notification: Misskey.entities.Notification)
overflow-wrap: break-word;
display: flex;
contain: content;
+ content-visibility: auto;
+ contain-intrinsic-size: 0 100px;
--eventFollow: #36aed2;
--eventRenote: #36d298;
From c46d6d8edd05b3dd69cf894e29d740d7fe1300ed Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Mon, 14 Oct 2024 12:34:03 +0900
Subject: [PATCH 056/147] perf(frontend-embed): improve note rendering
performance
---
packages/frontend-embed/src/components/EmNote.vue | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/packages/frontend-embed/src/components/EmNote.vue b/packages/frontend-embed/src/components/EmNote.vue
index d4b4827c90..f5b064c293 100644
--- a/packages/frontend-embed/src/components/EmNote.vue
+++ b/packages/frontend-embed/src/components/EmNote.vue
@@ -108,6 +108,8 @@ SPDX-License-Identifier: AGPL-3.0-only
import { computed, inject, ref, shallowRef } from 'vue';
import * as mfm from 'mfm-js';
import * as Misskey from 'misskey-js';
+import { shouldCollapsed } from '@@/js/collapsed.js';
+import { url } from '@@/js/config.js';
import I18n from '@/components/I18n.vue';
import EmNoteSub from '@/components/EmNoteSub.vue';
import EmNoteHeader from '@/components/EmNoteHeader.vue';
@@ -123,8 +125,6 @@ import EmUserName from '@/components/EmUserName.vue';
import EmTime from '@/components/EmTime.vue';
import { userPage } from '@/utils.js';
import { i18n } from '@/i18n.js';
-import { shouldCollapsed } from '@@/js/collapsed.js';
-import { url } from '@@/js/config.js';
function getAppearNote(note: Misskey.entities.Note) {
return Misskey.note.isPureRenote(note) ? note.renote : note;
@@ -164,14 +164,8 @@ const isDeleted = ref(false);
font-size: 1.05em;
overflow: clip;
contain: content;
-
- // これらの指定はパフォーマンス向上には有効だが、ノートの高さは一定でないため、
- // 下の方までスクロールすると上のノートの高さがここで決め打ちされたものに変化し、表示しているノートの位置が変わってしまう
- // ノートがマウントされたときに自身の高さを取得し contain-intrinsic-size を設定しなおせばほぼ解決できそうだが、
- // 今度はその処理自体がパフォーマンス低下の原因にならないか懸念される。また、被リアクションでも高さは変化するため、やはり多少のズレは生じる
- // 一度レンダリングされた要素はブラウザがよしなにサイズを覚えておいてくれるような実装になるまで待った方が良さそう(なるのか?)
- //content-visibility: auto;
- //contain-intrinsic-size: 0 128px;
+ content-visibility: auto;
+ contain-intrinsic-size: 0 150px;
&:focus-visible {
outline: none;
From 3b361a9d0bbc2a6fce6076e379ed08febb447d59 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Mon, 14 Oct 2024 12:37:18 +0900
Subject: [PATCH 057/147] perf(frontend): make skipNoteRender on by default
---
packages/frontend/src/store.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts
index 4f641e7513..aab67e0b5c 100644
--- a/packages/frontend/src/store.ts
+++ b/packages/frontend/src/store.ts
@@ -470,7 +470,7 @@ export const defaultStore = markRaw(new Storage('base', {
},
skipNoteRender: {
where: 'device',
- default: false,
+ default: true,
},
sound_masterVolume: {
From 140322b8e2bfce65d39edef0e4cd4f5e93ce1d14 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Mon, 14 Oct 2024 12:38:12 +0900
Subject: [PATCH 058/147] Update CHANGELOG.md
---
CHANGELOG.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9e42d0448e..4631615bc7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,8 +8,9 @@
- Feat: ユーザーの名前に禁止ワードを設定できるように
### Client
-- Enhance: l10nの更新
+- Enhance: タイムライン表示時のパフォーマンスを向上
- Enhance: アーカイブした個人宛のお知らせを表示・編集できるように
+- Enhance: l10nの更新
- Fix: メールアドレス不要でCaptchaが有効な場合にアカウント登録完了後自動でのログインに失敗する問題を修正
### Server
From 04e74aa28c8cbab840313c2e257896f97fc460fe Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Mon, 14 Oct 2024 04:19:47 +0000
Subject: [PATCH 059/147] Bump version to 2024.10.1-beta.6
---
package.json | 2 +-
packages/misskey-js/package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index 37a11fb20b..59b75fece4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "misskey",
- "version": "2024.10.1-beta.5",
+ "version": "2024.10.1-beta.6",
"codename": "nasubi",
"repository": {
"type": "git",
diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json
index 590d2367db..0f8433fbb1 100644
--- a/packages/misskey-js/package.json
+++ b/packages/misskey-js/package.json
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "misskey-js",
- "version": "2024.10.1-beta.5",
+ "version": "2024.10.1-beta.6",
"description": "Misskey SDK for JavaScript",
"license": "MIT",
"main": "./built/index.js",
From b0a251d231b18007e0801dbf3517102c6b455320 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Mon, 14 Oct 2024 15:35:44 +0900
Subject: [PATCH 060/147] :art:
---
packages/frontend/src/components/global/MkAd.vue | 4 ----
1 file changed, 4 deletions(-)
diff --git a/packages/frontend/src/components/global/MkAd.vue b/packages/frontend/src/components/global/MkAd.vue
index 792a087148..0d68d02e35 100644
--- a/packages/frontend/src/components/global/MkAd.vue
+++ b/packages/frontend/src/components/global/MkAd.vue
@@ -136,8 +136,6 @@ function reduceFrequency(): void {
}
&.form_horizontal {
- padding: 8px;
-
> .link,
> .link > .img {
max-width: min(600px, 100%);
@@ -146,8 +144,6 @@ function reduceFrequency(): void {
}
&.form_horizontalBig {
- padding: 8px;
-
> .link,
> .link > .img {
max-width: min(600px, 100%);
From 7fd8ef344b33b0a157bc197cbd64069695806936 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Mon, 14 Oct 2024 17:43:44 +0900
Subject: [PATCH 061/147] refactor
---
.../backend/src/core/entities/NoteEntityService.ts | 12 +-----------
packages/backend/src/misc/is-renote.ts | 11 +++++++++++
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/packages/backend/src/core/entities/NoteEntityService.ts b/packages/backend/src/core/entities/NoteEntityService.ts
index e530772dd9..c24c80a5b5 100644
--- a/packages/backend/src/core/entities/NoteEntityService.ts
+++ b/packages/backend/src/core/entities/NoteEntityService.ts
@@ -16,23 +16,13 @@ import { bindThis } from '@/decorators.js';
import { DebounceLoader } from '@/misc/loader.js';
import { IdService } from '@/core/IdService.js';
import { ReactionsBufferingService } from '@/core/ReactionsBufferingService.js';
+import { isPureRenote } from '@/misc/is-renote.js';
import type { OnModuleInit } from '@nestjs/common';
import type { CustomEmojiService } from '../CustomEmojiService.js';
import type { ReactionService } from '../ReactionService.js';
import type { UserEntityService } from './UserEntityService.js';
import type { DriveFileEntityService } from './DriveFileEntityService.js';
-function isPureRenote(note: MiNote): note is MiNote & { renoteId: MiNote['id']; renote: MiNote } {
- return (
- note.renote != null &&
- note.reply == null &&
- note.text == null &&
- note.cw == null &&
- (note.fileIds == null || note.fileIds.length === 0) &&
- !note.hasPoll
- );
-}
-
function getAppearNoteIds(notes: MiNote[]): Set {
const appearNoteIds = new Set();
for (const note of notes) {
diff --git a/packages/backend/src/misc/is-renote.ts b/packages/backend/src/misc/is-renote.ts
index 48f821806c..245057c64e 100644
--- a/packages/backend/src/misc/is-renote.ts
+++ b/packages/backend/src/misc/is-renote.ts
@@ -36,6 +36,17 @@ export function isQuote(note: Renote): note is Quote {
note.fileIds.length > 0;
}
+export function isPureRenote(note: MiNote): note is MiNote & { renoteId: MiNote['id']; renote: MiNote } {
+ return (
+ note.renote != null &&
+ note.reply == null &&
+ note.text == null &&
+ note.cw == null &&
+ (note.fileIds == null || note.fileIds.length === 0) &&
+ !note.hasPoll
+ );
+}
+
type PackedRenote =
Packed<'Note'> & {
renoteId: NonNullable['renoteId']>
From 77ebabb3dc76d6a422ea576ed60e5e4afe72d637 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Mon, 14 Oct 2024 17:51:47 +0900
Subject: [PATCH 062/147] Revert "refactor"
This reverts commit 7fd8ef344b33b0a157bc197cbd64069695806936.
---
.../backend/src/core/entities/NoteEntityService.ts | 12 +++++++++++-
packages/backend/src/misc/is-renote.ts | 11 -----------
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/packages/backend/src/core/entities/NoteEntityService.ts b/packages/backend/src/core/entities/NoteEntityService.ts
index c24c80a5b5..e530772dd9 100644
--- a/packages/backend/src/core/entities/NoteEntityService.ts
+++ b/packages/backend/src/core/entities/NoteEntityService.ts
@@ -16,13 +16,23 @@ import { bindThis } from '@/decorators.js';
import { DebounceLoader } from '@/misc/loader.js';
import { IdService } from '@/core/IdService.js';
import { ReactionsBufferingService } from '@/core/ReactionsBufferingService.js';
-import { isPureRenote } from '@/misc/is-renote.js';
import type { OnModuleInit } from '@nestjs/common';
import type { CustomEmojiService } from '../CustomEmojiService.js';
import type { ReactionService } from '../ReactionService.js';
import type { UserEntityService } from './UserEntityService.js';
import type { DriveFileEntityService } from './DriveFileEntityService.js';
+function isPureRenote(note: MiNote): note is MiNote & { renoteId: MiNote['id']; renote: MiNote } {
+ return (
+ note.renote != null &&
+ note.reply == null &&
+ note.text == null &&
+ note.cw == null &&
+ (note.fileIds == null || note.fileIds.length === 0) &&
+ !note.hasPoll
+ );
+}
+
function getAppearNoteIds(notes: MiNote[]): Set {
const appearNoteIds = new Set();
for (const note of notes) {
diff --git a/packages/backend/src/misc/is-renote.ts b/packages/backend/src/misc/is-renote.ts
index 245057c64e..48f821806c 100644
--- a/packages/backend/src/misc/is-renote.ts
+++ b/packages/backend/src/misc/is-renote.ts
@@ -36,17 +36,6 @@ export function isQuote(note: Renote): note is Quote {
note.fileIds.length > 0;
}
-export function isPureRenote(note: MiNote): note is MiNote & { renoteId: MiNote['id']; renote: MiNote } {
- return (
- note.renote != null &&
- note.reply == null &&
- note.text == null &&
- note.cw == null &&
- (note.fileIds == null || note.fileIds.length === 0) &&
- !note.hasPoll
- );
-}
-
type PackedRenote =
Packed<'Note'> & {
renoteId: NonNullable['renoteId']>
From f13c3909a09a73be9952723c431decbb0df67fef Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Mon, 14 Oct 2024 17:54:27 +0900
Subject: [PATCH 063/147] refactor(backend): remove unnecessary any
---
packages/backend/src/core/entities/NoteEntityService.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/backend/src/core/entities/NoteEntityService.ts b/packages/backend/src/core/entities/NoteEntityService.ts
index e530772dd9..c6e176d055 100644
--- a/packages/backend/src/core/entities/NoteEntityService.ts
+++ b/packages/backend/src/core/entities/NoteEntityService.ts
@@ -113,7 +113,7 @@ export class NoteEntityService implements OnModuleInit {
hide = false;
} else {
// 指定されているかどうか
- const specified = packedNote.visibleUserIds!.some((id: any) => meId === id);
+ const specified = packedNote.visibleUserIds!.some(id => meId === id);
if (specified) {
hide = false;
@@ -250,7 +250,7 @@ export class NoteEntityService implements OnModuleInit {
return true;
} else {
// 指定されているかどうか
- return note.visibleUserIds.some((id: any) => meId === id);
+ return note.visibleUserIds.some(id => meId === id);
}
}
From 5005cc8ae358cf61ae104e39282838d219538f3d Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Mon, 14 Oct 2024 21:00:20 +0900
Subject: [PATCH 064/147] add note
---
packages/backend/src/core/entities/NoteEntityService.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/packages/backend/src/core/entities/NoteEntityService.ts b/packages/backend/src/core/entities/NoteEntityService.ts
index c6e176d055..3e1f094fce 100644
--- a/packages/backend/src/core/entities/NoteEntityService.ts
+++ b/packages/backend/src/core/entities/NoteEntityService.ts
@@ -22,6 +22,7 @@ import type { ReactionService } from '../ReactionService.js';
import type { UserEntityService } from './UserEntityService.js';
import type { DriveFileEntityService } from './DriveFileEntityService.js';
+// is-renote.tsとよしなにリンク
function isPureRenote(note: MiNote): note is MiNote & { renoteId: MiNote['id']; renote: MiNote } {
return (
note.renote != null &&
From b5de52554834744e4938eee118b43c6cd286ac30 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Tue, 15 Oct 2024 10:32:00 +0900
Subject: [PATCH 065/147] add note
---
packages/backend/src/misc/is-renote.ts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/packages/backend/src/misc/is-renote.ts b/packages/backend/src/misc/is-renote.ts
index 48f821806c..f4bb329d80 100644
--- a/packages/backend/src/misc/is-renote.ts
+++ b/packages/backend/src/misc/is-renote.ts
@@ -6,6 +6,8 @@
import type { MiNote } from '@/models/Note.js';
import type { Packed } from '@/misc/json-schema.js';
+// NoteEntityService.isPureRenote とよしなにリンク
+
type Renote =
MiNote & {
renoteId: NonNullable
From 825d2186929ea5c819adcafd4cc73743c57b7a14 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Tue, 15 Oct 2024 10:39:36 +0900
Subject: [PATCH 066/147] Update CHANGELOG.md
---
CHANGELOG.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4631615bc7..399eca0f75 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,8 @@
## 2024.10.1
+
### Note
-- 悪質なユーザからサーバを守る措置の一環として、モデレータ権限を持つユーザの最終アクティブ日時を確認し、
-7日間活動していない場合は自動的に招待制へと移行(コントロールパネル -> モデレーション -> "誰でも新規登録できるようにする"をオフに変更)するようになりました。
-詳細な経緯は https://github.com/misskey-dev/misskey/issues/13437 をご確認ください。
+- スパム対策として、モデレータ権限を持つユーザのアクティビティが7日以上確認できない場合は自動的に招待制へと切り替え(コントロールパネル -> モデレーション -> "誰でも新規登録できるようにする"をオフに変更)るようになりました。 ( #13437 )
+ - 切り替わった際はモデレーターへお知らせとして通知されます。登録をオープンな状態で継続したい場合は、コントロールパネルから再度設定を行ってください。
### General
- Feat: ユーザーの名前に禁止ワードを設定できるように
@@ -14,7 +14,7 @@
- Fix: メールアドレス不要でCaptchaが有効な場合にアカウント登録完了後自動でのログインに失敗する問題を修正
### Server
-- Feat: モデレータ権限を持つユーザが全員7日間活動しなかった場合は自動的に招待制へと移行するように ( #13437 )
+- Feat: モデレータ権限を持つユーザが全員7日間活動しなかった場合は自動的に招待制へと切り替えるように ( #13437 )
- Enhance: 個人宛のお知らせは「わかった」を押すと自動的にアーカイブされるように
- Fix: `admin/emoji/update`エンドポイントのidのみ指定した時不正なエラーが発生するバグを修正
- Fix: RBT有効時、リノートのリアクションが反映されない問題を修正
From 21a2aa5243c68c070bf73de514ff3884134dd260 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Tue, 15 Oct 2024 12:30:40 +0900
Subject: [PATCH 067/147] Update CHANGELOG.md
---
CHANGELOG.md | 2 --
1 file changed, 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 399eca0f75..504c1bbef6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,8 +18,6 @@
- Enhance: 個人宛のお知らせは「わかった」を押すと自動的にアーカイブされるように
- Fix: `admin/emoji/update`エンドポイントのidのみ指定した時不正なエラーが発生するバグを修正
- Fix: RBT有効時、リノートのリアクションが反映されない問題を修正
-
-### Server
- Fix: キューのエラーログを簡略化するように
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/649)
From 3cea890eba0b5137adcc4cb0d4fa2b2286914892 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Tue, 15 Oct 2024 13:01:06 +0900
Subject: [PATCH 068/147] =?UTF-8?q?fix(frontend):=20blink=E3=82=A2?=
=?UTF-8?q?=E3=83=8B=E3=83=A1=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E3=81=8C?=
=?UTF-8?q?=E5=8B=95=E4=BD=9C=E3=81=97=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84?=
=?UTF-8?q?=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
packages/frontend/src/components/MkLaunchPad.vue | 5 ++---
packages/frontend/src/components/MkMenu.vue | 9 ++++-----
packages/frontend/src/style.scss | 6 +++++-
.../frontend/src/ui/_common_/navbar-for-mobile.vue | 5 ++---
packages/frontend/src/ui/_common_/navbar.vue | 6 ++----
packages/frontend/src/ui/classic.header.vue | 5 ++---
packages/frontend/src/ui/classic.sidebar.vue | 5 ++---
packages/frontend/src/ui/deck.vue | 7 +++----
packages/frontend/src/ui/universal.vue | 11 +++++------
9 files changed, 27 insertions(+), 32 deletions(-)
diff --git a/packages/frontend/src/components/MkLaunchPad.vue b/packages/frontend/src/components/MkLaunchPad.vue
index 2dcba7a50e..32c1a2d172 100644
--- a/packages/frontend/src/components/MkLaunchPad.vue
+++ b/packages/frontend/src/components/MkLaunchPad.vue
@@ -12,13 +12,13 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ item.text }}
{{ item.indicateValue }}
-
+
{{ item.text }}
{{ item.indicateValue }}
-
+
@@ -139,7 +139,6 @@ function close() {
left: 32px;
color: var(--MI_THEME-indicator);
font-size: 8px;
- animation: global-blink 1s infinite;
@media (max-width: 500px) {
top: 16px;
diff --git a/packages/frontend/src/components/MkMenu.vue b/packages/frontend/src/components/MkMenu.vue
index 59f36f8eec..13a65e411f 100644
--- a/packages/frontend/src/components/MkMenu.vue
+++ b/packages/frontend/src/components/MkMenu.vue
@@ -49,7 +49,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ item.text }}
-
+
{{ item.text }}
-
+
{{ item.text }}
-
+
@@ -639,7 +639,6 @@ onBeforeUnmount(() => {
align-items: center;
color: var(--MI_THEME-indicator);
font-size: 12px;
- animation: global-blink 1s infinite;
}
.divider {
diff --git a/packages/frontend/src/style.scss b/packages/frontend/src/style.scss
index 1e6561bdb9..4204c5af59 100644
--- a/packages/frontend/src/style.scss
+++ b/packages/frontend/src/style.scss
@@ -480,7 +480,11 @@ html[data-color-scheme=dark] ._woodenFrame {
transform: scale(0.9);
}
-@keyframes global-blink {
+._blink {
+ animation: blink 1s infinite;
+}
+
+@keyframes blink {
0% { opacity: 1; transform: scale(1); }
30% { opacity: 1; transform: scale(1); }
90% { opacity: 0; transform: scale(0.5); }
diff --git a/packages/frontend/src/ui/_common_/navbar-for-mobile.vue b/packages/frontend/src/ui/_common_/navbar-for-mobile.vue
index 9acf7b2ede..44253e93bd 100644
--- a/packages/frontend/src/ui/_common_/navbar-for-mobile.vue
+++ b/packages/frontend/src/ui/_common_/navbar-for-mobile.vue
@@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ navbarItemDef[item].title }}
-
+
{{ navbarItemDef[item].indicateValue }}
@@ -31,7 +31,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.settings }}
@@ -257,7 +257,6 @@ function more() {
left: 20px;
color: var(--MI_THEME-navIndicator);
font-size: 8px;
- animation: global-blink 1s infinite;
&:has(.itemIndicateValueIcon) {
animation: none;
diff --git a/packages/frontend/src/ui/_common_/navbar.vue b/packages/frontend/src/ui/_common_/navbar.vue
index cbfdaac235..8ae11efa2c 100644
--- a/packages/frontend/src/ui/_common_/navbar.vue
+++ b/packages/frontend/src/ui/_common_/navbar.vue
@@ -29,7 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
v-on="navbarItemDef[item].action ? { click: navbarItemDef[item].action } : {}"
>
{{ navbarItemDef[item].title }}
-
+
{{ navbarItemDef[item].indicateValue }}
@@ -41,7 +41,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.settings }}
@@ -350,7 +350,6 @@ function more(ev: MouseEvent) {
left: 20px;
color: var(--MI_THEME-navIndicator);
font-size: 8px;
- animation: global-blink 1s infinite;
&:has(.itemIndicateValueIcon) {
animation: none;
@@ -555,7 +554,6 @@ function more(ev: MouseEvent) {
left: 24px;
color: var(--MI_THEME-navIndicator);
font-size: 8px;
- animation: global-blink 1s infinite;
&:has(.itemIndicateValueIcon) {
animation: none;
diff --git a/packages/frontend/src/ui/classic.header.vue b/packages/frontend/src/ui/classic.header.vue
index a0a8601887..f4633314ae 100644
--- a/packages/frontend/src/ui/classic.header.vue
+++ b/packages/frontend/src/ui/classic.header.vue
@@ -17,7 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
@@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
@@ -142,7 +142,6 @@ onMounted(() => {
left: 0;
color: var(--MI_THEME-navIndicator);
font-size: 8px;
- animation: global-blink 1s infinite;
}
&:hover {
diff --git a/packages/frontend/src/ui/classic.sidebar.vue b/packages/frontend/src/ui/classic.sidebar.vue
index 4d1846c34c..5acef0bef8 100644
--- a/packages/frontend/src/ui/classic.sidebar.vue
+++ b/packages/frontend/src/ui/classic.sidebar.vue
@@ -21,7 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ navbarItemDef[item].title }}
-
+
{{ navbarItemDef[item].indicateValue }}
@@ -33,7 +33,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.settings }}
@@ -222,7 +222,6 @@ watch(defaultStore.reactiveState.menuDisplay, () => {
left: 0;
color: var(--MI_THEME-navIndicator);
font-size: 8px;
- animation: global-blink 1s infinite;
&:has(.itemIndicateValueIcon) {
animation: none;
diff --git a/packages/frontend/src/ui/deck.vue b/packages/frontend/src/ui/deck.vue
index 36ffca8264..a1a76a7e7d 100644
--- a/packages/frontend/src/ui/deck.vue
+++ b/packages/frontend/src/ui/deck.vue
@@ -50,11 +50,11 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
@@ -97,6 +97,7 @@ import { v4 as uuid } from 'uuid';
import XCommon from './_common_/common.vue';
import { deckStore, columnTypes, addColumn as addColumnToStore, loadDeck, getProfiles, deleteProfile as deleteProfile_ } from './deck/deck-store.js';
import type { ColumnType } from './deck/deck-store.js';
+import type { MenuItem } from '@/types/menu.js';
import XSidebar from '@/ui/_common_/navbar.vue';
import XDrawerMenu from '@/ui/_common_/navbar-for-mobile.vue';
import MkButton from '@/components/MkButton.vue';
@@ -118,7 +119,6 @@ import XMentionsColumn from '@/ui/deck/mentions-column.vue';
import XDirectColumn from '@/ui/deck/direct-column.vue';
import XRoleTimelineColumn from '@/ui/deck/role-timeline-column.vue';
import { mainRouter } from '@/router/main.js';
-import type { MenuItem } from '@/types/menu.js';
const XStatusBars = defineAsyncComponent(() => import('@/ui/_common_/statusbars.vue'));
const XAnnouncements = defineAsyncComponent(() => import('@/ui/_common_/announcements.vue'));
@@ -479,7 +479,6 @@ body {
left: 0;
color: var(--MI_THEME-indicator);
font-size: 16px;
- animation: global-blink 1s infinite;
&:has(.itemIndicateValueIcon) {
animation: none;
diff --git a/packages/frontend/src/ui/universal.vue b/packages/frontend/src/ui/universal.vue
index 9fc8bd102d..d739c2e1cd 100644
--- a/packages/frontend/src/ui/universal.vue
+++ b/packages/frontend/src/ui/universal.vue
@@ -25,11 +25,11 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
@@ -96,9 +96,11 @@ SPDX-License-Identifier: AGPL-3.0-only
@@ -121,6 +110,7 @@ onMounted(() => {
top: var(--MI-stickyTop, 0px);
-webkit-backdrop-filter: var(--MI-blur, blur(8px));
backdrop-filter: var(--MI-blur, blur(20px));
+ background-color: color(from v-bind("parentBg ?? 'var(--bg)'") srgb r g b / 0.85);
}
.title {
diff --git a/packages/frontend/src/components/MkFolder.vue b/packages/frontend/src/components/MkFolder.vue
index 5f9500d923..7bdc06a8b4 100644
--- a/packages/frontend/src/components/MkFolder.vue
+++ b/packages/frontend/src/components/MkFolder.vue
@@ -56,8 +56,9 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/router/definition.ts b/packages/frontend/src/router/definition.ts
index 75f994b865..b5fd6b6ec3 100644
--- a/packages/frontend/src/router/definition.ts
+++ b/packages/frontend/src/router/definition.ts
@@ -217,7 +217,7 @@ const routes: RouteDef[] = [{
component: page(() => import('@/pages/theme-editor.vue')),
loginRequired: true,
}, {
- path: '/roles/:role',
+ path: '/roles/:roleId',
component: page(() => import('@/pages/role.vue')),
}, {
path: '/user-tags/:tag',
From 1d106b3ae81b8fa28bf644622e617262a2889040 Mon Sep 17 00:00:00 2001
From: tetsuya-ki <64536338+tetsuya-ki@users.noreply.github.com>
Date: Sun, 20 Oct 2024 16:17:16 +0900
Subject: [PATCH 075/147] =?UTF-8?q?Enhance:=20=E3=83=89=E3=83=A9=E3=82=A4?=
=?UTF-8?q?=E3=83=96=E3=81=A7=E3=82=BD=E3=83=BC=E3=83=88=E3=81=8C=E3=81=A7?=
=?UTF-8?q?=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=20=20(#14801)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Enhance: ドライブでソートができるように
* Update CHANGELOG.md
---
CHANGELOG.md | 1 +
packages/frontend/src/components/MkDrive.vue | 25 +++++++++++++++++++-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c3a5e41787..3a23938c38 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
### Client
- Enhance: Bull DashboardでRelationship Queueの状態も確認できるように
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/751)
+- Enhance: ドライブでソートができるように
### Server
-
diff --git a/packages/frontend/src/components/MkDrive.vue b/packages/frontend/src/components/MkDrive.vue
index 23883a44e9..05f3354813 100644
--- a/packages/frontend/src/components/MkDrive.vue
+++ b/packages/frontend/src/components/MkDrive.vue
@@ -30,6 +30,16 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ folder.name }}
+
+
+
+
+
+
+
+
+
+
entries.some((entry) => entry.isIntersecting) && !fetching.value && moreFiles.value && fetchMoreFiles(),
);
+const sortModeSelect = ref('+createdAt');
+
watch(folder, () => emit('cd', folder.value));
+watch(sortModeSelect, () => {
+ fetch();
+});
function onStreamDriveFileCreated(file: Misskey.entities.DriveFile) {
addFile(file, true);
@@ -558,6 +574,7 @@ async function fetch() {
folderId: folder.value ? folder.value.id : null,
type: props.type,
limit: filesMax + 1,
+ sort: sortModeSelect.value,
}).then(fetchedFiles => {
if (fetchedFiles.length === filesMax + 1) {
moreFiles.value = true;
@@ -607,6 +624,7 @@ function fetchMoreFiles() {
type: props.type,
untilId: files.value.at(-1)?.id,
limit: max + 1,
+ sort: sortModeSelect.value,
}).then(files => {
if (files.length === max + 1) {
moreFiles.value = true;
@@ -760,11 +778,16 @@ onBeforeUnmount(() => {
}
}
-.navMenu {
+.navSort {
+ display: inline-block;
margin-left: auto;
padding: 0 12px;
}
+.navMenu {
+ padding: 0 12px;
+}
+
.main {
flex: 1;
overflow: auto;
From 041c9caf317f35211bd43dc39664ed033a34c1f2 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Sun, 20 Oct 2024 16:38:27 +0900
Subject: [PATCH 076/147] :art:
---
packages/frontend/src/components/MkDrive.vue | 55 ++++++++++++++------
1 file changed, 38 insertions(+), 17 deletions(-)
diff --git a/packages/frontend/src/components/MkDrive.vue b/packages/frontend/src/components/MkDrive.vue
index 05f3354813..910b73c798 100644
--- a/packages/frontend/src/components/MkDrive.vue
+++ b/packages/frontend/src/components/MkDrive.vue
@@ -30,16 +30,6 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ folder.name }}
-
-
-
-
-
-
-
-
-
-
{ sortModeSelect.value = '+createdAt'; },
+ active: sortModeSelect.value === '+createdAt',
+ }, {
+ text: `${i18n.ts.registeredDate} (${i18n.ts.ascendingOrder})`,
+ icon: 'ti ti-sort-ascending-letters',
+ action: () => { sortModeSelect.value = '-createdAt'; },
+ active: sortModeSelect.value === '-createdAt',
+ }, {
+ text: `${i18n.ts.size} (${i18n.ts.descendingOrder})`,
+ icon: 'ti ti-sort-descending-letters',
+ action: () => { sortModeSelect.value = '+size'; },
+ active: sortModeSelect.value === '+size',
+ }, {
+ text: `${i18n.ts.size} (${i18n.ts.ascendingOrder})`,
+ icon: 'ti ti-sort-ascending-letters',
+ action: () => { sortModeSelect.value = '-size'; },
+ active: sortModeSelect.value === '-size',
+ }, {
+ text: `${i18n.ts.name} (${i18n.ts.descendingOrder})`,
+ icon: 'ti ti-sort-descending-letters',
+ action: () => { sortModeSelect.value = '+name'; },
+ active: sortModeSelect.value === '+name',
+ }, {
+ text: `${i18n.ts.name} (${i18n.ts.ascendingOrder})`,
+ icon: 'ti ti-sort-ascending-letters',
+ action: () => { sortModeSelect.value = '-name'; },
+ active: sortModeSelect.value === '-name',
+ }],
+ });
+
if (folder.value) {
menu.push({
text: i18n.ts.renameFolder,
@@ -778,13 +804,8 @@ onBeforeUnmount(() => {
}
}
-.navSort {
- display: inline-block;
- margin-left: auto;
- padding: 0 12px;
-}
-
.navMenu {
+ margin-left: auto;
padding: 0 12px;
}
From d6caa4d9c4453cf38129197dd4a237711f0085ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?=
<67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Sun, 20 Oct 2024 17:29:41 +0900
Subject: [PATCH 077/147] =?UTF-8?q?fix(frontend):=20=E9=80=9A=E7=9F=A5?=
=?UTF-8?q?=E3=81=AE=E7=AF=84=E5=9B=B2=E6=8C=87=E5=AE=9A=E3=81=8C=E5=BF=85?=
=?UTF-8?q?=E8=A6=81=E3=81=AA=E3=81=84=E9=80=9A=E7=9F=A5=E8=A8=AD=E5=AE=9A?=
=?UTF-8?q?=E3=81=A7=E3=82=82=E7=AF=84=E5=9B=B2=E6=8C=87=E5=AE=9A=E3=81=8C?=
=?UTF-8?q?=E3=81=A7=E3=81=A6=E3=81=84=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92?=
=?UTF-8?q?=E4=BF=AE=E6=AD=A3=20(#14798)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix(frontend): 通知の範囲指定が必要ない通知設定でも範囲指定がでている問題を修正
* Update Changelog
---------
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
---
CHANGELOG.md | 1 +
locales/index.d.ts | 6 +--
locales/ja-JP.yml | 6 +--
.../notifications.notification-config.vue | 50 ++++++++++++++-----
.../src/pages/settings/notifications.vue | 15 ++++--
5 files changed, 55 insertions(+), 23 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3a23938c38..04ae102227 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
- Enhance: Bull DashboardでRelationship Queueの状態も確認できるように
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/751)
- Enhance: ドライブでソートができるように
+- Fix: 通知の範囲指定の設定項目が必要ない通知設定でも範囲指定の設定がでている問題を修正
### Server
-
diff --git a/locales/index.d.ts b/locales/index.d.ts
index b5af5909a3..fb010d9353 100644
--- a/locales/index.d.ts
+++ b/locales/index.d.ts
@@ -9271,7 +9271,7 @@ export interface Locale extends ILocale {
*/
"youGotQuote": ParameterizedString<"name">;
/**
- * {name}がRenoteしました
+ * {name}がリノートしました
*/
"youRenoted": ParameterizedString<"name">;
/**
@@ -9376,7 +9376,7 @@ export interface Locale extends ILocale {
*/
"reply": string;
/**
- * Renote
+ * リノート
*/
"renote": string;
/**
@@ -9434,7 +9434,7 @@ export interface Locale extends ILocale {
*/
"reply": string;
/**
- * Renote
+ * リノート
*/
"renote": string;
};
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index c448d4d50a..c241a9e560 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -2448,7 +2448,7 @@ _notification:
youGotMention: "{name}からのメンション"
youGotReply: "{name}からのリプライ"
youGotQuote: "{name}による引用"
- youRenoted: "{name}がRenoteしました"
+ youRenoted: "{name}がリノートしました"
youWereFollowed: "フォローされました"
youReceivedFollowRequest: "フォローリクエストが来ました"
yourFollowRequestAccepted: "フォローリクエストが承認されました"
@@ -2476,7 +2476,7 @@ _notification:
follow: "フォロー"
mention: "メンション"
reply: "リプライ"
- renote: "Renote"
+ renote: "リノート"
quote: "引用"
reaction: "リアクション"
pollEnded: "アンケートが終了"
@@ -2492,7 +2492,7 @@ _notification:
_actions:
followBack: "フォローバック"
reply: "返信"
- renote: "Renote"
+ renote: "リノート"
_deck:
alwaysShowMainColumn: "常にメインカラムを表示"
diff --git a/packages/frontend/src/pages/settings/notifications.notification-config.vue b/packages/frontend/src/pages/settings/notifications.notification-config.vue
index a36f036303..0ea415f673 100644
--- a/packages/frontend/src/pages/settings/notifications.notification-config.vue
+++ b/packages/frontend/src/pages/settings/notifications.notification-config.vue
@@ -6,13 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
-
-
-
-
-
-
+
@@ -21,31 +15,61 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ i18n.ts.save }}
+ {{ i18n.ts.save }}
+
+
diff --git a/packages/frontend/src/pages/settings/notifications.vue b/packages/frontend/src/pages/settings/notifications.vue
index 53b3bd4936..8ffe0d6a7a 100644
--- a/packages/frontend/src/pages/settings/notifications.vue
+++ b/packages/frontend/src/pages/settings/notifications.vue
@@ -22,7 +22,12 @@ SPDX-License-Identifier: AGPL-3.0-only
}}
-
updateReceiveConfig(type, res)"/>
+ updateReceiveConfig(type, res)"
+ />
@@ -58,7 +63,7 @@ SPDX-License-Identifier: AGPL-3.0-only
+
+
diff --git a/packages/frontend/src/components/MkModalWindow.vue b/packages/frontend/src/components/MkModalWindow.vue
index fe9e1ce088..f06cfffee4 100644
--- a/packages/frontend/src/components/MkModalWindow.vue
+++ b/packages/frontend/src/components/MkModalWindow.vue
@@ -26,11 +26,11 @@ import { onMounted, onUnmounted, shallowRef, ref } from 'vue';
import MkModal from './MkModal.vue';
const props = withDefaults(defineProps<{
- withOkButton: boolean;
- withCloseButton: boolean;
- okButtonDisabled: boolean;
- width: number;
- height: number;
+ withOkButton?: boolean;
+ withCloseButton?: boolean;
+ okButtonDisabled?: boolean;
+ width?: number;
+ height?: number;
}>(), {
withOkButton: false,
withCloseButton: true,
diff --git a/packages/frontend/src/components/MkSignupDialog.vue b/packages/frontend/src/components/MkSignupDialog.vue
index f240e6dc46..4f75a36fbe 100644
--- a/packages/frontend/src/components/MkSignupDialog.vue
+++ b/packages/frontend/src/components/MkSignupDialog.vue
@@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
ref="dialog"
:width="500"
:height="600"
- @close="dialog?.close()"
+ @close="onClose"
@closed="$emit('closed')"
>
{{ i18n.ts.signup }}
@@ -22,7 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:leaveToClass="$style.transition_x_leaveTo"
>
-
+
@@ -48,6 +48,7 @@ const props = withDefaults(defineProps<{
const emit = defineEmits<{
(ev: 'done', res: Misskey.entities.SignupResponse): void;
+ (ev: 'cancelled'): void;
(ev: 'closed'): void;
}>();
@@ -55,6 +56,11 @@ const dialog = shallowRef>();
const isAcceptedServerRule = ref(false);
+function onClose() {
+ emit('cancelled');
+ dialog.value?.close();
+}
+
function onSignup(res: Misskey.entities.SignupResponse) {
emit('done', res);
dialog.value?.close();
diff --git a/packages/frontend/src/pages/miauth.vue b/packages/frontend/src/pages/miauth.vue
index ffaf739ed0..283f66ac45 100644
--- a/packages/frontend/src/pages/miauth.vue
+++ b/packages/frontend/src/pages/miauth.vue
@@ -4,95 +4,79 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
-
-
-
-
-
-
-
-
-
{{ i18n.ts._auth.denied }}
-
-
-
{{ i18n.ts._auth.callback }}
-
{{ i18n.ts._auth.pleaseGoBack }}
-
-
-
-
{{ i18n.tsx._auth.permission({ name }) }}
-
{{ i18n.ts._auth.permissionAsk }}
-
- - {{ i18n.ts._permissions[p] }}
-
-
-
{{ i18n.tsx._auth.shareAccess({ name }) }}
-
{{ i18n.ts._auth.shareAccessAsk }}
-
- {{ i18n.ts.cancel }}
- {{ i18n.ts.accept }}
-
-
+
+
+
+
+
+
+
+
{{ i18n.ts._auth.byClickingYouWillBeRedirectedToThisUrl }}
+
{{ callback }}
+
+
+
-
-
{{ i18n.ts._auth.pleaseLogin }}
-
-
-
-
+
+
diff --git a/packages/frontend/src/pages/oauth.vue b/packages/frontend/src/pages/oauth.vue
index 733e34eb2c..8719a769e5 100644
--- a/packages/frontend/src/pages/oauth.vue
+++ b/packages/frontend/src/pages/oauth.vue
@@ -4,40 +4,28 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
-
-
-
-
-
-
{{ i18n.tsx._auth.permission({ name }) }}
-
{{ i18n.ts._auth.permissionAsk }}
-
- - {{ i18n.ts._permissions[p] }}
-
-
-
{{ i18n.tsx._auth.shareAccess({ name }) }}
-
{{ i18n.ts._auth.shareAccessAsk }}
-
+
+
+
+
+
-
-
{{ i18n.ts._auth.pleaseLogin }}
-
-
-
-
+
+
diff --git a/packages/frontend/src/pages/settings/accounts.vue b/packages/frontend/src/pages/settings/accounts.vue
index 1bbedb817e..16f0716a12 100644
--- a/packages/frontend/src/pages/settings/accounts.vue
+++ b/packages/frontend/src/pages/settings/accounts.vue
@@ -19,13 +19,13 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/components/MkAuthConfirm.vue b/packages/frontend/src/components/MkAuthConfirm.vue
index f5f6d7f6cc..f78d2d38f0 100644
--- a/packages/frontend/src/components/MkAuthConfirm.vue
+++ b/packages/frontend/src/components/MkAuthConfirm.vue
@@ -21,7 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.pleaseSelectAccount }}
-
+
{{ i18n.ts.selectAccount }}
@@ -63,7 +63,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
{{ i18n.ts._auth.scopeUser }}
diff --git a/packages/frontend/src/components/MkSignin.password.vue b/packages/frontend/src/components/MkSignin.password.vue
index 5608122a39..cd003a39df 100644
--- a/packages/frontend/src/components/MkSignin.password.vue
+++ b/packages/frontend/src/components/MkSignin.password.vue
@@ -24,11 +24,11 @@ SPDX-License-Identifier: AGPL-3.0-only
-
-
-
-
-
+
+
+
+
+
{{ i18n.ts.continue }}
diff --git a/packages/frontend/src/components/global/MkAd.vue b/packages/frontend/src/components/global/MkAd.vue
index 0d68d02e35..08a78c8d81 100644
--- a/packages/frontend/src/components/global/MkAd.vue
+++ b/packages/frontend/src/components/global/MkAd.vue
@@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
-
+
-.root {
-
-}
-
.main {
text-align: center;
From 74847bce303449124282a748fc50b1c6588288fc Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Mon, 28 Oct 2024 20:42:14 +0900
Subject: [PATCH 102/147] =?UTF-8?q?enhance:=20=E3=82=A2=E3=82=A4=E3=82=B3?=
=?UTF-8?q?=E3=83=B3=E3=83=87=E3=82=B3=E3=83=AC=E3=83=BC=E3=82=B7=E3=83=A7?=
=?UTF-8?q?=E3=83=B3=E7=AE=A1=E7=90=86=E7=94=BB=E9=9D=A2=E3=81=AE=E6=94=B9?=
=?UTF-8?q?=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CHANGELOG.md | 1 +
locales/index.d.ts | 4 +
locales/ja-JP.yml | 1 +
.../admin/avatar-decorations/create.ts | 57 ++++-
.../admin/avatar-decorations/list.ts | 3 -
.../pages/avatar-decoration-edit-dialog.vue | 220 ++++++++++++++++++
.../frontend/src/pages/avatar-decorations.vue | 172 +++++---------
.../settings/avatar-decoration.decoration.vue | 7 +-
.../settings/avatar-decoration.dialog.vue | 4 +-
packages/misskey-js/etc/misskey-js.api.md | 4 +
packages/misskey-js/src/autogen/endpoint.ts | 3 +-
packages/misskey-js/src/autogen/entities.ts | 1 +
packages/misskey-js/src/autogen/types.ts | 19 +-
13 files changed, 374 insertions(+), 122 deletions(-)
create mode 100644 packages/frontend/src/pages/avatar-decoration-edit-dialog.vue
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cbd48b8b6c..52077f813f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@
- Enhance: Bull DashboardでRelationship Queueの状態も確認できるように
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/751)
- Enhance: ドライブでソートができるように
+- Enhance: アイコンデコレーション管理画面の改善
- Enhance: 「単なるラッキー」の取得条件を変更
- Enhance: 投稿フォームでEscキーを押したときIME入力中ならフォームを閉じないように( #10866 )
- Enhance: MiAuth, OAuthの認可画面の改善
diff --git a/locales/index.d.ts b/locales/index.d.ts
index 9058c70496..440f24ac84 100644
--- a/locales/index.d.ts
+++ b/locales/index.d.ts
@@ -5214,6 +5214,10 @@ export interface Locale extends ILocale {
* アカウントを選択してください
*/
"pleaseSelectAccount": string;
+ /**
+ * 利用可能なロール
+ */
+ "availableRoles": string;
"_accountSettings": {
/**
* コンテンツの表示にログインを必須にする
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index 1d426f1705..5d8e1a5e72 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -1299,6 +1299,7 @@ yourNameContainsProhibitedWordsDescription: "名前に禁止されている文
thisContentsAreMarkedAsSigninRequiredByAuthor: "投稿者により、表示にはログインが必要と設定されています"
lockdown: "ロックダウン"
pleaseSelectAccount: "アカウントを選択してください"
+availableRoles: "利用可能なロール"
_accountSettings:
requireSigninToViewContents: "コンテンツの表示にログインを必須にする"
diff --git a/packages/backend/src/server/api/endpoints/admin/avatar-decorations/create.ts b/packages/backend/src/server/api/endpoints/admin/avatar-decorations/create.ts
index fd21309818..87d80cbe80 100644
--- a/packages/backend/src/server/api/endpoints/admin/avatar-decorations/create.ts
+++ b/packages/backend/src/server/api/endpoints/admin/avatar-decorations/create.ts
@@ -6,6 +6,7 @@
import { Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { AvatarDecorationService } from '@/core/AvatarDecorationService.js';
+import { IdService } from '@/core/IdService.js';
export const meta = {
tags: ['admin'],
@@ -13,6 +14,49 @@ export const meta = {
requireCredential: true,
requireRolePolicy: 'canManageAvatarDecorations',
kind: 'write:admin:avatar-decorations',
+
+ res: {
+ type: 'object',
+ optional: false, nullable: false,
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ updatedAt: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'date-time',
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ description: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ url: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ roleIdsThatCanBeUsedThisDecoration: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ },
+ },
+ },
} as const;
export const paramDef = {
@@ -32,14 +76,25 @@ export const paramDef = {
export default class extends Endpoint
{ // eslint-disable-line import/no-default-export
constructor(
private avatarDecorationService: AvatarDecorationService,
+ private idService: IdService,
) {
super(meta, paramDef, async (ps, me) => {
- await this.avatarDecorationService.create({
+ const created = await this.avatarDecorationService.create({
name: ps.name,
description: ps.description,
url: ps.url,
roleIdsThatCanBeUsedThisDecoration: ps.roleIdsThatCanBeUsedThisDecoration,
}, me);
+
+ return {
+ id: created.id,
+ createdAt: this.idService.parse(created.id).date.toISOString(),
+ updatedAt: null,
+ name: created.name,
+ description: created.description,
+ url: created.url,
+ roleIdsThatCanBeUsedThisDecoration: created.roleIdsThatCanBeUsedThisDecoration,
+ };
});
}
}
diff --git a/packages/backend/src/server/api/endpoints/admin/avatar-decorations/list.ts b/packages/backend/src/server/api/endpoints/admin/avatar-decorations/list.ts
index aee90023e1..d785f085ac 100644
--- a/packages/backend/src/server/api/endpoints/admin/avatar-decorations/list.ts
+++ b/packages/backend/src/server/api/endpoints/admin/avatar-decorations/list.ts
@@ -4,10 +4,7 @@
*/
import { Inject, Injectable } from '@nestjs/common';
-import type { AnnouncementsRepository, AnnouncementReadsRepository } from '@/models/_.js';
-import type { MiAnnouncement } from '@/models/Announcement.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
-import { QueryService } from '@/core/QueryService.js';
import { DI } from '@/di-symbols.js';
import { IdService } from '@/core/IdService.js';
import { AvatarDecorationService } from '@/core/AvatarDecorationService.js';
diff --git a/packages/frontend/src/pages/avatar-decoration-edit-dialog.vue b/packages/frontend/src/pages/avatar-decoration-edit-dialog.vue
new file mode 100644
index 0000000000..a834f1c5fd
--- /dev/null
+++ b/packages/frontend/src/pages/avatar-decoration-edit-dialog.vue
@@ -0,0 +1,220 @@
+
+
+
+
+ {{ avatarDecoration.name }}
+ New decoration
+
+
+
+
+
+
+ {{ i18n.ts.name }}
+
+
+ {{ i18n.ts.imageUrl }}
+
+
+ {{ i18n.ts.description }}
+
+
+ {{ i18n.ts.availableRoles }}
+ {{ rolesThatCanBeUsedThisDecoration.length === 0 ? i18n.ts.all : rolesThatCanBeUsedThisDecoration.length }}
+
+
+
{{ i18n.ts.add }}
+
+
+
+
+
+
+
+
+
{{ i18n.ts.delete }}
+
+
+
+ {{ props.avatarDecoration ? i18n.ts.update : i18n.ts.create }}
+
+
+
+
+
+
+
+
diff --git a/packages/frontend/src/pages/avatar-decorations.vue b/packages/frontend/src/pages/avatar-decorations.vue
index b97e7c0eea..a5cafb1678 100644
--- a/packages/frontend/src/pages/avatar-decorations.vue
+++ b/packages/frontend/src/pages/avatar-decorations.vue
@@ -5,92 +5,38 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
-
- {{ avatarDecoration.name }}
- {{ avatarDecoration.description }}
-
-
-
-
-
-
- {{ i18n.ts.name }}
-
-
- {{ i18n.ts.description }}
-
-
- {{ i18n.ts.imageUrl }}
-
-
- {{ i18n.ts.save }}
- {{ i18n.ts.delete }}
-
-
-
+
+
+
{{ avatarDecoration.name }}
+
-
+
diff --git a/packages/frontend/src/pages/settings/avatar-decoration.decoration.vue b/packages/frontend/src/pages/settings/avatar-decoration.decoration.vue
index f72a0b9383..3c9914b4e2 100644
--- a/packages/frontend/src/pages/settings/avatar-decoration.decoration.vue
+++ b/packages/frontend/src/pages/settings/avatar-decoration.decoration.vue
@@ -10,12 +10,12 @@ SPDX-License-Identifier: AGPL-3.0-only
>
{{ decoration.name }}
-
+
diff --git a/packages/frontend/src/pages/settings/avatar-decoration.dialog.vue b/packages/frontend/src/pages/settings/avatar-decoration.dialog.vue
index 853e536ea3..aa899ac649 100644
--- a/packages/frontend/src/pages/settings/avatar-decoration.dialog.vue
+++ b/packages/frontend/src/pages/settings/avatar-decoration.dialog.vue
@@ -38,7 +38,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.update }}
{{ i18n.ts.detach }}
- {{ i18n.ts.attach }}
+ {{ i18n.ts.attach }}
@@ -61,6 +61,7 @@ const props = defineProps<{
id: string;
url: string;
name: string;
+ roleIdsThatCanBeUsedThisDecoration: string[];
};
}>();
@@ -83,6 +84,7 @@ const emit = defineEmits<{
const dialog = shallowRef
>();
const exceeded = computed(() => ($i.policies.avatarDecorationLimit - $i.avatarDecorations.length) <= 0);
+const locked = computed(() => props.decoration.roleIdsThatCanBeUsedThisDecoration.length > 0 && !$i.roles.some(r => props.decoration.roleIdsThatCanBeUsedThisDecoration.includes(r.id)));
const angle = ref((props.usingIndex != null ? $i.avatarDecorations[props.usingIndex].angle : null) ?? 0);
const flipH = ref((props.usingIndex != null ? $i.avatarDecorations[props.usingIndex].flipH : null) ?? false);
const offsetX = ref((props.usingIndex != null ? $i.avatarDecorations[props.usingIndex].offsetX : null) ?? 0);
diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md
index 61de8b8c7e..061b533b72 100644
--- a/packages/misskey-js/etc/misskey-js.api.md
+++ b/packages/misskey-js/etc/misskey-js.api.md
@@ -121,6 +121,9 @@ type AdminAnnouncementsUpdateRequest = operations['admin___announcements___updat
// @public (undocumented)
type AdminAvatarDecorationsCreateRequest = operations['admin___avatar-decorations___create']['requestBody']['content']['application/json'];
+// @public (undocumented)
+type AdminAvatarDecorationsCreateResponse = operations['admin___avatar-decorations___create']['responses']['200']['content']['application/json'];
+
// @public (undocumented)
type AdminAvatarDecorationsDeleteRequest = operations['admin___avatar-decorations___delete']['requestBody']['content']['application/json'];
@@ -1253,6 +1256,7 @@ declare namespace entities {
AdminAnnouncementsListResponse,
AdminAnnouncementsUpdateRequest,
AdminAvatarDecorationsCreateRequest,
+ AdminAvatarDecorationsCreateResponse,
AdminAvatarDecorationsDeleteRequest,
AdminAvatarDecorationsListRequest,
AdminAvatarDecorationsListResponse,
diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts
index d0367d8496..5e6bc0a99c 100644
--- a/packages/misskey-js/src/autogen/endpoint.ts
+++ b/packages/misskey-js/src/autogen/endpoint.ts
@@ -31,6 +31,7 @@ import type {
AdminAnnouncementsListResponse,
AdminAnnouncementsUpdateRequest,
AdminAvatarDecorationsCreateRequest,
+ AdminAvatarDecorationsCreateResponse,
AdminAvatarDecorationsDeleteRequest,
AdminAvatarDecorationsListRequest,
AdminAvatarDecorationsListResponse,
@@ -597,7 +598,7 @@ export type Endpoints = {
'admin/announcements/delete': { req: AdminAnnouncementsDeleteRequest; res: EmptyResponse };
'admin/announcements/list': { req: AdminAnnouncementsListRequest; res: AdminAnnouncementsListResponse };
'admin/announcements/update': { req: AdminAnnouncementsUpdateRequest; res: EmptyResponse };
- 'admin/avatar-decorations/create': { req: AdminAvatarDecorationsCreateRequest; res: EmptyResponse };
+ 'admin/avatar-decorations/create': { req: AdminAvatarDecorationsCreateRequest; res: AdminAvatarDecorationsCreateResponse };
'admin/avatar-decorations/delete': { req: AdminAvatarDecorationsDeleteRequest; res: EmptyResponse };
'admin/avatar-decorations/list': { req: AdminAvatarDecorationsListRequest; res: AdminAvatarDecorationsListResponse };
'admin/avatar-decorations/update': { req: AdminAvatarDecorationsUpdateRequest; res: EmptyResponse };
diff --git a/packages/misskey-js/src/autogen/entities.ts b/packages/misskey-js/src/autogen/entities.ts
index ced87c4c7e..f3ddf64481 100644
--- a/packages/misskey-js/src/autogen/entities.ts
+++ b/packages/misskey-js/src/autogen/entities.ts
@@ -34,6 +34,7 @@ export type AdminAnnouncementsListRequest = operations['admin___announcements___
export type AdminAnnouncementsListResponse = operations['admin___announcements___list']['responses']['200']['content']['application/json'];
export type AdminAnnouncementsUpdateRequest = operations['admin___announcements___update']['requestBody']['content']['application/json'];
export type AdminAvatarDecorationsCreateRequest = operations['admin___avatar-decorations___create']['requestBody']['content']['application/json'];
+export type AdminAvatarDecorationsCreateResponse = operations['admin___avatar-decorations___create']['responses']['200']['content']['application/json'];
export type AdminAvatarDecorationsDeleteRequest = operations['admin___avatar-decorations___delete']['requestBody']['content']['application/json'];
export type AdminAvatarDecorationsListRequest = operations['admin___avatar-decorations___list']['requestBody']['content']['application/json'];
export type AdminAvatarDecorationsListResponse = operations['admin___avatar-decorations___list']['responses']['200']['content']['application/json'];
diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts
index 560960f018..a5333d4f93 100644
--- a/packages/misskey-js/src/autogen/types.ts
+++ b/packages/misskey-js/src/autogen/types.ts
@@ -6324,9 +6324,22 @@ export type operations = {
};
};
responses: {
- /** @description OK (without any results) */
- 204: {
- content: never;
+ /** @description OK (with results) */
+ 200: {
+ content: {
+ 'application/json': {
+ /** Format: id */
+ id: string;
+ /** Format: date-time */
+ createdAt: string;
+ /** Format: date-time */
+ updatedAt: string | null;
+ name: string;
+ description: string;
+ url: string;
+ roleIdsThatCanBeUsedThisDecoration: string[];
+ };
+ };
};
/** @description Client error */
400: {
From 0472d43ee97f1ac0fd13969b2111d67b322a947f Mon Sep 17 00:00:00 2001
From: Pinapelz
Date: Mon, 28 Oct 2024 05:04:46 -0700
Subject: [PATCH 103/147] fix: encode RSS uris with escape sequences before
fetching (#14826)
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
---
CHANGELOG.md | 1 +
packages/frontend/src/ui/_common_/statusbar-rss.vue | 2 +-
packages/frontend/src/widgets/WidgetRss.vue | 2 +-
packages/frontend/src/widgets/WidgetRssTicker.vue | 2 +-
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 52077f813f..0b2cb43e25 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,7 @@
- Fix: Turnstileが失敗・期限切れした際にも成功扱いとなってしまう問題を修正
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/768)
- Fix: デッキのタイムラインカラムで「センシティブなファイルを含むノートを表示」設定が使用できなかった問題を修正
+- Fix: Encode RSS urls with escape sequences before fetching allowing query parameters to be used
- Fix: リンク切れを修正
### Server
diff --git a/packages/frontend/src/ui/_common_/statusbar-rss.vue b/packages/frontend/src/ui/_common_/statusbar-rss.vue
index 550fc39b00..da8fa8bb21 100644
--- a/packages/frontend/src/ui/_common_/statusbar-rss.vue
+++ b/packages/frontend/src/ui/_common_/statusbar-rss.vue
@@ -48,7 +48,7 @@ const fetching = ref(true);
const key = ref(0);
const tick = () => {
- window.fetch(`/api/fetch-rss?url=${props.url}`, {}).then(res => {
+ window.fetch(`/api/fetch-rss?url=${encodeURIComponent(props.url)}`, {}).then(res => {
res.json().then((feed: Misskey.entities.FetchRssResponse) => {
if (props.shuffle) {
shuffle(feed.items);
diff --git a/packages/frontend/src/widgets/WidgetRss.vue b/packages/frontend/src/widgets/WidgetRss.vue
index 3e43687709..92dc6d148e 100644
--- a/packages/frontend/src/widgets/WidgetRss.vue
+++ b/packages/frontend/src/widgets/WidgetRss.vue
@@ -70,7 +70,7 @@ const items = computed(() => rawItems.value.slice(0, widgetProps.maxEntries));
const fetching = ref(true);
const fetchEndpoint = computed(() => {
const url = new URL('/api/fetch-rss', base);
- url.searchParams.set('url', widgetProps.url);
+ url.searchParams.set('url', encodeURIComponent(widgetProps.url));
return url;
});
const intervalClear = ref<(() => void) | undefined>();
diff --git a/packages/frontend/src/widgets/WidgetRssTicker.vue b/packages/frontend/src/widgets/WidgetRssTicker.vue
index 4f594b720f..6957878572 100644
--- a/packages/frontend/src/widgets/WidgetRssTicker.vue
+++ b/packages/frontend/src/widgets/WidgetRssTicker.vue
@@ -99,7 +99,7 @@ const items = computed(() => {
const fetching = ref(true);
const fetchEndpoint = computed(() => {
const url = new URL('/api/fetch-rss', base);
- url.searchParams.set('url', widgetProps.url);
+ url.searchParams.set('url', encodeURIComponent(widgetProps.url));
return url;
});
const intervalClear = ref<(() => void) | undefined>();
From 8eb7749e448d912bdbe2c4eadc35f5d5f1becf61 Mon Sep 17 00:00:00 2001
From: Tamme Schichler
Date: Mon, 28 Oct 2024 13:06:16 +0100
Subject: [PATCH 104/147] fix(backend): Accept arrays in ActivityPub `icon` and
`image` properties (#14825)
This is allowed according to the Activity vocabulary: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-icon
The issue is noticeable in combination with Bridgy Fed: https://github.com/snarfed/bridgy-fed/issues/1408
---
.../backend/src/core/activitypub/models/ApPersonService.ts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/packages/backend/src/core/activitypub/models/ApPersonService.ts b/packages/backend/src/core/activitypub/models/ApPersonService.ts
index 0e2934301b..c9de67b3a0 100644
--- a/packages/backend/src/core/activitypub/models/ApPersonService.ts
+++ b/packages/backend/src/core/activitypub/models/ApPersonService.ts
@@ -232,6 +232,12 @@ export class ApPersonService implements OnModuleInit {
if (user == null) throw new Error('failed to create user: user is null');
const [avatar, banner] = await Promise.all([icon, image].map(img => {
+ // icon and image may be arrays
+ // see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-icon
+ if (Array.isArray(img)) {
+ img = img.find(item => item && item.url) ?? null;
+ }
+
// if we have an explicitly missing image, return an
// explicitly-null set of values
if ((img == null) || (typeof img === 'object' && img.url == null)) {
From f30d19051fb67f800185da283672ae7f9e8c535e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?=
<67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Mon, 28 Oct 2024 21:06:54 +0900
Subject: [PATCH 105/147] =?UTF-8?q?enhance(backend):=20check=5Fconnect.js?=
=?UTF-8?q?=20=E3=81=A7=E5=85=A8Redis=E3=81=A8DB=E3=81=B8=E3=81=AE?=
=?UTF-8?q?=E6=8E=A5=E7=B6=9A=E3=82=92=E7=A2=BA=E8=AA=8D=E3=81=99=E3=82=8B?=
=?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=20(#14853)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix race conditions in check_connect.js
(cherry picked from commit 524ddb96770690455b82522104a543c5b0b1f3b3)
* fix
* Update Changelog
---------
Co-authored-by: Hazelnoot
---
CHANGELOG.md | 3 ++
packages/backend/scripts/check_connect.js | 51 ++++++++++++++++++++---
2 files changed, 49 insertions(+), 5 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0b2cb43e25..23be962d9e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,6 +24,9 @@
- Fix: リンク切れを修正
### Server
+- Enhance: 起動前の疎通チェックで、DBとメイン以外のRedisの疎通確認も行うように
+ (Based on https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/588)
+ (Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/715)
- Fix: Nested proxy requestsを検出した際にブロックするように
[ghsa-gq5q-c77c-v236](https://github.com/misskey-dev/misskey/security/advisories/ghsa-gq5q-c77c-v236)
- Fix: 招待コードの発行可能な残り数算出に使用すべきロールポリシーの値が違う問題を修正
diff --git a/packages/backend/scripts/check_connect.js b/packages/backend/scripts/check_connect.js
index ba25fd416c..bb149444b5 100644
--- a/packages/backend/scripts/check_connect.js
+++ b/packages/backend/scripts/check_connect.js
@@ -5,11 +5,52 @@
import Redis from 'ioredis';
import { loadConfig } from '../built/config.js';
+import { createPostgresDataSource } from '../built/postgres.js';
const config = loadConfig();
-const redis = new Redis(config.redis);
-redis.on('connect', () => redis.disconnect());
-redis.on('error', (e) => {
- throw e;
-});
+async function connectToPostgres() {
+ const source = createPostgresDataSource(config);
+ await source.initialize();
+ await source.destroy();
+}
+
+async function connectToRedis(redisOptions) {
+ return await new Promise(async (resolve, reject) => {
+ const redis = new Redis({
+ ...redisOptions,
+ lazyConnect: true,
+ reconnectOnError: false,
+ showFriendlyErrorStack: true,
+ });
+ redis.on('error', e => reject(e));
+
+ try {
+ await redis.connect();
+ resolve();
+
+ } catch (e) {
+ reject(e);
+
+ } finally {
+ redis.disconnect(false);
+ }
+ });
+}
+
+// If not all of these are defined, the default one gets reused.
+// so we use a Set to only try connecting once to each **uniq** redis.
+const promises = Array
+ .from(new Set([
+ config.redis,
+ config.redisForPubsub,
+ config.redisForJobQueue,
+ config.redisForTimelines,
+ config.redisForReactions,
+ ]))
+ .map(connectToRedis)
+ .concat([
+ connectToPostgres()
+ ]);
+
+await Promise.allSettled(promises);
From a96f09cee352f8ae7cc11c3dd45e0182a5623350 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Mon, 28 Oct 2024 12:23:59 +0000
Subject: [PATCH 106/147] Bump version to 2024.10.2-alpha.2
---
package.json | 2 +-
packages/misskey-js/package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index 6c598e11a3..55ae092967 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "misskey",
- "version": "2024.10.2-alpha.1",
+ "version": "2024.10.2-alpha.2",
"codename": "nasubi",
"repository": {
"type": "git",
diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json
index ef3d84ee96..32d6c8b0cb 100644
--- a/packages/misskey-js/package.json
+++ b/packages/misskey-js/package.json
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "misskey-js",
- "version": "2024.10.2-alpha.1",
+ "version": "2024.10.2-alpha.2",
"description": "Misskey SDK for JavaScript",
"license": "MIT",
"main": "./built/index.js",
From 7fc8a2a7b04d8550abdf55259bde4c857bd462a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?=
<67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Wed, 30 Oct 2024 09:57:54 +0900
Subject: [PATCH 107/147] =?UTF-8?q?fix(frontend):=20=E4=B8=80=E9=83=A8?=
=?UTF-8?q?=E3=81=AE=E3=83=8E=E3=83=BC=E3=83=88=E8=A1=A8=E7=A4=BA=E3=81=A7?=
=?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=81=AB=E3=81=8B=E3=81=8B=E3=82=8F=E3=82=89?=
=?UTF-8?q?=E3=81=9A=E3=82=BB=E3=83=B3=E3=82=B7=E3=83=86=E3=82=A3=E3=83=96?=
=?UTF-8?q?=E3=81=AA=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92=E5=90=AB?=
=?UTF-8?q?=E3=82=80=E3=83=8E=E3=83=BC=E3=83=88=E3=81=8C=E6=9C=80=E5=B0=8F?=
=?UTF-8?q?=E5=8C=96=E3=81=95=E3=82=8C=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92?=
=?UTF-8?q?=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix https://github.com/misskey-dev/misskey/pull/14772#discussion_r1821707117
---
packages/frontend/src/components/MkNote.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue
index be1339ecc4..3de69d6d09 100644
--- a/packages/frontend/src/components/MkNote.vue
+++ b/packages/frontend/src/components/MkNote.vue
@@ -227,7 +227,7 @@ const emit = defineEmits<{
}>();
const inTimeline = inject('inTimeline', false);
-const tl_withSensitive = inject[>('tl_withSensitive', ref(false));
+const tl_withSensitive = inject][>('tl_withSensitive', ref(true));
const inChannel = inject('inChannel', null);
const currentClip = inject][ | null>('currentClip', null);
From 17d9aca5a7ec6149a8dbf0c1607c81ab188e7015 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?=
<67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Thu, 31 Oct 2024 13:46:42 +0900
Subject: [PATCH 108/147] =?UTF-8?q?refactor(frontend):=20as=E3=81=A8any?=
=?UTF-8?q?=E3=82=92=E3=81=99=E3=81=90=E3=81=AA=E3=81=8A=E3=81=9B=E3=82=8B?=
=?UTF-8?q?=E7=AF=84=E5=9B=B2=E3=81=A7=E9=99=A4=E5=8E=BB=20(#14848)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* refactor(frontend): できるだけanyを除去
* refactor
* lint
* fix
* remove unused
* Update packages/frontend/src/components/MkReactionsViewer.details.vue
* Update packages/frontend/src/components/MkUsersTooltip.vue
---------
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
---
.../src/components/MkAntennaEditor.vue | 2 +-
.../src/components/MkChannelPreview.vue | 3 +-
packages/frontend/src/components/MkDialog.vue | 4 +--
packages/frontend/src/components/MkDrive.vue | 8 ++---
.../src/components/MkEmojiPicker.section.vue | 2 +-
.../frontend/src/components/MkEmojiPicker.vue | 4 +--
.../src/components/MkExtensionInstaller.vue | 2 +-
packages/frontend/src/components/MkInput.vue | 8 ++---
.../components/MkNotificationSelectWindow.vue | 2 +-
.../src/components/MkObjectView.value.vue | 10 +++---
.../frontend/src/components/MkPageWindow.vue | 2 +-
.../frontend/src/components/MkPopupMenu.vue | 2 +-
.../frontend/src/components/MkPostForm.vue | 20 +++--------
.../src/components/MkPostFormAttaches.vue | 8 ++---
.../src/components/MkPostFormDialog.vue | 16 ++-------
packages/frontend/src/components/MkRadio.vue | 8 ++---
.../components/MkReactionsViewer.details.vue | 3 +-
.../frontend/src/components/MkSuperMenu.vue | 33 +++++++++++++++++--
.../frontend/src/components/MkUrlPreview.vue | 10 +++---
.../MkUserAnnouncementEditDialog.vue | 8 +++--
.../src/components/MkUsersTooltip.vue | 4 +--
packages/frontend/src/components/MkWindow.vue | 11 +++++--
.../frontend/src/components/form/suspense.vue | 6 ++--
.../frontend/src/components/global/MkMfm.ts | 4 +--
packages/frontend/src/nirax.ts | 12 ++++---
packages/frontend/src/os.ts | 23 ++++++-------
packages/frontend/src/pages/admin/users.vue | 6 ++--
.../src/pages/custom-emojis-manager.vue | 26 +++++++--------
.../frontend/src/pages/emoji-edit-dialog.vue | 19 ++++++-----
.../frontend/src/pages/follow-requests.vue | 4 +--
packages/frontend/src/pages/lookup.vue | 2 +-
.../frontend/src/pages/my-clips/index.vue | 6 ++--
packages/frontend/src/pages/my-lists/list.vue | 4 +--
.../page-editor/els/page-editor.el.image.vue | 5 +--
.../page-editor/els/page-editor.el.note.vue | 13 +++++---
.../els/page-editor.el.section.vue | 12 +++----
.../page-editor/els/page-editor.el.text.vue | 5 +--
packages/frontend/src/pages/registry.keys.vue | 2 +-
.../src/pages/reversi/game.setting.vue | 6 ++--
packages/frontend/src/pages/scratchpad.vue | 6 +++-
.../src/pages/settings/2fa.qrdialog.vue | 7 ++--
.../frontend/src/pages/settings/accounts.vue | 2 +-
packages/frontend/src/pages/settings/apps.vue | 3 +-
.../settings/avatar-decoration.dialog.vue | 8 ++---
packages/frontend/src/pages/user/home.vue | 2 +-
packages/frontend/src/router/definition.ts | 2 +-
packages/frontend/src/router/main.ts | 8 ++---
.../frontend/src/scripts/check-word-mute.ts | 3 +-
packages/frontend/src/scripts/form.ts | 16 ++++-----
packages/frontend/src/scripts/misskey-api.ts | 6 ++--
packages/frontend/src/scripts/select-file.ts | 6 ++--
packages/frontend/src/scripts/shuffle.ts | 5 +--
packages/frontend/src/scripts/upload.ts | 8 ++---
packages/frontend/src/store.ts | 9 ++---
packages/frontend/src/types/post-form.ts | 22 +++++++++++++
.../frontend/src/widgets/WidgetPhotos.vue | 4 +--
56 files changed, 250 insertions(+), 192 deletions(-)
create mode 100644 packages/frontend/src/types/post-form.ts
diff --git a/packages/frontend/src/components/MkAntennaEditor.vue b/packages/frontend/src/components/MkAntennaEditor.vue
index 2386ba6fa7..e622d57f1e 100644
--- a/packages/frontend/src/components/MkAntennaEditor.vue
+++ b/packages/frontend/src/components/MkAntennaEditor.vue
@@ -160,7 +160,7 @@ async function deleteAntenna() {
function addUser() {
os.selectUser({ includeSelf: true }).then(user => {
users.value = users.value.trim();
- users.value += '\n@' + Misskey.acct.toString(user as any);
+ users.value += '\n@' + Misskey.acct.toString(user);
users.value = users.value.trim();
});
}
diff --git a/packages/frontend/src/components/MkChannelPreview.vue b/packages/frontend/src/components/MkChannelPreview.vue
index 99580df5e2..c470042b79 100644
--- a/packages/frontend/src/components/MkChannelPreview.vue
+++ b/packages/frontend/src/components/MkChannelPreview.vue
@@ -47,11 +47,12 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/components/MkEmojiPicker.vue b/packages/frontend/src/components/MkEmojiPicker.vue
index 219950f135..8187d991e7 100644
--- a/packages/frontend/src/components/MkEmojiPicker.vue
+++ b/packages/frontend/src/components/MkEmojiPicker.vue
@@ -409,7 +409,7 @@ function computeButtonTitle(ev: MouseEvent): void {
elm.title = getEmojiName(emoji);
}
-function chosen(emoji: any, ev?: MouseEvent) {
+function chosen(emoji: string | Misskey.entities.EmojiSimple | UnicodeEmojiDef, ev?: MouseEvent) {
const el = ev && (ev.currentTarget ?? ev.target) as HTMLElement | null | undefined;
if (el) {
const rect = el.getBoundingClientRect();
@@ -426,7 +426,7 @@ function chosen(emoji: any, ev?: MouseEvent) {
// 最近使った絵文字更新
if (!pinned.value?.includes(key)) {
let recents = defaultStore.state.recentlyUsedEmojis;
- recents = recents.filter((emoji: any) => emoji !== key);
+ recents = recents.filter((emoji) => emoji !== key);
recents.unshift(key);
defaultStore.set('recentlyUsedEmojis', recents.splice(0, 32));
}
diff --git a/packages/frontend/src/components/MkExtensionInstaller.vue b/packages/frontend/src/components/MkExtensionInstaller.vue
index b41604b2c3..d59b20435e 100644
--- a/packages/frontend/src/components/MkExtensionInstaller.vue
+++ b/packages/frontend/src/components/MkExtensionInstaller.vue
@@ -73,7 +73,7 @@ export type Extension = {
author: string;
description?: string;
permissions?: string[];
- config?: Record;
+ config?: Record;
};
} | {
type: 'theme';
diff --git a/packages/frontend/src/components/MkInput.vue b/packages/frontend/src/components/MkInput.vue
index e01ff86c5a..08817fd6a8 100644
--- a/packages/frontend/src/components/MkInput.vue
+++ b/packages/frontend/src/components/MkInput.vue
@@ -44,7 +44,7 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/components/MkPageWindow.vue b/packages/frontend/src/components/MkPageWindow.vue
index 4777da2848..02c84df447 100644
--- a/packages/frontend/src/components/MkPageWindow.vue
+++ b/packages/frontend/src/components/MkPageWindow.vue
@@ -58,7 +58,7 @@ const windowRouter = routerFactory(props.initialPath);
const contents = shallowRef(null);
const pageMetadata = ref(null);
const windowEl = shallowRef>();
-const history = ref<{ path: string; key: any; }[]>([{
+const history = ref<{ path: string; key: string; }[]>([{
path: windowRouter.getCurrentPath(),
key: windowRouter.getCurrentKey(),
}]);
diff --git a/packages/frontend/src/components/MkPopupMenu.vue b/packages/frontend/src/components/MkPopupMenu.vue
index 26c251a8d2..df664e49f7 100644
--- a/packages/frontend/src/components/MkPopupMenu.vue
+++ b/packages/frontend/src/components/MkPopupMenu.vue
@@ -19,7 +19,7 @@ defineProps<{
items: MenuItem[];
align?: 'center' | string;
width?: number;
- src?: any;
+ src?: HTMLElement | null;
returnFocusTo?: HTMLElement | null;
}>();
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue
index b6b80082d3..f2fe048449 100644
--- a/packages/frontend/src/components/MkPostForm.vue
+++ b/packages/frontend/src/components/MkPostForm.vue
@@ -129,25 +129,13 @@ import { miLocalStorage } from '@/local-storage.js';
import { claimAchievement } from '@/scripts/achievements.js';
import { emojiPicker } from '@/scripts/emoji-picker.js';
import { mfmFunctionPicker } from '@/scripts/mfm-function-picker.js';
+import type { PostFormProps } from '@/types/post-form.js';
const $i = signinRequired();
const modal = inject('modal');
-const props = withDefaults(defineProps<{
- reply?: Misskey.entities.Note;
- renote?: Misskey.entities.Note;
- channel?: Misskey.entities.Channel; // TODO
- mention?: Misskey.entities.User;
- specified?: Misskey.entities.UserDetailed;
- initialText?: string;
- initialCw?: string;
- initialVisibility?: (typeof Misskey.noteVisibilities)[number];
- initialFiles?: Misskey.entities.DriveFile[];
- initialLocalOnly?: boolean;
- initialVisibleUsers?: Misskey.entities.UserDetailed[];
- initialNote?: Misskey.entities.Note;
- instant?: boolean;
+const props = withDefaults(defineProps {
- if (typeof key !== 'string') return;
+ }, (key, value) => {
+ if (typeof key !== 'string' || typeof value !== 'string') return;
if (key === 'text') { text.value = value; }
if (key === 'cw') { useCw.value = value !== null; cw.value = value; }
});
diff --git a/packages/frontend/src/components/MkPostFormAttaches.vue b/packages/frontend/src/components/MkPostFormAttaches.vue
index ee7038df64..56e026aa3c 100644
--- a/packages/frontend/src/components/MkPostFormAttaches.vue
+++ b/packages/frontend/src/components/MkPostFormAttaches.vue
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
]
emit('update:modelValue', v)">
-
+
import('vuedraggable').then(x => x.default));
const props = defineProps<{
- modelValue: any[];
+ modelValue: Misskey.entities.DriveFile[];
detachMediaFn?: (id: string) => void;
}>();
const mock = inject
('mock', false);
const emit = defineEmits<{
- (ev: 'update:modelValue', value: any[]): void;
+ (ev: 'update:modelValue', value: Misskey.entities.DriveFile[]): void;
(ev: 'detach', id: string): void;
(ev: 'changeSensitive', file: Misskey.entities.DriveFile, isSensitive: boolean): void;
(ev: 'changeName', file: Misskey.entities.DriveFile, newName: string): void;
@@ -113,7 +113,7 @@ async function rename(file) {
});
}
-async function describe(file) {
+async function describe(file: Misskey.entities.DriveFile) {
if (mock) return;
const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkFileCaptionEditWindow.vue')), {
diff --git a/packages/frontend/src/components/MkPostFormDialog.vue b/packages/frontend/src/components/MkPostFormDialog.vue
index d6bca29050..32d8df1504 100644
--- a/packages/frontend/src/components/MkPostFormDialog.vue
+++ b/packages/frontend/src/components/MkPostFormDialog.vue
@@ -11,23 +11,11 @@ SPDX-License-Identifier: AGPL-3.0-only
+
diff --git a/packages/frontend/src/components/MkUrlPreview.vue b/packages/frontend/src/components/MkUrlPreview.vue
index c287effadc..f0da8fd3f2 100644
--- a/packages/frontend/src/components/MkUrlPreview.vue
+++ b/packages/frontend/src/components/MkUrlPreview.vue
@@ -180,7 +180,7 @@ window.fetch(`/url?url=${encodeURIComponent(requestUrl.href)}&lang=${versatileLa
sensitive.value = info.sensitive ?? false;
});
-function adjustTweetHeight(message: any) {
+function adjustTweetHeight(message: MessageEvent) {
if (message.origin !== 'https://platform.twitter.com') return;
const embed = message.data?.['twttr.embed'];
if (embed?.method !== 'twttr.private.resize') return;
@@ -193,14 +193,16 @@ function openPlayer(): void {
const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkYouTubePlayer.vue')), {
url: requestUrl.href,
}, {
- // TODO
+ closed: () => {
+ dispose();
+ },
});
}
-(window as any).addEventListener('message', adjustTweetHeight);
+window.addEventListener('message', adjustTweetHeight);
onUnmounted(() => {
- (window as any).removeEventListener('message', adjustTweetHeight);
+ window.removeEventListener('message', adjustTweetHeight);
});
diff --git a/packages/frontend/src/components/MkUserAnnouncementEditDialog.vue b/packages/frontend/src/components/MkUserAnnouncementEditDialog.vue
index 7a2b5f5ddc..7f0266d1d3 100644
--- a/packages/frontend/src/components/MkUserAnnouncementEditDialog.vue
+++ b/packages/frontend/src/components/MkUserAnnouncementEditDialog.vue
@@ -62,9 +62,11 @@ import MkTextarea from '@/components/MkTextarea.vue';
import MkSwitch from '@/components/MkSwitch.vue';
import MkRadios from '@/components/MkRadios.vue';
+type AdminAnnouncementType = Misskey.entities.AdminAnnouncementsCreateRequest & { id: string; }
+
const props = defineProps<{
user: Misskey.entities.User,
- announcement?: Misskey.entities.Announcement,
+ announcement?: Required,
}>();
const dialog = ref | null>(null);
@@ -75,7 +77,7 @@ const display = ref(props.announcement ? props.announcement.display : 'dialog');
const needConfirmationToRead = ref(props.announcement ? props.announcement.needConfirmationToRead : false);
const emit = defineEmits<{
- (ev: 'done', v: { deleted?: boolean; updated?: any; created?: any }): void,
+ (ev: 'done', v: { deleted?: boolean; updated?: AdminAnnouncementType; created?: AdminAnnouncementType; }): void,
(ev: 'closed'): void
}>();
@@ -88,7 +90,7 @@ async function done() {
display: display.value,
needConfirmationToRead: needConfirmationToRead.value,
userId: props.user.id,
- };
+ } satisfies Misskey.entities.AdminAnnouncementsCreateRequest;
if (props.announcement) {
await os.apiWithDialog('admin/announcements/update', {
diff --git a/packages/frontend/src/components/MkUsersTooltip.vue b/packages/frontend/src/components/MkUsersTooltip.vue
index 054a503257..0cb7f22e93 100644
--- a/packages/frontend/src/components/MkUsersTooltip.vue
+++ b/packages/frontend/src/components/MkUsersTooltip.vue
@@ -16,12 +16,12 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/pages/follow-requests.vue b/packages/frontend/src/pages/follow-requests.vue
index 8991af8086..a840d0d0b3 100644
--- a/packages/frontend/src/pages/follow-requests.vue
+++ b/packages/frontend/src/pages/follow-requests.vue
@@ -55,13 +55,13 @@ const pagination = {
function accept(user) {
misskeyApi('following/requests/accept', { userId: user.id }).then(() => {
- paginationComponent.value.reload();
+ paginationComponent.value?.reload();
});
}
function reject(user) {
misskeyApi('following/requests/reject', { userId: user.id }).then(() => {
- paginationComponent.value.reload();
+ paginationComponent.value?.reload();
});
}
diff --git a/packages/frontend/src/pages/lookup.vue b/packages/frontend/src/pages/lookup.vue
index 3233953942..6f10c69640 100644
--- a/packages/frontend/src/pages/lookup.vue
+++ b/packages/frontend/src/pages/lookup.vue
@@ -40,7 +40,7 @@ function fetch() {
return;
}
- let promise: Promise;
+ let promise: Promise;
if (uri.startsWith('https://')) {
promise = misskeyApi('ap/show', {
diff --git a/packages/frontend/src/pages/my-clips/index.vue b/packages/frontend/src/pages/my-clips/index.vue
index ece998a7a5..acf37a9a2f 100644
--- a/packages/frontend/src/pages/my-clips/index.vue
+++ b/packages/frontend/src/pages/my-clips/index.vue
@@ -77,15 +77,15 @@ async function create() {
clipsCache.delete();
- pagingComponent.value.reload();
+ pagingComponent.value?.reload();
}
function onClipCreated() {
- pagingComponent.value.reload();
+ pagingComponent.value?.reload();
}
function onClipDeleted() {
- pagingComponent.value.reload();
+ pagingComponent.value?.reload();
}
const headerActions = computed(() => []);
diff --git a/packages/frontend/src/pages/my-lists/list.vue b/packages/frontend/src/pages/my-lists/list.vue
index 804a5ae8f8..69e404bd85 100644
--- a/packages/frontend/src/pages/my-lists/list.vue
+++ b/packages/frontend/src/pages/my-lists/list.vue
@@ -110,7 +110,7 @@ function addUser() {
listId: list.value.id,
userId: user.id,
}).then(() => {
- paginationEl.value.reload();
+ paginationEl.value?.reload();
});
});
}
@@ -126,7 +126,7 @@ async function removeUser(item, ev) {
listId: list.value.id,
userId: item.userId,
}).then(() => {
- paginationEl.value.removeItem(item.id);
+ paginationEl.value?.removeItem(item.id);
});
},
}], ev.currentTarget ?? ev.target);
diff --git a/packages/frontend/src/pages/page-editor/els/page-editor.el.image.vue b/packages/frontend/src/pages/page-editor/els/page-editor.el.image.vue
index 1cfe7a6d2d..247b8f61a1 100644
--- a/packages/frontend/src/pages/page-editor/els/page-editor.el.image.vue
+++ b/packages/frontend/src/pages/page-editor/els/page-editor.el.image.vue
@@ -30,11 +30,12 @@ import { misskeyApi } from '@/scripts/misskey-api.js';
import { i18n } from '@/i18n.js';
const props = defineProps<{
- modelValue: any
+ modelValue: Misskey.entities.PageBlock & { type: 'image' };
}>();
const emit = defineEmits<{
- (ev: 'update:modelValue', value: any): void;
+ (ev: 'update:modelValue', value: Misskey.entities.PageBlock & { type: 'image' }): void;
+ (ev: 'remove'): void;
}>();
const file = ref(null);
diff --git a/packages/frontend/src/pages/page-editor/els/page-editor.el.note.vue b/packages/frontend/src/pages/page-editor/els/page-editor.el.note.vue
index 0a28386986..52b4f2aaa3 100644
--- a/packages/frontend/src/pages/page-editor/els/page-editor.el.note.vue
+++ b/packages/frontend/src/pages/page-editor/els/page-editor.el.note.vue
@@ -34,19 +34,24 @@ import { misskeyApi } from '@/scripts/misskey-api.js';
import { i18n } from '@/i18n.js';
const props = defineProps<{
- modelValue: any
+ modelValue: Misskey.entities.PageBlock & { type: 'note' };
}>();
const emit = defineEmits<{
- (ev: 'update:modelValue', value: any): void;
+ (ev: 'update:modelValue', value: Misskey.entities.PageBlock & { type: 'note' }): void;
}>();
-const id = ref(props.modelValue.note);
+const id = ref(props.modelValue.note);
const note = ref(null);
watch(id, async () => {
if (id.value && (id.value.startsWith('http://') || id.value.startsWith('https://'))) {
- id.value = (id.value.endsWith('/') ? id.value.slice(0, -1) : id.value).split('/').pop();
+ id.value = (id.value.endsWith('/') ? id.value.slice(0, -1) : id.value).split('/').pop() ?? null;
+ }
+
+ if (!id.value) {
+ note.value = null;
+ return;
}
emit('update:modelValue', {
diff --git a/packages/frontend/src/pages/page-editor/els/page-editor.el.section.vue b/packages/frontend/src/pages/page-editor/els/page-editor.el.section.vue
index 0f8dc33143..eea52255c7 100644
--- a/packages/frontend/src/pages/page-editor/els/page-editor.el.section.vue
+++ b/packages/frontend/src/pages/page-editor/els/page-editor.el.section.vue
@@ -23,6 +23,7 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/pages/settings/accounts.vue b/packages/frontend/src/pages/settings/accounts.vue
index 16f0716a12..97e960675f 100644
--- a/packages/frontend/src/pages/settings/accounts.vue
+++ b/packages/frontend/src/pages/settings/accounts.vue
@@ -90,7 +90,7 @@ function createAccount() {
});
}
-async function switchAccount(account: any) {
+async function switchAccount(account: Misskey.entities.UserDetailed) {
const fetchedAccounts = await getAccounts();
const token = fetchedAccounts.find(x => x.id === account.id)!.token;
switchAccountWithToken(token);
diff --git a/packages/frontend/src/pages/settings/apps.vue b/packages/frontend/src/pages/settings/apps.vue
index 68e36ef1bb..6515503505 100644
--- a/packages/frontend/src/pages/settings/apps.vue
+++ b/packages/frontend/src/pages/settings/apps.vue
@@ -55,6 +55,7 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/pages/user/home.vue b/packages/frontend/src/pages/user/home.vue
index 00b5740639..2794db2821 100644
--- a/packages/frontend/src/pages/user/home.vue
+++ b/packages/frontend/src/pages/user/home.vue
@@ -257,7 +257,7 @@ function parallaxLoop() {
}
function parallax() {
- const banner = bannerEl.value as any;
+ const banner = bannerEl.value;
if (banner == null) return;
const top = getScrollPosition(rootEl.value);
diff --git a/packages/frontend/src/router/definition.ts b/packages/frontend/src/router/definition.ts
index b5fd6b6ec3..e98e0b59b1 100644
--- a/packages/frontend/src/router/definition.ts
+++ b/packages/frontend/src/router/definition.ts
@@ -10,7 +10,7 @@ import { $i, iAmModerator } from '@/account.js';
import MkLoading from '@/pages/_loading_.vue';
import MkError from '@/pages/_error_.vue';
-export const page = (loader: AsyncComponentLoader) => defineAsyncComponent({
+export const page = (loader: AsyncComponentLoader) => defineAsyncComponent({
loader: loader,
loadingComponent: MkLoading,
errorComponent: MkError,
diff --git a/packages/frontend/src/router/main.ts b/packages/frontend/src/router/main.ts
index 6ee967e6f4..3c25e80d12 100644
--- a/packages/frontend/src/router/main.ts
+++ b/packages/frontend/src/router/main.ts
@@ -4,7 +4,7 @@
*/
import { EventEmitter } from 'eventemitter3';
-import { IRouter, Resolved, RouteDef, RouterEvent } from '@/nirax.js';
+import { IRouter, Resolved, RouteDef, RouterEvent, RouterFlag } from '@/nirax.js';
import type { App, ShallowRef } from 'vue';
@@ -79,7 +79,7 @@ class MainRouterProxy implements IRouter {
return this.supplier().currentRoute;
}
- get navHook(): ((path: string, flag?: any) => boolean) | null {
+ get navHook(): ((path: string, flag?: RouterFlag) => boolean) | null {
return this.supplier().navHook;
}
@@ -91,11 +91,11 @@ class MainRouterProxy implements IRouter {
return this.supplier().getCurrentKey();
}
- getCurrentPath(): any {
+ getCurrentPath(): string {
return this.supplier().getCurrentPath();
}
- push(path: string, flag?: any): void {
+ push(path: string, flag?: RouterFlag): void {
this.supplier().push(path, flag);
}
diff --git a/packages/frontend/src/scripts/check-word-mute.ts b/packages/frontend/src/scripts/check-word-mute.ts
index 67e896b4b9..0a37a08bf0 100644
--- a/packages/frontend/src/scripts/check-word-mute.ts
+++ b/packages/frontend/src/scripts/check-word-mute.ts
@@ -2,8 +2,9 @@
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
+import * as Misskey from 'misskey-js';
-export function checkWordMute(note: Record, me: Record | null | undefined, mutedWords: Array): boolean {
+export function checkWordMute(note: Misskey.entities.Note, me: Misskey.entities.UserLite | null | undefined, mutedWords: Array): boolean {
// 自分自身
if (me && (note.userId === me.id)) return false;
diff --git a/packages/frontend/src/scripts/form.ts b/packages/frontend/src/scripts/form.ts
index 242a504c3b..1032e97ac9 100644
--- a/packages/frontend/src/scripts/form.ts
+++ b/packages/frontend/src/scripts/form.ts
@@ -15,7 +15,7 @@ type Hidden = boolean | ((v: any) => boolean);
export type FormItem = {
label?: string;
type: 'string';
- default: string | null;
+ default?: string | null;
description?: string;
required?: boolean;
hidden?: Hidden;
@@ -24,7 +24,7 @@ export type FormItem = {
} | {
label?: string;
type: 'number';
- default: number | null;
+ default?: number | null;
description?: string;
required?: boolean;
hidden?: Hidden;
@@ -32,20 +32,20 @@ export type FormItem = {
} | {
label?: string;
type: 'boolean';
- default: boolean | null;
+ default?: boolean | null;
description?: string;
hidden?: Hidden;
} | {
label?: string;
type: 'enum';
- default: string | null;
+ default?: string | null;
required?: boolean;
hidden?: Hidden;
enum: EnumItem[];
} | {
label?: string;
type: 'radio';
- default: unknown | null;
+ default?: unknown | null;
required?: boolean;
hidden?: Hidden;
options: {
@@ -55,7 +55,7 @@ export type FormItem = {
} | {
label?: string;
type: 'range';
- default: number | null;
+ default?: number | null;
description?: string;
required?: boolean;
step?: number;
@@ -66,12 +66,12 @@ export type FormItem = {
} | {
label?: string;
type: 'object';
- default: Record | null;
+ default?: Record | null;
hidden: Hidden;
} | {
label?: string;
type: 'array';
- default: unknown[] | null;
+ default?: unknown[] | null;
hidden: Hidden;
} | {
type: 'button';
diff --git a/packages/frontend/src/scripts/misskey-api.ts b/packages/frontend/src/scripts/misskey-api.ts
index 1b1159fd01..e7a92e2d5c 100644
--- a/packages/frontend/src/scripts/misskey-api.ts
+++ b/packages/frontend/src/scripts/misskey-api.ts
@@ -17,7 +17,7 @@ export function misskeyApi<
_ResT = ResT extends void ? Misskey.api.SwitchCaseResponseType : ResT,
>(
endpoint: E,
- data: P = {} as any,
+ data: P & { i?: string | null; } = {} as any,
token?: string | null | undefined,
signal?: AbortSignal,
): Promise<_ResT> {
@@ -30,8 +30,8 @@ export function misskeyApi<
const promise = new Promise<_ResT>((resolve, reject) => {
// Append a credential
- if ($i) (data as any).i = $i.token;
- if (token !== undefined) (data as any).i = token;
+ if ($i) data.i = $i.token;
+ if (token !== undefined) data.i = token;
// Send request
window.fetch(`${apiUrl}/${endpoint}`, {
diff --git a/packages/frontend/src/scripts/select-file.ts b/packages/frontend/src/scripts/select-file.ts
index 9aa38178b2..b037aa8acc 100644
--- a/packages/frontend/src/scripts/select-file.ts
+++ b/packages/frontend/src/scripts/select-file.ts
@@ -80,7 +80,7 @@ export function chooseFileFromUrl(): Promise {
});
}
-function select(src: any, label: string | null, multiple: boolean): Promise {
+function select(src: HTMLElement | EventTarget | null, label: string | null, multiple: boolean): Promise {
return new Promise((res, rej) => {
const keepOriginal = ref(defaultStore.state.keepOriginalUploading);
@@ -107,10 +107,10 @@ function select(src: any, label: string | null, multiple: boolean): Promise {
+export function selectFile(src: HTMLElement | EventTarget | null, label: string | null = null): Promise {
return select(src, label, false).then(files => files[0]);
}
-export function selectFiles(src: any, label: string | null = null): Promise {
+export function selectFiles(src: HTMLElement | EventTarget | null, label: string | null = null): Promise {
return select(src, label, true);
}
diff --git a/packages/frontend/src/scripts/shuffle.ts b/packages/frontend/src/scripts/shuffle.ts
index fed16bc71c..1f6ef1928c 100644
--- a/packages/frontend/src/scripts/shuffle.ts
+++ b/packages/frontend/src/scripts/shuffle.ts
@@ -6,8 +6,9 @@
/**
* 配列をシャッフル (破壊的)
*/
-export function shuffle(array: T): T {
- let currentIndex = array.length, randomIndex;
+export function shuffle(array: T): T {
+ let currentIndex = array.length;
+ let randomIndex: number;
// While there remain elements to shuffle.
while (currentIndex !== 0) {
diff --git a/packages/frontend/src/scripts/upload.ts b/packages/frontend/src/scripts/upload.ts
index 22dce609c6..713573a377 100644
--- a/packages/frontend/src/scripts/upload.ts
+++ b/packages/frontend/src/scripts/upload.ts
@@ -32,13 +32,13 @@ const mimeTypeMap = {
export function uploadFile(
file: File,
- folder?: any,
+ folder?: string | Misskey.entities.DriveFolder,
name?: string,
keepOriginal: boolean = defaultStore.state.keepOriginalUploading,
): Promise {
if ($i == null) throw new Error('Not logged in');
- if (folder && typeof folder === 'object') folder = folder.id;
+ const _folder = typeof folder === 'string' ? folder : folder?.id;
if (file.size > instance.maxFileSize) {
alert({
@@ -89,11 +89,11 @@ export function uploadFile(
}
const formData = new FormData();
- formData.append('i', $i.token);
+ formData.append('i', $i!.token);
formData.append('force', 'true');
formData.append('file', resizedImage ?? file);
formData.append('name', ctx.name);
- if (folder) formData.append('folderId', folder);
+ if (_folder) formData.append('folderId', _folder);
const xhr = new XMLHttpRequest();
xhr.open('POST', apiUrl + '/drive/files/create', true);
diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts
index aab67e0b5c..911a463636 100644
--- a/packages/frontend/src/store.ts
+++ b/packages/frontend/src/store.ts
@@ -11,6 +11,7 @@ import darkTheme from '@@/themes/d-green-lime.json5';
import { miLocalStorage } from './local-storage.js';
import type { SoundType } from '@/scripts/sound.js';
import { Storage } from '@/pizzax.js';
+import type { Ast } from '@syuilo/aiscript';
interface PostFormAction {
title: string,
@@ -516,7 +517,7 @@ export type Plugin = {
token: string;
src: string | null;
version: string;
- ast: any[];
+ ast: Ast.Node[];
author?: string;
description?: string;
permissions?: string[];
@@ -554,13 +555,13 @@ export class ColdDeviceStorage {
}
public static getAll(): Partial {
- return (Object.keys(this.default) as (keyof typeof this.default)[]).reduce((acc, key) => {
+ return (Object.keys(this.default) as (keyof typeof this.default)[]).reduce>((acc, key) => {
const value = localStorage.getItem(PREFIX + key);
if (value != null) {
acc[key] = JSON.parse(value);
}
return acc;
- }, {} as any);
+ }, {});
}
public static set(key: T, value: typeof ColdDeviceStorage.default[T]): void {
@@ -605,7 +606,7 @@ export class ColdDeviceStorage {
get: () => {
return valueRef.value;
},
- set: (value: unknown) => {
+ set: (value: typeof ColdDeviceStorage.default[K]) => {
const val = value;
ColdDeviceStorage.set(key, val);
},
diff --git a/packages/frontend/src/types/post-form.ts b/packages/frontend/src/types/post-form.ts
new file mode 100644
index 0000000000..5bb04a95a0
--- /dev/null
+++ b/packages/frontend/src/types/post-form.ts
@@ -0,0 +1,22 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and misskey-project
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+import * as Misskey from 'misskey-js';
+
+export interface PostFormProps {
+ reply?: Misskey.entities.Note;
+ renote?: Misskey.entities.Note;
+ channel?: Misskey.entities.Channel; // TODO
+ mention?: Misskey.entities.User;
+ specified?: Misskey.entities.UserDetailed;
+ initialText?: string;
+ initialCw?: string;
+ initialVisibility?: (typeof Misskey.noteVisibilities)[number];
+ initialFiles?: Misskey.entities.DriveFile[];
+ initialLocalOnly?: boolean;
+ initialVisibleUsers?: Misskey.entities.UserDetailed[];
+ initialNote?: Misskey.entities.Note;
+ instant?: boolean;
+};
diff --git a/packages/frontend/src/widgets/WidgetPhotos.vue b/packages/frontend/src/widgets/WidgetPhotos.vue
index 34be8c5e57..40e2d8fbc7 100644
--- a/packages/frontend/src/widgets/WidgetPhotos.vue
+++ b/packages/frontend/src/widgets/WidgetPhotos.vue
@@ -68,10 +68,10 @@ const onDriveFileCreated = (file) => {
}
};
-const thumbnail = (image: any): string => {
+const thumbnail = (image: Misskey.entities.DriveFile): string => {
return defaultStore.state.disableShowingAnimatedImages
? getStaticImageUrl(image.url)
- : image.thumbnailUrl;
+ : image.thumbnailUrl ?? image.url;
};
misskeyApi('drive/stream', {
From ceb60d61b05e32fa340269122378ea93efb20517 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Thu, 31 Oct 2024 13:47:30 +0900
Subject: [PATCH 109/147] refactor
---
packages/frontend/src/pages/emoji-edit-dialog.vue | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/packages/frontend/src/pages/emoji-edit-dialog.vue b/packages/frontend/src/pages/emoji-edit-dialog.vue
index 2caba03675..db3f436873 100644
--- a/packages/frontend/src/pages/emoji-edit-dialog.vue
+++ b/packages/frontend/src/pages/emoji-edit-dialog.vue
@@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:initialHeight="500"
:canResize="true"
@close="windowEl.close()"
- @closed="$emit('closed')"
+ @closed="emit('closed')"
>
:{{ emoji.name }}:
New emoji
@@ -98,6 +98,11 @@ const props = defineProps<{
emoji?: Misskey.entities.EmojiDetailed,
}>();
+const emit = defineEmits<{
+ (ev: 'done', v: { deleted?: boolean; updated?: Misskey.entities.AdminEmojiUpdateRequest; created?: Misskey.entities.AdminEmojiUpdateRequest }): void,
+ (ev: 'closed'): void
+}>();
+
const windowEl = ref | null>(null);
const name = ref(props.emoji ? props.emoji.name : '');
const category = ref(props.emoji?.category ? props.emoji.category : '');
@@ -115,11 +120,6 @@ watch(roleIdsThatCanBeUsedThisEmojiAsReaction, async () => {
const imgUrl = computed(() => file.value ? file.value.url : props.emoji ? `/emoji/${props.emoji.name}.webp` : null);
-const emit = defineEmits<{
- (ev: 'done', v: { deleted?: boolean; updated?: Misskey.entities.AdminEmojiUpdateRequest; created?: Misskey.entities.AdminEmojiUpdateRequest }): void,
- (ev: 'closed'): void
-}>();
-
async function changeImage(ev: Event) {
file.value = await selectFile(ev.currentTarget ?? ev.target, null);
const candidate = file.value.name.replace(/\.(.+)$/, '');
From 724dea8136164dcfcd7238888ef93ccab8270fb9 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Thu, 31 Oct 2024 13:47:47 +0900
Subject: [PATCH 110/147] lint
---
packages/frontend/src/pages/emoji-edit-dialog.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/frontend/src/pages/emoji-edit-dialog.vue b/packages/frontend/src/pages/emoji-edit-dialog.vue
index db3f436873..3765319b25 100644
--- a/packages/frontend/src/pages/emoji-edit-dialog.vue
+++ b/packages/frontend/src/pages/emoji-edit-dialog.vue
@@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:initialWidth="400"
:initialHeight="500"
:canResize="true"
- @close="windowEl.close()"
+ @close="windowEl?.close()"
@closed="emit('closed')"
>
:{{ emoji.name }}:
From 224bbd486f8745cd471b77f38570b65be3b87cfc Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Thu, 31 Oct 2024 13:50:50 +0900
Subject: [PATCH 111/147] refactor
---
packages/frontend/src/components/MkCropperDialog.vue | 2 +-
.../src/components/MkCustomEmojiDetailedDialog.vue | 2 +-
.../frontend/src/components/MkEmbedCodeGenDialog.vue | 2 +-
packages/frontend/src/components/MkFormDialog.vue | 2 +-
packages/frontend/src/components/MkPageWindow.vue | 8 ++++----
packages/frontend/src/components/MkSignupDialog.vue | 2 +-
.../src/components/MkTokenGenerateWindow.vue | 2 +-
.../src/components/MkUserAnnouncementEditDialog.vue | 12 ++++++------
.../frontend/src/components/MkUserSelectDialog.vue | 2 +-
packages/frontend/src/components/MkWidgets.vue | 2 +-
packages/frontend/src/components/MkWindow.vue | 2 +-
.../pages/page-editor/els/page-editor.el.image.vue | 2 +-
.../pages/page-editor/els/page-editor.el.note.vue | 2 +-
.../pages/page-editor/els/page-editor.el.section.vue | 4 ++--
.../pages/page-editor/els/page-editor.el.text.vue | 4 ++--
.../src/pages/page-editor/page-editor.blocks.vue | 2 +-
16 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/packages/frontend/src/components/MkCropperDialog.vue b/packages/frontend/src/components/MkCropperDialog.vue
index c2a1aaf29a..0186cfc2c0 100644
--- a/packages/frontend/src/components/MkCropperDialog.vue
+++ b/packages/frontend/src/components/MkCropperDialog.vue
@@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:withOkButton="true"
@close="cancel()"
@ok="ok()"
- @closed="$emit('closed')"
+ @closed="emit('closed')"
>
{{ i18n.ts.cropImage }}
diff --git a/packages/frontend/src/components/MkCustomEmojiDetailedDialog.vue b/packages/frontend/src/components/MkCustomEmojiDetailedDialog.vue
index 949adc6a8e..ecbee864dc 100644
--- a/packages/frontend/src/components/MkCustomEmojiDetailedDialog.vue
+++ b/packages/frontend/src/components/MkCustomEmojiDetailedDialog.vue
@@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
-
+
:{{ emoji.name }}:
diff --git a/packages/frontend/src/components/MkEmbedCodeGenDialog.vue b/packages/frontend/src/components/MkEmbedCodeGenDialog.vue
index c2bb516c7c..6e9eb75920 100644
--- a/packages/frontend/src/components/MkEmbedCodeGenDialog.vue
+++ b/packages/frontend/src/components/MkEmbedCodeGenDialog.vue
@@ -11,7 +11,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:scroll="false"
:withOkButton="false"
@close="cancel()"
- @closed="$emit('closed')"
+ @closed="emit('closed')"
>
{{ i18n.ts._embedCodeGen.title }}
diff --git a/packages/frontend/src/components/MkFormDialog.vue b/packages/frontend/src/components/MkFormDialog.vue
index 124f114111..a639eae208 100644
--- a/packages/frontend/src/components/MkFormDialog.vue
+++ b/packages/frontend/src/components/MkFormDialog.vue
@@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
@click="cancel()"
@ok="ok()"
@close="cancel()"
- @closed="$emit('closed')"
+ @closed="emit('closed')"
>
{{ title }}
diff --git a/packages/frontend/src/components/MkPageWindow.vue b/packages/frontend/src/components/MkPageWindow.vue
index 02c84df447..9547423227 100644
--- a/packages/frontend/src/components/MkPageWindow.vue
+++ b/packages/frontend/src/components/MkPageWindow.vue
@@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:buttonsLeft="buttonsLeft"
:buttonsRight="buttonsRight"
:contextmenu="contextmenu"
- @closed="$emit('closed')"
+ @closed="emit('closed')"
>
@@ -30,17 +30,17 @@ SPDX-License-Identifier: AGPL-3.0-only
From a4c5ce1413078c9b98816644bebfcc0a24e94a85 Mon Sep 17 00:00:00 2001
From: momoirodouhu
Date: Sat, 9 Nov 2024 10:54:44 +0900
Subject: [PATCH 124/147] =?UTF-8?q?enhance(backend)=20:=20=E3=83=AA?=
=?UTF-8?q?=E3=83=A2=E3=83=BC=E3=83=88=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC?=
=?UTF-8?q?=E3=81=AE=E7=85=A7=E4=BC=9A=E3=82=92=E3=82=AA=E3=83=AA=E3=82=B8?=
=?UTF-8?q?=E3=83=8A=E3=83=AB=E3=81=AB=E3=83=AA=E3=83=80=E3=82=A4=E3=83=AC?=
=?UTF-8?q?=E3=82=AF=E3=83=88=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?=
=?UTF-8?q?=20(#12892)=20(#14897)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* enhance(backend) : リモートユーザーの照会をオリジナルにリダイレクトするように (#12892)
* オリジンリダイレクトのテストをtodoとして追加。
e2eテストにリモートユーザー考慮のテストがなさそうなので。
次のコマンドで動くことは確認済みです。
curl "http://localhost:3000/@foo@bar" -H "accept: application/activity+json" -L
* Acctのパースを既存のパーサーでするように修正
* lint
---
CHANGELOG.md | 1 +
.../src/server/ActivityPubServerService.ts | 20 +++++++++++++++----
packages/backend/test/e2e/fetch-resource.ts | 2 ++
3 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cddd9f1ad7..b986273d0d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -39,6 +39,7 @@
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/711)
- Fix: FTT無効時にユーザーリストタイムラインが使用できない問題を修正
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/709)
+- Enhance: リモートユーザーの照会をオリジナルにリダイレクトするように
### Misskey.js
- Fix: Stream初期化時、別途WebSocketを指定する場合の型定義を修正
diff --git a/packages/backend/src/server/ActivityPubServerService.ts b/packages/backend/src/server/ActivityPubServerService.ts
index 3255d64621..ba2342b630 100644
--- a/packages/backend/src/server/ActivityPubServerService.ts
+++ b/packages/backend/src/server/ActivityPubServerService.ts
@@ -29,6 +29,7 @@ import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { bindThis } from '@/decorators.js';
import { IActivity } from '@/core/activitypub/type.js';
import { isQuote, isRenote } from '@/misc/is-renote.js';
+import * as Acct from '@/misc/acct.js';
import type { FastifyInstance, FastifyRequest, FastifyReply, FastifyPluginOptions, FastifyBodyParser } from 'fastify';
import type { FindOptionsWhere } from 'typeorm';
@@ -486,6 +487,16 @@ export class ActivityPubServerService {
return;
}
+ // リモートだったらリダイレクト
+ if (user.host != null) {
+ if (user.uri == null || this.utilityService.isSelfHost(user.host)) {
+ reply.code(500);
+ return;
+ }
+ reply.redirect(user.uri, 301);
+ return;
+ }
+
reply.header('Cache-Control', 'public, max-age=180');
this.setResponseType(request, reply);
return (this.apRendererService.addContext(await this.apRendererService.renderPerson(user as MiLocalUser)));
@@ -654,19 +665,20 @@ export class ActivityPubServerService {
const user = await this.usersRepository.findOneBy({
id: userId,
- host: IsNull(),
isSuspended: false,
});
return await this.userInfo(request, reply, user);
});
- fastify.get<{ Params: { user: string; } }>('/@:user', { constraints: { apOrHtml: 'ap' } }, async (request, reply) => {
+ fastify.get<{ Params: { acct: string; } }>('/@:acct', { constraints: { apOrHtml: 'ap' } }, async (request, reply) => {
vary(reply.raw, 'Accept');
+ const acct = Acct.parse(request.params.acct);
+
const user = await this.usersRepository.findOneBy({
- usernameLower: request.params.user.toLowerCase(),
- host: IsNull(),
+ usernameLower: acct.username,
+ host: acct.host ?? IsNull(),
isSuspended: false,
});
diff --git a/packages/backend/test/e2e/fetch-resource.ts b/packages/backend/test/e2e/fetch-resource.ts
index 7efd688ec2..8ea4cb9800 100644
--- a/packages/backend/test/e2e/fetch-resource.ts
+++ b/packages/backend/test/e2e/fetch-resource.ts
@@ -230,6 +230,7 @@ describe('Webリソース', () => {
path: path('xxxxxxxxxx'),
type: HTML,
}));
+ test.todo('HTMLとしてGETできる。(リモートユーザーでもリダイレクトせず)');
});
describe.each([
@@ -249,6 +250,7 @@ describe('Webリソース', () => {
path: path('xxxxxxxxxx'),
accept,
}));
+ test.todo('はオリジナルにリダイレクトされる。(リモートユーザー)');
});
});
From 3a421837bfc8ea816c3109394a916cb0cac0e8d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?=
<67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Sat, 9 Nov 2024 10:57:04 +0900
Subject: [PATCH 125/147] =?UTF-8?q?refactor(frontend):=20=E5=8B=95?=
=?UTF-8?q?=E7=94=BBUI=E3=81=AE=E3=83=95=E3=83=AB=E3=82=B9=E3=82=AF?=
=?UTF-8?q?=E3=83=AA=E3=83=BC=E3=83=B3=E5=91=A8=E3=82=8A=E3=81=AE=E8=AA=BF?=
=?UTF-8?q?=E6=95=B4=20(#14877)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* refactor(frontend): フルスクリーン周りの調整
(cherry picked from commit 783032caec5853d78d5af3391e29cf364f2282e8)
* refactor(frontend): deviceKindの循環参照を除去
(cherry picked from commit 1ca471f57e968a1a6e2259bde4a7c6da1fe0c54e)
* fix
---------
Co-authored-by: taiyme <53635909+taiyme@users.noreply.github.com>
---
packages/frontend/src/boot/common.ts | 6 ++-
.../frontend/src/components/MkMediaVideo.vue | 43 ++++++++---------
packages/frontend/src/scripts/device-kind.ts | 24 +++++-----
packages/frontend/src/scripts/fullscreen.ts | 46 +++++++++++++++++++
packages/frontend/src/store.ts | 9 ++--
5 files changed, 88 insertions(+), 40 deletions(-)
create mode 100644 packages/frontend/src/scripts/fullscreen.ts
diff --git a/packages/frontend/src/boot/common.ts b/packages/frontend/src/boot/common.ts
index 90ae49ee59..bfe5c4f5f7 100644
--- a/packages/frontend/src/boot/common.ts
+++ b/packages/frontend/src/boot/common.ts
@@ -15,7 +15,7 @@ import { updateI18n, i18n } from '@/i18n.js';
import { $i, refreshAccount, login } from '@/account.js';
import { defaultStore, ColdDeviceStorage } from '@/store.js';
import { fetchInstance, instance } from '@/instance.js';
-import { deviceKind } from '@/scripts/device-kind.js';
+import { deviceKind, updateDeviceKind } from '@/scripts/device-kind.js';
import { reloadChannel } from '@/scripts/unison-reload.js';
import { getUrlWithoutLoginId } from '@/scripts/login-id.js';
import { getAccountFromId } from '@/scripts/get-account-from-id.js';
@@ -185,6 +185,10 @@ export async function common(createVue: () => App) {
}
});
+ watch(defaultStore.reactiveState.overridedDeviceKind, (kind) => {
+ updateDeviceKind(kind);
+ }, { immediate: true });
+
watch(defaultStore.reactiveState.useBlurEffectForModal, v => {
document.documentElement.style.setProperty('--MI-modalBgFilter', v ? 'blur(4px)' : 'none');
}, { immediate: true });
diff --git a/packages/frontend/src/components/MkMediaVideo.vue b/packages/frontend/src/components/MkMediaVideo.vue
index d3a12ca734..65e4a1eb12 100644
--- a/packages/frontend/src/components/MkMediaVideo.vue
+++ b/packages/frontend/src/components/MkMediaVideo.vue
@@ -118,7 +118,7 @@ import { hms } from '@/filters/hms.js';
import { defaultStore } from '@/store.js';
import { i18n } from '@/i18n.js';
import * as os from '@/os.js';
-import { isFullscreenNotSupported } from '@/scripts/device-kind.js';
+import { exitFullscreen, requestFullscreen } from '@/scripts/fullscreen.js';
import hasAudio from '@/scripts/media-has-audio.js';
import MkMediaRange from '@/components/MkMediaRange.vue';
import { $i, iAmModerator } from '@/account.js';
@@ -334,26 +334,21 @@ function togglePlayPause() {
}
function toggleFullscreen() {
- if (isFullscreenNotSupported && videoEl.value) {
- if (isFullscreen.value) {
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- //@ts-ignore
- videoEl.value.webkitExitFullscreen();
- isFullscreen.value = false;
- } else {
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- //@ts-ignore
- videoEl.value.webkitEnterFullscreen();
- isFullscreen.value = true;
- }
- } else if (playerEl.value) {
- if (isFullscreen.value) {
- document.exitFullscreen();
- isFullscreen.value = false;
- } else {
- playerEl.value.requestFullscreen({ navigationUI: 'hide' });
- isFullscreen.value = true;
- }
+ if (playerEl.value == null || videoEl.value == null) return;
+ if (isFullscreen.value) {
+ exitFullscreen({
+ videoEl: videoEl.value,
+ });
+ isFullscreen.value = false;
+ } else {
+ requestFullscreen({
+ videoEl: videoEl.value,
+ playerEl: playerEl.value,
+ options: {
+ navigationUI: 'hide',
+ },
+ });
+ isFullscreen.value = true;
}
}
@@ -454,8 +449,10 @@ watch(loop, (to) => {
});
watch(hide, (to) => {
- if (to && isFullscreen.value) {
- document.exitFullscreen();
+ if (videoEl.value && to && isFullscreen.value) {
+ exitFullscreen({
+ videoEl: videoEl.value,
+ });
isFullscreen.value = false;
}
});
diff --git a/packages/frontend/src/scripts/device-kind.ts b/packages/frontend/src/scripts/device-kind.ts
index 7c33f8ccee..7aadb617ca 100644
--- a/packages/frontend/src/scripts/device-kind.ts
+++ b/packages/frontend/src/scripts/device-kind.ts
@@ -3,22 +3,22 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
-import { defaultStore } from '@/store.js';
-
-await defaultStore.ready;
+export type DeviceKind = 'smartphone' | 'tablet' | 'desktop';
const ua = navigator.userAgent.toLowerCase();
const isTablet = /ipad/.test(ua) || (/mobile|iphone|android/.test(ua) && window.innerWidth > 700);
const isSmartphone = !isTablet && /mobile|iphone|android/.test(ua);
-const isIPhone = /iphone|ipod/gi.test(ua) && navigator.maxTouchPoints > 1;
-// navigator.platform may be deprecated but this check is still required
-const isIPadOS = navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1;
-const isIos = /ipad|iphone|ipod/gi.test(ua) && navigator.maxTouchPoints > 1;
+export const DEFAULT_DEVICE_KIND: DeviceKind = (
+ isSmartphone
+ ? 'smartphone'
+ : isTablet
+ ? 'tablet'
+ : 'desktop'
+);
-export const isFullscreenNotSupported = isIPhone || isIos;
+export let deviceKind: DeviceKind = DEFAULT_DEVICE_KIND;
-export const deviceKind: 'smartphone' | 'tablet' | 'desktop' = defaultStore.state.overridedDeviceKind ? defaultStore.state.overridedDeviceKind
- : isSmartphone ? 'smartphone'
- : isTablet ? 'tablet'
- : 'desktop';
+export function updateDeviceKind(kind: DeviceKind | null) {
+ deviceKind = kind ?? DEFAULT_DEVICE_KIND;
+}
diff --git a/packages/frontend/src/scripts/fullscreen.ts b/packages/frontend/src/scripts/fullscreen.ts
new file mode 100644
index 0000000000..7a0a018ef3
--- /dev/null
+++ b/packages/frontend/src/scripts/fullscreen.ts
@@ -0,0 +1,46 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and misskey-project
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+type PartiallyPartial = Omit & Partial>;
+
+type VideoEl = PartiallyPartial & {
+ webkitEnterFullscreen?(): void;
+ webkitExitFullscreen?(): void;
+};
+
+type PlayerEl = PartiallyPartial;
+
+type RequestFullscreenProps = {
+ readonly videoEl: VideoEl;
+ readonly playerEl: PlayerEl;
+ readonly options?: FullscreenOptions | null;
+};
+
+type ExitFullscreenProps = {
+ readonly videoEl: VideoEl;
+};
+
+export const requestFullscreen = ({ videoEl, playerEl, options }: RequestFullscreenProps) => {
+ if (playerEl.requestFullscreen != null) {
+ playerEl.requestFullscreen(options ?? undefined);
+ return;
+ }
+ if (videoEl.webkitEnterFullscreen != null) {
+ videoEl.webkitEnterFullscreen();
+ return;
+ }
+};
+
+export const exitFullscreen = ({ videoEl }: ExitFullscreenProps) => {
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
+ if (document.exitFullscreen != null) {
+ document.exitFullscreen();
+ return;
+ }
+ if (videoEl.webkitExitFullscreen != null) {
+ videoEl.webkitExitFullscreen();
+ return;
+ }
+};
diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts
index 911a463636..1d981e897b 100644
--- a/packages/frontend/src/store.ts
+++ b/packages/frontend/src/store.ts
@@ -8,8 +8,9 @@ import * as Misskey from 'misskey-js';
import { hemisphere } from '@@/js/intl-const.js';
import lightTheme from '@@/themes/l-light.json5';
import darkTheme from '@@/themes/d-green-lime.json5';
-import { miLocalStorage } from './local-storage.js';
import type { SoundType } from '@/scripts/sound.js';
+import { DEFAULT_DEVICE_KIND, type DeviceKind } from '@/scripts/device-kind.js';
+import { miLocalStorage } from '@/local-storage.js';
import { Storage } from '@/pizzax.js';
import type { Ast } from '@syuilo/aiscript';
@@ -207,7 +208,7 @@ export const defaultStore = markRaw(new Storage('base', {
overridedDeviceKind: {
where: 'device',
- default: null as null | 'smartphone' | 'tablet' | 'desktop',
+ default: null as DeviceKind | null,
},
serverDisconnectedBehavior: {
where: 'device',
@@ -263,11 +264,11 @@ export const defaultStore = markRaw(new Storage('base', {
},
useBlurEffectForModal: {
where: 'device',
- default: !/mobile|iphone|android/.test(navigator.userAgent.toLowerCase()), // 循環参照するのでdevice-kind.tsは参照できない
+ default: DEFAULT_DEVICE_KIND === 'desktop',
},
useBlurEffect: {
where: 'device',
- default: !/mobile|iphone|android/.test(navigator.userAgent.toLowerCase()), // 循環参照するのでdevice-kind.tsは参照できない
+ default: DEFAULT_DEVICE_KIND === 'desktop',
},
showFixedPostForm: {
where: 'device',
From 4a62051ce7bd369335cf020d0bd39019f2a45212 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?=
<67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Sat, 9 Nov 2024 10:58:09 +0900
Subject: [PATCH 126/147] =?UTF-8?q?fix(backend):=20=E3=83=AD=E3=83=BC?=
=?UTF-8?q?=E3=82=AB=E3=83=AB=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E3=81=B8?=
=?UTF-8?q?=E3=81=AE=E3=83=A1=E3=83=B3=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=92?=
=?UTF-8?q?=E5=90=AB=E3=82=80=E3=83=8E=E3=83=BC=E3=83=88=E3=81=8C=E9=80=A3?=
=?UTF-8?q?=E5=90=88=E3=81=95=E3=82=8C=E3=82=8B=E9=9A=9B=E3=81=AB=E6=AD=A3?=
=?UTF-8?q?=E3=81=97=E3=81=84URL=E3=81=AB=E5=A4=89=E6=8F=9B=E3=81=95?=
=?UTF-8?q?=E3=82=8C=E3=81=AA=E3=81=84=E3=81=93=E3=81=A8=E3=81=8C=E3=81=82?=
=?UTF-8?q?=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3=20(#1487?=
=?UTF-8?q?9)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix: make sure mentions of local users get rendered correctly during AP delivery (resolves #645)
* Update Changelog
* indent
---------
Co-authored-by: Laura Hausmann
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
---
CHANGELOG.md | 2 ++
packages/backend/src/core/MfmService.ts | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b986273d0d..76abe42e10 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -37,6 +37,8 @@
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/706)
- Fix: 連合への配信時に、acctの大小文字が区別されてしまい正しくメンションが処理されないことがある問題を修正
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/711)
+- Fix: ローカルユーザーへのメンションを含むノートが連合される際に正しいURLに変換されないことがある問題を修正
+ (Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/712)
- Fix: FTT無効時にユーザーリストタイムラインが使用できない問題を修正
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/709)
- Enhance: リモートユーザーの照会をオリジナルにリダイレクトするように
diff --git a/packages/backend/src/core/MfmService.ts b/packages/backend/src/core/MfmService.ts
index edfb3aa4fc..8061622340 100644
--- a/packages/backend/src/core/MfmService.ts
+++ b/packages/backend/src/core/MfmService.ts
@@ -407,7 +407,9 @@ export class MfmService {
const a = doc.createElement('a');
const { username, host, acct } = node.props;
const remoteUserInfo = mentionedRemoteUsers.find(remoteUser => remoteUser.username.toLowerCase() === username.toLowerCase() && remoteUser.host?.toLowerCase() === host?.toLowerCase());
- a.setAttribute('href', remoteUserInfo ? (remoteUserInfo.url ? remoteUserInfo.url : remoteUserInfo.uri) : `${this.config.url}/${acct}`);
+ a.setAttribute('href', remoteUserInfo
+ ? (remoteUserInfo.url ? remoteUserInfo.url : remoteUserInfo.uri)
+ : `${this.config.url}/${acct.endsWith(`@${this.config.url}`) ? acct.substring(0, acct.length - this.config.url.length - 1) : acct}`);
a.className = 'u-url mention';
a.textContent = acct;
return a;
From 9f7d41eb470db5d350e76c06c0d385d58e7445a7 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sat, 9 Nov 2024 02:25:42 +0000
Subject: [PATCH 127/147] Bump version to 2024.10.2-alpha.3
---
package.json | 2 +-
packages/misskey-js/package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index 55ae092967..dbdedd4635 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "misskey",
- "version": "2024.10.2-alpha.2",
+ "version": "2024.10.2-alpha.3",
"codename": "nasubi",
"repository": {
"type": "git",
diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json
index 32d6c8b0cb..f638bacbf9 100644
--- a/packages/misskey-js/package.json
+++ b/packages/misskey-js/package.json
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "misskey-js",
- "version": "2024.10.2-alpha.2",
+ "version": "2024.10.2-alpha.3",
"description": "Misskey SDK for JavaScript",
"license": "MIT",
"main": "./built/index.js",
From cf09aa21f0eec86e7ffffee4fcbb610ff0e378a4 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sat, 9 Nov 2024 02:28:02 +0000
Subject: [PATCH 128/147] Bump version to 2024.11.0-alpha.0
---
package.json | 2 +-
packages/misskey-js/package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index dbdedd4635..6a44eb04f3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "misskey",
- "version": "2024.10.2-alpha.3",
+ "version": "2024.11.0-alpha.0",
"codename": "nasubi",
"repository": {
"type": "git",
diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json
index f638bacbf9..19615cfee5 100644
--- a/packages/misskey-js/package.json
+++ b/packages/misskey-js/package.json
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "misskey-js",
- "version": "2024.10.2-alpha.3",
+ "version": "2024.11.0-alpha.0",
"description": "Misskey SDK for JavaScript",
"license": "MIT",
"main": "./built/index.js",
From 00cbf9fe8085afe4190721b80a5bd55d0099c4cf Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Sat, 9 Nov 2024 14:09:02 +0900
Subject: [PATCH 129/147] Update CONTRIBUTING.md
---
CONTRIBUTING.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 76a5f42eac..f8af6b3df0 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -85,6 +85,7 @@ Be willing to comment on the good points and not just the things you want fixed
読んでおくといいやつ
- https://blog.lacolaco.net/posts/1e2cf439b3c2/
+- https://konifar-zatsu.hatenadiary.jp/entry/2024/11/05/192421
### Review perspective
- Scope
From 1496700b3754be3a91d0123fc5ca17b6e8845488 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?=
<67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Sat, 9 Nov 2024 15:51:49 +0900
Subject: [PATCH 130/147] Update CHANGELOG.md
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
たぶんリリースワークフローはこうしないと認識してくれない
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 76abe42e10..a302632a6c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-## 2024.10.2
+## 2024.11.0
### General
- Feat: コンテンツの表示にログインを必須にできるように
From e0a83e9c9ecbabcaa017d0b586b7ad56b3b4b6db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?=
<67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Sat, 9 Nov 2024 15:57:10 +0900
Subject: [PATCH 131/147] =?UTF-8?q?Update=20CHANGELOG.md=20(=E6=9B=B8?=
=?UTF-8?q?=E3=81=8D=E6=96=B9=E3=82=92=E6=8F=83=E3=81=88=E3=82=8B)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CHANGELOG.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a302632a6c..8f428c1c15 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,7 +30,8 @@
- Enhance: 起動前の疎通チェックで、DBとメイン以外のRedisの疎通確認も行うように
(Based on https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/588)
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/715)
-- fix(backend): フォロワーへのメッセージの絵文字をemojisに含めるように
+- Enhance: リモートユーザーの照会をオリジナルにリダイレクトするように
+- Fix: フォロワーへのメッセージの絵文字をemojisに含めるように
- Fix: Nested proxy requestsを検出した際にブロックするように
[ghsa-gq5q-c77c-v236](https://github.com/misskey-dev/misskey/security/advisories/ghsa-gq5q-c77c-v236)
- Fix: 招待コードの発行可能な残り数算出に使用すべきロールポリシーの値が違う問題を修正
@@ -41,7 +42,6 @@
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/712)
- Fix: FTT無効時にユーザーリストタイムラインが使用できない問題を修正
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/709)
-- Enhance: リモートユーザーの照会をオリジナルにリダイレクトするように
### Misskey.js
- Fix: Stream初期化時、別途WebSocketを指定する場合の型定義を修正
From 31e5f0bd09175baba8b1cc9e617c83934b423596 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?=
<67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Sun, 10 Nov 2024 15:08:58 +0900
Subject: [PATCH 132/147] =?UTF-8?q?fix(frontend):=20=E3=83=A1=E3=83=BC?=
=?UTF-8?q?=E3=83=AB=E3=82=A2=E3=83=89=E3=83=AC=E3=82=B9=E7=99=BB=E9=8C=B2?=
=?UTF-8?q?=E6=9C=89=E5=8A=B9=E5=8C=96=E6=99=82=E3=81=AE=E3=80=8C=E5=AE=8C?=
=?UTF-8?q?=E4=BA=86=E3=80=8D=E3=83=80=E3=82=A4=E3=82=A2=E3=83=AD=E3=82=B0?=
=?UTF-8?q?=E3=83=9C=E3=83=83=E3=82=AF=E3=82=B9=E3=81=AE=E8=A1=A8=E7=A4=BA?=
=?UTF-8?q?=E6=9D=A1=E4=BB=B6=E3=82=92=E4=BF=AE=E6=AD=A3=20(#14928)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix(frontend): メールアドレス登録有効化時の「完了」ダイアログボックスの表示条件を修正
* Update MkSignupDialog.form.vue
* fix condition
---
packages/frontend/src/components/MkSignupDialog.form.vue | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/packages/frontend/src/components/MkSignupDialog.form.vue b/packages/frontend/src/components/MkSignupDialog.form.vue
index 3d1c44fc90..e1f4e26d62 100644
--- a/packages/frontend/src/components/MkSignupDialog.form.vue
+++ b/packages/frontend/src/components/MkSignupDialog.form.vue
@@ -277,7 +277,7 @@ async function onSubmit(): Promise {
return null;
});
- if (res) {
+ if (res && res.ok) {
if (res.status === 204 || instance.emailRequiredForSignup) {
os.alert({
type: 'success',
@@ -295,6 +295,8 @@ async function onSubmit(): Promise {
await login(resJson.token);
}
}
+ } else {
+ onSignupApiError();
}
submitting.value = false;
From 6bd3ed2074b9cfdfc46db0ca5a7a2a7507103519 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Sun, 10 Nov 2024 15:10:04 +0900
Subject: [PATCH 133/147] Update CHANGELOG.md
---
CHANGELOG.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8f428c1c15..e5bbda36fa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,8 @@
### General
- Feat: コンテンツの表示にログインを必須にできるように
- Feat: 過去のノートを非公開化/フォロワーのみ表示可能にできるように
+- Enhance: 依存関係の更新
+- Enhance: l10nの更新
### Client
- Enhance: Bull DashboardでRelationship Queueの状態も確認できるように
@@ -25,6 +27,7 @@
- Fix: リンク切れを修正
= Fix: ノート投稿ボタンにホバー時のスタイルが適用されていないのを修正
(Cherry-picked from https://github.com/taiyme/misskey/pull/305)
+- Fix: メールアドレス登録有効化時の「完了」ダイアログボックスの表示条件を修正
### Server
- Enhance: 起動前の疎通チェックで、DBとメイン以外のRedisの疎通確認も行うように
From 458c72c15372a6ae94416656b155f7c727ab4597 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Mon, 11 Nov 2024 16:35:13 +0900
Subject: [PATCH 134/147] Update about-misskey.vue
---
packages/frontend/src/pages/about-misskey.vue | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/packages/frontend/src/pages/about-misskey.vue b/packages/frontend/src/pages/about-misskey.vue
index fbbfb6ea61..f2becfd8f5 100644
--- a/packages/frontend/src/pages/about-misskey.vue
+++ b/packages/frontend/src/pages/about-misskey.vue
@@ -272,6 +272,9 @@ const patronsWithIcon = [{
}, {
name: 'Yatoigawa',
icon: 'https://assets.misskey-hub.net/patrons/505e3568885a4a488431a8f22b4553d0.jpg',
+}, {
+ name: '秋瀬カヲル',
+ icon: 'https://assets.misskey-hub.net/patrons/0f22aeb866484f4fa51db6721e3f9847.jpg',
}];
const patrons = [
@@ -380,6 +383,7 @@ const patrons = [
'ケモナーのケシン',
'こまつぶり',
'まゆつな空高',
+ 'asata',
];
const thereIsTreasure = ref($i && !claimedAchievements.includes('foundTreasure'));
From a11b77a4158e07c18bcc57f77660cb08c0d950ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=A5=BA=E5=AD=90w=20=28Yumechi=29?=
<35571479+eternal-flame-AD@users.noreply.github.com>
Date: Mon, 11 Nov 2024 18:51:18 -0600
Subject: [PATCH 135/147] =?UTF-8?q?fix(backend):=20Webhook=20Test=E4=B8=80?=
=?UTF-8?q?=E8=87=B4=E6=80=A7=20(#14863)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix(backend): Webhook Test一致性
Signed-off-by: eternal-flame-AD
* UserWebhookPayload<'followed'> 修正
Signed-off-by: eternal-flame-AD
---------
Signed-off-by: eternal-flame-AD
---
CHANGELOG.md | 1 +
packages/backend/src/core/QueueService.ts | 9 +++---
.../backend/src/core/UserWebhookService.ts | 14 ++++++++-
.../backend/src/core/WebhookTestService.ts | 31 ++++++++++++-------
.../backend/test/unit/WebhookTestService.ts | 16 +++++-----
.../src/pages/settings/webhook.edit.vue | 2 +-
.../src/pages/settings/webhook.new.vue | 2 +-
7 files changed, 48 insertions(+), 27 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e5bbda36fa..c92b8c06a1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -45,6 +45,7 @@
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/712)
- Fix: FTT無効時にユーザーリストタイムラインが使用できない問題を修正
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/709)
+- Fix: User Webhookテスト機能のMock Payloadを修正
### Misskey.js
- Fix: Stream初期化時、別途WebSocketを指定する場合の型定義を修正
diff --git a/packages/backend/src/core/QueueService.ts b/packages/backend/src/core/QueueService.ts
index 37028026cc..50f08da241 100644
--- a/packages/backend/src/core/QueueService.ts
+++ b/packages/backend/src/core/QueueService.ts
@@ -7,7 +7,7 @@ import { randomUUID } from 'node:crypto';
import { Inject, Injectable } from '@nestjs/common';
import type { IActivity } from '@/core/activitypub/type.js';
import type { MiDriveFile } from '@/models/DriveFile.js';
-import type { MiWebhook, webhookEventTypes } from '@/models/Webhook.js';
+import type { MiWebhook, WebhookEventTypes, webhookEventTypes } from '@/models/Webhook.js';
import type { MiSystemWebhook, SystemWebhookEventType } from '@/models/SystemWebhook.js';
import type { Config } from '@/config.js';
import { DI } from '@/di-symbols.js';
@@ -35,6 +35,7 @@ import type {
} from './QueueModule.js';
import type httpSignature from '@peertube/http-signature';
import type * as Bull from 'bullmq';
+import { type UserWebhookPayload } from './UserWebhookService.js';
@Injectable()
export class QueueService {
@@ -468,10 +469,10 @@ export class QueueService {
* @see UserWebhookDeliverProcessorService
*/
@bindThis
- public userWebhookDeliver(
+ public userWebhookDeliver(
webhook: MiWebhook,
- type: typeof webhookEventTypes[number],
- content: unknown,
+ type: T,
+ content: UserWebhookPayload,
opts?: { attempts?: number },
) {
const data: UserWebhookDeliverJobData = {
diff --git a/packages/backend/src/core/UserWebhookService.ts b/packages/backend/src/core/UserWebhookService.ts
index 8a40a53688..7117a3d7fa 100644
--- a/packages/backend/src/core/UserWebhookService.ts
+++ b/packages/backend/src/core/UserWebhookService.ts
@@ -6,11 +6,23 @@
import { Inject, Injectable } from '@nestjs/common';
import * as Redis from 'ioredis';
import { type WebhooksRepository } from '@/models/_.js';
-import { MiWebhook } from '@/models/Webhook.js';
+import { MiWebhook, WebhookEventTypes } from '@/models/Webhook.js';
import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';
import { GlobalEvents } from '@/core/GlobalEventService.js';
import type { OnApplicationShutdown } from '@nestjs/common';
+import type { Packed } from '@/misc/json-schema.js';
+
+export type UserWebhookPayload =
+ T extends 'note' | 'reply' | 'renote' |'mention' ? {
+ note: Packed<'Note'>,
+ } :
+ T extends 'follow' | 'unfollow' ? {
+ user: Packed<'UserDetailedNotMe'>,
+ } :
+ T extends 'followed' ? {
+ user: Packed<'UserLite'>,
+ } : never;
@Injectable()
export class UserWebhookService implements OnApplicationShutdown {
diff --git a/packages/backend/src/core/WebhookTestService.ts b/packages/backend/src/core/WebhookTestService.ts
index c826a28963..b1ea7974fb 100644
--- a/packages/backend/src/core/WebhookTestService.ts
+++ b/packages/backend/src/core/WebhookTestService.ts
@@ -10,7 +10,7 @@ import { MiSystemWebhook, type SystemWebhookEventType } from '@/models/SystemWeb
import { SystemWebhookService } from '@/core/SystemWebhookService.js';
import { Packed } from '@/misc/json-schema.js';
import { type WebhookEventTypes } from '@/models/Webhook.js';
-import { UserWebhookService } from '@/core/UserWebhookService.js';
+import { type UserWebhookPayload, UserWebhookService } from '@/core/UserWebhookService.js';
import { QueueService } from '@/core/QueueService.js';
import { ModeratorInactivityRemainingTime } from '@/queue/processors/CheckModeratorsActivityProcessorService.js';
@@ -306,10 +306,10 @@ export class WebhookTestService {
* - 送信対象イベント(on)に関する設定
*/
@bindThis
- public async testUserWebhook(
+ public async testUserWebhook(
params: {
webhookId: MiWebhook['id'],
- type: WebhookEventTypes,
+ type: T,
override?: Partial>,
},
sender: MiUser | null,
@@ -321,7 +321,7 @@ export class WebhookTestService {
}
const webhook = webhooks[0];
- const send = (contents: unknown) => {
+ const send = (type: U, contents: UserWebhookPayload) => {
const merged = {
...webhook,
...params.override,
@@ -329,7 +329,7 @@ export class WebhookTestService {
// テスト目的なのでUserWebhookServiceの機能を経由せず直接キューに追加する(チェック処理などをスキップする意図).
// また、Jobの試行回数も1回だけ.
- this.queueService.userWebhookDeliver(merged, params.type, contents, { attempts: 1 });
+ this.queueService.userWebhookDeliver(merged, type, contents, { attempts: 1 });
};
const dummyNote1 = generateDummyNote({
@@ -361,33 +361,40 @@ export class WebhookTestService {
switch (params.type) {
case 'note': {
- send(toPackedNote(dummyNote1));
+ send('note', { note: toPackedNote(dummyNote1) });
break;
}
case 'reply': {
- send(toPackedNote(dummyReply1));
+ send('reply', { note: toPackedNote(dummyReply1) });
break;
}
case 'renote': {
- send(toPackedNote(dummyRenote1));
+ send('renote', { note: toPackedNote(dummyRenote1) });
break;
}
case 'mention': {
- send(toPackedNote(dummyMention1));
+ send('mention', { note: toPackedNote(dummyMention1) });
break;
}
case 'follow': {
- send(toPackedUserDetailedNotMe(dummyUser1));
+ send('follow', { user: toPackedUserDetailedNotMe(dummyUser1) });
break;
}
case 'followed': {
- send(toPackedUserLite(dummyUser2));
+ send('followed', { user: toPackedUserLite(dummyUser2) });
break;
}
case 'unfollow': {
- send(toPackedUserDetailedNotMe(dummyUser3));
+ send('unfollow', { user: toPackedUserDetailedNotMe(dummyUser3) });
break;
}
+ // まだ実装されていない (#9485)
+ case 'reaction': return;
+ default: {
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ const _exhaustiveAssertion: never = params.type;
+ return;
+ }
}
}
diff --git a/packages/backend/test/unit/WebhookTestService.ts b/packages/backend/test/unit/WebhookTestService.ts
index 5e63b86f8f..be84ae9b84 100644
--- a/packages/backend/test/unit/WebhookTestService.ts
+++ b/packages/backend/test/unit/WebhookTestService.ts
@@ -7,7 +7,7 @@
import { Test, TestingModule } from '@nestjs/testing';
import { beforeAll, describe, jest } from '@jest/globals';
import { WebhookTestService } from '@/core/WebhookTestService.js';
-import { UserWebhookService } from '@/core/UserWebhookService.js';
+import { UserWebhookPayload, UserWebhookService } from '@/core/UserWebhookService.js';
import { SystemWebhookService } from '@/core/SystemWebhookService.js';
import { GlobalModule } from '@/GlobalModule.js';
import { MiSystemWebhook, MiUser, MiWebhook, UserProfilesRepository, UsersRepository } from '@/models/_.js';
@@ -122,7 +122,7 @@ describe('WebhookTestService', () => {
const calls = queueService.userWebhookDeliver.mock.calls[0];
expect((calls[0] as any).id).toBe('dummy-webhook');
expect(calls[1]).toBe('note');
- expect((calls[2] as any).id).toBe('dummy-note-1');
+ expect((calls[2] as UserWebhookPayload<'note'>).note.id).toBe('dummy-note-1');
});
test('reply', async () => {
@@ -131,7 +131,7 @@ describe('WebhookTestService', () => {
const calls = queueService.userWebhookDeliver.mock.calls[0];
expect((calls[0] as any).id).toBe('dummy-webhook');
expect(calls[1]).toBe('reply');
- expect((calls[2] as any).id).toBe('dummy-reply-1');
+ expect((calls[2] as UserWebhookPayload<'reply'>).note.id).toBe('dummy-reply-1');
});
test('renote', async () => {
@@ -140,7 +140,7 @@ describe('WebhookTestService', () => {
const calls = queueService.userWebhookDeliver.mock.calls[0];
expect((calls[0] as any).id).toBe('dummy-webhook');
expect(calls[1]).toBe('renote');
- expect((calls[2] as any).id).toBe('dummy-renote-1');
+ expect((calls[2] as UserWebhookPayload<'renote'>).note.id).toBe('dummy-renote-1');
});
test('mention', async () => {
@@ -149,7 +149,7 @@ describe('WebhookTestService', () => {
const calls = queueService.userWebhookDeliver.mock.calls[0];
expect((calls[0] as any).id).toBe('dummy-webhook');
expect(calls[1]).toBe('mention');
- expect((calls[2] as any).id).toBe('dummy-mention-1');
+ expect((calls[2] as UserWebhookPayload<'mention'>).note.id).toBe('dummy-mention-1');
});
test('follow', async () => {
@@ -158,7 +158,7 @@ describe('WebhookTestService', () => {
const calls = queueService.userWebhookDeliver.mock.calls[0];
expect((calls[0] as any).id).toBe('dummy-webhook');
expect(calls[1]).toBe('follow');
- expect((calls[2] as any).id).toBe('dummy-user-1');
+ expect((calls[2] as UserWebhookPayload<'follow'>).user.id).toBe('dummy-user-1');
});
test('followed', async () => {
@@ -167,7 +167,7 @@ describe('WebhookTestService', () => {
const calls = queueService.userWebhookDeliver.mock.calls[0];
expect((calls[0] as any).id).toBe('dummy-webhook');
expect(calls[1]).toBe('followed');
- expect((calls[2] as any).id).toBe('dummy-user-2');
+ expect((calls[2] as UserWebhookPayload<'followed'>).user.id).toBe('dummy-user-2');
});
test('unfollow', async () => {
@@ -176,7 +176,7 @@ describe('WebhookTestService', () => {
const calls = queueService.userWebhookDeliver.mock.calls[0];
expect((calls[0] as any).id).toBe('dummy-webhook');
expect(calls[1]).toBe('unfollow');
- expect((calls[2] as any).id).toBe('dummy-user-3');
+ expect((calls[2] as UserWebhookPayload<'unfollow'>).user.id).toBe('dummy-user-3');
});
describe('NoSuchWebhookError', () => {
diff --git a/packages/frontend/src/pages/settings/webhook.edit.vue b/packages/frontend/src/pages/settings/webhook.edit.vue
index 40d23e36c5..22b008fb61 100644
--- a/packages/frontend/src/pages/settings/webhook.edit.vue
+++ b/packages/frontend/src/pages/settings/webhook.edit.vue
@@ -44,7 +44,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ i18n.ts._webhookSettings._events.reaction }}
+ {{ i18n.ts._webhookSettings._events.reaction }}
diff --git a/packages/frontend/src/pages/settings/webhook.new.vue b/packages/frontend/src/pages/settings/webhook.new.vue
index d62357caaf..727c4df2d6 100644
--- a/packages/frontend/src/pages/settings/webhook.new.vue
+++ b/packages/frontend/src/pages/settings/webhook.new.vue
@@ -27,7 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts._webhookSettings._events.note }}
{{ i18n.ts._webhookSettings._events.reply }}
{{ i18n.ts._webhookSettings._events.renote }}
- {{ i18n.ts._webhookSettings._events.reaction }}
+ {{ i18n.ts._webhookSettings._events.reaction }}
{{ i18n.ts._webhookSettings._events.mention }}
From 2305788ed9cdc0c61dfeef9249f93f760a9d5f77 Mon Sep 17 00:00:00 2001
From: shimmar <78616491+shimmar@users.noreply.github.com>
Date: Wed, 13 Nov 2024 11:19:54 +0900
Subject: [PATCH 136/147] =?UTF-8?q?Enhance(frontend):=20=E3=83=8E=E3=83=BC?=
=?UTF-8?q?=E3=83=88=E8=A9=B3=E7=B4=B0=E7=94=BB=E9=9D=A2=E3=81=AB=E3=83=AD?=
=?UTF-8?q?=E3=83=BC=E3=83=AB=E3=81=AE=E3=83=90=E3=83=83=E3=82=B8=E3=82=92?=
=?UTF-8?q?=E8=A1=A8=E7=A4=BA=20(#14946)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* enhance(frontend): ノートの詳細画面にロールのバッジを表示(#14058)
* Update CHANGELOG.md
---
CHANGELOG.md | 1 +
.../src/components/MkNoteDetailed.vue | 27 ++++++++++++++++++-
2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c92b8c06a1..7c07d86580 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,7 @@
- Enhance: Self-XSS防止用の警告を追加
- Enhance: カタルーニャ語 (ca-ES) に対応
- Enhance: 個別お知らせページではMetaタグを出力するように
+- Enhance: ノート詳細画面にロールのバッジを表示
- Fix: 通知の範囲指定の設定項目が必要ない通知設定でも範囲指定の設定がでている問題を修正
- Fix: Turnstileが失敗・期限切れした際にも成功扱いとなってしまう問題を修正
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/768)
diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue
index e0473dce5e..4a350388c2 100644
--- a/packages/frontend/src/components/MkNoteDetailed.vue
+++ b/packages/frontend/src/components/MkNoteDetailed.vue
@@ -62,7 +62,14 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
+
+
+
+
+
+
+
@@ -679,12 +686,30 @@ function loadConversation() {
float: right;
}
+.noteHeaderUsernameAndBadgeRoles {
+ display: flex;
+}
+
.noteHeaderUsername {
margin-bottom: 2px;
+ margin-right: 0.5em;
line-height: 1.3;
word-wrap: anywhere;
}
+.noteHeaderBadgeRoles {
+ margin: 0 .5em 0 0;
+}
+
+.noteHeaderBadgeRole {
+ height: 1.3em;
+ vertical-align: -20%;
+
+ & + .noteHeaderBadgeRole {
+ margin-left: 0.2em;
+ }
+}
+
.noteContent {
container-type: inline-size;
overflow-wrap: break-word;
From 4d541015109b0b046595634f81e4e54754d4a288 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Wed, 13 Nov 2024 19:43:36 +0900
Subject: [PATCH 137/147] update node to 22.11.0 (#14869)
* wip
* Update CHANGELOG.md
* Update CHANGELOG.md
---
.devcontainer/devcontainer.json | 2 +-
.github/workflows/get-api-diff.yml | 2 +-
.github/workflows/on-release-created.yml | 2 +-
.github/workflows/test-backend.yml | 4 ++--
.github/workflows/test-federation.yml | 2 +-
.github/workflows/test-frontend.yml | 4 ++--
.github/workflows/test-misskey-js.yml | 2 +-
.github/workflows/test-production.yml | 2 +-
.github/workflows/validate-api-json.yml | 2 +-
.node-version | 2 +-
CHANGELOG.md | 4 ++++
Dockerfile | 2 +-
12 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index fbf959d449..713c2e5fdd 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -5,7 +5,7 @@
"workspaceFolder": "/workspace",
"features": {
"ghcr.io/devcontainers/features/node:1": {
- "version": "20.16.0"
+ "version": "22.11.0"
},
"ghcr.io/devcontainers-contrib/features/corepack:1": {}
},
diff --git a/.github/workflows/get-api-diff.yml b/.github/workflows/get-api-diff.yml
index 1bcaa0d9c4..972619ec60 100644
--- a/.github/workflows/get-api-diff.yml
+++ b/.github/workflows/get-api-diff.yml
@@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
- node-version: [20.16.0]
+ node-version: [22.11.0]
api-json-name: [api-base.json, api-head.json]
include:
- api-json-name: api-base.json
diff --git a/.github/workflows/on-release-created.yml b/.github/workflows/on-release-created.yml
index ffaf7bc038..6258fa693a 100644
--- a/.github/workflows/on-release-created.yml
+++ b/.github/workflows/on-release-created.yml
@@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
- node-version: [20.16.0]
+ node-version: [22.11.0]
steps:
- uses: actions/checkout@v4.1.1
diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml
index d95d6676f9..cedcf16ecd 100644
--- a/.github/workflows/test-backend.yml
+++ b/.github/workflows/test-backend.yml
@@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
- node-version: [20.16.0]
+ node-version: [22.11.0]
services:
postgres:
@@ -71,7 +71,7 @@ jobs:
strategy:
matrix:
- node-version: [20.16.0]
+ node-version: [22.11.0]
services:
postgres:
diff --git a/.github/workflows/test-federation.yml b/.github/workflows/test-federation.yml
index 183ddb6f34..e89cdcb091 100644
--- a/.github/workflows/test-federation.yml
+++ b/.github/workflows/test-federation.yml
@@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- node-version: [20.16.0]
+ node-version: [22.11.0]
steps:
- uses: actions/checkout@v4
with:
diff --git a/.github/workflows/test-frontend.yml b/.github/workflows/test-frontend.yml
index c68e1a8ef1..eca596c7c7 100644
--- a/.github/workflows/test-frontend.yml
+++ b/.github/workflows/test-frontend.yml
@@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
- node-version: [20.16.0]
+ node-version: [22.11.0]
steps:
- uses: actions/checkout@v4.1.1
@@ -61,7 +61,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- node-version: [20.16.0]
+ node-version: [22.11.0]
browser: [chrome]
services:
diff --git a/.github/workflows/test-misskey-js.yml b/.github/workflows/test-misskey-js.yml
index 63e81f8c92..054c10bf61 100644
--- a/.github/workflows/test-misskey-js.yml
+++ b/.github/workflows/test-misskey-js.yml
@@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
- node-version: [20.16.0]
+ node-version: [22.11.0]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
diff --git a/.github/workflows/test-production.yml b/.github/workflows/test-production.yml
index 0abc09c5a6..11a95ca82f 100644
--- a/.github/workflows/test-production.yml
+++ b/.github/workflows/test-production.yml
@@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
- node-version: [20.16.0]
+ node-version: [22.11.0]
steps:
- uses: actions/checkout@v4.1.1
diff --git a/.github/workflows/validate-api-json.yml b/.github/workflows/validate-api-json.yml
index f809af1063..835b2a9a24 100644
--- a/.github/workflows/validate-api-json.yml
+++ b/.github/workflows/validate-api-json.yml
@@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
- node-version: [20.16.0]
+ node-version: [22.11.0]
steps:
- uses: actions/checkout@v4.1.1
diff --git a/.node-version b/.node-version
index 8ce7030825..7af24b7ddb 100644
--- a/.node-version
+++ b/.node-version
@@ -1 +1 @@
-20.16.0
+22.11.0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7c07d86580..e07cdc00d7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,8 @@
## 2024.11.0
+### Note
+- DockerのNode.jsが22.11.0に更新されました
+
### General
- Feat: コンテンツの表示にログインを必須にできるように
- Feat: 過去のノートを非公開化/フォロワーのみ表示可能にできるように
@@ -31,6 +34,7 @@
- Fix: メールアドレス登録有効化時の「完了」ダイアログボックスの表示条件を修正
### Server
+- Enhance: DockerのNode.jsを22.11.0に更新
- Enhance: 起動前の疎通チェックで、DBとメイン以外のRedisの疎通確認も行うように
(Based on https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/588)
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/715)
diff --git a/Dockerfile b/Dockerfile
index e21b2a31fc..ee765abe7c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,6 @@
# syntax = docker/dockerfile:1.4
-ARG NODE_VERSION=20.16.0-bullseye
+ARG NODE_VERSION=22.11.0-bullseye
# build assets & compile TypeScript
From 7f8c8f62b1fab2b7f7ededeb7cb2dbc387895d17 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?=
<67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Fri, 15 Nov 2024 09:33:09 +0900
Subject: [PATCH 138/147] =?UTF-8?q?fix(frontend):=20=E3=82=B9=E3=83=9E?=
=?UTF-8?q?=E3=83=9B=E3=81=A7=E8=A1=A8=E7=A4=BA=E3=81=97=E3=81=9F=E6=99=82?=
=?UTF-8?q?=E3=81=ABipv6=E3=81=A0=E3=81=A8=E3=81=AF=E3=81=BF=E5=87=BA?=
=?UTF-8?q?=E3=81=A6=E3=81=97=E3=81=BE=E3=81=86=E3=81=AE=E3=82=92=E4=BF=AE?=
=?UTF-8?q?=E6=AD=A3=20(#14960)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix(frontend): スマホで表示した時にipv6だとはみ出てしまうのを修正 (MisskeyIO#815)
(cherry picked from commit aec01dd4adda8e975da523c5bea329120e689569)
* Update Changelog
---------
Co-authored-by: sleep-moe
---
CHANGELOG.md | 2 ++
packages/frontend/src/pages/admin-user.vue | 1 +
2 files changed, 3 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e07cdc00d7..f51fcb9d0a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,6 +32,8 @@
= Fix: ノート投稿ボタンにホバー時のスタイルが適用されていないのを修正
(Cherry-picked from https://github.com/taiyme/misskey/pull/305)
- Fix: メールアドレス登録有効化時の「完了」ダイアログボックスの表示条件を修正
+- Fix: 画面幅が狭い環境でデザインが崩れる問題を修正
+ (Cherry-picked from https://github.com/MisskeyIO/misskey/pull/815)
### Server
- Enhance: DockerのNode.jsを22.11.0に更新
diff --git a/packages/frontend/src/pages/admin-user.vue b/packages/frontend/src/pages/admin-user.vue
index 948e7a3cce..30d7e38638 100644
--- a/packages/frontend/src/pages/admin-user.vue
+++ b/packages/frontend/src/pages/admin-user.vue
@@ -627,6 +627,7 @@ definePageMetadata(() => ({