Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/photos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakob <jakob.roehrl@web.de>2019-12-05 10:40:41 +0300
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-12-05 13:44:07 +0300
commit82a63d9897c02ab12b334f0caf955744f7a03f17 (patch)
treefd39f4c23c0e07cdb1169eb405e8edb29ce9be30 /src
parent903091675cb3e6ba7c4779650fcf82413c8167f5 (diff)
route adjustments
Signed-off-by: Jakob <jakob.roehrl@web.de>
Diffstat (limited to 'src')
-rw-r--r--src/Photos.vue12
-rw-r--r--src/router/index.js20
-rw-r--r--src/services/IsMapsInstalled.js (renamed from src/services/isMapsInstalled.js)0
3 files changed, 13 insertions, 19 deletions
diff --git a/src/Photos.vue b/src/Photos.vue
index e5376bbb..acd5057a 100644
--- a/src/Photos.vue
+++ b/src/Photos.vue
@@ -32,7 +32,7 @@
<AppNavigationItem :to="{name: 'albums'}" :title="t('photos', 'Your albums')" icon="icon-files-dark" />
<AppNavigationItem :to="{name: 'shared'}" :title="t('photos', 'Shared albums')" icon="icon-share" />
<AppNavigationItem :to="{name: 'tags'}" :title="t('photos', 'Tagged photos')" icon="icon-tag" />
- <AppNavigationItem :to="mapsLink" :title="t('photos', 'Locations')" icon="icon-address" target="_blank" />
+ <AppNavigationItem :to="{name: 'maps'}" :title="t('photos', 'Locations')" icon="icon-address" />
</AppNavigation>
<AppContent :class="{ 'icon-loading': loading }">
<router-view v-show="!loading" :loading.sync="loading" />
@@ -53,7 +53,6 @@ import AppNavigationItem from '@nextcloud/vue/dist/Components/AppNavigationItem'
import svgplaceholder from './assets/file-placeholder.svg'
import imgplaceholder from './assets/image.svg'
import videoplaceholder from './assets/video.svg'
-import isMapsInstalled from './services/isMapsInstalled'
export default {
name: 'Photos',
@@ -71,15 +70,6 @@ export default {
videoplaceholder,
}
},
- computed: {
- mapsLink() {
- if (isMapsInstalled) {
- return {name: 'MapsInstalled'}
- } else {
- return {name: 'MapsNotInstalled'}
- }
- },
- },
}
</script>
<style lang="scss" scoped>
diff --git a/src/router/index.js b/src/router/index.js
index 69d09608..c6cc453c 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -27,9 +27,15 @@ import Vue from 'vue'
import Albums from '../views/Albums'
import Timeline from '../views/Timeline'
import Tags from '../views/Tags'
+import isMapsInstalled from '../services/IsMapsInstalled'
Vue.use(Router)
+let mapsPath = generateUrl('/apps/maps')
+if (!isMapsInstalled) {
+ mapsPath = generateUrl('/settings/apps/integration/maps')
+}
+
export default new Router({
mode: 'history',
// if index.php is in the url AND we got this far, then it's working:
@@ -84,14 +90,12 @@ export default new Router({
}),
},
{
- path: generateUrl('apps/maps', ''),
- name: 'MapsInstalled',
- redirect: '',
- },
- {
- path: generateUrl('settings/apps/integration/maps', ''),
- name: 'MapsNotInstalled',
- redirect: '',
+ path: '/maps',
+ name: 'maps',
+ // router-link doesn't support external url, let's force the redirect
+ beforeEnter() {
+ location.href = mapsPath
+ },
},
],
})
diff --git a/src/services/isMapsInstalled.js b/src/services/IsMapsInstalled.js
index 1c841628..1c841628 100644
--- a/src/services/isMapsInstalled.js
+++ b/src/services/IsMapsInstalled.js