This commit is contained in:
syuilo 2018-02-20 23:37:35 +09:00
parent e87a5feffa
commit 204d4dfe31
4 changed files with 19 additions and 4 deletions

View file

@ -18,6 +18,8 @@ import post from './api/post';
import MkIndex from './views/pages/index.vue'; import MkIndex from './views/pages/index.vue';
import MkUser from './views/pages/user/user.vue'; import MkUser from './views/pages/user/user.vue';
import MkSelectDrive from './views/pages/selectdrive.vue';
import MkDrive from './views/pages/drive.vue';
/** /**
* init * init
@ -58,6 +60,12 @@ init(async (launch) => {
app.$router.addRoutes([{ app.$router.addRoutes([{
path: '/', component: MkIndex path: '/', component: MkIndex
}, {
path: '/i/drive', component: MkDrive
}, {
path: '/i/drive/folder/:folder', component: MkDrive
}, {
path: '/selectdrive', component: MkSelectDrive
}, { }, {
path: '/:user', component: MkUser path: '/:user', component: MkUser
}]); }]);

View file

@ -1,5 +1,5 @@
<template> <template>
<mk-window ref="window" @closed="$destroy" width="800px" height="500px" :popout="popout"> <mk-window ref="window" @closed="$destroy" width="800px" height="500px" :popout-url="popout">
<template slot="header"> <template slot="header">
<p v-if="usage" :class="$style.info"><b>{{ usage.toFixed(1) }}%</b> %i18n:desktop.tags.mk-drive-browser-window.used%</p> <p v-if="usage" :class="$style.info"><b>{{ usage.toFixed(1) }}%</b> %i18n:desktop.tags.mk-drive-browser-window.used%</p>
<span :class="$style.title">%fa:cloud%%i18n:desktop.tags.mk-drive-browser-window.drive%</span> <span :class="$style.title">%fa:cloud%%i18n:desktop.tags.mk-drive-browser-window.drive%</span>

View file

@ -563,7 +563,7 @@ export default Vue.extend({
margin 0 margin 0
padding 0 padding 0
cursor pointer cursor pointer
font-size 1.2em font-size 1em
color rgba(#000, 0.4) color rgba(#000, 0.4)
border none border none
outline none outline none

View file

@ -1,13 +1,20 @@
<template> <template>
<div class="mk-drive-page"> <div class="mk-drive-page">
<mk-drive :folder="folder" @move-root="onMoveRoot" @open-folder="onOpenFolder"/> <mk-drive :init-folder="folder" @move-root="onMoveRoot" @open-folder="onOpenFolder"/>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import Vue from 'vue'; import Vue from 'vue';
export default Vue.extend({ export default Vue.extend({
props: ['folder'], data() {
return {
folder: null
};
},
created() {
this.folder = this.$route.params.folder;
},
mounted() { mounted() {
document.title = 'Misskey Drive'; document.title = 'Misskey Drive';
}, },