/
AccountInformationDialog.vue
103 lines (90 loc) · 3.16 KB
/
AccountInformationDialog.vue
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// Copyright (C) 2023 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<v-dialog v-model="dialog" activator="parent" width="auto" transition="fade-transition">
<v-card rounded="xlg">
<v-sheet>
<v-card-item class="pl-7 py-4">
<template #prepend>
<v-card-title class="font-weight-bold">
Account Information
</v-card-title>
</template>
<template #append>
<v-btn icon="$close" variant="text" size="small" color="default" @click="dialog = false" />
</template>
</v-card-item>
</v-sheet>
<v-divider />
<v-form v-model="valid" class="pa-7">
<v-row>
<v-col cols="12">
<p>Edit the name, email, and account type.</p>
</v-col>
</v-row>
<v-row>
<v-col cols="12">
<v-text-field
model-value="Irving Tacker" label="Account Name" variant="outlined"
hide-details="auto"
/>
</v-col>
<v-col cols="12">
<v-text-field model-value="itacker@gmail.com" label="Account Email" hide-details="auto" />
</v-col>
<v-col cols="12">
<v-select
label="Account Type" placeholder="Select the account type"
:items="['Free', 'Pro', 'Priority', 'Enterprise']" model-value="Pro" chips required variant="outlined"
hide-details="auto"
/>
</v-col>
</v-row>
</v-form>
<v-divider />
<v-card-actions class="pa-7">
<v-row>
<v-col>
<v-btn variant="outlined" color="default" block @click="dialog = false">Cancel</v-btn>
</v-col>
<v-col>
<v-btn color="primary" variant="flat" block :loading="loading" @click="onButtonClick">Save</v-btn>
</v-col>
</v-row>
</v-card-actions>
</v-card>
</v-dialog>
<v-snackbar v-model="snackbar" :timeout="7000" color="success">
Successfully saved the account information.
<template #actions>
<v-btn color="default" variant="text" @click="snackbar = false">
Close
</v-btn>
</template>
</v-snackbar>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import {
VDialog,
VCard,
VSheet,
VCardItem,
VCardTitle,
VBtn,
VDivider,
VForm,
VRow,
VCol,
VTextField,
VCardActions,
VSnackbar,
VSelect,
} from 'vuetify/components';
const snackbar = ref<boolean>(false);
const dialog = ref<boolean>(false);
function onButtonClick() {
snackbar.value = true;
dialog.value = false;
}
</script>