summaryrefslogtreecommitdiff
path: root/src/client/app/desktop/views/components/choose-folder-from-drive-window.vue
blob: fe764365446707026c3a5b96e1dd0f1e76cae550 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<template>
<mk-window ref="window" is-modal width="800px" height="500px" @closed="destroyDom">
	<template #header>
		<span>{{ $t('choose-prompt') }}</span>
	</template>

	<div class="hllkpxxu">
		<x-drive
			ref="browser"
			class="browser"
			:multiple="false"
		/>
		<div class="footer">
			<ui-button inline @click="cancel" style="margin-right:16px;">{{ $t('cancel') }}</ui-button>
			<ui-button inline @click="ok" primary>{{ $t('ok') }}</ui-button>
		</div>
	</div>
</mk-window>
</template>

<script lang="ts">
import Vue from 'vue';
import i18n from '../../../i18n';
export default Vue.extend({
	i18n: i18n('desktop/views/components/choose-folder-from-drive-window.vue'),
	components: {
		XDrive: () => import('./drive.vue').then(m => m.default),
	},
	methods: {
		ok() {
			this.$emit('selected', (this.$refs.browser as any).folder);
			(this.$refs.window as any).close();
		},
		cancel() {
			(this.$refs.window as any).close();
		}
	}
});
</script>

<style lang="stylus" scoped>
.hllkpxxu
	display flex
	flex-direction column
	height 100%

	.browser
		flex 1
		overflow auto

	.footer
		padding 16px
		background var(--desktopPostFormBg)
		text-align right

</style>