Skip to content

Commit e1184cc

Browse files
refactor(vue3): migrate Account view to script setup ts
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 6dfc171 commit e1184cc

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

src/views/Account/Account.vue

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</div>
2828
</template>
2929

30-
<script>
30+
<script setup lang="ts">
3131
import { t } from '@nextcloud/l10n'
3232
3333
import { getCurrentUser } from '@nextcloud/auth'
@@ -37,21 +37,21 @@ import ManagePassword from './partials/ManagePassword.vue'
3737
import Signatures from './partials/Signatures.vue'
3838
import UserImage from './partials/UserImage.vue'
3939
40-
export default {
40+
defineOptions({
4141
name: 'Account',
42+
})
4243
43-
components: {
44-
Signatures,
45-
UserImage,
46-
Documents,
47-
ManagePassword,
48-
},
49-
data() {
50-
return {
51-
user: getCurrentUser(),
52-
}
53-
},
44+
type User = {
45+
uid?: string
46+
displayName?: string
5447
}
48+
49+
const user = getCurrentUser() as User
50+
51+
defineExpose({
52+
user,
53+
t,
54+
})
5555
</script>
5656

5757
<style lang="scss" scoped>

0 commit comments

Comments
 (0)