showBelow -> showBehind

This commit is contained in:
kakkokari-gtyih 2024-10-05 15:27:27 +09:00
parent d63247c480
commit c215410e69
11 changed files with 23 additions and 23 deletions

2
locales/index.d.ts vendored
View File

@ -4921,7 +4921,7 @@ export interface Locale extends ILocale {
/** /**
* *
*/ */
"showBelowAvatar": string; "showBehindAvatar": string;
/** /**
* *
*/ */

View File

@ -1225,7 +1225,7 @@ detach: "外す"
detachAll: "全て外す" detachAll: "全て外す"
angle: "角度" angle: "角度"
flip: "反転" flip: "反転"
showBelowAvatar: "アイコンの後ろに表示" showBehindAvatar: "アイコンの後ろに表示"
showAvatarDecorations: "アイコンのデコレーションを表示" showAvatarDecorations: "アイコンのデコレーションを表示"
releaseToRefresh: "離してリロード" releaseToRefresh: "離してリロード"
refreshing: "リロード中" refreshing: "リロード中"

View File

@ -486,7 +486,7 @@ export class UserEntityService implements OnModuleInit {
flipH: ud.flipH || undefined, flipH: ud.flipH || undefined,
offsetX: ud.offsetX || undefined, offsetX: ud.offsetX || undefined,
offsetY: ud.offsetY || undefined, offsetY: ud.offsetY || undefined,
showBelow: ud.showBelow || undefined, showBehind: ud.showBehind || undefined,
url: decorations.find(d => d.id === ud.id)!.url, url: decorations.find(d => d.id === ud.id)!.url,
}))) : [], }))) : [],
isBot: user.isBot, isBot: user.isBot,

View File

@ -147,7 +147,7 @@ export class MiUser {
flipH?: boolean; flipH?: boolean;
offsetX?: number; offsetX?: number;
offsetY?: number; offsetY?: number;
showBelow?: boolean; showBehind?: boolean;
}[]; }[];
@Index() @Index()

View File

@ -104,7 +104,7 @@ export const packedUserLiteSchema = {
type: 'number', type: 'number',
nullable: false, optional: true, nullable: false, optional: true,
}, },
showBelow: { showBehind: {
type: 'boolean', type: 'boolean',
nullable: false, optional: true, nullable: false, optional: true,
}, },

View File

@ -146,7 +146,7 @@ export const paramDef = {
flipH: { type: 'boolean', nullable: true }, flipH: { type: 'boolean', nullable: true },
offsetX: { type: 'number', nullable: true, maximum: 0.25, minimum: -0.25 }, offsetX: { type: 'number', nullable: true, maximum: 0.25, minimum: -0.25 },
offsetY: { type: 'number', nullable: true, maximum: 0.25, minimum: -0.25 }, offsetY: { type: 'number', nullable: true, maximum: 0.25, minimum: -0.25 },
showBelow: { type: 'boolean', nullable: true }, showBehind: { type: 'boolean', nullable: true },
}, },
required: ['id'], required: ['id'],
} }, } },
@ -387,7 +387,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
flipH: d.flipH ?? false, flipH: d.flipH ?? false,
offsetX: d.offsetX ?? 0, offsetX: d.offsetX ?? 0,
offsetY: d.offsetY ?? 0, offsetY: d.offsetY ?? 0,
showBelow: d.showBelow ?? false, showBehind: d.showBehind ?? false,
})); }));
} }

View File

@ -115,7 +115,7 @@ function getDecorationOffset(decoration: Omit<Misskey.entities.UserDetailed['ava
} }
function getDecorationZIndex(decoration: Omit<Misskey.entities.UserDetailed['avatarDecorations'][number], 'id'>) { function getDecorationZIndex(decoration: Omit<Misskey.entities.UserDetailed['avatarDecorations'][number], 'id'>) {
return decoration.showBelow ? '-1' : undefined; return decoration.showBehind ? '-1' : undefined;
} }
const color = ref<string | undefined>(); const color = ref<string | undefined>();

View File

@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
@click="emit('click')" @click="emit('click')"
> >
<div :class="$style.name"><MkCondensedLine :minScale="0.5">{{ decoration.name }}</MkCondensedLine></div> <div :class="$style.name"><MkCondensedLine :minScale="0.5">{{ decoration.name }}</MkCondensedLine></div>
<MkAvatar style="width: 60px; height: 60px;" :user="$i" :decorations="[{ url: decoration.url, angle, flipH, offsetX, offsetY, showBelow }]" forceShowDecoration/> <MkAvatar style="width: 60px; height: 60px;" :user="$i" :decorations="[{ url: decoration.url, angle, flipH, offsetX, offsetY, showBehind }]" forceShowDecoration/>
<i v-if="decoration.roleIdsThatCanBeUsedThisDecoration.length > 0 && !$i.roles.some(r => decoration.roleIdsThatCanBeUsedThisDecoration.includes(r.id))" :class="$style.lock" class="ti ti-lock"></i> <i v-if="decoration.roleIdsThatCanBeUsedThisDecoration.length > 0 && !$i.roles.some(r => decoration.roleIdsThatCanBeUsedThisDecoration.includes(r.id))" :class="$style.lock" class="ti ti-lock"></i>
</div> </div>
</template> </template>
@ -32,7 +32,7 @@ const props = defineProps<{
flipH?: boolean; flipH?: boolean;
offsetX?: number; offsetX?: number;
offsetY?: number; offsetY?: number;
showBelow?: boolean; showBehind?: boolean;
}>(); }>();
const emit = defineEmits<{ const emit = defineEmits<{

View File

@ -29,8 +29,8 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkRange v-model="offsetY" continuousUpdate :min="-0.25" :max="0.25" :step="0.025" :textConverter="(v) => `${Math.floor(v * 100)}%`"> <MkRange v-model="offsetY" continuousUpdate :min="-0.25" :max="0.25" :step="0.025" :textConverter="(v) => `${Math.floor(v * 100)}%`">
<template #label>Y {{ i18n.ts.position }}</template> <template #label>Y {{ i18n.ts.position }}</template>
</MkRange> </MkRange>
<MkSwitch v-model="showBelow"> <MkSwitch v-model="showBehind">
<template #label>{{ i18n.ts.showBelowAvatar }}</template> <template #label>{{ i18n.ts.showBehindAvatar }}</template>
</MkSwitch> </MkSwitch>
<MkSwitch v-model="flipH"> <MkSwitch v-model="flipH">
<template #label>{{ i18n.ts.flip }}</template> <template #label>{{ i18n.ts.flip }}</template>
@ -74,14 +74,14 @@ const emit = defineEmits<{
flipH: boolean; flipH: boolean;
offsetX: number; offsetX: number;
offsetY: number; offsetY: number;
showBelow: boolean; showBehind: boolean;
}): void; }): void;
(ev: 'update', payload: { (ev: 'update', payload: {
angle: number; angle: number;
flipH: boolean; flipH: boolean;
offsetX: number; offsetX: number;
offsetY: number; offsetY: number;
showBelow: boolean; showBehind: boolean;
}): void; }): void;
(ev: 'detach'): void; (ev: 'detach'): void;
}>(); }>();
@ -92,7 +92,7 @@ const angle = ref((props.usingIndex != null ? $i.avatarDecorations[props.usingIn
const flipH = ref((props.usingIndex != null ? $i.avatarDecorations[props.usingIndex].flipH : null) ?? false); 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); const offsetX = ref((props.usingIndex != null ? $i.avatarDecorations[props.usingIndex].offsetX : null) ?? 0);
const offsetY = ref((props.usingIndex != null ? $i.avatarDecorations[props.usingIndex].offsetY : null) ?? 0); const offsetY = ref((props.usingIndex != null ? $i.avatarDecorations[props.usingIndex].offsetY : null) ?? 0);
const showBelow = ref((props.usingIndex != null ? $i.avatarDecorations[props.usingIndex].showBelow : null) ?? false); const showBehind = ref((props.usingIndex != null ? $i.avatarDecorations[props.usingIndex].showBehind : null) ?? false);
const decorationsForPreview = computed(() => { const decorationsForPreview = computed(() => {
const decoration = { const decoration = {
@ -103,7 +103,7 @@ const decorationsForPreview = computed(() => {
offsetX: offsetX.value, offsetX: offsetX.value,
offsetY: offsetY.value, offsetY: offsetY.value,
blink: true, blink: true,
showBelow: showBelow.value, showBehind: showBehind.value,
}; };
const decorations = [...$i.avatarDecorations]; const decorations = [...$i.avatarDecorations];
if (props.usingIndex != null) { if (props.usingIndex != null) {
@ -124,7 +124,7 @@ async function update() {
flipH: flipH.value, flipH: flipH.value,
offsetX: offsetX.value, offsetX: offsetX.value,
offsetY: offsetY.value, offsetY: offsetY.value,
showBelow: showBelow.value, showBehind: showBehind.value,
}); });
dialog.value?.close(); dialog.value?.close();
} }
@ -135,7 +135,7 @@ async function attach() {
flipH: flipH.value, flipH: flipH.value,
offsetX: offsetX.value, offsetX: offsetX.value,
offsetY: offsetY.value, offsetY: offsetY.value,
showBelow: showBelow.value, showBehind: showBehind.value,
}); });
dialog.value?.close(); dialog.value?.close();
} }

View File

@ -21,7 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:flipH="avatarDecoration.flipH" :flipH="avatarDecoration.flipH"
:offsetX="avatarDecoration.offsetX" :offsetX="avatarDecoration.offsetX"
:offsetY="avatarDecoration.offsetY" :offsetY="avatarDecoration.offsetY"
:showBelow="avatarDecoration.showBelow" :showBehind="avatarDecoration.showBehind"
:active="true" :active="true"
@click="openDecoration(avatarDecoration, i)" @click="openDecoration(avatarDecoration, i)"
/> />
@ -79,7 +79,7 @@ function openDecoration(avatarDecoration, index?: number) {
flipH: payload.flipH, flipH: payload.flipH,
offsetX: payload.offsetX, offsetX: payload.offsetX,
offsetY: payload.offsetY, offsetY: payload.offsetY,
showBelow: payload.showBelow, showBehind: payload.showBehind,
}; };
const update = [...$i.avatarDecorations, decoration]; const update = [...$i.avatarDecorations, decoration];
await os.apiWithDialog('i/update', { await os.apiWithDialog('i/update', {
@ -94,7 +94,7 @@ function openDecoration(avatarDecoration, index?: number) {
flipH: payload.flipH, flipH: payload.flipH,
offsetX: payload.offsetX, offsetX: payload.offsetX,
offsetY: payload.offsetY, offsetY: payload.offsetY,
showBelow: payload.showBelow, showBehind: payload.showBehind,
}; };
const update = [...$i.avatarDecorations]; const update = [...$i.avatarDecorations];
update[index] = decoration; update[index] = decoration;

View File

@ -3715,7 +3715,7 @@ export type components = {
url: string; url: string;
offsetX?: number; offsetX?: number;
offsetY?: number; offsetY?: number;
showBelow?: boolean; showBehind?: boolean;
}[]; }[];
isBot?: boolean; isBot?: boolean;
isCat?: boolean; isCat?: boolean;
@ -19698,7 +19698,7 @@ export type operations = {
flipH?: boolean | null; flipH?: boolean | null;
offsetX?: number | null; offsetX?: number | null;
offsetY?: number | null; offsetY?: number | null;
showBelow?: boolean | null; showBehind?: boolean | null;
})[]; })[];
/** Format: misskey:id */ /** Format: misskey:id */
bannerId?: string | null; bannerId?: string | null;