mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-17 15:37:30 -07:00
e8b5804e99
* wip
* wip
* wip
* wip
* wip
* Update storage.ts
* wip
* wip
* wip
* wip
* Update storage.ts
* Update storage.ts
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Update storage.ts
* wip
* wip
* wip
* wip
* 🍕
* wip
* wip
* wip
* wip
* wip
* wip
* Update deck-storage.ts
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Update store.ts
* wip
* wip
* wip
* wip
* Update init.ts
* wip
* wip
* Update pizzax.ts
* wip
* wip
* Update timeline.vue
* Update init.ts
* wip
* wip
* Update init.ts
60 lines
1.5 KiB
Vue
60 lines
1.5 KiB
Vue
<template>
|
|
<section class="uawsfosz _section">
|
|
<div class="_title"><Fa :icon="faCloud"/> {{ $t('drive') }}</div>
|
|
<div class="_content">
|
|
<span>{{ $t('uploadFolder') }}: {{ uploadFolder ? uploadFolder.name : '-' }}</span>
|
|
<MkButton primary @click="chooseUploadFolder()"><Fa :icon="faFolderOpen"/> {{ $t('selectFolder') }}</MkButton>
|
|
</div>
|
|
</section>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent } from 'vue';
|
|
import { faCloud, faFolderOpen } from '@fortawesome/free-solid-svg-icons';
|
|
import { faClock, faEyeSlash, faTrashAlt } from '@fortawesome/free-regular-svg-icons';
|
|
import MkButton from '@/components/ui/button.vue';
|
|
import * as os from '@/os';
|
|
|
|
export default defineComponent({
|
|
components: {
|
|
MkButton,
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
uploadFolder: null,
|
|
faCloud, faClock, faEyeSlash, faFolderOpen, faTrashAlt
|
|
}
|
|
},
|
|
|
|
async created() {
|
|
if (this.$store.state.uploadFolder) {
|
|
this.uploadFolder = await os.api('drive/folders/show', {
|
|
folderId: this.$store.state.uploadFolder
|
|
});
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
chooseUploadFolder() {
|
|
os.selectDriveFolder(false).then(async folder => {
|
|
this.$store.set('uploadFolder', folder ? folder.id : null);
|
|
os.success();
|
|
if (this.$store.state.uploadFolder) {
|
|
this.uploadFolder = await os.api('drive/folders/show', {
|
|
folderId: this.$store.state.uploadFolder
|
|
});
|
|
} else {
|
|
this.uploadFolder = null;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.uawsfosz {
|
|
|
|
}
|
|
</style>
|