2018-02-13 22:54:18 -08:00
|
|
|
<template>
|
2020-01-29 11:37:25 -08:00
|
|
|
<div class="yfudmmck">
|
2017-01-11 12:55:38 -08:00
|
|
|
<nav>
|
2018-02-13 22:54:18 -08:00
|
|
|
<div class="path" @contextmenu.prevent.stop="() => {}">
|
2020-10-17 04:12:00 -07:00
|
|
|
<XNavFolder :class="{ current: folder == null }"/>
|
2020-04-21 08:34:56 -07:00
|
|
|
<template v-for="f in hierarchyFolders">
|
2021-04-20 07:22:59 -07:00
|
|
|
<span class="separator"><i class="fas fa-angle-right"></i></span>
|
2020-10-17 04:12:00 -07:00
|
|
|
<XNavFolder :folder="f"/>
|
2018-02-07 21:50:18 -08:00
|
|
|
</template>
|
2021-04-20 07:22:59 -07:00
|
|
|
<span class="separator" v-if="folder != null"><i class="fas fa-angle-right"></i></span>
|
2018-02-17 19:35:18 -08:00
|
|
|
<span class="folder current" v-if="folder != null">{{ folder.name }}</span>
|
2017-01-11 12:55:38 -08:00
|
|
|
</div>
|
|
|
|
</nav>
|
2021-04-10 20:31:24 -07:00
|
|
|
<div class="main" :class="{ uploading: uploadings.length > 0, fetching }"
|
2018-02-13 22:54:18 -08:00
|
|
|
ref="main"
|
|
|
|
@dragover.prevent.stop="onDragover"
|
2018-02-26 13:35:16 -08:00
|
|
|
@dragenter="onDragenter"
|
2018-02-13 22:54:18 -08:00
|
|
|
@dragleave="onDragleave"
|
|
|
|
@drop.prevent.stop="onDrop"
|
2021-01-11 01:49:39 -08:00
|
|
|
@contextmenu.stop="onContextmenu"
|
2018-02-13 22:54:18 -08:00
|
|
|
>
|
2017-01-11 12:55:38 -08:00
|
|
|
<div class="contents" ref="contents">
|
2020-05-30 20:53:06 -07:00
|
|
|
<div class="folders" ref="foldersContainer" v-show="folders.length > 0">
|
2021-02-06 17:31:18 -08:00
|
|
|
<XFolder v-for="(f, i) in folders" :key="f.id" class="folder" :folder="f" :select-mode="select === 'folder'" :is-selected="selectedFolders.some(x => x.id === f.id)" @chosen="chooseFolder" v-anim="i"/>
|
2017-12-18 20:18:17 -08:00
|
|
|
<!-- SEE: https://stackoverflow.com/questions/18744164/flex-box-align-last-row-to-grid -->
|
2020-04-21 08:34:56 -07:00
|
|
|
<div class="padding" v-for="(n, i) in 16" :key="i"></div>
|
2020-12-25 17:47:36 -08:00
|
|
|
<MkButton ref="moreFolders" v-if="moreFolders">{{ $ts.loadMore }}</MkButton>
|
2017-01-11 12:55:38 -08:00
|
|
|
</div>
|
2020-05-30 20:53:06 -07:00
|
|
|
<div class="files" ref="filesContainer" v-show="files.length > 0">
|
2021-02-06 17:31:18 -08:00
|
|
|
<XFile v-for="(file, i) in files" :key="file.id" class="file" :file="file" :select-mode="select === 'file'" :is-selected="selectedFiles.some(x => x.id === file.id)" @chosen="chooseFile" v-anim="i"/>
|
2017-12-18 20:18:17 -08:00
|
|
|
<!-- SEE: https://stackoverflow.com/questions/18744164/flex-box-align-last-row-to-grid -->
|
2020-04-21 08:34:56 -07:00
|
|
|
<div class="padding" v-for="(n, i) in 16" :key="i"></div>
|
2020-12-25 17:47:36 -08:00
|
|
|
<MkButton ref="loadMoreFiles" @click="fetchMoreFiles" v-show="moreFiles">{{ $ts.loadMore }}</MkButton>
|
2017-01-11 12:55:38 -08:00
|
|
|
</div>
|
2020-01-29 11:37:25 -08:00
|
|
|
<div class="empty" v-if="files.length == 0 && folders.length == 0 && !fetching">
|
2018-11-08 10:44:35 -08:00
|
|
|
<p v-if="draghover">{{ $t('empty-draghover') }}</p>
|
2020-12-25 17:47:36 -08:00
|
|
|
<p v-if="!draghover && folder == null"><strong>{{ $ts.emptyDrive }}</strong><br/>{{ $t('empty-drive-description') }}</p>
|
|
|
|
<p v-if="!draghover && folder != null">{{ $ts.emptyFolder }}</p>
|
2016-12-28 14:49:51 -08:00
|
|
|
</div>
|
2017-01-11 12:55:38 -08:00
|
|
|
</div>
|
2020-10-17 04:12:00 -07:00
|
|
|
<MkLoading v-if="fetching"/>
|
2017-01-11 12:55:38 -08:00
|
|
|
</div>
|
2018-02-07 01:34:43 -08:00
|
|
|
<div class="dropzone" v-if="draghover"></div>
|
2018-02-13 22:54:18 -08:00
|
|
|
<input ref="fileInput" type="file" accept="*/*" multiple="multiple" tabindex="-1" @change="onChangeFileInput"/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2020-10-17 04:12:00 -07:00
|
|
|
import { defineComponent } from 'vue';
|
2018-02-22 14:56:35 -08:00
|
|
|
import XNavFolder from './drive.nav-folder.vue';
|
|
|
|
import XFolder from './drive.folder.vue';
|
|
|
|
import XFile from './drive.file.vue';
|
2020-01-29 11:37:25 -08:00
|
|
|
import MkButton from './ui/button.vue';
|
2021-03-23 01:30:14 -07:00
|
|
|
import * as os from '@client/os';
|
2018-02-13 22:54:18 -08:00
|
|
|
|
2020-10-17 04:12:00 -07:00
|
|
|
export default defineComponent({
|
2018-02-22 14:56:35 -08:00
|
|
|
components: {
|
|
|
|
XNavFolder,
|
|
|
|
XFolder,
|
2020-01-29 11:37:25 -08:00
|
|
|
XFile,
|
|
|
|
MkButton,
|
2018-02-22 14:56:35 -08:00
|
|
|
},
|
2020-01-29 11:37:25 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
props: {
|
2020-11-02 17:27:00 -08:00
|
|
|
initialFolder: {
|
2018-02-17 19:35:18 -08:00
|
|
|
type: Object,
|
2018-02-13 22:54:18 -08:00
|
|
|
required: false
|
|
|
|
},
|
2019-07-03 22:31:30 -07:00
|
|
|
type: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
2020-01-29 11:37:25 -08:00
|
|
|
default: undefined
|
2019-07-03 22:31:30 -07:00
|
|
|
},
|
2018-02-13 22:54:18 -08:00
|
|
|
multiple: {
|
2018-02-17 19:35:18 -08:00
|
|
|
type: Boolean,
|
2020-01-29 11:37:25 -08:00
|
|
|
required: false,
|
|
|
|
default: false
|
|
|
|
},
|
2020-04-21 08:34:56 -07:00
|
|
|
select: {
|
|
|
|
type: String,
|
2020-01-29 11:37:25 -08:00
|
|
|
required: false,
|
2020-04-21 08:34:56 -07:00
|
|
|
default: null
|
2018-02-13 22:54:18 -08:00
|
|
|
}
|
|
|
|
},
|
2020-01-29 11:37:25 -08:00
|
|
|
|
2020-10-17 04:12:00 -07:00
|
|
|
emits: ['selected', 'change-selection', 'move-root', 'cd', 'open-folder'],
|
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
/**
|
|
|
|
* 現在の階層(フォルダ)
|
|
|
|
* * null でルートを表す
|
|
|
|
*/
|
|
|
|
folder: null,
|
|
|
|
|
|
|
|
files: [],
|
|
|
|
folders: [],
|
|
|
|
moreFiles: false,
|
|
|
|
moreFolders: false,
|
|
|
|
hierarchyFolders: [],
|
|
|
|
selectedFiles: [],
|
2020-04-21 08:34:56 -07:00
|
|
|
selectedFolders: [],
|
2020-10-17 04:12:00 -07:00
|
|
|
uploadings: os.uploads,
|
2018-10-25 23:06:55 -07:00
|
|
|
connection: null,
|
2018-02-13 22:54:18 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ドロップされようとしているか
|
|
|
|
*/
|
|
|
|
draghover: false,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 自信の所有するアイテムがドラッグをスタートさせたか
|
|
|
|
* (自分自身の階層にドロップできないようにするためのフラグ)
|
|
|
|
*/
|
|
|
|
isDragSource: false,
|
|
|
|
|
2020-01-29 11:37:25 -08:00
|
|
|
fetching: true,
|
|
|
|
|
2020-05-30 20:53:06 -07:00
|
|
|
ilFilesObserver: new IntersectionObserver(
|
|
|
|
(entries) => entries.some((entry) => entry.isIntersecting)
|
|
|
|
&& !this.fetching && this.moreFiles &&
|
|
|
|
this.fetchMoreFiles()
|
|
|
|
),
|
|
|
|
moreFilesElement: null as Element,
|
|
|
|
|
2017-02-20 16:49:35 -08:00
|
|
|
};
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2020-01-29 11:37:25 -08:00
|
|
|
|
|
|
|
watch: {
|
|
|
|
folder() {
|
|
|
|
this.$emit('cd', this.folder);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
mounted() {
|
2020-12-18 17:55:52 -08:00
|
|
|
if (this.$store.state.enableInfiniteScroll && this.$refs.loadMoreFiles) {
|
2020-05-30 20:53:06 -07:00
|
|
|
this.$nextTick(() => {
|
|
|
|
this.ilFilesObserver.observe((this.$refs.loadMoreFiles as Vue).$el)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-05-27 01:15:08 -07:00
|
|
|
this.connection = os.stream.useChannel('drive');
|
2018-02-13 22:54:18 -08:00
|
|
|
|
2018-10-22 15:01:43 -07:00
|
|
|
this.connection.on('fileCreated', this.onStreamDriveFileCreated);
|
|
|
|
this.connection.on('fileUpdated', this.onStreamDriveFileUpdated);
|
|
|
|
this.connection.on('fileDeleted', this.onStreamDriveFileDeleted);
|
|
|
|
this.connection.on('folderCreated', this.onStreamDriveFolderCreated);
|
|
|
|
this.connection.on('folderUpdated', this.onStreamDriveFolderUpdated);
|
2018-10-25 23:06:55 -07:00
|
|
|
this.connection.on('folderDeleted', this.onStreamDriveFolderDeleted);
|
2018-02-13 22:54:18 -08:00
|
|
|
|
2020-11-02 17:27:00 -08:00
|
|
|
if (this.initialFolder) {
|
|
|
|
this.move(this.initialFolder);
|
2018-02-13 22:54:18 -08:00
|
|
|
} else {
|
|
|
|
this.fetch();
|
|
|
|
}
|
|
|
|
},
|
2020-01-29 11:37:25 -08:00
|
|
|
|
2020-05-30 20:53:06 -07:00
|
|
|
activated() {
|
2020-12-18 17:55:52 -08:00
|
|
|
if (this.$store.state.enableInfiniteScroll) {
|
2020-05-30 20:53:06 -07:00
|
|
|
this.$nextTick(() => {
|
|
|
|
this.ilFilesObserver.observe((this.$refs.loadMoreFiles as Vue).$el)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2020-10-17 04:12:00 -07:00
|
|
|
beforeUnmount() {
|
2018-10-06 19:06:17 -07:00
|
|
|
this.connection.dispose();
|
2020-05-30 20:53:06 -07:00
|
|
|
this.ilFilesObserver.disconnect();
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2020-01-29 11:37:25 -08:00
|
|
|
methods: {
|
2018-02-13 22:54:18 -08:00
|
|
|
onStreamDriveFileCreated(file) {
|
|
|
|
this.addFile(file, true);
|
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
onStreamDriveFileUpdated(file) {
|
2017-02-20 16:49:35 -08:00
|
|
|
const current = this.folder ? this.folder.id : null;
|
2018-03-28 22:48:47 -07:00
|
|
|
if (current != file.folderId) {
|
2017-02-20 16:49:35 -08:00
|
|
|
this.removeFile(file);
|
|
|
|
} else {
|
|
|
|
this.addFile(file, true);
|
|
|
|
}
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-06-14 17:53:30 -07:00
|
|
|
onStreamDriveFileDeleted(fileId) {
|
|
|
|
this.removeFile(fileId);
|
|
|
|
},
|
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
onStreamDriveFolderCreated(folder) {
|
2017-02-20 16:49:35 -08:00
|
|
|
this.addFolder(folder, true);
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
onStreamDriveFolderUpdated(folder) {
|
2017-02-20 16:49:35 -08:00
|
|
|
const current = this.folder ? this.folder.id : null;
|
2018-03-28 22:48:47 -07:00
|
|
|
if (current != folder.parentId) {
|
2017-02-20 16:49:35 -08:00
|
|
|
this.removeFolder(folder);
|
|
|
|
} else {
|
|
|
|
this.addFolder(folder, true);
|
|
|
|
}
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-10-25 23:06:55 -07:00
|
|
|
onStreamDriveFolderDeleted(folderId) {
|
|
|
|
this.removeFolder(folderId);
|
|
|
|
},
|
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
onDragover(e): any {
|
2018-02-26 13:25:17 -08:00
|
|
|
// ドラッグ元が自分自身の所有するアイテムだったら
|
|
|
|
if (this.isDragSource) {
|
|
|
|
// 自分自身にはドロップさせない
|
|
|
|
e.dataTransfer.dropEffect = 'none';
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
const isFile = e.dataTransfer.items[0].kind == 'file';
|
2020-10-17 04:12:00 -07:00
|
|
|
const isDriveFile = e.dataTransfer.types[0] == _DATA_TRANSFER_DRIVE_FILE_;
|
|
|
|
const isDriveFolder = e.dataTransfer.types[0] == _DATA_TRANSFER_DRIVE_FOLDER_;
|
2018-02-26 13:25:17 -08:00
|
|
|
|
|
|
|
if (isFile || isDriveFile || isDriveFolder) {
|
2017-02-20 16:49:35 -08:00
|
|
|
e.dataTransfer.dropEffect = e.dataTransfer.effectAllowed == 'all' ? 'copy' : 'move';
|
|
|
|
} else {
|
|
|
|
e.dataTransfer.dropEffect = 'none';
|
|
|
|
}
|
2018-02-26 13:35:16 -08:00
|
|
|
|
|
|
|
return false;
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
onDragenter(e) {
|
2017-02-20 16:49:35 -08:00
|
|
|
if (!this.isDragSource) this.draghover = true;
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
onDragleave(e) {
|
2017-02-20 16:49:35 -08:00
|
|
|
this.draghover = false;
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
onDrop(e): any {
|
2017-02-20 16:49:35 -08:00
|
|
|
this.draghover = false;
|
2017-01-11 12:55:38 -08:00
|
|
|
|
2017-02-19 16:53:57 -08:00
|
|
|
// ドロップされてきたものがファイルだったら
|
2017-02-20 16:49:35 -08:00
|
|
|
if (e.dataTransfer.files.length > 0) {
|
2018-12-11 03:36:55 -08:00
|
|
|
for (const file of Array.from(e.dataTransfer.files)) {
|
2017-02-20 16:49:35 -08:00
|
|
|
this.upload(file, this.folder);
|
2018-12-11 03:36:55 -08:00
|
|
|
}
|
2018-02-26 13:25:17 -08:00
|
|
|
return;
|
2017-02-20 16:49:35 -08:00
|
|
|
}
|
2017-01-11 12:55:38 -08:00
|
|
|
|
2018-02-26 13:25:17 -08:00
|
|
|
//#region ドライブのファイル
|
2020-10-17 04:12:00 -07:00
|
|
|
const driveFile = e.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FILE_);
|
2018-02-26 13:25:17 -08:00
|
|
|
if (driveFile != null && driveFile != '') {
|
|
|
|
const file = JSON.parse(driveFile);
|
|
|
|
if (this.files.some(f => f.id == file.id)) return;
|
|
|
|
this.removeFile(file.id);
|
2020-10-17 04:12:00 -07:00
|
|
|
os.api('drive/files/update', {
|
2018-03-28 22:48:47 -07:00
|
|
|
fileId: file.id,
|
|
|
|
folderId: this.folder ? this.folder.id : null
|
2017-02-20 16:49:35 -08:00
|
|
|
});
|
2018-02-26 13:25:17 -08:00
|
|
|
}
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
//#region ドライブのフォルダ
|
2020-10-17 04:12:00 -07:00
|
|
|
const driveFolder = e.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FOLDER_);
|
2018-02-26 13:25:17 -08:00
|
|
|
if (driveFolder != null && driveFolder != '') {
|
|
|
|
const folder = JSON.parse(driveFolder);
|
|
|
|
|
2017-02-19 16:53:57 -08:00
|
|
|
// 移動先が自分自身ならreject
|
2018-02-26 13:25:17 -08:00
|
|
|
if (this.folder && folder.id == this.folder.id) return false;
|
|
|
|
if (this.folders.some(f => f.id == folder.id)) return false;
|
|
|
|
this.removeFolder(folder.id);
|
2020-10-17 04:12:00 -07:00
|
|
|
os.api('drive/folders/update', {
|
2018-03-28 22:48:47 -07:00
|
|
|
folderId: folder.id,
|
|
|
|
parentId: this.folder ? this.folder.id : null
|
2017-02-20 03:13:42 -08:00
|
|
|
}).then(() => {
|
2018-02-26 13:25:17 -08:00
|
|
|
// noop
|
2017-02-20 16:49:35 -08:00
|
|
|
}).catch(err => {
|
|
|
|
switch (err) {
|
|
|
|
case 'detected-circular-definition':
|
2020-10-17 04:12:00 -07:00
|
|
|
os.dialog({
|
2020-12-25 17:47:36 -08:00
|
|
|
title: this.$ts.unableToProcess,
|
|
|
|
text: this.$ts.circularReferenceFolder
|
2018-02-17 19:35:18 -08:00
|
|
|
});
|
2017-02-20 16:49:35 -08:00
|
|
|
break;
|
|
|
|
default:
|
2020-10-17 04:12:00 -07:00
|
|
|
os.dialog({
|
2019-04-15 21:05:10 -07:00
|
|
|
type: 'error',
|
2020-12-25 17:47:36 -08:00
|
|
|
text: this.$ts.somethingHappened
|
2019-04-15 21:05:10 -07:00
|
|
|
});
|
2017-02-20 16:49:35 -08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2018-02-26 13:25:17 -08:00
|
|
|
//#endregion
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2017-01-11 12:55:38 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
selectLocalFile() {
|
|
|
|
(this.$refs.fileInput as any).click();
|
|
|
|
},
|
2017-04-26 00:36:29 -07:00
|
|
|
|
2018-02-17 19:35:18 -08:00
|
|
|
urlUpload() {
|
2020-10-17 04:12:00 -07:00
|
|
|
os.dialog({
|
2020-12-25 17:47:36 -08:00
|
|
|
title: this.$ts.uploadFromUrl,
|
2018-12-02 03:10:53 -08:00
|
|
|
input: {
|
2020-12-25 17:47:36 -08:00
|
|
|
placeholder: this.$ts.uploadFromUrlDescription
|
2018-12-02 03:10:53 -08:00
|
|
|
}
|
|
|
|
}).then(({ canceled, result: url }) => {
|
|
|
|
if (canceled) return;
|
2021-05-27 01:15:08 -07:00
|
|
|
os.api('drive/files/upload-from-url', {
|
2017-02-20 16:49:35 -08:00
|
|
|
url: url,
|
2018-03-28 22:48:47 -07:00
|
|
|
folderId: this.folder ? this.folder.id : undefined
|
2017-02-20 16:49:35 -08:00
|
|
|
});
|
2017-02-16 12:46:14 -08:00
|
|
|
|
2020-10-17 04:12:00 -07:00
|
|
|
os.dialog({
|
2020-12-25 17:47:36 -08:00
|
|
|
title: this.$ts.uploadFromUrlRequested,
|
|
|
|
text: this.$ts.uploadFromUrlMayTakeTime
|
2018-02-17 19:35:18 -08:00
|
|
|
});
|
2017-02-20 16:49:35 -08:00
|
|
|
});
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2017-04-26 00:36:29 -07:00
|
|
|
|
2018-02-17 19:35:18 -08:00
|
|
|
createFolder() {
|
2020-10-17 04:12:00 -07:00
|
|
|
os.dialog({
|
2020-12-25 17:47:36 -08:00
|
|
|
title: this.$ts.createFolder,
|
2018-12-02 03:10:53 -08:00
|
|
|
input: {
|
2020-12-25 17:47:36 -08:00
|
|
|
placeholder: this.$ts.folderName
|
2018-12-02 03:10:53 -08:00
|
|
|
}
|
|
|
|
}).then(({ canceled, result: name }) => {
|
|
|
|
if (canceled) return;
|
2020-10-17 04:12:00 -07:00
|
|
|
os.api('drive/folders/create', {
|
2017-02-20 16:49:35 -08:00
|
|
|
name: name,
|
2018-11-06 19:15:28 -08:00
|
|
|
parentId: this.folder ? this.folder.id : undefined
|
2017-02-20 16:49:35 -08:00
|
|
|
}).then(folder => {
|
|
|
|
this.addFolder(folder, true);
|
|
|
|
});
|
|
|
|
});
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2020-02-07 20:09:38 -08:00
|
|
|
renameFolder(folder) {
|
2020-10-17 04:12:00 -07:00
|
|
|
os.dialog({
|
2020-12-25 17:47:36 -08:00
|
|
|
title: this.$ts.renameFolder,
|
2020-02-07 20:09:38 -08:00
|
|
|
input: {
|
2020-12-25 17:47:36 -08:00
|
|
|
placeholder: this.$ts.inputNewFolderName,
|
2020-02-07 20:09:38 -08:00
|
|
|
default: folder.name
|
|
|
|
}
|
|
|
|
}).then(({ canceled, result: name }) => {
|
|
|
|
if (canceled) return;
|
2020-10-17 04:12:00 -07:00
|
|
|
os.api('drive/folders/update', {
|
2020-02-07 20:09:38 -08:00
|
|
|
folderId: folder.id,
|
|
|
|
name: name
|
|
|
|
}).then(folder => {
|
|
|
|
// FIXME: 画面を更新するために自分自身に移動
|
|
|
|
this.move(folder);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
deleteFolder(folder) {
|
2020-10-17 04:12:00 -07:00
|
|
|
os.api('drive/folders/delete', {
|
2020-02-07 20:09:38 -08:00
|
|
|
folderId: folder.id
|
|
|
|
}).then(() => {
|
|
|
|
// 削除時に親フォルダに移動
|
|
|
|
this.move(folder.parentId);
|
|
|
|
}).catch(err => {
|
|
|
|
switch(err.id) {
|
|
|
|
case 'b0fc8a17-963c-405d-bfbc-859a487295e1':
|
2020-10-17 04:12:00 -07:00
|
|
|
os.dialog({
|
2020-02-07 20:09:38 -08:00
|
|
|
type: 'error',
|
2020-12-25 17:47:36 -08:00
|
|
|
title: this.$ts.unableToDelete,
|
|
|
|
text: this.$ts.hasChildFilesOrFolders
|
2020-02-07 20:09:38 -08:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
default:
|
2020-10-17 04:12:00 -07:00
|
|
|
os.dialog({
|
2020-02-07 20:09:38 -08:00
|
|
|
type: 'error',
|
2020-12-25 17:47:36 -08:00
|
|
|
text: this.$ts.unableToDelete
|
2020-02-07 20:09:38 -08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
onChangeFileInput() {
|
2018-12-11 03:36:55 -08:00
|
|
|
for (const file of Array.from((this.$refs.fileInput as any).files)) {
|
2017-02-20 16:49:35 -08:00
|
|
|
this.upload(file, this.folder);
|
2018-12-11 03:36:55 -08:00
|
|
|
}
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
upload(file, folder) {
|
2017-02-20 16:49:35 -08:00
|
|
|
if (folder && typeof folder == 'object') folder = folder.id;
|
2020-10-17 04:12:00 -07:00
|
|
|
os.upload(file, folder).then(res => {
|
|
|
|
this.addFile(res, true);
|
|
|
|
});
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
chooseFile(file) {
|
2017-02-24 20:23:54 -08:00
|
|
|
const isAlreadySelected = this.selectedFiles.some(f => f.id == file.id);
|
|
|
|
if (this.multiple) {
|
|
|
|
if (isAlreadySelected) {
|
|
|
|
this.selectedFiles = this.selectedFiles.filter(f => f.id != file.id);
|
|
|
|
} else {
|
|
|
|
this.selectedFiles.push(file);
|
|
|
|
}
|
2018-02-08 20:11:30 -08:00
|
|
|
this.$emit('change-selection', this.selectedFiles);
|
2017-02-23 00:12:09 -08:00
|
|
|
} else {
|
2017-02-24 20:23:54 -08:00
|
|
|
if (isAlreadySelected) {
|
2018-02-08 20:11:30 -08:00
|
|
|
this.$emit('selected', file);
|
2017-02-24 20:23:54 -08:00
|
|
|
} else {
|
|
|
|
this.selectedFiles = [file];
|
2018-02-08 20:11:30 -08:00
|
|
|
this.$emit('change-selection', [file]);
|
2017-02-24 20:23:54 -08:00
|
|
|
}
|
2017-02-23 00:12:09 -08:00
|
|
|
}
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2020-04-21 08:34:56 -07:00
|
|
|
chooseFolder(folder) {
|
|
|
|
const isAlreadySelected = this.selectedFolders.some(f => f.id == folder.id);
|
|
|
|
if (this.multiple) {
|
|
|
|
if (isAlreadySelected) {
|
|
|
|
this.selectedFolders = this.selectedFolders.filter(f => f.id != folder.id);
|
|
|
|
} else {
|
|
|
|
this.selectedFolders.push(folder);
|
|
|
|
}
|
|
|
|
this.$emit('change-selection', this.selectedFolders);
|
|
|
|
} else {
|
|
|
|
if (isAlreadySelected) {
|
|
|
|
this.$emit('selected', folder);
|
|
|
|
} else {
|
|
|
|
this.selectedFolders = [folder];
|
|
|
|
this.$emit('change-selection', [folder]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
move(target) {
|
2017-02-20 16:49:35 -08:00
|
|
|
if (target == null) {
|
|
|
|
this.goRoot();
|
|
|
|
return;
|
|
|
|
} else if (typeof target == 'object') {
|
|
|
|
target = target.id;
|
|
|
|
}
|
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
this.fetching = true;
|
2016-12-28 14:49:51 -08:00
|
|
|
|
2020-10-17 04:12:00 -07:00
|
|
|
os.api('drive/folders/show', {
|
2018-03-28 22:48:47 -07:00
|
|
|
folderId: target
|
2017-02-20 16:49:35 -08:00
|
|
|
}).then(folder => {
|
|
|
|
this.folder = folder;
|
|
|
|
this.hierarchyFolders = [];
|
2016-12-28 14:49:51 -08:00
|
|
|
|
2017-02-20 16:49:35 -08:00
|
|
|
const dive = folder => {
|
|
|
|
this.hierarchyFolders.unshift(folder);
|
|
|
|
if (folder.parent) dive(folder.parent);
|
|
|
|
};
|
2016-12-28 14:49:51 -08:00
|
|
|
|
2017-02-20 16:49:35 -08:00
|
|
|
if (folder.parent) dive(folder.parent);
|
2017-01-11 12:55:38 -08:00
|
|
|
|
2018-02-08 20:11:30 -08:00
|
|
|
this.$emit('open-folder', folder);
|
2017-02-26 00:36:54 -08:00
|
|
|
this.fetch();
|
2017-02-20 16:49:35 -08:00
|
|
|
});
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
addFolder(folder, unshift = false) {
|
2017-02-20 16:49:35 -08:00
|
|
|
const current = this.folder ? this.folder.id : null;
|
2018-03-28 22:48:47 -07:00
|
|
|
if (current != folder.parentId) return;
|
2017-01-11 12:55:38 -08:00
|
|
|
|
2017-02-20 16:49:35 -08:00
|
|
|
if (this.folders.some(f => f.id == folder.id)) {
|
|
|
|
const exist = this.folders.map(f => f.id).indexOf(folder.id);
|
2020-10-17 04:12:00 -07:00
|
|
|
this.folders[exist] = folder;
|
2017-02-20 16:49:35 -08:00
|
|
|
return;
|
|
|
|
}
|
2017-01-11 12:55:38 -08:00
|
|
|
|
2017-02-20 16:49:35 -08:00
|
|
|
if (unshift) {
|
|
|
|
this.folders.unshift(folder);
|
|
|
|
} else {
|
|
|
|
this.folders.push(folder);
|
|
|
|
}
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
addFile(file, unshift = false) {
|
2017-02-20 16:49:35 -08:00
|
|
|
const current = this.folder ? this.folder.id : null;
|
2018-03-28 22:48:47 -07:00
|
|
|
if (current != file.folderId) return;
|
2017-01-11 12:55:38 -08:00
|
|
|
|
2017-02-20 16:49:35 -08:00
|
|
|
if (this.files.some(f => f.id == file.id)) {
|
|
|
|
const exist = this.files.map(f => f.id).indexOf(file.id);
|
2020-10-17 04:12:00 -07:00
|
|
|
this.files[exist] = file;
|
2017-02-20 16:49:35 -08:00
|
|
|
return;
|
|
|
|
}
|
2016-12-28 14:49:51 -08:00
|
|
|
|
2017-02-20 16:49:35 -08:00
|
|
|
if (unshift) {
|
|
|
|
this.files.unshift(file);
|
|
|
|
} else {
|
|
|
|
this.files.push(file);
|
|
|
|
}
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
removeFolder(folder) {
|
2017-02-20 16:49:35 -08:00
|
|
|
if (typeof folder == 'object') folder = folder.id;
|
|
|
|
this.folders = this.folders.filter(f => f.id != folder);
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
removeFile(file) {
|
2017-02-20 16:49:35 -08:00
|
|
|
if (typeof file == 'object') file = file.id;
|
|
|
|
this.files = this.files.filter(f => f.id != file);
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
appendFile(file) {
|
|
|
|
this.addFile(file);
|
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
appendFolder(folder) {
|
|
|
|
this.addFolder(folder);
|
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
prependFile(file) {
|
|
|
|
this.addFile(file, true);
|
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
prependFolder(folder) {
|
|
|
|
this.addFolder(folder, true);
|
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
goRoot() {
|
2017-02-20 16:49:35 -08:00
|
|
|
// 既にrootにいるなら何もしない
|
|
|
|
if (this.folder == null) return;
|
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
this.folder = null;
|
|
|
|
this.hierarchyFolders = [];
|
2018-02-08 20:11:30 -08:00
|
|
|
this.$emit('move-root');
|
2017-02-26 00:36:54 -08:00
|
|
|
this.fetch();
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
fetch() {
|
|
|
|
this.folders = [];
|
|
|
|
this.files = [];
|
|
|
|
this.moreFolders = false;
|
|
|
|
this.moreFiles = false;
|
|
|
|
this.fetching = true;
|
2016-12-28 14:49:51 -08:00
|
|
|
|
2017-02-20 16:49:35 -08:00
|
|
|
let fetchedFolders = null;
|
|
|
|
let fetchedFiles = null;
|
2017-01-11 12:55:38 -08:00
|
|
|
|
2017-02-20 16:49:35 -08:00
|
|
|
const foldersMax = 30;
|
|
|
|
const filesMax = 30;
|
2017-01-11 12:55:38 -08:00
|
|
|
|
2017-02-19 16:53:57 -08:00
|
|
|
// フォルダ一覧取得
|
2020-10-17 04:12:00 -07:00
|
|
|
os.api('drive/folders', {
|
2018-03-28 22:48:47 -07:00
|
|
|
folderId: this.folder ? this.folder.id : null,
|
2017-02-20 16:49:35 -08:00
|
|
|
limit: foldersMax + 1
|
|
|
|
}).then(folders => {
|
|
|
|
if (folders.length == foldersMax + 1) {
|
|
|
|
this.moreFolders = true;
|
|
|
|
folders.pop();
|
|
|
|
}
|
|
|
|
fetchedFolders = folders;
|
|
|
|
complete();
|
|
|
|
});
|
2017-01-11 12:55:38 -08:00
|
|
|
|
2017-02-19 16:53:57 -08:00
|
|
|
// ファイル一覧取得
|
2020-10-17 04:12:00 -07:00
|
|
|
os.api('drive/files', {
|
2018-03-28 22:48:47 -07:00
|
|
|
folderId: this.folder ? this.folder.id : null,
|
2019-07-03 22:31:30 -07:00
|
|
|
type: this.type,
|
2017-02-20 16:49:35 -08:00
|
|
|
limit: filesMax + 1
|
|
|
|
}).then(files => {
|
|
|
|
if (files.length == filesMax + 1) {
|
|
|
|
this.moreFiles = true;
|
|
|
|
files.pop();
|
|
|
|
}
|
|
|
|
fetchedFiles = files;
|
|
|
|
complete();
|
|
|
|
});
|
|
|
|
|
|
|
|
let flag = false;
|
2017-02-21 09:05:44 -08:00
|
|
|
const complete = () => {
|
2017-02-20 16:49:35 -08:00
|
|
|
if (flag) {
|
2018-12-11 03:36:55 -08:00
|
|
|
for (const x of fetchedFolders) this.appendFolder(x);
|
|
|
|
for (const x of fetchedFiles) this.appendFile(x);
|
2018-02-13 22:54:18 -08:00
|
|
|
this.fetching = false;
|
2017-02-20 16:49:35 -08:00
|
|
|
} else {
|
|
|
|
flag = true;
|
|
|
|
}
|
|
|
|
};
|
2018-02-13 22:54:18 -08:00
|
|
|
},
|
2018-02-17 19:35:18 -08:00
|
|
|
|
2018-02-13 22:54:18 -08:00
|
|
|
fetchMoreFiles() {
|
|
|
|
this.fetching = true;
|
2017-02-26 00:36:54 -08:00
|
|
|
|
|
|
|
const max = 30;
|
|
|
|
|
|
|
|
// ファイル一覧取得
|
2020-10-17 04:12:00 -07:00
|
|
|
os.api('drive/files', {
|
2018-03-28 22:48:47 -07:00
|
|
|
folderId: this.folder ? this.folder.id : null,
|
2019-07-03 22:31:30 -07:00
|
|
|
type: this.type,
|
2018-08-12 08:59:36 -07:00
|
|
|
untilId: this.files[this.files.length - 1].id,
|
2017-02-26 00:36:54 -08:00
|
|
|
limit: max + 1
|
|
|
|
}).then(files => {
|
|
|
|
if (files.length == max + 1) {
|
|
|
|
this.moreFiles = true;
|
|
|
|
files.pop();
|
|
|
|
} else {
|
|
|
|
this.moreFiles = false;
|
|
|
|
}
|
2018-12-11 03:36:55 -08:00
|
|
|
for (const x of files) this.appendFile(x);
|
2018-02-13 22:54:18 -08:00
|
|
|
this.fetching = false;
|
2017-02-26 00:36:54 -08:00
|
|
|
});
|
2020-10-17 04:12:00 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
getMenu() {
|
|
|
|
return [{
|
2020-12-25 17:47:36 -08:00
|
|
|
text: this.$ts.addFile,
|
2020-10-17 04:12:00 -07:00
|
|
|
type: 'label'
|
|
|
|
}, {
|
2020-12-25 17:47:36 -08:00
|
|
|
text: this.$ts.upload,
|
2021-04-20 07:22:59 -07:00
|
|
|
icon: 'fas fa-upload',
|
2020-10-17 04:12:00 -07:00
|
|
|
action: () => { this.selectLocalFile(); }
|
|
|
|
}, {
|
2020-12-25 17:47:36 -08:00
|
|
|
text: this.$ts.fromUrl,
|
2021-04-20 07:22:59 -07:00
|
|
|
icon: 'fas fa-link',
|
2020-10-17 04:12:00 -07:00
|
|
|
action: () => { this.urlUpload(); }
|
|
|
|
}, null, {
|
2020-12-25 17:47:36 -08:00
|
|
|
text: this.folder ? this.folder.name : this.$ts.drive,
|
2020-10-17 04:12:00 -07:00
|
|
|
type: 'label'
|
|
|
|
}, this.folder ? {
|
2020-12-25 17:47:36 -08:00
|
|
|
text: this.$ts.renameFolder,
|
2021-04-25 06:32:46 -07:00
|
|
|
icon: 'fas fa-i-cursor',
|
2020-10-17 04:12:00 -07:00
|
|
|
action: () => { this.renameFolder(this.folder); }
|
|
|
|
} : undefined, this.folder ? {
|
2020-12-25 17:47:36 -08:00
|
|
|
text: this.$ts.deleteFolder,
|
2021-04-20 07:22:59 -07:00
|
|
|
icon: 'fas fa-trash-alt',
|
2020-10-17 04:12:00 -07:00
|
|
|
action: () => { this.deleteFolder(this.folder); }
|
|
|
|
} : undefined, {
|
2020-12-25 17:47:36 -08:00
|
|
|
text: this.$ts.createFolder,
|
2021-04-20 07:22:59 -07:00
|
|
|
icon: 'fas fa-folder-plus',
|
2020-10-17 04:12:00 -07:00
|
|
|
action: () => { this.createFolder(); }
|
|
|
|
}];
|
|
|
|
},
|
|
|
|
|
|
|
|
onContextmenu(e) {
|
|
|
|
os.contextMenu(this.getMenu(), e);
|
|
|
|
},
|
2018-02-13 22:54:18 -08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2020-01-29 11:37:25 -08:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
.yfudmmck {
|
2020-11-02 17:27:00 -08:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
height: 100%;
|
|
|
|
|
2020-01-29 11:37:25 -08:00
|
|
|
> nav {
|
|
|
|
display: block;
|
|
|
|
z-index: 2;
|
|
|
|
width: 100%;
|
2020-10-17 04:12:00 -07:00
|
|
|
padding: 0 8px;
|
|
|
|
box-sizing: border-box;
|
2020-01-29 11:37:25 -08:00
|
|
|
overflow: auto;
|
|
|
|
font-size: 0.9em;
|
|
|
|
box-shadow: 0 1px 0 var(--divider);
|
|
|
|
|
|
|
|
&, * {
|
|
|
|
user-select: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .path {
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: bottom;
|
|
|
|
line-height: 38px;
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
> * {
|
|
|
|
display: inline-block;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0 8px;
|
|
|
|
line-height: 38px;
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
* {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.current {
|
|
|
|
font-weight: bold;
|
|
|
|
cursor: default;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.separator {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
opacity: 0.5;
|
|
|
|
cursor: default;
|
|
|
|
|
2021-04-20 07:22:59 -07:00
|
|
|
> i {
|
2020-01-29 11:37:25 -08:00
|
|
|
margin: 0;
|
|
|
|
}
|
2019-05-04 17:27:55 -07:00
|
|
|
}
|
|
|
|
}
|
2020-01-29 11:37:25 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .main {
|
2020-11-02 17:27:00 -08:00
|
|
|
flex: 1;
|
2020-01-29 11:37:25 -08:00
|
|
|
overflow: auto;
|
2021-04-09 20:40:50 -07:00
|
|
|
padding: var(--margin);
|
2020-01-29 11:37:25 -08:00
|
|
|
|
|
|
|
&, * {
|
|
|
|
user-select: none;
|
|
|
|
}
|
2018-02-13 22:54:18 -08:00
|
|
|
|
2020-01-29 11:37:25 -08:00
|
|
|
&.fetching {
|
|
|
|
cursor: wait !important;
|
|
|
|
|
|
|
|
* {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .contents {
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.uploading {
|
|
|
|
height: calc(100% - 38px - 100px);
|
|
|
|
}
|
|
|
|
|
|
|
|
> .contents {
|
|
|
|
|
|
|
|
> .folders,
|
|
|
|
> .files {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
|
|
> .folder,
|
|
|
|
> .file {
|
|
|
|
flex-grow: 1;
|
2021-04-09 20:40:50 -07:00
|
|
|
width: 128px;
|
2020-01-29 11:37:25 -08:00
|
|
|
margin: 4px;
|
|
|
|
box-sizing: border-box;
|
2019-05-04 17:27:55 -07:00
|
|
|
}
|
2020-01-29 11:37:25 -08:00
|
|
|
|
|
|
|
> .padding {
|
|
|
|
flex-grow: 1;
|
|
|
|
pointer-events: none;
|
2021-04-09 20:40:50 -07:00
|
|
|
width: 128px + 8px;
|
2018-02-13 22:54:18 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-29 11:37:25 -08:00
|
|
|
> .empty {
|
|
|
|
padding: 16px;
|
|
|
|
text-align: center;
|
|
|
|
pointer-events: none;
|
|
|
|
opacity: 0.5;
|
2018-02-13 22:54:18 -08:00
|
|
|
|
2020-01-29 11:37:25 -08:00
|
|
|
> p {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-02-13 22:54:18 -08:00
|
|
|
|
2020-01-29 11:37:25 -08:00
|
|
|
> .dropzone {
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 38px;
|
|
|
|
width: 100%;
|
|
|
|
height: calc(100% - 38px);
|
|
|
|
border: dashed 2px var(--focus);
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
> input {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2018-02-13 22:54:18 -08:00
|
|
|
</style>
|