2022-08-14 20:54:18 +00:00
|
|
|
<template>
|
2023-10-02 17:03:58 +00:00
|
|
|
<router-view v-if="onlyRouterView" />
|
|
|
|
|
|
|
|
<FirstStart v-else-if="isFirstStart" />
|
2022-10-28 19:08:34 +00:00
|
|
|
|
|
|
|
<NcContent
|
|
|
|
app-name="memories"
|
2023-09-29 18:00:44 +00:00
|
|
|
v-else-if="!isConfigUnknown"
|
2022-10-28 19:08:34 +00:00
|
|
|
:class="{
|
2023-05-23 03:18:50 +00:00
|
|
|
'has-nav': showNavigation,
|
2022-10-28 19:08:34 +00:00
|
|
|
}"
|
|
|
|
>
|
2023-05-17 22:37:41 +00:00
|
|
|
<NcAppNavigation v-if="showNavigation">
|
2023-03-03 19:41:25 +00:00
|
|
|
<template #list>
|
2022-10-28 19:08:34 +00:00
|
|
|
<NcAppNavigationItem
|
2022-11-11 13:55:47 +00:00
|
|
|
v-for="item in navItems"
|
|
|
|
:key="item.name"
|
|
|
|
:to="{ name: item.name }"
|
2023-02-26 21:52:24 +00:00
|
|
|
:name="item.title"
|
2022-11-11 13:55:47 +00:00
|
|
|
@click="linkClick"
|
2022-10-28 19:08:34 +00:00
|
|
|
exact
|
|
|
|
>
|
2022-11-11 13:55:47 +00:00
|
|
|
<component :is="item.icon" slot="icon" :size="20" />
|
2022-10-28 19:08:34 +00:00
|
|
|
</NcAppNavigationItem>
|
|
|
|
</template>
|
2022-11-11 13:55:47 +00:00
|
|
|
|
2022-10-28 19:08:34 +00:00
|
|
|
<template #footer>
|
2023-08-02 23:29:15 +00:00
|
|
|
<ul class="app-navigation__settings">
|
2023-10-24 18:33:55 +00:00
|
|
|
<NcAppNavigationItem :name="t('memories', 'Settings')" @click="showSettings" href="#ss">
|
2023-08-02 23:29:15 +00:00
|
|
|
<CogIcon slot="icon" :size="20" />
|
|
|
|
</NcAppNavigationItem>
|
|
|
|
</ul>
|
2022-10-28 19:08:34 +00:00
|
|
|
</template>
|
|
|
|
</NcAppNavigation>
|
|
|
|
|
|
|
|
<NcAppContent>
|
2023-02-08 21:35:42 +00:00
|
|
|
<div
|
|
|
|
:class="{
|
|
|
|
outer: true,
|
2023-05-03 18:05:40 +00:00
|
|
|
'router-outlet': true,
|
2023-02-08 21:35:42 +00:00
|
|
|
'remove-gap': removeNavGap,
|
2023-05-04 17:30:41 +00:00
|
|
|
'has-nav': showNavigation,
|
2023-05-15 04:49:23 +00:00
|
|
|
'has-mobile-header': hasMobileHeader,
|
|
|
|
'is-native': native,
|
2023-02-08 21:35:42 +00:00
|
|
|
}"
|
|
|
|
>
|
2022-10-28 19:08:34 +00:00
|
|
|
<router-view />
|
|
|
|
</div>
|
2023-05-03 09:27:03 +00:00
|
|
|
|
2023-05-15 04:49:23 +00:00
|
|
|
<MobileHeader v-if="hasMobileHeader" />
|
2023-05-04 17:30:41 +00:00
|
|
|
<MobileNav v-if="showNavigation" />
|
2022-10-28 19:08:34 +00:00
|
|
|
</NcAppContent>
|
2023-02-09 21:03:06 +00:00
|
|
|
|
|
|
|
<Settings :open.sync="settingsOpen" />
|
2023-03-09 21:47:14 +00:00
|
|
|
|
2023-05-14 18:59:38 +00:00
|
|
|
<Viewer />
|
2023-03-09 21:47:14 +00:00
|
|
|
<Sidebar />
|
2023-09-30 17:10:04 +00:00
|
|
|
|
2023-03-10 20:45:04 +00:00
|
|
|
<EditMetadataModal />
|
2023-08-02 20:23:27 +00:00
|
|
|
<AddToAlbumModal />
|
2023-03-10 20:45:04 +00:00
|
|
|
<NodeShareModal />
|
2023-03-10 23:27:12 +00:00
|
|
|
<ShareModal />
|
2023-09-30 17:10:04 +00:00
|
|
|
<MoveToFolderModal />
|
2023-09-30 17:17:28 +00:00
|
|
|
<FaceMoveModal />
|
2022-10-28 19:08:34 +00:00
|
|
|
</NcContent>
|
2022-08-14 20:54:18 +00:00
|
|
|
</template>
|
|
|
|
|
2022-09-13 01:33:24 +00:00
|
|
|
<script lang="ts">
|
2023-10-17 04:04:18 +00:00
|
|
|
import { defineComponent } from 'vue';
|
2023-04-19 23:14:30 +00:00
|
|
|
|
|
|
|
import NcContent from '@nextcloud/vue/dist/Components/NcContent';
|
|
|
|
import NcAppContent from '@nextcloud/vue/dist/Components/NcAppContent';
|
|
|
|
import NcAppNavigation from '@nextcloud/vue/dist/Components/NcAppNavigation';
|
|
|
|
const NcAppNavigationItem = () => import('@nextcloud/vue/dist/Components/NcAppNavigationItem');
|
|
|
|
|
|
|
|
import { generateUrl } from '@nextcloud/router';
|
|
|
|
import { translate as t } from '@nextcloud/l10n';
|
|
|
|
|
2023-08-22 01:22:14 +00:00
|
|
|
import * as utils from './services/utils';
|
2023-05-04 02:59:23 +00:00
|
|
|
import * as nativex from './native';
|
2023-05-21 19:12:47 +00:00
|
|
|
import staticConfig from './services/static-config';
|
2023-04-19 23:14:30 +00:00
|
|
|
import UserConfig from './mixins/UserConfig';
|
|
|
|
import Timeline from './components/Timeline.vue';
|
|
|
|
import Settings from './components/Settings.vue';
|
|
|
|
import FirstStart from './components/FirstStart.vue';
|
2023-05-14 18:59:38 +00:00
|
|
|
import Viewer from './components/viewer/Viewer.vue';
|
2023-04-19 23:14:30 +00:00
|
|
|
import Sidebar from './components/Sidebar.vue';
|
2023-09-30 17:10:04 +00:00
|
|
|
import MobileNav from './components/MobileNav.vue';
|
|
|
|
import MobileHeader from './components/MobileHeader.vue';
|
|
|
|
|
2023-04-19 23:14:30 +00:00
|
|
|
import EditMetadataModal from './components/modal/EditMetadataModal.vue';
|
2023-08-02 20:23:27 +00:00
|
|
|
import AddToAlbumModal from './components/modal/AddToAlbumModal.vue';
|
2023-04-19 23:14:30 +00:00
|
|
|
import NodeShareModal from './components/modal/NodeShareModal.vue';
|
|
|
|
import ShareModal from './components/modal/ShareModal.vue';
|
2023-09-30 17:10:04 +00:00
|
|
|
import MoveToFolderModal from './components/modal/MoveToFolderModal.vue';
|
2023-09-30 17:17:28 +00:00
|
|
|
import FaceMoveModal from './components/modal/FaceMoveModal.vue';
|
2023-04-19 23:14:30 +00:00
|
|
|
|
|
|
|
import ImageMultiple from 'vue-material-design-icons/ImageMultiple.vue';
|
|
|
|
import FolderIcon from 'vue-material-design-icons/Folder.vue';
|
|
|
|
import Star from 'vue-material-design-icons/Star.vue';
|
|
|
|
import Video from 'vue-material-design-icons/PlayCircle.vue';
|
|
|
|
import AlbumIcon from 'vue-material-design-icons/ImageAlbum.vue';
|
|
|
|
import ArchiveIcon from 'vue-material-design-icons/PackageDown.vue';
|
|
|
|
import CalendarIcon from 'vue-material-design-icons/Calendar.vue';
|
|
|
|
import PeopleIcon from 'vue-material-design-icons/AccountBoxMultiple.vue';
|
|
|
|
import MarkerIcon from 'vue-material-design-icons/MapMarker.vue';
|
|
|
|
import TagsIcon from 'vue-material-design-icons/Tag.vue';
|
|
|
|
import MapIcon from 'vue-material-design-icons/Map.vue';
|
|
|
|
import CogIcon from 'vue-material-design-icons/Cog.vue';
|
2022-09-16 03:17:40 +00:00
|
|
|
|
2023-04-19 02:19:05 +00:00
|
|
|
type NavItem = {
|
|
|
|
name: string;
|
|
|
|
title: string;
|
|
|
|
icon: any;
|
|
|
|
if?: any;
|
|
|
|
};
|
|
|
|
|
2022-12-10 09:01:44 +00:00
|
|
|
export default defineComponent({
|
2023-04-19 23:14:30 +00:00
|
|
|
name: 'App',
|
2022-10-28 19:08:34 +00:00
|
|
|
components: {
|
|
|
|
NcContent,
|
|
|
|
NcAppContent,
|
|
|
|
NcAppNavigation,
|
|
|
|
NcAppNavigationItem,
|
|
|
|
|
|
|
|
Timeline,
|
|
|
|
Settings,
|
|
|
|
FirstStart,
|
2023-05-14 18:59:38 +00:00
|
|
|
Viewer,
|
2023-03-09 21:47:14 +00:00
|
|
|
Sidebar,
|
2023-09-30 17:10:04 +00:00
|
|
|
MobileNav,
|
|
|
|
MobileHeader,
|
|
|
|
|
2023-03-10 20:45:04 +00:00
|
|
|
EditMetadataModal,
|
2023-08-02 20:23:27 +00:00
|
|
|
AddToAlbumModal,
|
2023-03-10 20:45:04 +00:00
|
|
|
NodeShareModal,
|
2023-03-10 23:27:12 +00:00
|
|
|
ShareModal,
|
2023-09-30 17:10:04 +00:00
|
|
|
MoveToFolderModal,
|
2023-09-30 17:17:28 +00:00
|
|
|
FaceMoveModal,
|
2022-10-28 19:08:34 +00:00
|
|
|
|
|
|
|
ImageMultiple,
|
|
|
|
FolderIcon,
|
|
|
|
Star,
|
|
|
|
Video,
|
|
|
|
AlbumIcon,
|
|
|
|
ArchiveIcon,
|
|
|
|
CalendarIcon,
|
|
|
|
PeopleIcon,
|
2023-02-05 21:43:25 +00:00
|
|
|
MarkerIcon,
|
2022-10-28 19:08:34 +00:00
|
|
|
TagsIcon,
|
|
|
|
MapIcon,
|
2023-02-09 21:03:06 +00:00
|
|
|
CogIcon,
|
2022-10-28 19:08:34 +00:00
|
|
|
},
|
|
|
|
|
2023-03-03 20:47:46 +00:00
|
|
|
mixins: [UserConfig],
|
|
|
|
|
2022-12-10 18:59:36 +00:00
|
|
|
data: () => ({
|
2023-04-19 02:19:05 +00:00
|
|
|
navItems: [] as NavItem[],
|
2023-02-09 21:03:06 +00:00
|
|
|
settingsOpen: false,
|
2022-12-10 18:59:36 +00:00
|
|
|
}),
|
2022-11-07 21:55:11 +00:00
|
|
|
|
2022-12-10 09:01:44 +00:00
|
|
|
computed: {
|
2023-05-15 04:49:23 +00:00
|
|
|
native(): boolean {
|
|
|
|
return nativex.has();
|
|
|
|
},
|
|
|
|
|
2023-04-19 02:19:05 +00:00
|
|
|
recognize(): string | false {
|
2023-05-03 05:52:00 +00:00
|
|
|
if (!this.config.recognize_enabled) {
|
2022-12-10 09:01:44 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2023-08-25 04:14:41 +00:00
|
|
|
if (this.config.facerecognition_installed) {
|
2023-04-19 23:14:30 +00:00
|
|
|
return t('memories', 'People (Recognize)');
|
2022-12-10 09:01:44 +00:00
|
|
|
}
|
|
|
|
|
2023-04-19 23:14:30 +00:00
|
|
|
return t('memories', 'People');
|
2022-12-08 21:00:53 +00:00
|
|
|
},
|
2022-12-10 17:58:30 +00:00
|
|
|
|
2023-04-19 02:19:05 +00:00
|
|
|
facerecognition(): string | false {
|
2023-05-03 05:52:00 +00:00
|
|
|
if (!this.config.facerecognition_installed) {
|
2022-12-10 09:01:44 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2023-05-03 05:52:00 +00:00
|
|
|
if (this.config.recognize_enabled) {
|
2023-04-19 23:14:30 +00:00
|
|
|
return t('memories', 'People (Face Recognition)');
|
2022-12-10 09:01:44 +00:00
|
|
|
}
|
|
|
|
|
2023-04-19 23:14:30 +00:00
|
|
|
return t('memories', 'People');
|
2022-11-11 13:55:47 +00:00
|
|
|
},
|
2022-12-10 17:58:30 +00:00
|
|
|
|
2023-10-02 17:03:58 +00:00
|
|
|
onlyRouterView(): boolean {
|
2023-10-16 19:42:18 +00:00
|
|
|
return this.routeIsNxSetup;
|
2023-10-02 17:03:58 +00:00
|
|
|
},
|
|
|
|
|
2022-12-10 17:58:30 +00:00
|
|
|
isFirstStart(): boolean {
|
2023-09-29 18:00:44 +00:00
|
|
|
return this.config.timeline_path === '_empty_' && !this.routeIsPublic && !this.$route.query.noinit;
|
|
|
|
},
|
|
|
|
|
|
|
|
isConfigUnknown(): boolean {
|
|
|
|
return this.config.timeline_path === '_unknown_';
|
2022-11-11 13:55:47 +00:00
|
|
|
},
|
2022-12-10 17:58:30 +00:00
|
|
|
|
|
|
|
showAlbums(): boolean {
|
2023-05-03 05:52:00 +00:00
|
|
|
return this.config.albums_enabled;
|
2022-11-11 13:55:47 +00:00
|
|
|
},
|
2022-12-10 17:58:30 +00:00
|
|
|
|
|
|
|
showNavigation(): boolean {
|
2023-05-15 04:49:23 +00:00
|
|
|
if (this.native) {
|
2023-05-25 06:24:30 +00:00
|
|
|
return this.routeIsBase || this.routeIsExplore || (this.routeIsAlbums && !this.$route.params.name);
|
2023-05-15 04:49:23 +00:00
|
|
|
}
|
|
|
|
|
2023-05-25 06:24:30 +00:00
|
|
|
return !this.routeIsPublic;
|
2022-11-11 13:55:47 +00:00
|
|
|
},
|
2023-02-08 21:35:42 +00:00
|
|
|
|
2023-05-15 04:49:23 +00:00
|
|
|
hasMobileHeader(): boolean {
|
2023-06-26 22:01:46 +00:00
|
|
|
return this.native && this.showNavigation && this.routeIsBase;
|
2023-05-15 04:49:23 +00:00
|
|
|
},
|
|
|
|
|
2023-02-08 21:35:42 +00:00
|
|
|
removeNavGap(): boolean {
|
2023-06-26 22:01:46 +00:00
|
|
|
return this.routeIsMap;
|
2023-02-08 21:35:42 +00:00
|
|
|
},
|
2022-12-10 09:01:44 +00:00
|
|
|
},
|
2022-10-29 01:34:17 +00:00
|
|
|
|
2023-03-18 19:08:52 +00:00
|
|
|
created() {
|
|
|
|
// No real need to unbind these, as the app is never destroyed
|
|
|
|
const onResize = () => {
|
2023-10-13 17:32:07 +00:00
|
|
|
_m.window.innerWidth = window.innerWidth;
|
|
|
|
_m.window.innerHeight = window.innerHeight;
|
2023-08-28 23:14:50 +00:00
|
|
|
utils.bus.emit('memories:window:resize', null);
|
2023-03-18 19:08:52 +00:00
|
|
|
};
|
2023-04-19 23:14:30 +00:00
|
|
|
window.addEventListener('resize', () => {
|
|
|
|
utils.setRenewingTimeout(this, 'resizeTimer', onResize, 100);
|
2023-03-18 19:08:52 +00:00
|
|
|
});
|
2023-05-03 05:52:00 +00:00
|
|
|
|
|
|
|
// Register navigation items on config change
|
2023-08-28 23:14:50 +00:00
|
|
|
utils.bus.on('memories:user-config-changed', this.refreshNav);
|
2023-05-03 18:18:30 +00:00
|
|
|
|
|
|
|
// Register global functions
|
2023-10-13 17:32:07 +00:00
|
|
|
_m.modals.showSettings = this.showSettings;
|
2023-03-18 19:08:52 +00:00
|
|
|
},
|
|
|
|
|
2022-10-29 01:58:40 +00:00
|
|
|
mounted() {
|
2023-05-03 05:52:00 +00:00
|
|
|
this.refreshNav();
|
2022-11-11 13:55:47 +00:00
|
|
|
|
2022-10-30 20:24:17 +00:00
|
|
|
// Store CSS variables modified
|
|
|
|
const root = document.documentElement;
|
2023-04-19 23:14:30 +00:00
|
|
|
const colorPrimary = getComputedStyle(root).getPropertyValue('--color-primary');
|
|
|
|
root.style.setProperty('--color-primary-select-light', `${colorPrimary}40`);
|
|
|
|
root.style.setProperty('--plyr-color-main', colorPrimary);
|
2022-11-07 21:55:11 +00:00
|
|
|
|
2023-05-08 04:18:33 +00:00
|
|
|
// Set theme color to default
|
|
|
|
nativex.setTheme();
|
2023-05-08 04:06:30 +00:00
|
|
|
|
2023-05-03 08:24:22 +00:00
|
|
|
// Check for native interface
|
2023-05-15 04:49:23 +00:00
|
|
|
if (this.native) {
|
2023-05-14 18:59:38 +00:00
|
|
|
document.documentElement.classList.add('native');
|
2023-05-03 08:24:22 +00:00
|
|
|
}
|
2023-06-26 22:01:46 +00:00
|
|
|
|
|
|
|
// Close navigation by default if init is disabled
|
|
|
|
// This is the case for public folder/album shares
|
|
|
|
if (this.$route.query.noinit) {
|
2023-08-28 23:14:50 +00:00
|
|
|
utils.bus.emit('toggle-navigation', { open: false });
|
2023-06-26 22:01:46 +00:00
|
|
|
}
|
2022-12-10 09:01:44 +00:00
|
|
|
},
|
2022-10-29 01:58:40 +00:00
|
|
|
|
2023-02-09 19:28:15 +00:00
|
|
|
async beforeMount() {
|
2023-10-03 01:00:49 +00:00
|
|
|
if (window.location.hostname === 'localhost') {
|
|
|
|
// Disable on dev instances
|
|
|
|
console.warn('Service Worker is not enabled on localhost.');
|
|
|
|
} else if ('serviceWorker' in navigator) {
|
2023-05-21 19:12:47 +00:00
|
|
|
// Get the config before loading
|
|
|
|
const previousVersion = staticConfig.getSync('version');
|
|
|
|
|
2023-02-09 19:28:15 +00:00
|
|
|
// Use the window load event to keep the page load performant
|
2023-04-19 23:14:30 +00:00
|
|
|
window.addEventListener('load', async () => {
|
2023-02-09 19:28:15 +00:00
|
|
|
try {
|
2023-10-20 19:21:41 +00:00
|
|
|
const url = generateUrl('/apps/memories/static/service-worker.js');
|
2023-02-09 19:28:15 +00:00
|
|
|
const registration = await navigator.serviceWorker.register(url, {
|
2023-04-19 23:14:30 +00:00
|
|
|
scope: generateUrl('/apps/memories'),
|
2023-02-09 19:28:15 +00:00
|
|
|
});
|
2023-10-20 19:21:41 +00:00
|
|
|
console.info('SW registered: ', registration);
|
2023-05-21 19:12:47 +00:00
|
|
|
|
|
|
|
// Check for updates
|
|
|
|
const currentVersion = await staticConfig.get('version');
|
|
|
|
if (previousVersion !== currentVersion) {
|
|
|
|
registration.update();
|
|
|
|
}
|
2023-02-09 19:28:15 +00:00
|
|
|
} catch (error) {
|
2023-04-19 23:14:30 +00:00
|
|
|
console.error('SW registration failed: ', error);
|
2023-02-09 19:28:15 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
} else {
|
2023-04-19 23:14:30 +00:00
|
|
|
console.debug('Service Worker is not enabled on this browser.');
|
2023-02-09 19:28:15 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2022-12-10 09:01:44 +00:00
|
|
|
methods: {
|
2023-05-03 05:52:00 +00:00
|
|
|
refreshNav() {
|
|
|
|
const navItems = [
|
2022-12-10 09:01:44 +00:00
|
|
|
{
|
2023-04-19 23:14:30 +00:00
|
|
|
name: 'timeline',
|
2022-12-10 09:01:44 +00:00
|
|
|
icon: ImageMultiple,
|
2023-04-19 23:14:30 +00:00
|
|
|
title: t('memories', 'Timeline'),
|
2022-12-10 09:01:44 +00:00
|
|
|
},
|
|
|
|
{
|
2023-04-19 23:14:30 +00:00
|
|
|
name: 'folders',
|
2022-12-10 09:01:44 +00:00
|
|
|
icon: FolderIcon,
|
2023-04-19 23:14:30 +00:00
|
|
|
title: t('memories', 'Folders'),
|
2022-12-10 09:01:44 +00:00
|
|
|
},
|
|
|
|
{
|
2023-04-19 23:14:30 +00:00
|
|
|
name: 'favorites',
|
2022-12-10 09:01:44 +00:00
|
|
|
icon: Star,
|
2023-04-19 23:14:30 +00:00
|
|
|
title: t('memories', 'Favorites'),
|
2022-12-10 09:01:44 +00:00
|
|
|
},
|
|
|
|
{
|
2023-04-19 23:14:30 +00:00
|
|
|
name: 'videos',
|
2022-12-10 09:01:44 +00:00
|
|
|
icon: Video,
|
2023-04-19 23:14:30 +00:00
|
|
|
title: t('memories', 'Videos'),
|
2022-12-10 09:01:44 +00:00
|
|
|
},
|
|
|
|
{
|
2023-04-19 23:14:30 +00:00
|
|
|
name: 'albums',
|
2022-12-10 09:01:44 +00:00
|
|
|
icon: AlbumIcon,
|
2023-04-19 23:14:30 +00:00
|
|
|
title: t('memories', 'Albums'),
|
2022-12-10 09:01:44 +00:00
|
|
|
if: this.showAlbums,
|
|
|
|
},
|
|
|
|
{
|
2023-04-19 23:14:30 +00:00
|
|
|
name: 'recognize',
|
2022-12-10 09:01:44 +00:00
|
|
|
icon: PeopleIcon,
|
2023-04-19 23:14:30 +00:00
|
|
|
title: this.recognize || '',
|
2022-12-10 09:01:44 +00:00
|
|
|
if: this.recognize,
|
|
|
|
},
|
|
|
|
{
|
2023-04-19 23:14:30 +00:00
|
|
|
name: 'facerecognition',
|
2022-12-10 09:01:44 +00:00
|
|
|
icon: PeopleIcon,
|
2023-04-19 23:14:30 +00:00
|
|
|
title: this.facerecognition || '',
|
2022-12-10 09:01:44 +00:00
|
|
|
if: this.facerecognition,
|
|
|
|
},
|
|
|
|
{
|
2023-04-19 23:14:30 +00:00
|
|
|
name: 'archive',
|
2022-12-10 09:01:44 +00:00
|
|
|
icon: ArchiveIcon,
|
2023-04-19 23:14:30 +00:00
|
|
|
title: t('memories', 'Archive'),
|
2022-12-10 09:01:44 +00:00
|
|
|
},
|
|
|
|
{
|
2023-04-19 23:14:30 +00:00
|
|
|
name: 'thisday',
|
2022-12-10 09:01:44 +00:00
|
|
|
icon: CalendarIcon,
|
2023-04-19 23:14:30 +00:00
|
|
|
title: t('memories', 'On this day'),
|
2022-12-10 09:01:44 +00:00
|
|
|
},
|
2023-02-05 21:43:25 +00:00
|
|
|
{
|
2023-04-19 23:14:30 +00:00
|
|
|
name: 'places',
|
2023-02-05 21:43:25 +00:00
|
|
|
icon: MarkerIcon,
|
2023-04-19 23:14:30 +00:00
|
|
|
title: t('memories', 'Places'),
|
2023-05-03 05:52:00 +00:00
|
|
|
if: this.config.places_gis > 0,
|
2023-02-05 21:43:25 +00:00
|
|
|
},
|
2023-02-08 22:13:13 +00:00
|
|
|
{
|
2023-04-19 23:14:30 +00:00
|
|
|
name: 'map',
|
2023-02-08 22:13:13 +00:00
|
|
|
icon: MapIcon,
|
2023-04-19 23:14:30 +00:00
|
|
|
title: t('memories', 'Map'),
|
2023-02-08 22:13:13 +00:00
|
|
|
},
|
2022-12-10 09:01:44 +00:00
|
|
|
{
|
2023-04-19 23:14:30 +00:00
|
|
|
name: 'tags',
|
2022-12-10 09:01:44 +00:00
|
|
|
icon: TagsIcon,
|
2023-04-19 23:14:30 +00:00
|
|
|
title: t('memories', 'Tags'),
|
2023-05-03 05:52:00 +00:00
|
|
|
if: this.config.systemtags_enabled,
|
2022-12-10 09:01:44 +00:00
|
|
|
},
|
|
|
|
];
|
2023-05-03 05:52:00 +00:00
|
|
|
|
|
|
|
this.navItems = navItems.filter((item) => typeof item.if === 'undefined' || Boolean(item.if));
|
2022-12-10 09:01:44 +00:00
|
|
|
},
|
2022-10-29 01:58:40 +00:00
|
|
|
|
2022-12-10 09:01:44 +00:00
|
|
|
linkClick() {
|
2023-10-13 17:32:07 +00:00
|
|
|
if (_m.window.innerWidth <= 1024) {
|
2023-08-28 23:14:50 +00:00
|
|
|
utils.bus.emit('toggle-navigation', { open: false });
|
2023-05-17 22:37:41 +00:00
|
|
|
}
|
2022-12-10 09:01:44 +00:00
|
|
|
},
|
2022-10-29 01:58:40 +00:00
|
|
|
|
2023-02-09 21:03:06 +00:00
|
|
|
showSettings() {
|
|
|
|
this.settingsOpen = true;
|
|
|
|
},
|
2022-12-10 09:01:44 +00:00
|
|
|
},
|
|
|
|
});
|
2022-08-14 20:54:18 +00:00
|
|
|
</script>
|
2022-09-16 04:06:40 +00:00
|
|
|
|
2022-10-12 19:05:38 +00:00
|
|
|
<style scoped lang="scss">
|
|
|
|
.outer {
|
2022-10-28 19:08:34 +00:00
|
|
|
padding: 0 0 0 44px;
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
2023-02-08 21:35:42 +00:00
|
|
|
|
|
|
|
&.remove-gap {
|
2023-10-16 18:38:57 +00:00
|
|
|
// Fill up the whole space, e.g. on map
|
2023-02-08 21:35:42 +00:00
|
|
|
padding: 0;
|
|
|
|
}
|
2022-10-12 19:05:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: 768px) {
|
2022-10-28 19:08:34 +00:00
|
|
|
.outer {
|
|
|
|
padding: 0px;
|
|
|
|
}
|
2022-10-12 19:05:38 +00:00
|
|
|
}
|
2023-08-02 23:29:15 +00:00
|
|
|
|
|
|
|
ul.app-navigation__settings {
|
|
|
|
height: auto !important;
|
|
|
|
overflow: hidden !important;
|
|
|
|
padding-top: 0 !important;
|
|
|
|
flex: 0 0 auto;
|
|
|
|
}
|
2022-10-12 19:05:38 +00:00
|
|
|
</style>
|