refactor(client):

This commit is contained in:
syuilo
2021-12-10 01:22:22 +09:00
parent 980a99b6c9
commit 46c0280764
10 changed files with 23 additions and 14 deletions

View File

@@ -53,7 +53,7 @@ import MkButton from '@/components/ui/button.vue';
import MkInput from '@/components/form/input.vue';
import MkPagination from '@/components/ui/pagination.vue';
import MkTab from '@/components/tab.vue';
import { selectFile } from '@/scripts/select-file';
import { selectFiles } from '@/scripts/select-file';
import * as os from '@/os';
import * as symbols from '@/symbols';
@@ -117,7 +117,7 @@ export default defineComponent({
methods: {
async add(e) {
const files = await selectFile(e.currentTarget || e.target, null, true);
const files = await selectFiles(e.currentTarget || e.target, null);
const promise = Promise.all(files.map(file => os.api('admin/emoji/add', {
fileId: file.id,

View File

@@ -112,7 +112,7 @@ export default defineComponent({
},
setBannerImage(e) {
selectFile(e.currentTarget || e.target, null, false).then(file => {
selectFile(e.currentTarget || e.target, null).then(file => {
this.bannerId = file.id;
});
},

View File

@@ -37,7 +37,7 @@ import FormTuple from '@/components/debobigego/tuple.vue';
import FormBase from '@/components/debobigego/base.vue';
import FormGroup from '@/components/debobigego/group.vue';
import FormSuspense from '@/components/debobigego/suspense.vue';
import { selectFile } from '@/scripts/select-file';
import { selectFiles } from '@/scripts/select-file';
import * as os from '@/os';
import * as symbols from '@/symbols';
@@ -95,7 +95,7 @@ export default defineComponent({
methods: {
selectFile(e) {
selectFile(e.currentTarget || e.target, null, true).then(files => {
selectFiles(e.currentTarget || e.target, null).then(files => {
this.files = this.files.concat(files);
});
},

View File

@@ -152,7 +152,7 @@ export default defineComponent({
},
chooseFile(e) {
selectFile(e.currentTarget || e.target, this.$ts.selectFile, false).then(file => {
selectFile(e.currentTarget || e.target, this.$ts.selectFile).then(file => {
this.file = file;
});
},

View File

@@ -448,7 +448,7 @@ export default defineComponent({
},
setEyeCatchingImage(e) {
selectFile(e.currentTarget || e.target, null, false).then(file => {
selectFile(e.currentTarget || e.target, null).then(file => {
this.eyeCatchingImageId = file.id;
});
},

View File

@@ -210,7 +210,7 @@ export default defineComponent({
},
chooseImage(key, e) {
selectFile(e.currentTarget || e.target, null, false).then(file => {
selectFile(e.currentTarget || e.target, null).then(file => {
room.updateProp(key, `/proxy/?${urlQuery({ url: file.thumbnailUrl })}`);
this.$refs.preview.selected(room.getSelectedObject());
this.changed = true;

View File

@@ -188,7 +188,7 @@ export default defineComponent({
themesCount,
wallpaper,
setWallpaper(e) {
selectFile(e.currentTarget || e.target, null, false).then(file => {
selectFile(e.currentTarget || e.target, null).then(file => {
wallpaper.value = file.url;
});
},