From 60875586422c29c0189652a13474bc87b7b004cb Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Thu, 30 Nov 2023 15:58:12 +0900 Subject: [PATCH 01/17] =?UTF-8?q?(fix)=20=E7=BF=BB=E8=A8=B3=E3=81=AE?= =?UTF-8?q?=E3=83=80=E3=83=96=E3=82=8A=E3=82=92=E8=A7=A3=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/index.d.ts | 1 - locales/ja-JP.yml | 1 - packages/frontend/src/components/MkLaunchPad.vue | 2 ++ packages/frontend/src/navbar.ts | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/locales/index.d.ts b/locales/index.d.ts index d462816494..402c2413f8 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -440,7 +440,6 @@ export interface Locale { "notFound": string; "notFoundDescription": string; "uploadFolder": string; - "cacheClear": string; "markAsReadAllNotifications": string; "markAsReadAllUnreadNotes": string; "markAsReadAllTalkMessages": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index aa3cdf0750..2b2f05aa88 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -437,7 +437,6 @@ share: "共有" notFound: "見つかりません" notFoundDescription: "指定されたURLに該当するページはありませんでした。" uploadFolder: "既定アップロード先" -cacheClear: "キャッシュを削除" markAsReadAllNotifications: "すべての通知を既読にする" markAsReadAllUnreadNotes: "すべての投稿を既読にする" markAsReadAllTalkMessages: "すべてのチャットを既読にする" diff --git a/packages/frontend/src/components/MkLaunchPad.vue b/packages/frontend/src/components/MkLaunchPad.vue index 87f15a110f..b16c05f575 100644 --- a/packages/frontend/src/components/MkLaunchPad.vue +++ b/packages/frontend/src/components/MkLaunchPad.vue @@ -101,6 +101,8 @@ function close() { vertical-align: bottom; height: 100px; border-radius: 10px; + padding: 10px; + box-sizing: border-box; &:hover { color: var(--accent); diff --git a/packages/frontend/src/navbar.ts b/packages/frontend/src/navbar.ts index 78a0945ddb..95fd6bf29c 100644 --- a/packages/frontend/src/navbar.ts +++ b/packages/frontend/src/navbar.ts @@ -173,7 +173,7 @@ export const navbarItemDef = reactive({ to: `/@${$i?.username}`, }, cacheClear: { - title: i18n.ts.cacheClear, + title: i18n.ts.clearCache, icon: 'ti ti-trash', action: (ev) => { clearCache(); From 5e06ee5a793ab5116844ed1cf114c5a1deefde61 Mon Sep 17 00:00:00 2001 From: zyoshoka Date: Thu, 30 Nov 2023 18:42:58 +0900 Subject: [PATCH 02/17] =?UTF-8?q?fix(frontend):=20=E9=95=B7=E3=81=84?= =?UTF-8?q?=E5=90=8D=E5=89=8D=E3=81=AE=E3=83=81=E3=83=A3=E3=83=B3=E3=83=8D?= =?UTF-8?q?=E3=83=AB=E3=81=AB=E3=81=8A=E3=81=91=E3=82=8B=E6=8A=95=E7=A8=BF?= =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=BC=E3=83=A0=E3=81=AE=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=8C=E5=B4=A9=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 --- packages/frontend/src/components/MkPostForm.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index 07c7213202..ed9f50ad6e 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -1059,8 +1059,9 @@ defineExpose({ .visibility { overflow: clip; - text-overflow: ellipsis; - white-space: nowrap; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 210px; &:enabled { > .headerRightButtonText { From b9c8cbca536bac43f986c8d0e7c146be26b06e8f Mon Sep 17 00:00:00 2001 From: zyoshoka Date: Thu, 30 Nov 2023 18:43:52 +0900 Subject: [PATCH 03/17] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d32b46f63d..a512047819 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ - Fix: 一度に大量の通知が入った際に通知音が音割れする問題を修正 - Fix: 共有機能をサポートしていないブラウザの場合は共有ボタンを非表示にする #11305 - Fix: 通知のグルーピング設定を変更してもリロードされるまで表示が変わらない問題を修正 #12470 +- Fix: 長い名前のチャンネルにおける投稿フォームの表示が崩れる問題を修正 ### Server - Enhance: MFM `$[ruby ]` が他ソフトウェアと連合されるように From 58f383ab1fbb03c6ab63895e7a0e42bbae27701f Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Thu, 30 Nov 2023 20:27:06 +0900 Subject: [PATCH 04/17] =?UTF-8?q?enhance(frontend):=20=E3=83=87=E3=83=BC?= =?UTF-8?q?=E3=82=BF=E3=82=BB=E3=83=BC=E3=83=90=E3=83=BC=E3=82=92=E5=80=8B?= =?UTF-8?q?=E5=88=A5=E3=81=A7=E8=A8=AD=E5=AE=9A=E3=81=A7=E3=81=8D=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/index.d.ts | 20 ++++++++ locales/ja-JP.yml | 16 ++++++ .../frontend/src/components/MkCode.core.vue | 2 +- packages/frontend/src/components/MkCode.vue | 49 +++++++++++++++--- .../frontend/src/components/MkMediaImage.vue | 8 +-- .../frontend/src/components/MkMediaVideo.vue | 6 +-- .../frontend/src/components/MkUrlPreview.vue | 2 +- .../src/components/global/MkAvatar.vue | 2 +- .../frontend/src/pages/settings/general.vue | 51 ++++++++++++++++++- .../pages/settings/preferences-backups.vue | 2 +- packages/frontend/src/store.ts | 13 +++-- 11 files changed, 146 insertions(+), 25 deletions(-) diff --git a/locales/index.d.ts b/locales/index.d.ts index d462816494..497a5de637 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1171,6 +1171,8 @@ export interface Locale { "signupPendingError": string; "cwNotationRequired": string; "doReaction": string; + "code": string; + "tryReloadIfNotApplied": string; "_announcement": { "forExistingUsers": string; "forExistingUsersDescription": string; @@ -2502,6 +2504,24 @@ export interface Locale { }; }; }; + "_dataSaver": { + "_media": { + "title": string; + "description": string; + }; + "_avatar": { + "title": string; + "description": string; + }; + "_urlPreview": { + "title": string; + "description": string; + }; + "_code": { + "title": string; + "description": string; + }; + }; } declare const locales: { [lang: string]: Locale; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index aa3cdf0750..327ae765ca 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1168,6 +1168,8 @@ useGroupedNotifications: "通知をグルーピングして表示する" signupPendingError: "メールアドレスの確認中に問題が発生しました。リンクの有効期限が切れている可能性があります。" cwNotationRequired: "「内容を隠す」がオンの場合は注釈の記述が必要です。" doReaction: "リアクションする" +code: "コード" +tryReloadIfNotApplied: "設定が反映されない場合はリロードをお試しください。" _announcement: forExistingUsers: "既存ユーザーのみ" @@ -2389,3 +2391,17 @@ _externalResourceInstaller: _themeInstallFailed: title: "テーマのインストールに失敗しました" description: "テーマのインストール中に問題が発生しました。もう一度お試しください。エラーの詳細はJavascriptコンソールをご覧ください。" + +_dataSaver: + _media: + title: "メディアの読み込み" + description: "画像・動画が自動で読み込まれるのを防止します。隠れている画像・動画はタップすると読み込まれます。" + _avatar: + title: "アイコン画像" + description: "アイコン画像のアニメーションが停止します。アニメーション画像は通常の画像よりファイルサイズが大きいことがあるので、データ通信量をさらに削減できます。" + _urlPreview: + title: "URLプレビューのサムネイル" + description: "URLプレビューのサムネイル画像が読み込まれなくなります。" + _code: + title: "コードハイライト" + description: "MFMなどでコードハイライト記法が使われている場合、タップするまで読み込まれなくなります。コードハイライトではハイライトする言語ごとにその定義ファイルを読み込む必要がありますが、それらが自動で読み込まれなくなるため、通信量の削減が見込めます。" diff --git a/packages/frontend/src/components/MkCode.core.vue b/packages/frontend/src/components/MkCode.core.vue index 4ec3540419..eee08b2f02 100644 --- a/packages/frontend/src/components/MkCode.core.vue +++ b/packages/frontend/src/components/MkCode.core.vue @@ -62,7 +62,7 @@ watch(() => props.lang, (to) => { padding: 1em; margin: .5em 0; overflow: auto; - border-radius: .3em; + border-radius: 8px; & pre, & code { diff --git a/packages/frontend/src/components/MkCode.vue b/packages/frontend/src/components/MkCode.vue index b39e6ff23c..cb0eef0549 100644 --- a/packages/frontend/src/components/MkCode.vue +++ b/packages/frontend/src/components/MkCode.vue @@ -4,18 +4,26 @@ SPDX-License-Identifier: AGPL-3.0-only --> @@ -36,4 +46,27 @@ const XCode = defineAsyncComponent(() => import('@/components/MkCode.core.vue')) padding: .1em; border-radius: .3em; } + +.codePlaceholderRoot { + display: block; + width: 100%; + background: none; + border: none; + outline: none; + font: inherit; + color: inherit; + cursor: pointer; + + box-sizing: border-box; + border-radius: 8px; + padding: 24px; + margin-top: 4px; + color: #D4D4D4; + background: #1E1E1E; +} + +.codePlaceholderContainer { + text-align: center; + font-size: 0.8em; +} diff --git a/packages/frontend/src/components/MkMediaImage.vue b/packages/frontend/src/components/MkMediaImage.vue index cc1c28a9e1..003c0979c7 100644 --- a/packages/frontend/src/components/MkMediaImage.vue +++ b/packages/frontend/src/components/MkMediaImage.vue @@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only >
- {{ i18n.ts.sensitive }}{{ defaultStore.state.enableDataSaverMode ? ` (${i18n.ts.image}${image.size ? ' ' + bytes(image.size) : ''})` : '' }} - {{ defaultStore.state.enableDataSaverMode && image.size ? bytes(image.size) : i18n.ts.image }} + {{ i18n.ts.sensitive }}{{ defaultStore.state.dataSaver.media ? ` (${i18n.ts.image}${image.size ? ' ' + bytes(image.size) : ''})` : '' }} + {{ defaultStore.state.dataSaver.media && image.size ? bytes(image.size) : i18n.ts.image }} {{ i18n.ts.clickToShow }}
@@ -94,7 +94,7 @@ function onclick() { // Plugin:register_note_view_interruptor を使って書き換えられる可能性があるためwatchする watch(() => props.image, () => { - hide = (defaultStore.state.nsfw === 'force' || defaultStore.state.enableDataSaverMode) ? true : (props.image.isSensitive && defaultStore.state.nsfw !== 'ignore'); + hide = (defaultStore.state.nsfw === 'force' || defaultStore.state.dataSaver.media) ? true : (props.image.isSensitive && defaultStore.state.nsfw !== 'ignore'); }, { deep: true, immediate: true, diff --git a/packages/frontend/src/components/MkMediaVideo.vue b/packages/frontend/src/components/MkMediaVideo.vue index b6e8f1ff22..f9dba0b15a 100644 --- a/packages/frontend/src/components/MkMediaVideo.vue +++ b/packages/frontend/src/components/MkMediaVideo.vue @@ -7,8 +7,8 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ i18n.ts.sensitive }}{{ defaultStore.state.enableDataSaverMode ? ` (${i18n.ts.video}${video.size ? ' ' + bytes(video.size) : ''})` : '' }} - {{ defaultStore.state.enableDataSaverMode && video.size ? bytes(video.size) : i18n.ts.video }} + {{ i18n.ts.sensitive }}{{ defaultStore.state.dataSaver.media ? ` (${i18n.ts.video}${video.size ? ' ' + bytes(video.size) : ''})` : '' }} + {{ defaultStore.state.dataSaver.media && video.size ? bytes(video.size) : i18n.ts.video }} {{ i18n.ts.clickToShow }}
@@ -43,7 +43,7 @@ const props = defineProps<{ video: Misskey.entities.DriveFile; }>(); -const hide = ref((defaultStore.state.nsfw === 'force' || defaultStore.state.enableDataSaverMode) ? true : (props.video.isSensitive && defaultStore.state.nsfw !== 'ignore')); +const hide = ref((defaultStore.state.nsfw === 'force' || defaultStore.state.dataSaver.media) ? true : (props.video.isSensitive && defaultStore.state.nsfw !== 'ignore')); const videoEl = shallowRef(); diff --git a/packages/frontend/src/components/MkUrlPreview.vue b/packages/frontend/src/components/MkUrlPreview.vue index a460f3ea07..d3c486a98b 100644 --- a/packages/frontend/src/components/MkUrlPreview.vue +++ b/packages/frontend/src/components/MkUrlPreview.vue @@ -45,7 +45,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
diff --git a/packages/frontend/src/components/global/MkAvatar.vue b/packages/frontend/src/components/global/MkAvatar.vue index e238834872..51a454b2cc 100644 --- a/packages/frontend/src/components/global/MkAvatar.vue +++ b/packages/frontend/src/components/global/MkAvatar.vue @@ -83,7 +83,7 @@ const bound = $computed(() => props.link ? { to: userPage(props.user), target: props.target } : {}); -const url = $computed(() => (defaultStore.state.disableShowingAnimatedImages || defaultStore.state.enableDataSaverMode) +const url = $computed(() => (defaultStore.state.disableShowingAnimatedImages || defaultStore.state.dataSaver.avatar) ? getStaticImageUrl(props.user.avatarUrl) : props.user.avatarUrl); diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 313b5efc46..8819f8d5d4 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -122,7 +122,6 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.useSystemFont }} {{ i18n.ts.disableDrawer }} {{ i18n.ts.forceShowAds }} - {{ i18n.ts.dataSaver }}
@@ -168,6 +167,37 @@ SPDX-License-Identifier: AGPL-3.0-only
+ + + +
+ {{ i18n.ts.tryReloadIfNotApplied }} + +
+ {{ i18n.ts.enableAll }} + {{ i18n.ts.disableAll }} +
+
+ + {{ i18n.ts._dataSaver._media.title }} + + + + {{ i18n.ts._dataSaver._avatar.title }} + + + + {{ i18n.ts._dataSaver._urlPreview.title }} + + + + {{ i18n.ts._dataSaver._code.title }} + + +
+
+
+ @@ -198,6 +228,7 @@ import MkButton from '@/components/MkButton.vue'; import FormSection from '@/components/form/section.vue'; import FormLink from '@/components/form/link.vue'; import MkLink from '@/components/MkLink.vue'; +import MkInfo from '@/components/MkInfo.vue'; import { langs } from '@/config.js'; import { defaultStore } from '@/store.js'; import * as os from '@/os.js'; @@ -241,7 +272,7 @@ const disableShowingAnimatedImages = computed(defaultStore.makeGetterSetter('dis const forceShowAds = computed(defaultStore.makeGetterSetter('forceShowAds')); const loadRawImages = computed(defaultStore.makeGetterSetter('loadRawImages')); const highlightSensitiveMedia = computed(defaultStore.makeGetterSetter('highlightSensitiveMedia')); -const enableDataSaverMode = computed(defaultStore.makeGetterSetter('enableDataSaverMode')); +const dataSaver = computed(defaultStore.makeGetterSetter('dataSaver')); const imageNewTab = computed(defaultStore.makeGetterSetter('imageNewTab')); const nsfw = computed(defaultStore.makeGetterSetter('nsfw')); const showFixedPostForm = computed(defaultStore.makeGetterSetter('showFixedPostForm')); @@ -374,6 +405,22 @@ function testNotification(): void { }, 300); } +function enableAllDataSaver() { + const g = defaultStore.state.dataSaver; + + Object.keys(g).forEach((key) => { g[key] = true; }); + + defaultStore.set('dataSaver', g); +} + +function disableAllDataSaver() { + const g = defaultStore.state.dataSaver; + + Object.keys(g).forEach((key) => { g[key] = false; }); + + defaultStore.set('dataSaver', g); +} + const headerActions = $computed(() => []); const headerTabs = $computed(() => []); diff --git a/packages/frontend/src/pages/settings/preferences-backups.vue b/packages/frontend/src/pages/settings/preferences-backups.vue index 35435238fc..0362998855 100644 --- a/packages/frontend/src/pages/settings/preferences-backups.vue +++ b/packages/frontend/src/pages/settings/preferences-backups.vue @@ -71,7 +71,7 @@ const defaultStoreSaveKeys: (keyof typeof defaultStore['state'])[] = [ 'advancedMfm', 'loadRawImages', 'imageNewTab', - 'enableDataSaverMode', + 'dataSaver', 'disableShowingAnimatedImages', 'emojiStyle', 'disableDrawer', diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index 70d2cf402d..dea3ed14fc 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -223,10 +223,6 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: false, }, - enableDataSaverMode: { - where: 'device', - default: false, - }, disableShowingAnimatedImages: { where: 'device', default: window.matchMedia('(prefers-reduced-motion)').matches, @@ -403,6 +399,15 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: true, }, + dataSaver: { + where: 'device', + default: { + media: false, + avatar: false, + urlPreview: false, + code: false, + }, + }, sound_masterVolume: { where: 'device', From a8e0cd7cbcf310f43465c3a7eb3e4a03d4adfaea Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Thu, 30 Nov 2023 20:28:46 +0900 Subject: [PATCH 05/17] Update Changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d32b46f63d..be1a714cf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ ### Client - Feat: 今日誕生日のフォロー中のユーザーを一覧表示できるウィジェットを追加 +- Feat: データセーバーでコードハイライトの読み込みを削減できるように - Enhance: 絵文字のオートコンプリート機能強化 #12364 - Enhance: ユーザーのRawデータを表示するページが復活 - Enhance: リアクション選択時に音を鳴らせるように @@ -30,6 +31,8 @@ - Enhance: Shareページで投稿を完了すると、親ウィンドウ(親フレーム)にpostMessageするように - Enhance: チャンネル、クリップ、ページ、Play、ギャラリーにURLのコピーボタンを設置 #11305 - Enhance: ノートプレビューに「内容を隠す」が反映されるように +- Enhance: データセーバーの適用範囲を個別で設定できるように + - 従来のデータセーバーの設定はリセットされます - fix: 「設定のバックアップ」で一部の項目がバックアップに含まれていなかった問題を修正 - Fix: ウィジェットのジョブキューにて音声の発音方法変更に追従できていなかったのを修正 #12367 - Enhance: 絵文字の詳細ページに記載される情報を追加 From 84805fc160f17486509ea86c4e90a1e984b266f8 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Thu, 30 Nov 2023 20:31:21 +0900 Subject: [PATCH 06/17] fix design --- packages/frontend/src/pages/settings/general.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 8819f8d5d4..1abaeccfc9 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -177,7 +177,7 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.enableAll }} {{ i18n.ts.disableAll }}
-
+
{{ i18n.ts._dataSaver._media.title }} From 37c75a3bb1f8ef83c784c8e03b21565888c3ee3e Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Thu, 30 Nov 2023 20:46:21 +0900 Subject: [PATCH 07/17] =?UTF-8?q?(fix)=20=E8=A8=AD=E5=AE=9A=E3=81=8C?= =?UTF-8?q?=E5=BD=93=E3=81=9F=E3=82=89=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/pages/settings/general.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 1abaeccfc9..10298da01b 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -242,6 +242,7 @@ import { claimAchievement } from '@/scripts/achievements.js'; const lang = ref(miLocalStorage.getItem('lang')); const fontSize = ref(miLocalStorage.getItem('fontSize')); const useSystemFont = ref(miLocalStorage.getItem('useSystemFont') != null); +const dataSaver = ref(defaultStore.state.dataSaver); async function reloadAsk() { const { canceled } = await os.confirm({ @@ -272,7 +273,6 @@ const disableShowingAnimatedImages = computed(defaultStore.makeGetterSetter('dis const forceShowAds = computed(defaultStore.makeGetterSetter('forceShowAds')); const loadRawImages = computed(defaultStore.makeGetterSetter('loadRawImages')); const highlightSensitiveMedia = computed(defaultStore.makeGetterSetter('highlightSensitiveMedia')); -const dataSaver = computed(defaultStore.makeGetterSetter('dataSaver')); const imageNewTab = computed(defaultStore.makeGetterSetter('imageNewTab')); const nsfw = computed(defaultStore.makeGetterSetter('nsfw')); const showFixedPostForm = computed(defaultStore.makeGetterSetter('showFixedPostForm')); @@ -410,7 +410,7 @@ function enableAllDataSaver() { Object.keys(g).forEach((key) => { g[key] = true; }); - defaultStore.set('dataSaver', g); + dataSaver.value = g; } function disableAllDataSaver() { @@ -418,9 +418,15 @@ function disableAllDataSaver() { Object.keys(g).forEach((key) => { g[key] = false; }); - defaultStore.set('dataSaver', g); + dataSaver.value = g; } +watch(dataSaver, (to) => { + defaultStore.set('dataSaver', to); +}, { + deep: true, +}); + const headerActions = $computed(() => []); const headerTabs = $computed(() => []); From edd252afaa104d0ce76d7ef45decfadb9c948256 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Thu, 30 Nov 2023 20:56:18 +0900 Subject: [PATCH 08/17] =?UTF-8?q?fix=20test=EF=BC=88=E7=84=A1=E7=90=86?= =?UTF-8?q?=E3=82=84=E3=82=8A=E6=84=9F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/store.ts | 2 +- packages/frontend/test/init.ts | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index dea3ed14fc..8459a5721a 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -406,7 +406,7 @@ export const defaultStore = markRaw(new Storage('base', { avatar: false, urlPreview: false, code: false, - }, + } as Record, }, sound_masterVolume: { diff --git a/packages/frontend/test/init.ts b/packages/frontend/test/init.ts index ab5e84b53c..dfc02378d5 100644 --- a/packages/frontend/test/init.ts +++ b/packages/frontend/test/init.ts @@ -21,7 +21,17 @@ vi.stubGlobal('WebSocket', class WebSocket extends EventTarget { static CLOSING vi.mock('@/store.js', () => { return { defaultStore: { - state: {}, + state: { + + // なんかtestがうまいこと動かないのでここに書く + dataSaver: { + media: false, + avatar: false, + urlPreview: false, + code: false, + }, + + }, }, }; }); From 5cd4c36cad1fa38080f2b596b936d6b44db45cc7 Mon Sep 17 00:00:00 2001 From: nullnyat Date: Fri, 1 Dec 2023 11:19:33 +0900 Subject: [PATCH 09/17] rename docker-compose.yml.example to docker-compose_example.yml (#12530) * rename docker-compose.yml.example to docker-compose_example.yml * fix: dockle.yml --- .github/workflows/dockle.yml | 2 +- docker-compose.yml.example => docker-compose_example.yml | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename docker-compose.yml.example => docker-compose_example.yml (100%) diff --git a/.github/workflows/dockle.yml b/.github/workflows/dockle.yml index edb18b04da..eee7a78fed 100644 --- a/.github/workflows/dockle.yml +++ b/.github/workflows/dockle.yml @@ -20,7 +20,7 @@ jobs: sudo dpkg -i dockle.deb - run: | cp .config/docker_example.env .config/docker.env - cp ./docker-compose.yml.example ./docker-compose.yml + cp ./docker-compose_example.yml ./docker-compose.yml - run: | docker compose up -d web docker tag "$(docker compose images web | awk 'OFS=":" {print $4}' | tail -n +2)" misskey-web:latest diff --git a/docker-compose.yml.example b/docker-compose_example.yml similarity index 100% rename from docker-compose.yml.example rename to docker-compose_example.yml From c7dfd446096e6e1d1db3e9d73fdad955fc9242fa Mon Sep 17 00:00:00 2001 From: NoriDev Date: Fri, 1 Dec 2023 16:54:39 +0900 Subject: [PATCH 10/17] lint --- packages/frontend/src/components/MkMediaImage.vue | 10 ++++++---- packages/frontend/src/components/MkMediaVideo.vue | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/frontend/src/components/MkMediaImage.vue b/packages/frontend/src/components/MkMediaImage.vue index 59ef0b7225..0e89916445 100644 --- a/packages/frontend/src/components/MkMediaImage.vue +++ b/packages/frontend/src/components/MkMediaImage.vue @@ -91,10 +91,12 @@ const url = $computed(() => (props.raw || defaultStore.state.loadRawImages) : props.image.thumbnailUrl, ); -let clickToShowMessage = $computed(() => - defaultStore.state.nsfwOpenBehavior === 'click' ? i18n.ts.clickToShow - : defaultStore.state.nsfwOpenBehavior === 'doubleClick' ? i18n.ts.doubleClickToShow - : '', +let clickToShowMessage = $computed(() => defaultStore.state.nsfwOpenBehavior === 'click' + ? i18n.ts.clickToShow + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + : defaultStore.state.nsfwOpenBehavior === 'doubleClick' + ? i18n.ts.doubleClickToShow + : '', ); function onClick(ev: MouseEvent) { diff --git a/packages/frontend/src/components/MkMediaVideo.vue b/packages/frontend/src/components/MkMediaVideo.vue index 2b5da835f2..eed9c916a6 100644 --- a/packages/frontend/src/components/MkMediaVideo.vue +++ b/packages/frontend/src/components/MkMediaVideo.vue @@ -47,10 +47,12 @@ const props = defineProps<{ const hide = ref((defaultStore.state.nsfw === 'force' || defaultStore.state.dataSaver.media) ? true : (props.video.isSensitive && defaultStore.state.nsfw !== 'ignore')); -let clickToShowMessage = $computed(() => - defaultStore.state.nsfwOpenBehavior === 'click' ? i18n.ts.clickToShow - : defaultStore.state.nsfwOpenBehavior === 'doubleClick' ? i18n.ts.doubleClickToShow - : '', +let clickToShowMessage = $computed(() => defaultStore.state.nsfwOpenBehavior === 'click' + ? i18n.ts.clickToShow + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + : defaultStore.state.nsfwOpenBehavior === 'doubleClick' + ? i18n.ts.doubleClickToShow + : '', ); function onClick(ev: MouseEvent) { From 633d5a8096925b5e983699bd585d479d7e3131f5 Mon Sep 17 00:00:00 2001 From: NoriDev Date: Fri, 1 Dec 2023 16:58:42 +0900 Subject: [PATCH 11/17] tweak e6ff6601 --- CHANGELOG.md | 1 - CHANGELOG_CHERRYPICK.md | 1 + packages/frontend/src/components/MkPostFormSimple.vue | 5 +++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31e1a6161e..b05c6ec39e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,7 +38,6 @@ - Fix: 一度に大量の通知が入った際に通知音が音割れする問題を修正 - Fix: 共有機能をサポートしていないブラウザの場合は共有ボタンを非表示にする #11305 - Fix: 通知のグルーピング設定を変更してもリロードされるまで表示が変わらない問題を修正 #12470 -- Fix: 長い名前のチャンネルにおける投稿フォームの表示が崩れる問題を修正 ### Server - Enhance: MFM `$[ruby ]` が他ソフトウェアと連合されるように diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md index edbb70d7ab..baf5fbaba1 100644 --- a/CHANGELOG_CHERRYPICK.md +++ b/CHANGELOG_CHERRYPICK.md @@ -57,6 +57,7 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE - 기존 데이터 절약 모드 설정이 재설정됩니다. - Fix: '모달 배경색 제거' 옵션이 이모지 피커에 반영되지 않음 - Fix: 열람 주의로 설정된 노트의 반응이 더 보기를 눌러야 표시됨 +- Fix: 채널 이름이 긴 경우 게시 양식 표시가 깨지는 문제 (misskey-dev/misskey#12524) ### Server - Enhance: (dev) 개발 모드에서 locale 및 유형 정의가 자동으로 재생성되도록 (misskey-dev/misskey#12481) diff --git a/packages/frontend/src/components/MkPostFormSimple.vue b/packages/frontend/src/components/MkPostFormSimple.vue index 5e8910068b..2d92c75237 100644 --- a/packages/frontend/src/components/MkPostFormSimple.vue +++ b/packages/frontend/src/components/MkPostFormSimple.vue @@ -1231,8 +1231,9 @@ defineExpose({ .visibility { overflow: clip; - text-overflow: ellipsis; - white-space: nowrap; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 210px; &:enabled { > .headerRightButtonText { From 6d154e8c3e10d797ccc5df2988ec3e3314f20d06 Mon Sep 17 00:00:00 2001 From: NoriDev Date: Fri, 1 Dec 2023 17:01:54 +0900 Subject: [PATCH 12/17] tweak ea557022 --- locales/en-US.yml | 1 - locales/ko-KR.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index e533b740e3..4d88e77ef8 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -512,7 +512,6 @@ share: "Share" notFound: "Not found" notFoundDescription: "No page corresponding to this URL could be found." uploadFolder: "Default folder for uploads" -cacheClear: "Clear cache" markAsReadAllNotifications: "Mark all notifications as read" markAsReadAllUnreadNotes: "Mark all notes as read" markAsReadAllTalkMessages: "Mark all messages as read" diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index 587874062b..e6ab656e7d 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -512,7 +512,6 @@ share: "공유" notFound: "요청하신 페이지를 어디에서도 찾을 수 없었어요.. (404)" notFoundDescription: "이 URL에 해당하는 페이지가 없어요." uploadFolder: "기본 업로드 위치" -cacheClear: "캐시 지우기" markAsReadAllNotifications: "모든 알림을 읽은 상태로 표시" markAsReadAllUnreadNotes: "모든 글을 읽은 상태로 표시" markAsReadAllTalkMessages: "모든 대화를 읽은 상태로 표시" From 93cc3a231166815e2e460653018e12e7cf35d92d Mon Sep 17 00:00:00 2001 From: NoriDev Date: Fri, 1 Dec 2023 17:08:24 +0900 Subject: [PATCH 13/17] improve 2a01eeab --- locales/ko-KR.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index e6ab656e7d..2f214adcf8 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -2623,10 +2623,10 @@ _imageCompressionMode: noResizeCompressLossy: "해상도를 축소하지 않고 손실 압축" _dataSaver: _media: - title: "미디어 불러오기" + title: "미디어 불러오기 방지" description: "이미지/동영상이 자동으로 로드되는 것을 방지해요. 탭하면 숨겨진 이미지/동영상을 불러올 수 있어요." _avatar: - title: "프로필 아이콘" + title: "움직이는 프로필 아이콘" description: "움직이는 프로필 아이콘이 정적 이미지로 변경되어 표시돼요. 움직이는 이미지는 일반 이미지보다 파일 크기가 클 수 있기 때문에 데이터 통신량을 더욱 줄일 수 있어요." _urlPreview: title: "URL 미리보기 썸네일" From 5fde0c9186d2f65ba33965796f68d61cee0c72cd Mon Sep 17 00:00:00 2001 From: NoriDev Date: Fri, 1 Dec 2023 17:27:54 +0900 Subject: [PATCH 14/17] =?UTF-8?q?Feat:=20InstanceTicker=EB=A5=BC=20?= =?UTF-8?q?=ED=81=B4=EB=A6=AD=ED=95=B4=20=EB=85=B8=ED=8A=B8=EB=A5=BC=20?= =?UTF-8?q?=EC=9E=90=EC=84=B8=ED=9E=88=20=EB=B3=BC=20=EC=88=98=20=EC=9E=88?= =?UTF-8?q?=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG_CHERRYPICK.md | 2 ++ packages/frontend/src/components/MkNoteHeader.vue | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md index baf5fbaba1..46fc22c42e 100644 --- a/CHANGELOG_CHERRYPICK.md +++ b/CHANGELOG_CHERRYPICK.md @@ -46,6 +46,8 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE ### Client - Feat: 데이터 절약 모드로 코드 하이라이트 로드를 줄일 수 있음 (misskey-dev/misskey#12526) +- Feat: InstanceTicker를 클릭해 노트를 자세히 볼 수 있음 + - 리모트에서 수신된 노트인 경우, '리모트에서 보기'로 작동함 - Enhance: 사운드 설정을 기본값으로 복원하거나 저장할 때 확실하게 표시함 - Enhance: 리모트 서버와 동일한 이모지가 존재하지 않는 경우 '이모지 복사'를 비활성화함 - Enhance: 아이콘 장식을 바로 업로드 하거나 드라이브에서 불러올 수 있음 ([Secineralyr/misskey.dream@e358212d](https://github.com/Secineralyr/misskey.dream/commit/e358212da93256749e31d9e0ca9dd2ed37fd548e), [Secineralyr/misskey.dream@52592fea](https://github.com/Secineralyr/misskey.dream/commit/52592fea52684497ba7e07f173aac2b1083afcb1)) diff --git a/packages/frontend/src/components/MkNoteHeader.vue b/packages/frontend/src/components/MkNoteHeader.vue index 71cedee956..ae5e56db3c 100644 --- a/packages/frontend/src/components/MkNoteHeader.vue +++ b/packages/frontend/src/components/MkNoteHeader.vue @@ -43,7 +43,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
@@ -56,6 +56,7 @@ import { notePage } from '@/filters/note.js'; import { userPage } from '@/filters/user.js'; import { defaultStore } from '@/store.js'; import { deepClone } from '@/scripts/clone.js'; +import { useRouter } from '@/router.js'; import MkInstanceTicker from '@/components/MkInstanceTicker.vue'; const props = defineProps<{ @@ -66,6 +67,13 @@ const mock = inject('mock', false); let note = $ref(deepClone(props.note)); const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && note.user.instance); +const router = useRouter(); + +function showOnRemote() { + if (props.note.url ?? props.note.uri === undefined) router.push(notePage(note)); + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + else window.open(props.note.url ?? props.note.uri); +}