11import translations from '../l10n/translations.json'
22import { useGettext } from 'vue3-gettext'
33import { computed } from 'vue'
4+ import Inbox from './views/Inbox.vue'
5+ import MailCompose from './views/MailCompose.vue'
6+ import LayoutContainer from './LayoutContainer.vue'
7+ import EmptyLayoutContainer from './EmptyLayoutContainer.vue'
48
59import {
610 AppMenuItemExtension ,
@@ -26,38 +30,39 @@ export default defineWebApplication({
2630
2731 const routes : RouteRecordRaw [ ] = [
2832 {
29- path : '/ ' ,
30- name : 'root' ,
31- component : ( ) => import ( './ LayoutContainer.vue' ) ,
33+ path : '' ,
34+ name : 'mail- root' ,
35+ component : LayoutContainer ,
3236 meta : {
3337 authContext : 'user'
3438 } ,
3539 children : [
3640 {
3741 path : '' ,
38- redirect : urlJoin ( appInfo . id , 'all' , ' inbox')
42+ redirect : { name : 'mail-all- inbox' }
3943 } ,
4044 {
4145 path : 'create' ,
4246 name : 'mail-create' ,
43- component : ( ) => import ( './views/ MailCompose.vue' ) ,
47+ component : MailCompose ,
4448 meta : {
4549 authContext : 'user' ,
4650 title : $gettext ( 'Create new email' )
4751 }
4852 } ,
4953 {
5054 path : 'all' ,
51- name : 'all' ,
52- component : ( ) => import ( './EmptyLayoutContainer.vue' ) ,
55+ name : 'mail-all' ,
56+ component : EmptyLayoutContainer ,
57+ redirect : { name : 'mail-all-inbox' } ,
5358 meta : {
5459 authContext : 'user'
5560 } ,
5661 children : [
5762 {
5863 path : 'inbox' ,
59- name : 'all-inbox' ,
60- component : ( ) => import ( './views/ Inbox.vue' ) ,
64+ name : 'mail- all-inbox' ,
65+ component : Inbox ,
6166 meta : {
6267 authContext : 'user' ,
6368 title : $gettext ( 'All emails' )
0 commit comments