@@ -29,6 +29,9 @@ SPDX-License-Identifier: AGPL-3.0-only
29
29
<MkRange v-model="offsetY" continuousUpdate :min="-0.25" :max="0.25" :step="0.025" :textConverter="(v) => `${Math.floor(v * 100)}%`">
30
30
<template #label>Y {{ i18n.ts.position }}</template>
31
31
</MkRange>
32
+ <MkSwitch v-model="showBelow">
33
+ <template #label>{{ i18n.ts.showBelowAvatar }}</template>
34
+ </MkSwitch>
32
35
<MkSwitch v-model="flipH">
33
36
<template #label>{{ i18n.ts.flip }}</template>
34
37
</MkSwitch>
@@ -71,12 +74,14 @@ const emit = defineEmits<{
71
74
flipH: boolean;
72
75
offsetX: number;
73
76
offsetY: number;
77
+ showBelow: boolean;
74
78
}): void;
75
79
(ev: 'update', payload: {
76
80
angle: number;
77
81
flipH: boolean;
78
82
offsetX: number;
79
83
offsetY: number;
84
+ showBelow: boolean;
80
85
}): void;
81
86
(ev: 'detach'): void;
82
87
}>();
@@ -87,6 +92,7 @@ const angle = ref((props.usingIndex != null ? $i.avatarDecorations[props.usingIn
87
92
const flipH = ref((props.usingIndex != null ? $i.avatarDecorations[props.usingIndex].flipH : null) ?? false);
88
93
const offsetX = ref((props.usingIndex != null ? $i.avatarDecorations[props.usingIndex].offsetX : null) ?? 0);
89
94
const offsetY = ref((props.usingIndex != null ? $i.avatarDecorations[props.usingIndex].offsetY : null) ?? 0);
95
+ const showBelow = ref((props.usingIndex != null ? $i.avatarDecorations[props.usingIndex].showBelow : null) ?? false);
90
96
91
97
const decorationsForPreview = computed(() => {
92
98
const decoration = {
@@ -96,6 +102,7 @@ const decorationsForPreview = computed(() => {
96
102
flipH: flipH.value,
97
103
offsetX: offsetX.value,
98
104
offsetY: offsetY.value,
105
+ showBelow: showBelow.value,
99
106
};
100
107
const decorations = [...$i.avatarDecorations];
101
108
if (props.usingIndex != null) {
@@ -116,6 +123,7 @@ async function update() {
116
123
flipH: flipH.value,
117
124
offsetX: offsetX.value,
118
125
offsetY: offsetY.value,
126
+ showBelow: showBelow.value,
119
127
});
120
128
dialog.value.close();
121
129
}
@@ -126,6 +134,7 @@ async function attach() {
126
134
flipH: flipH.value,
127
135
offsetX: offsetX.value,
128
136
offsetY: offsetY.value,
137
+ showBelow: showBelow.value,
129
138
});
130
139
dialog.value.close();
131
140
}
0 commit comments