mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-12-22 10:38:23 +09:00
46 lines
798 B
Vue
46 lines
798 B
Vue
|
<template>
|
||
|
<div class="mk-drive-page">
|
||
|
<mk-drive :folder="folder" @move-root="onMoveRoot" @open-folder="onOpenFolder"/>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts">
|
||
|
import Vue from 'vue';
|
||
|
export default Vue.extend({
|
||
|
props: ['folder'],
|
||
|
mounted() {
|
||
|
document.title = 'Misskey Drive';
|
||
|
},
|
||
|
methods: {
|
||
|
onMoveRoot() {
|
||
|
const title = 'Misskey Drive';
|
||
|
|
||
|
// Rewrite URL
|
||
|
history.pushState(null, title, '/i/drive');
|
||
|
|
||
|
document.title = title;
|
||
|
},
|
||
|
onOpenFolder(folder) {
|
||
|
const title = folder.name + ' | Misskey Drive';
|
||
|
|
||
|
// Rewrite URL
|
||
|
history.pushState(null, title, '/i/drive/folder/' + folder.id);
|
||
|
|
||
|
document.title = title;
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
</script>
|
||
|
|
||
|
<style lang="stylus" scoped>
|
||
|
.mk-drive-page
|
||
|
position fixed
|
||
|
width 100%
|
||
|
height 100%
|
||
|
background #fff
|
||
|
|
||
|
> .mk-drive
|
||
|
height 100%
|
||
|
</style>
|
||
|
|