summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkWatermarkEditorDialog.Layer.vue
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2025-09-19 21:02:30 +0900
committerGitHub <noreply@github.com>2025-09-19 21:02:30 +0900
commit42b2aea53364c57c39ebb953359ece4b7b0017a5 (patch)
tree8abe7de01705ed3fb6324c6a174162c7bb9288f2 /packages/frontend/src/components/MkWatermarkEditorDialog.Layer.vue
parent🎨 (diff)
downloadmisskey-42b2aea53364c57c39ebb953359ece4b7b0017a5.tar.gz
misskey-42b2aea53364c57c39ebb953359ece4b7b0017a5.tar.bz2
misskey-42b2aea53364c57c39ebb953359ece4b7b0017a5.zip
feat(frontend): 自分のプロフィールページの二次元コード(QRコード)を表示し、他の人のコードを読み取りするページを追加 (#16456)
* wip (qr.show.vue) * added to navbar * qr.show.vue * fix * added to navbar * fix size * :art: * :art: * fix div warn * fix * use * 0.25 * fix?? * fix lint * clean up * ??? * ? * fix * :art: * :art: * refactor * :art: * :art: * :ar:t * :art: * iphone flip * no lazy import * :art: * :art: * :art: * ユーザー全部flipでいいや * :v: * fix * fix * fix lint * :art: * fix type * fix: local user profile url cannot be resolved with ap/show * fix: local user url with hostname could not be resolved * chore: use common utility for checking self host * wip * :art: * :art: * fix imports * fix * fix * fix * :art: * fix... * set spacer-w * :v: * 全画面でQRを読むように * fix * :art: * modify navbar.ts * start/stop on vue activation * display raw content read from qr * 端末のQRをスキャンするボタンを追加 * chore * やっぱりmfmを先に表示する * :art: * fix 18n * QRの内容は/users/:userIdにする * add spdx * use cqh * `defineProps` is a compiler macro and no longer needs to be imported. * use MkUserName * 🎨 * 🎨 * refactor * clean up * refactor * 🎨 * Update qr.show.vue * Misskeyロゴにdrop-shadowを追加 * clean up: do not use empty css * fix os.select usage * Update qr.vue * Update qr.show.vue * Update qr.show.vue * Update get-user-menu.ts * ✌️ * Update show.ts * Update ja-JP.yml * watermark * Update CHANGELOG.md * Update qr.read.vue * Update qr.read.vue * wip * Update MkWatermarkEditorDialog.Layer.vue --------- Co-authored-by: anatawa12 <anatawa12@icloud.com> Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src/components/MkWatermarkEditorDialog.Layer.vue')
-rw-r--r--packages/frontend/src/components/MkWatermarkEditorDialog.Layer.vue73
1 files changed, 73 insertions, 0 deletions
diff --git a/packages/frontend/src/components/MkWatermarkEditorDialog.Layer.vue b/packages/frontend/src/components/MkWatermarkEditorDialog.Layer.vue
index 11ae091d90..288293db3f 100644
--- a/packages/frontend/src/components/MkWatermarkEditorDialog.Layer.vue
+++ b/packages/frontend/src/components/MkWatermarkEditorDialog.Layer.vue
@@ -19,6 +19,18 @@ SPDX-License-Identifier: AGPL-3.0-only
</FormSlot>
<MkRange
+ :modelValue="layer.align.margin ?? 0"
+ :min="0"
+ :max="0.25"
+ :step="0.01"
+ :textConverter="(v) => (v * 100).toFixed(1) + '%'"
+ continuousUpdate
+ @update:modelValue="(v) => (layer as Extract<WatermarkPreset['layers'][number], { type: 'text' }>).align.margin = v"
+ >
+ <template #label>{{ i18n.ts._watermarkEditor.margin }}</template>
+ </MkRange>
+
+ <MkRange
v-model="layer.scale"
:min="0"
:max="1"
@@ -67,6 +79,18 @@ SPDX-License-Identifier: AGPL-3.0-only
</FormSlot>
<MkRange
+ :modelValue="layer.align.margin ?? 0"
+ :min="0"
+ :max="0.25"
+ :step="0.01"
+ :textConverter="(v) => (v * 100).toFixed(1) + '%'"
+ continuousUpdate
+ @update:modelValue="(v) => (layer as Extract<WatermarkPreset['layers'][number], { type: 'image' }>).align.margin = v"
+ >
+ <template #label>{{ i18n.ts._watermarkEditor.margin }}</template>
+ </MkRange>
+
+ <MkRange
v-model="layer.scale"
:min="0"
:max="1"
@@ -107,6 +131,55 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkSwitch>
</template>
+ <template v-else-if="layer.type === 'qr'">
+ <MkInput v-model="layer.data" debounce>
+ <template #label>{{ i18n.ts._watermarkEditor.text }}</template>
+ <template #caption>{{ i18n.ts._watermarkEditor.leaveBlankToAccountUrl }}</template>
+ </MkInput>
+
+ <FormSlot>
+ <template #label>{{ i18n.ts._watermarkEditor.position }}</template>
+ <MkPositionSelector
+ v-model:x="layer.align.x"
+ v-model:y="layer.align.y"
+ ></MkPositionSelector>
+ </FormSlot>
+
+ <MkRange
+ :modelValue="layer.align.margin ?? 0"
+ :min="0"
+ :max="0.25"
+ :step="0.01"
+ :textConverter="(v) => (v * 100).toFixed(1) + '%'"
+ continuousUpdate
+ @update:modelValue="(v) => (layer as Extract<WatermarkPreset['layers'][number], { type: 'qr' }>).align.margin = v"
+ >
+ <template #label>{{ i18n.ts._watermarkEditor.margin }}</template>
+ </MkRange>
+
+ <MkRange
+ v-model="layer.scale"
+ :min="0"
+ :max="1"
+ :step="0.01"
+ :textConverter="(v) => (v * 100).toFixed(1) + '%'"
+ continuousUpdate
+ >
+ <template #label>{{ i18n.ts._watermarkEditor.scale }}</template>
+ </MkRange>
+
+ <MkRange
+ v-model="layer.opacity"
+ :min="0"
+ :max="1"
+ :step="0.01"
+ :textConverter="(v) => (v * 100).toFixed(1) + '%'"
+ continuousUpdate
+ >
+ <template #label>{{ i18n.ts._watermarkEditor.opacity }}</template>
+ </MkRange>
+ </template>
+
<template v-else-if="layer.type === 'stripe'">
<MkRange
v-model="layer.frequency"