This commit is contained in:
parent
926e8b71e9
commit
915b1ccf2e
|
@ -28,7 +28,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<g fill-rule="evenodd">
|
||||
<rect x="21.709" y="14.787" width="120" height="80" fill="var(--MI_THEME-bg)" stop-color="#000000" stroke-dasharray="1.1384, 3.4152" stroke-width="1.1384" style="mix-blend-mode:normal" />
|
||||
<rect x="21.709" y="14.787" width="120" height="80" fill="url(#pattern5942)" stop-color="#000000" stroke-dasharray="1.1384, 3.4152" stroke-width="1.1384" style="mix-blend-mode:normal" />
|
||||
<rect x="47.101" y="40.105" width="69.216" height="29.364" ry="5.3019" fill="var(--MI_THEME-accentDarken)" stop-color="#000000" stroke-dasharray="1.13855, 3.41565" stroke-width="1.1386" />
|
||||
<rect x="47.101" y="40.105" width="69.216" height="29.364" ry="5.3019" fill="var(--MI_THEME-accent)" stop-color="#000000" stroke-dasharray="1.13855, 3.41565" stroke-width="1.1386" />
|
||||
</g>
|
||||
<g fill="none" stroke="var(--MI_THEME-error)">
|
||||
<path v-if="props.arrow === 'top'" d="m81.709 16.167 2e-6 22.601" marker-end="url(#Arrow3)" marker-start="url(#Arrow3)" stop-color="#000000" stroke-width="1.3038" />
|
||||
|
|
|
@ -109,9 +109,9 @@ import XAnchorSelector from '@/components/MkWatermarkEditorDialog.anchor.vue';
|
|||
import XPaddingView from '@/components/MkWatermarkEditorDialog.padding.vue';
|
||||
|
||||
import * as os from '@/os.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { prefer } from '@/preferences.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { selectFile } from '@/utility/select-file.js';
|
||||
import { selectFile } from '@/utility/drive.js';
|
||||
import { applyWatermark, canApplyWatermark } from '@/utility/watermark.js';
|
||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||
|
||||
|
@ -133,7 +133,7 @@ function cancel() {
|
|||
//#endregion
|
||||
|
||||
//#region 設定
|
||||
const watermarkConfig = ref<WatermarkUserConfig>(defaultStore.state.watermarkConfig ?? {
|
||||
const watermarkConfig = ref<WatermarkUserConfig>(prefer.s.watermarkConfig ?? {
|
||||
opacity: 0.2,
|
||||
repeat: true,
|
||||
rotate: 15,
|
||||
|
@ -202,7 +202,7 @@ const paddingBottom = computed({
|
|||
|
||||
function save() {
|
||||
if (canApplyWatermark(watermarkConfig.value)) {
|
||||
defaultStore.set('watermarkConfig', watermarkConfig.value);
|
||||
prefer.commit('watermarkConfig', watermarkConfig.value);
|
||||
} else {
|
||||
os.alert({
|
||||
type: 'warning',
|
||||
|
@ -251,10 +251,7 @@ const friendlyFileName = computed<string>(() => {
|
|||
});
|
||||
|
||||
function chooseFile(ev: MouseEvent) {
|
||||
selectFile(ev.currentTarget ?? ev.target, {
|
||||
label: i18n.ts.selectFile,
|
||||
dontUseWatermark: true,
|
||||
}).then((file) => {
|
||||
selectFile(ev.currentTarget ?? ev.target, i18n.ts.selectFile).then((file) => {
|
||||
if (!file.type.startsWith('image')) {
|
||||
os.alert({
|
||||
type: 'warning',
|
||||
|
|
|
@ -57,7 +57,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template #icon><i class="ti ti-ripple"></i></template>
|
||||
<template #label>{{ i18n.ts.watermark }}</template>
|
||||
|
||||
<div>
|
||||
<div class="_gaps_m">
|
||||
<div class="_gaps">
|
||||
<MkInfo>{{ i18n.ts.useWatermarkInfo }}</MkInfo>
|
||||
|
||||
|
|
Loading…
Reference in New Issue