Skip to content

Commit ffa501a

Browse files
committed
fix(router): redirect profile details view to internal contacts list
Signed-off-by: silver <s.szmajduch@posteo.de> Assisted-by: ClaudeCode:claude-sonnet-5
1 parent 961dceb commit ffa501a

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/router/index.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { generateUrl } from '@nextcloud/router'
77
import { createRouter, createWebHistory } from 'vue-router'
88
import Contacts from '../views/Contacts.vue'
9-
import { ROUTE_CHART, ROUTE_CIRCLE, ROUTE_USER_GROUP } from '../models/constants.ts'
9+
import { GROUP_ALL_CONTACTS, ROUTE_CHART, ROUTE_CIRCLE, ROUTE_USER_GROUP } from '../models/constants.ts'
1010

1111
// if index.php is in the url AND we got this far, then it's working:
1212
// let's keep using index.php in the url
@@ -57,6 +57,17 @@ export default createRouter({
5757
name: 'user_group',
5858
component: Contacts,
5959
},
60+
{
61+
path: 'u/:userId',
62+
name: 'profile-redirect',
63+
redirect: (to) => ({
64+
name: 'contact',
65+
params: {
66+
selectedGroup: GROUP_ALL_CONTACTS,
67+
selectedContact: Buffer.from(`${to.params.userId}~z-server-generated--system`, 'utf8').toString('base64'),
68+
},
69+
}),
70+
},
6071
],
6172
},
6273
],

0 commit comments

Comments
 (0)