-
{{ avatarDecoration.name }}
-
-
+
+
{{ i18n.t('_profile.avatarDecorationMax', { max: $i?.policies.avatarDecorationLimit }) }} ({{ i18n.t('remainingN', { n: $i?.policies.avatarDecorationLimit - $i.avatarDecorations.length }) }})
+
+
{{ i18n.ts.detachAll }}
+
+
+
+
{{ avatarDecoration.name }}
+
+
+
@@ -273,6 +279,19 @@ function openDecoration(avatarDecoration) {
}, {}, 'closed');
}
+function detachAllDecorations() {
+ os.confirm({
+ type: 'warning',
+ text: i18n.ts.areYouSure,
+ }).then(async ({ canceled }) => {
+ if (canceled) return;
+ await os.apiWithDialog('i/update', {
+ avatarDecorations: [],
+ });
+ $i.avatarDecorations = [];
+ });
+}
+
const headerActions = computed(() => []);
const headerTabs = computed(() => []);
From 71bb1814726ed563c0d67a975d1942ad50dd43ca 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, 13 Dec 2023 18:14:43 +0900
Subject: [PATCH 12/52] =?UTF-8?q?fix(frontend):=20MkAnimBg=E3=82=92?=
=?UTF-8?q?=E3=83=AA=E3=82=B5=E3=82=A4=E3=82=BA=E3=81=AB=E5=AF=BE=E5=BF=9C?=
=?UTF-8?q?=E3=81=95=E3=81=9B=E3=82=8B=20(#12642)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* (fix) MkAnimBgをリサイズに対応させる
* fix lint
* refactor
---
packages/frontend/src/components/MkAnimBg.vue | 32 ++++++++++++++++---
1 file changed, 27 insertions(+), 5 deletions(-)
diff --git a/packages/frontend/src/components/MkAnimBg.vue b/packages/frontend/src/components/MkAnimBg.vue
index 70d101a9d3..284ee8f3f8 100644
--- a/packages/frontend/src/components/MkAnimBg.vue
+++ b/packages/frontend/src/components/MkAnimBg.vue
@@ -21,8 +21,9 @@ const props = withDefaults(defineProps<{
focus: 1.0,
});
-function loadShader(gl, type, source) {
+function loadShader(gl: WebGLRenderingContext, type: number, source: string) {
const shader = gl.createShader(type);
+ if (shader == null) return null;
gl.shaderSource(shader, source);
gl.compileShader(shader);
@@ -38,11 +39,13 @@ function loadShader(gl, type, source) {
return shader;
}
-function initShaderProgram(gl, vsSource, fsSource) {
+function initShaderProgram(gl: WebGLRenderingContext, vsSource: string, fsSource: string) {
const vertexShader = loadShader(gl, gl.VERTEX_SHADER, vsSource);
const fragmentShader = loadShader(gl, gl.FRAGMENT_SHADER, fsSource);
const shaderProgram = gl.createProgram();
+ if (shaderProgram == null || vertexShader == null || fragmentShader == null) return null;
+
gl.attachShader(shaderProgram, vertexShader);
gl.attachShader(shaderProgram, fragmentShader);
gl.linkProgram(shaderProgram);
@@ -63,8 +66,10 @@ let handle: ReturnType
| null = null;
onMounted(() => {
const canvas = canvasEl.value!;
- canvas.width = canvas.offsetWidth;
- canvas.height = canvas.offsetHeight;
+ let width = canvas.offsetWidth;
+ let height = canvas.offsetHeight;
+ canvas.width = width;
+ canvas.height = height;
const gl = canvas.getContext('webgl', { premultipliedAlpha: true });
if (gl == null) return;
@@ -197,6 +202,7 @@ onMounted(() => {
gl_FragColor = vec4( color, max(max(color.x, color.y), color.z) );
}
`);
+ if (shaderProgram == null) return;
gl.useProgram(shaderProgram);
const u_resolution = gl.getUniformLocation(shaderProgram, 'u_resolution');
@@ -226,7 +232,23 @@ onMounted(() => {
gl!.uniform1f(u_time, 0);
gl!.drawArrays(gl!.TRIANGLE_STRIP, 0, 4);
} else {
- function render(timeStamp) {
+ function render(timeStamp: number) {
+ let sizeChanged = false;
+ if (Math.abs(height - canvas.offsetHeight) > 2) {
+ height = canvas.offsetHeight;
+ canvas.height = height;
+ sizeChanged = true;
+ }
+ if (Math.abs(width - canvas.offsetWidth) > 2) {
+ width = canvas.offsetWidth;
+ canvas.width = width;
+ sizeChanged = true;
+ }
+ if (sizeChanged && gl) {
+ gl.uniform2fv(u_resolution, [width, height]);
+ gl.viewport(0, 0, width, height);
+ }
+
gl!.uniform1f(u_time, timeStamp);
gl!.drawArrays(gl!.TRIANGLE_STRIP, 0, 4);
From 17f894348fcd8fc02ec898079f3ba994074f872b Mon Sep 17 00:00:00 2001
From: syuilo
Date: Wed, 13 Dec 2023 18:21:17 +0900
Subject: [PATCH 13/52] fix(client): fix glitch when attach/detach avatar
decoration
---
.../settings/profile.avatar-decoration-dialog.vue | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/packages/frontend/src/pages/settings/profile.avatar-decoration-dialog.vue b/packages/frontend/src/pages/settings/profile.avatar-decoration-dialog.vue
index c27a21217b..b7ea4c1521 100644
--- a/packages/frontend/src/pages/settings/profile.avatar-decoration-dialog.vue
+++ b/packages/frontend/src/pages/settings/profile.avatar-decoration-dialog.vue
@@ -77,19 +77,21 @@ async function attach() {
angle: angle.value,
flipH: flipH.value,
};
+ const update = [...$i.avatarDecorations, decoration];
await os.apiWithDialog('i/update', {
- avatarDecorations: [...$i.avatarDecorations, decoration],
+ avatarDecorations: update,
});
- $i.avatarDecorations = [...$i.avatarDecorations, decoration];
+ $i.avatarDecorations = update;
dialog.value.close();
}
async function detach() {
+ const update = $i.avatarDecorations.filter(x => x.id !== props.decoration.id);
await os.apiWithDialog('i/update', {
- avatarDecorations: $i.avatarDecorations.filter(x => x.id !== props.decoration.id),
+ avatarDecorations: update,
});
- $i.avatarDecorations = $i.avatarDecorations.filter(x => x.id !== props.decoration.id);
+ $i.avatarDecorations = update;
dialog.value.close();
}
From 37820ad57216048964edd98232630e311e51ed0f Mon Sep 17 00:00:00 2001
From: syuilo
Date: Wed, 13 Dec 2023 18:31:32 +0900
Subject: [PATCH 14/52] =?UTF-8?q?fix(backend):=20=E3=83=A2=E3=83=87?=
=?UTF-8?q?=E3=83=AC=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E3=83=AD=E3=82=B0?=
=?UTF-8?q?=E3=81=8C=E3=83=A2=E3=83=87=E3=83=AC=E3=83=BC=E3=82=BF=E3=83=BC?=
=?UTF-8?q?=E3=81=AF=E9=96=B2=E8=A6=A7=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84?=
=?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix #12622
---
CHANGELOG.md | 1 +
.../src/server/api/endpoints/admin/show-moderation-logs.ts | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e5ff09edec..84a6ce35ef 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -67,6 +67,7 @@
- Fix: チャンネルのノート一覧にてインスタンスミュートが効かない問題
- Fix: 「みつける」が年越し時に壊れる問題を修正
- Fix: アカウントをブロックした際に、自身のユーザーのページでノートが相手に表示される問題を修正
+- Fix: モデレーションログがモデレーターは閲覧できないように修正
## 2023.11.1
diff --git a/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts b/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts
index f87a5a3574..34c247343a 100644
--- a/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts
+++ b/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts
@@ -14,7 +14,7 @@ export const meta = {
tags: ['admin'],
requireCredential: true,
- requireModerator: true,
+ requireAdmin: true,
res: {
type: 'array',
From eeed67ecac8fca3d542c4d68c1eb13ca113c5053 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=8A=E3=81=95=E3=82=80=E3=81=AE=E3=81=B2=E3=81=A8?=
<46447427+samunohito@users.noreply.github.com>
Date: Thu, 14 Dec 2023 07:18:29 +0900
Subject: [PATCH 15/52] =?UTF-8?q?(fix)=20=E3=83=87=E3=83=95=E3=82=A9?=
=?UTF-8?q?=E3=83=AB=E3=83=88=E8=A1=A8=E7=A4=BA=E6=99=82=E3=81=AE=E3=83=98?=
=?UTF-8?q?=E3=83=83=E3=83=80=E3=81=AB=E3=81=82=E3=82=8B=E3=83=81=E3=83=A3?=
=?UTF-8?q?=E3=83=B3=E3=83=8D=E3=83=AB=E3=83=9C=E3=82=BF=E3=83=B3=E3=81=8C?=
=?UTF-8?q?=E5=8F=8D=E5=BF=9C=E3=81=97=E3=81=AA=E3=81=84=E7=8F=BE=E8=B1=A1?=
=?UTF-8?q?=E3=81=AE=E4=BF=AE=E6=AD=A3=20(#12648)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* dividerの仕変に追従
* fix type
---
packages/frontend/src/pages/timeline.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue
index f3213ad273..59c45a57ff 100644
--- a/packages/frontend/src/pages/timeline.vue
+++ b/packages/frontend/src/pages/timeline.vue
@@ -125,14 +125,14 @@ async function chooseChannel(ev: MouseEvent): Promise {
const channels = await os.api('channels/my-favorites', {
limit: 100,
});
- const items = [
+ const items: MenuItem[] = [
...channels.map(channel => ({
type: 'link' as const,
text: channel.name,
indicate: channel.hasUnreadNote,
to: `/channels/${channel.id}`,
})),
- (channels.length === 0 ? undefined : null),
+ (channels.length === 0 ? undefined : { type: 'divider' }),
{
type: 'link' as const,
icon: 'ti ti-plus',
From 839b7483ac85dc358cf116594f0003ca42e9b021 Mon Sep 17 00:00:00 2001
From: syuilo
Date: Thu, 14 Dec 2023 11:29:27 +0900
Subject: [PATCH 16/52] =?UTF-8?q?enhance(frontend):=20=E5=90=8C=E3=81=98?=
=?UTF-8?q?=E7=A8=AE=E9=A1=9E=E3=81=AE=E3=83=87=E3=82=B3=E3=83=AC=E3=83=BC?=
=?UTF-8?q?=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=92=E8=A4=87=E6=95=B0=E4=BB=98?=
=?UTF-8?q?=E3=81=91=E3=82=89=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/global/MkAvatar.vue | 6 +-
.../profile.avatar-decoration.decoration.vue | 67 ++++++++++
...e => profile.avatar-decoration.dialog.vue} | 63 ++++++---
.../settings/profile.avatar-decoration.vue | 125 ++++++++++++++++++
.../frontend/src/pages/settings/profile.vue | 75 +----------
5 files changed, 240 insertions(+), 96 deletions(-)
create mode 100644 packages/frontend/src/pages/settings/profile.avatar-decoration.decoration.vue
rename packages/frontend/src/pages/settings/{profile.avatar-decoration-dialog.vue => profile.avatar-decoration.dialog.vue} (66%)
create mode 100644 packages/frontend/src/pages/settings/profile.avatar-decoration.vue
diff --git a/packages/frontend/src/components/global/MkAvatar.vue b/packages/frontend/src/components/global/MkAvatar.vue
index 6aa9a42037..9d13c03290 100644
--- a/packages/frontend/src/components/global/MkAvatar.vue
+++ b/packages/frontend/src/components/global/MkAvatar.vue
@@ -59,7 +59,7 @@ const props = withDefaults(defineProps<{
link?: boolean;
preview?: boolean;
indicator?: boolean;
- decorations?: Misskey.entities.UserDetailed['avatarDecorations'][number][];
+ decorations?: Omit[];
forceShowDecoration?: boolean;
}>(), {
target: null,
@@ -89,12 +89,12 @@ function onClick(ev: MouseEvent): void {
emit('click', ev);
}
-function getDecorationAngle(decoration: Misskey.entities.UserDetailed['avatarDecorations'][number]) {
+function getDecorationAngle(decoration: Omit) {
const angle = decoration.angle ?? 0;
return angle === 0 ? undefined : `${angle * 360}deg`;
}
-function getDecorationScale(decoration: Misskey.entities.UserDetailed['avatarDecorations'][number]) {
+function getDecorationScale(decoration: Omit) {
const scaleX = decoration.flipH ? -1 : 1;
return scaleX === 1 ? undefined : `${scaleX} 1`;
}
diff --git a/packages/frontend/src/pages/settings/profile.avatar-decoration.decoration.vue b/packages/frontend/src/pages/settings/profile.avatar-decoration.decoration.vue
new file mode 100644
index 0000000000..c113868238
--- /dev/null
+++ b/packages/frontend/src/pages/settings/profile.avatar-decoration.decoration.vue
@@ -0,0 +1,67 @@
+
+
+
+
+
{{ decoration.name }}
+
+
+
+
+
+
+
+
diff --git a/packages/frontend/src/pages/settings/profile.avatar-decoration-dialog.vue b/packages/frontend/src/pages/settings/profile.avatar-decoration.dialog.vue
similarity index 66%
rename from packages/frontend/src/pages/settings/profile.avatar-decoration-dialog.vue
rename to packages/frontend/src/pages/settings/profile.avatar-decoration.dialog.vue
index b7ea4c1521..a27b46aa3e 100644
--- a/packages/frontend/src/pages/settings/profile.avatar-decoration-dialog.vue
+++ b/packages/frontend/src/pages/settings/profile.avatar-decoration.dialog.vue
@@ -17,7 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ decoration.name }}
-
+
@@ -30,8 +30,8 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ i18n.ts.update }}
- {{ i18n.ts.detach }}
+ {{ i18n.ts.update }}
+ {{ i18n.ts.detach }}
{{ i18n.ts.attach }}
@@ -51,48 +51,69 @@ import MkRange from '@/components/MkRange.vue';
import { $i } from '@/account.js';
const props = defineProps<{
+ usingIndex: number | null;
decoration: {
id: string;
url: string;
name: string;
- }
+ };
}>();
const emit = defineEmits<{
(ev: 'closed'): void;
+ (ev: 'attach', payload: {
+ angle: number;
+ flipH: boolean;
+ }): void;
+ (ev: 'update', payload: {
+ angle: number;
+ flipH: boolean;
+ }): void;
+ (ev: 'detach'): void;
}>();
const dialog = shallowRef>();
-const using = computed(() => $i.avatarDecorations.some(x => x.id === props.decoration.id));
-const angle = ref(using.value ? $i.avatarDecorations.find(x => x.id === props.decoration.id).angle ?? 0 : 0);
-const flipH = ref(using.value ? $i.avatarDecorations.find(x => x.id === props.decoration.id).flipH ?? false : false);
+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 decorationsForPreview = computed(() => {
+ const decoration = {
+ id: props.decoration.id,
+ url: props.decoration.url,
+ angle: angle.value,
+ flipH: flipH.value,
+ };
+ const decorations = [...$i.avatarDecorations];
+ if (props.usingIndex != null) {
+ decorations[props.usingIndex] = decoration;
+ } else {
+ decorations.push(decoration);
+ }
+ return decorations;
+});
function cancel() {
dialog.value.close();
}
-async function attach() {
- const decoration = {
- id: props.decoration.id,
+async function update() {
+ emit('update', {
angle: angle.value,
flipH: flipH.value,
- };
- const update = [...$i.avatarDecorations, decoration];
- await os.apiWithDialog('i/update', {
- avatarDecorations: update,
});
- $i.avatarDecorations = update;
+ dialog.value.close();
+}
+async function attach() {
+ emit('attach', {
+ angle: angle.value,
+ flipH: flipH.value,
+ });
dialog.value.close();
}
async function detach() {
- const update = $i.avatarDecorations.filter(x => x.id !== props.decoration.id);
- await os.apiWithDialog('i/update', {
- avatarDecorations: update,
- });
- $i.avatarDecorations = update;
-
+ emit('detach');
dialog.value.close();
}
diff --git a/packages/frontend/src/pages/settings/profile.avatar-decoration.vue b/packages/frontend/src/pages/settings/profile.avatar-decoration.vue
new file mode 100644
index 0000000000..90c2b75a4d
--- /dev/null
+++ b/packages/frontend/src/pages/settings/profile.avatar-decoration.vue
@@ -0,0 +1,125 @@
+
+
+
+
+
{{ i18n.t('_profile.avatarDecorationMax', { max: $i?.policies.avatarDecorationLimit }) }} ({{ i18n.t('remainingN', { n: $i?.policies.avatarDecorationLimit - $i.avatarDecorations.length }) }})
+
+
+
{{ i18n.ts.inUse }}
+
+
+
+
+
+
{{ i18n.ts.detachAll }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/frontend/src/pages/settings/profile.vue b/packages/frontend/src/pages/settings/profile.vue
index a5d3835b93..5f0d1aee51 100644
--- a/packages/frontend/src/pages/settings/profile.vue
+++ b/packages/frontend/src/pages/settings/profile.vue
@@ -87,24 +87,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.avatarDecorations }}
-
-
{{ i18n.t('_profile.avatarDecorationMax', { max: $i?.policies.avatarDecorationLimit }) }} ({{ i18n.t('remainingN', { n: $i?.policies.avatarDecorationLimit - $i.avatarDecorations.length }) }})
-
-
{{ i18n.ts.detachAll }}
-
-
-
-
{{ avatarDecoration.name }}
-
-
-
-
-
+
@@ -128,7 +111,8 @@ SPDX-License-Identifier: AGPL-3.0-only
@@ -194,4 +213,12 @@ onMounted(() => {
.save {
margin: 8px 0 0 0;
}
+
+.mfmPreview {
+ padding: 12px;
+ border-radius: var(--radius);
+ box-sizing: border-box;
+ min-height: 130px;
+ pointer-events: none;
+}
diff --git a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts
index fe599dcead..28293b287c 100644
--- a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts
+++ b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts
@@ -37,7 +37,7 @@ type MfmProps = {
isNote?: boolean;
emojiUrls?: string[];
rootScale?: number;
- nyaize: boolean | 'respect';
+ nyaize?: boolean | 'respect';
parsedNodes?: mfm.MfmNode[] | null;
enableEmojiMenu?: boolean;
enableEmojiMenuReaction?: boolean;
diff --git a/packages/frontend/src/pages/admin/announcements.vue b/packages/frontend/src/pages/admin/announcements.vue
index 92070dc6c6..e4bbe15955 100644
--- a/packages/frontend/src/pages/admin/announcements.vue
+++ b/packages/frontend/src/pages/admin/announcements.vue
@@ -25,7 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.title }}
-
+
{{ i18n.ts.text }}
@@ -75,7 +75,6 @@ import { ref, computed } from 'vue';
import XHeader from './_header_.vue';
import MkButton from '@/components/MkButton.vue';
import MkInput from '@/components/MkInput.vue';
-import MkTextarea from '@/components/MkTextarea.vue';
import MkSwitch from '@/components/MkSwitch.vue';
import MkRadios from '@/components/MkRadios.vue';
import MkInfo from '@/components/MkInfo.vue';
@@ -83,6 +82,7 @@ import * as os from '@/os.js';
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import MkFolder from '@/components/MkFolder.vue';
+import MkTextarea from '@/components/MkTextarea.vue';
const announcements = ref([]);
diff --git a/packages/frontend/src/pages/channel-editor.vue b/packages/frontend/src/pages/channel-editor.vue
index af382bb137..f16b8709f3 100644
--- a/packages/frontend/src/pages/channel-editor.vue
+++ b/packages/frontend/src/pages/channel-editor.vue
@@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.name }}
-
+
{{ i18n.ts.description }}
@@ -70,7 +70,6 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/pages/settings/emoji-picker.vue b/packages/frontend/src/pages/settings/emoji-picker.vue
new file mode 100644
index 0000000000..f3f974a96f
--- /dev/null
+++ b/packages/frontend/src/pages/settings/emoji-picker.vue
@@ -0,0 +1,274 @@
+
+
+
+
+
+
+ {{ i18n.ts.pinned }} ({{ i18n.ts.reaction }})
+ {{ i18n.ts.pinnedEmojisForReactionSettingDescription }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ i18n.ts.reactionSettingDescription2 }}
+
+
+
+ {{ i18n.ts.preview }}
+ {{ i18n.ts.default }}
+ {{ i18n.ts.copyFromPinnedEmojis }}
+
+
+
+
+
+
+ {{ i18n.ts.pinned }} ({{ i18n.ts.general }})
+ {{ i18n.ts.pinnedEmojisSettingDescription }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ i18n.ts.reactionSettingDescription2 }}
+
+
+
+ {{ i18n.ts.preview }}
+ {{ i18n.ts.default }}
+ {{ i18n.ts.copyFromPinnedEmojisForReaction }}
+
+
+
+
+
+ {{ i18n.ts.emojiPickerDisplay }}
+
+
+
+ {{ i18n.ts.size }}
+
+
+
+
+
+
+ {{ i18n.ts.numberOfColumn }}
+
+
+
+
+
+
+
+
+ {{ i18n.ts.height }}
+
+
+
+
+
+
+
+ {{ i18n.ts.useDrawerReactionPickerForMobile }}
+ {{ i18n.ts.needReloadToApply }}
+
+
+
+
+
+
+
+
+
diff --git a/packages/frontend/src/pages/settings/index.vue b/packages/frontend/src/pages/settings/index.vue
index 633ee894a9..e533f4420b 100644
--- a/packages/frontend/src/pages/settings/index.vue
+++ b/packages/frontend/src/pages/settings/index.vue
@@ -74,9 +74,9 @@ const menuDef = computed(() => [{
active: currentPage.value?.route.name === 'privacy',
}, {
icon: 'ti ti-mood-happy',
- text: i18n.ts.reaction,
- to: '/settings/reaction',
- active: currentPage.value?.route.name === 'reaction',
+ text: i18n.ts.emojiPicker,
+ to: '/settings/emoji-picker',
+ active: currentPage.value?.route.name === 'emojiPicker',
}, {
icon: 'ti ti-cloud',
text: i18n.ts.drive,
@@ -236,7 +236,7 @@ provideMetadataReceiver((info) => {
childInfo.value = null;
} else {
childInfo.value = info;
- INFO.value.needWideArea = info.value?.needWideArea ?? undefined;
+ INFO.value.needWideArea = info.value.needWideArea ?? undefined;
}
});
diff --git a/packages/frontend/src/pages/settings/preferences-backups.vue b/packages/frontend/src/pages/settings/preferences-backups.vue
index 66c549930b..cc6223218f 100644
--- a/packages/frontend/src/pages/settings/preferences-backups.vue
+++ b/packages/frontend/src/pages/settings/preferences-backups.vue
@@ -83,10 +83,10 @@ const defaultStoreSaveKeys: (keyof typeof defaultStore['state'])[] = [
'useReactionPickerForContextMenu',
'showGapBetweenNotesInTimeline',
'instanceTicker',
- 'reactionPickerSize',
- 'reactionPickerWidth',
- 'reactionPickerHeight',
- 'reactionPickerUseDrawerForMobile',
+ 'emojiPickerScale',
+ 'emojiPickerWidth',
+ 'emojiPickerHeight',
+ 'emojiPickerUseDrawerForMobile',
'defaultSideView',
'menuDisplay',
'reportError',
diff --git a/packages/frontend/src/pages/settings/reaction.vue b/packages/frontend/src/pages/settings/reaction.vue
deleted file mode 100644
index fe5d9fc443..0000000000
--- a/packages/frontend/src/pages/settings/reaction.vue
+++ /dev/null
@@ -1,159 +0,0 @@
-
-
-
-
-
- {{ i18n.ts.reactionSettingDescription }}
-
-
-
-
-
-
-
-
-
-
- {{ i18n.ts.reactionSettingDescription2 }}
-
-
-
- {{ i18n.ts.size }}
-
-
-
-
-
- {{ i18n.ts.numberOfColumn }}
-
-
-
-
-
-
-
- {{ i18n.ts.height }}
-
-
-
-
-
-
-
- {{ i18n.ts.useDrawerReactionPickerForMobile }}
- {{ i18n.ts.needReloadToApply }}
-
-
-
-
- {{ i18n.ts.preview }}
- {{ i18n.ts.default }}
-
-
-
-
-
-
-
-
diff --git a/packages/frontend/src/router.ts b/packages/frontend/src/router.ts
index b81811d2e7..a7a53e97e6 100644
--- a/packages/frontend/src/router.ts
+++ b/packages/frontend/src/router.ts
@@ -63,9 +63,9 @@ export const routes = [{
name: 'privacy',
component: page(() => import('./pages/settings/privacy.vue')),
}, {
- path: '/reaction',
- name: 'reaction',
- component: page(() => import('./pages/settings/reaction.vue')),
+ path: '/emoji-picker',
+ name: 'emojiPicker',
+ component: page(() => import('./pages/settings/emoji-picker.vue')),
}, {
path: '/drive',
name: 'drive',
diff --git a/packages/frontend/src/scripts/emoji-picker.ts b/packages/frontend/src/scripts/emoji-picker.ts
index d6d6bf1245..3cf653ea1b 100644
--- a/packages/frontend/src/scripts/emoji-picker.ts
+++ b/packages/frontend/src/scripts/emoji-picker.ts
@@ -3,8 +3,9 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
-import { defineAsyncComponent, Ref, ref } from 'vue';
+import { defineAsyncComponent, Ref, ref, computed, ComputedRef } from 'vue';
import { popup } from '@/os.js';
+import { defaultStore } from '@/store.js';
/**
* 絵文字ピッカーを表示する。
@@ -23,8 +24,10 @@ class EmojiPicker {
}
public async init() {
+ const emojisRef = defaultStore.reactiveState.pinnedEmojis;
await popup(defineAsyncComponent(() => import('@/components/MkEmojiPickerDialog.vue')), {
src: this.src,
+ pinnedEmojis: emojisRef,
asReactionPicker: false,
manualShowing: this.manualShowing,
choseAndClose: false,
@@ -44,8 +47,8 @@ class EmojiPicker {
public show(
src: HTMLElement,
- onChosen: EmojiPicker['onChosen'],
- onClosed: EmojiPicker['onClosed'],
+ onChosen?: EmojiPicker['onChosen'],
+ onClosed?: EmojiPicker['onClosed'],
) {
this.src.value = src;
this.manualShowing.value = true;
diff --git a/packages/frontend/src/scripts/reaction-picker.ts b/packages/frontend/src/scripts/reaction-picker.ts
index 19e1bfba2c..9b13e794f5 100644
--- a/packages/frontend/src/scripts/reaction-picker.ts
+++ b/packages/frontend/src/scripts/reaction-picker.ts
@@ -5,6 +5,7 @@
import { defineAsyncComponent, Ref, ref } from 'vue';
import { popup } from '@/os.js';
+import { defaultStore } from '@/store.js';
class ReactionPicker {
private src: Ref = ref(null);
@@ -17,25 +18,27 @@ class ReactionPicker {
}
public async init() {
+ const reactionsRef = defaultStore.reactiveState.reactions;
await popup(defineAsyncComponent(() => import('@/components/MkEmojiPickerDialog.vue')), {
src: this.src,
+ pinnedEmojis: reactionsRef,
asReactionPicker: true,
manualShowing: this.manualShowing,
}, {
done: reaction => {
- this.onChosen!(reaction);
+ if (this.onChosen) this.onChosen(reaction);
},
close: () => {
this.manualShowing.value = false;
},
closed: () => {
this.src.value = null;
- this.onClosed!();
+ if (this.onClosed) this.onClosed();
},
});
}
- public show(src: HTMLElement, onChosen: ReactionPicker['onChosen'], onClosed: ReactionPicker['onClosed']) {
+ public show(src: HTMLElement, onChosen?: ReactionPicker['onChosen'], onClosed?: ReactionPicker['onClosed']) {
this.src.value = src;
this.manualShowing.value = true;
this.onChosen = onChosen;
diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts
index 8459a5721a..c7e501aa84 100644
--- a/packages/frontend/src/store.ts
+++ b/packages/frontend/src/store.ts
@@ -119,6 +119,10 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'account',
default: ['👍', '❤️', '😆', '🤔', '😮', '🎉', '💢', '😥', '😇', '🍮'],
},
+ pinnedEmojis: {
+ where: 'account',
+ default: [],
+ },
reactionAcceptance: {
where: 'account',
default: 'nonSensitiveOnly' as 'likeOnly' | 'likeOnlyForRemote' | 'nonSensitiveOnly' | 'nonSensitiveOnlyForLocalLikeOnlyForRemote' | null,
@@ -271,19 +275,19 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'device',
default: 'remote' as 'none' | 'remote' | 'always',
},
- reactionPickerSize: {
+ emojiPickerScale: {
where: 'device',
default: 1,
},
- reactionPickerWidth: {
+ emojiPickerWidth: {
where: 'device',
default: 1,
},
- reactionPickerHeight: {
+ emojiPickerHeight: {
where: 'device',
default: 2,
},
- reactionPickerUseDrawerForMobile: {
+ emojiPickerUseDrawerForMobile: {
where: 'device',
default: true,
},
From 8ff87176f843e4e7ff3e1432c1e090867c8c2535 Mon Sep 17 00:00:00 2001
From: syuilo
Date: Thu, 14 Dec 2023 14:23:18 +0900
Subject: [PATCH 23/52] tweak profile.avatar-decoration.dialog.vue
---
.../src/pages/settings/profile.avatar-decoration.dialog.vue | 3 ++-
.../frontend/src/pages/settings/profile.avatar-decoration.vue | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/packages/frontend/src/pages/settings/profile.avatar-decoration.dialog.vue b/packages/frontend/src/pages/settings/profile.avatar-decoration.dialog.vue
index a27b46aa3e..26cacf3c37 100644
--- a/packages/frontend/src/pages/settings/profile.avatar-decoration.dialog.vue
+++ b/packages/frontend/src/pages/settings/profile.avatar-decoration.dialog.vue
@@ -32,7 +32,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.update }}
{{ i18n.ts.detach }}
- {{ i18n.ts.attach }}
+ {{ i18n.ts.attach }}
@@ -73,6 +73,7 @@ const emit = defineEmits<{
}>();
const dialog = shallowRef