From 3fde5c1caf0449907f6ea8c1187d7abcda0e61ad Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Thu, 9 Feb 2023 13:03:06 -0800 Subject: [PATCH] settings: add dialog --- lib/Controller/OtherController.php | 1 - src/App.vue | 21 +++++-- src/components/Settings.vue | 94 ++++++++++++++++++++---------- 3 files changed, 79 insertions(+), 37 deletions(-) diff --git a/lib/Controller/OtherController.php b/lib/Controller/OtherController.php index 9ad2d464..bee050c6 100644 --- a/lib/Controller/OtherController.php +++ b/lib/Controller/OtherController.php @@ -25,7 +25,6 @@ namespace OCA\Memories\Controller; use OCA\Memories\AppInfo\Application; use OCP\AppFramework\Http; -use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\Http\StreamResponse; diff --git a/src/App.vue b/src/App.vue index 8ba24320..74d08e92 100644 --- a/src/App.vue +++ b/src/App.vue @@ -23,9 +23,12 @@ @@ -39,6 +42,8 @@ + + @@ -50,8 +55,6 @@ import NcAppContent from "@nextcloud/vue/dist/Components/NcAppContent"; import NcAppNavigation from "@nextcloud/vue/dist/Components/NcAppNavigation"; const NcAppNavigationItem = () => import("@nextcloud/vue/dist/Components/NcAppNavigationItem"); -const NcAppNavigationSettings = () => - import("@nextcloud/vue/dist/Components/NcAppNavigationSettings"); import { generateUrl } from "@nextcloud/router"; import { translate as t } from "@nextcloud/l10n"; @@ -72,6 +75,7 @@ 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"; export default defineComponent({ name: "App", @@ -80,7 +84,6 @@ export default defineComponent({ NcAppContent, NcAppNavigation, NcAppNavigationItem, - NcAppNavigationSettings, Timeline, Settings, @@ -97,11 +100,13 @@ export default defineComponent({ MarkerIcon, TagsIcon, MapIcon, + CogIcon, }, data: () => ({ navItems: [], metadataComponent: null as any, + settingsOpen: false, }), computed: { @@ -324,6 +329,10 @@ export default defineComponent({ tokenInput.value = token; }, + + showSettings() { + this.settingsOpen = true; + }, }, }); diff --git a/src/components/Settings.vue b/src/components/Settings.vue index 6acba4dc..517d962a 100644 --- a/src/components/Settings.vue +++ b/src/components/Settings.vue @@ -22,37 +22,54 @@