Skip to content

Commit a42a52d

Browse files
rodcoffanidiocas
authored andcommitted
data-repositories: add isVisible codition
- remove unused code - add title to route
1 parent 1365fe7 commit a42a52d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

data-repositories/src/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { computed } from 'vue'
1+
import { computed, unref } from 'vue'
22
import App from './App.vue'
33
import { defineWebApplication, SidebarNavExtension, useRouter } from '@ownclouders/web-pkg'
44

@@ -9,10 +9,6 @@ const appInfo = {
99

1010
export default defineWebApplication({
1111
setup() {
12-
// const { $gettext } = useGettext()
13-
// const userStore = useUserStore()
14-
// const spacesStore = useSpacesStore()
15-
1612
const router = useRouter()
1713

1814
// if the route starts with /files, it has the other sidebar options
@@ -21,6 +17,7 @@ export default defineWebApplication({
2117
path: `/files/${appInfo.id}`,
2218
component: App,
2319
meta: {
20+
title: `${appInfo.name}`,
2421
authContext: 'user',
2522
patchCleanPath: true
2623
}
@@ -39,6 +36,7 @@ export default defineWebApplication({
3936
route: {
4037
path: `/files/${appInfo.id}`
4138
},
39+
isVisible: () => unref(router.currentRoute).path.startsWith('/files'),
4240
priority: 30
4341
}
4442
}

0 commit comments

Comments
 (0)