1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-25 20:18:28 +09:00
misskey/src/client/app/desktop/views/pages/drive.vue

52 lines
888 B
Vue
Raw Normal View History

2018-02-16 14:04:18 +09:00
<template>
<div class="mk-drive-page">
2018-02-20 23:37:35 +09:00
<mk-drive :init-folder="folder" @move-root="onMoveRoot" @open-folder="onOpenFolder"/>
2018-02-16 14:04:18 +09:00
</div>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
2018-02-20 23:37:35 +09:00
data() {
return {
folder: null
};
},
created() {
this.folder = this.$route.params.folder;
},
2018-02-16 14:04:18 +09:00
mounted() {
document.title = '%i18n:@title%';
2018-02-16 14:04:18 +09:00
},
methods: {
onMoveRoot() {
const title = '%i18n:@title%';
2018-02-16 14:04:18 +09:00
// Rewrite URL
history.pushState(null, title, '/i/drive');
document.title = title;
},
onOpenFolder(folder) {
const title = folder.name + ' | %i18n:@title%';
2018-02-16 14:04:18 +09:00
// Rewrite URL
2018-09-01 23:12:51 +09:00
history.pushState(null, title, `/i/drive/folder/${folder.id}`);
2018-02-16 14:04:18 +09:00
document.title = title;
}
}
});
</script>
<style lang="stylus" scoped>
.mk-drive-page
position fixed
width 100%
height 100%
background #fff
> .mk-drive
height 100%
</style>