wip
This commit is contained in:
parent
a2e1b8b41b
commit
39aec56947
|
|
@ -11911,6 +11911,10 @@ export interface Locale extends ILocale {
|
||||||
* {x}%節約
|
* {x}%節約
|
||||||
*/
|
*/
|
||||||
"savedXPercent": ParameterizedString<"x">;
|
"savedXPercent": ParameterizedString<"x">;
|
||||||
|
/**
|
||||||
|
* アップロードされていないファイルがありますが、中止しますか?
|
||||||
|
*/
|
||||||
|
"abortConfirm": string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
declare const locales: {
|
declare const locales: {
|
||||||
|
|
|
||||||
|
|
@ -3186,3 +3186,4 @@ _serverSetupWizard:
|
||||||
_uploader:
|
_uploader:
|
||||||
compressedToX: "{x}に圧縮"
|
compressedToX: "{x}に圧縮"
|
||||||
savedXPercent: "{x}%節約"
|
savedXPercent: "{x}%節約"
|
||||||
|
abortConfirm: "アップロードされていないファイルがありますが、中止しますか?"
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="_buttonsCenter">
|
<div class="_buttonsCenter">
|
||||||
<MkButton v-if="isUploading" rounded @click=""><i class="ti ti-x"></i> {{ i18n.ts.cancel }}</MkButton>
|
<MkButton v-if="isUploading" rounded @click="cancel()"><i class="ti ti-x"></i> {{ i18n.ts.cancel }}</MkButton>
|
||||||
<MkButton v-else-if="!firstUploadAttempted" primary rounded @click="upload()"><i class="ti ti-upload"></i> {{ i18n.ts.upload }}</MkButton>
|
<MkButton v-else-if="!firstUploadAttempted" primary rounded @click="upload()"><i class="ti ti-upload"></i> {{ i18n.ts.upload }}</MkButton>
|
||||||
<MkButton v-else-if="canRetry" primary rounded @click="upload()"><i class="ti ti-reload"></i> {{ i18n.ts.retry }}</MkButton>
|
<MkButton v-else-if="canRetry" primary rounded @click="upload()"><i class="ti ti-reload"></i> {{ i18n.ts.retry }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -90,6 +90,7 @@ import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
import MkSelect from '@/components/MkSelect.vue';
|
import MkSelect from '@/components/MkSelect.vue';
|
||||||
import { isWebpSupported } from '@/utility/isWebpSupported.js';
|
import { isWebpSupported } from '@/utility/isWebpSupported.js';
|
||||||
import { uploadFile } from '@/utility/upload.js';
|
import { uploadFile } from '@/utility/upload.js';
|
||||||
|
import * as os from '@/os.js';
|
||||||
|
|
||||||
const $i = ensureSignin();
|
const $i = ensureSignin();
|
||||||
|
|
||||||
|
|
@ -173,8 +174,16 @@ watch(items, () => {
|
||||||
}
|
}
|
||||||
}, { deep: true });
|
}, { deep: true });
|
||||||
|
|
||||||
function cancel() {
|
async function cancel() {
|
||||||
// TODO: アップロードを中止しますか?
|
const { canceled } = await os.confirm({
|
||||||
|
type: 'question',
|
||||||
|
text: i18n.ts._uploader.abortConfirm,
|
||||||
|
okText: i18n.ts.yes,
|
||||||
|
cancelText: i18n.ts.no,
|
||||||
|
});
|
||||||
|
if (canceled) return;
|
||||||
|
|
||||||
|
emit('done', items.value.filter(item => item.uploaded != null).map(item => item.uploaded!));
|
||||||
dialog.value?.close();
|
dialog.value?.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue