diff options
author | vnugent <public@vaughnnugent.com> | 2024-01-07 20:39:18 -0500 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-01-07 20:39:18 -0500 |
commit | c438ee90e3be4e5e01ae3d045d6b841a03bd46eb (patch) | |
tree | 41c0b2ee815ce979e2af0e79f8fde9b58f5f4627 /extension/src/entries/popup | |
parent | e87c4b69036e32b4fcf3df89e8158fb52df6a4e0 (diff) |
Diffstat (limited to 'extension/src/entries/popup')
-rw-r--r-- | extension/src/entries/popup/Components/PageContent.vue | 21 | ||||
-rw-r--r-- | extension/src/entries/popup/main.js | 5 |
2 files changed, 20 insertions, 6 deletions
diff --git a/extension/src/entries/popup/Components/PageContent.vue b/extension/src/entries/popup/Components/PageContent.vue index 8a48840..37e119d 100644 --- a/extension/src/entries/popup/Components/PageContent.vue +++ b/extension/src/entries/popup/Components/PageContent.vue @@ -44,7 +44,7 @@ </div> <div class=""> - <label class="mb-0.5 text-sm dark:text-dark-100"> + <label class="mb-0.5 text-sm"> Identity </label> <IdentitySelection></IdentitySelection> @@ -64,12 +64,12 @@ </div> <div class="mt-4"> - <label class="block mb-1 text-xs text-left dark:text-dark-100" > + <label class="block mb-1 text-xs text-left " > Current origin </label> <div v-if="isOriginProtectionOn" class="flex flex-row w-full gap-2"> - <input :value="currentOrigin" class="flex-1 p-1 mx-0 text-sm input" readonly/> + <input :value="currentOrigin" class="flex-1 p-1 mx-0 text-sm input dark:text-dark-100" readonly/> <button v-if="isTabAllowed" class="btn xs" @click="store.dissallowOrigin()"> <fa-icon icon="minus" /> @@ -79,10 +79,20 @@ </button> </div> - <div v-else class="text-xs text-center"> + <div v-else class="text-xs text-center dark:text-dark-100"> <span class="">Tracking protection disabled</span> </div> </div> + <div class="mt-4"> + <label class="block mb-1 text-xs text-left " > + Permissions + </label> + <ul class="flex flex-row flex-wrap gap-2 dark:text-dark-100"> + <li v-for="rule in ruleTypes" :key="rule" class="text-xs"> + {{ rule }} + </li> + </ul> + </div> </div> </div> @@ -102,6 +112,7 @@ import { notify } from "@kyvg/vue3-notification"; import { runtime } from "webextension-polyfill"; import Login from "./Login.vue"; import IdentitySelection from "./IdentitySelection.vue"; +import { map } from "lodash"; configureNotifier({notify, close:notify.close}) @@ -111,6 +122,8 @@ const { copy, copied } = useClipboard() const pubKey = computed(() => selectedKey!.value?.PublicKey) +const ruleTypes = computed<string[]>(() => map(store.permissions.rulesForCurrentOrigin, 'type')) + const openOptions = () => runtime.openOptionsPage(); const toggleDark = () => store.toggleDarkMode() diff --git a/extension/src/entries/popup/main.js b/extension/src/entries/popup/main.js index c8e9ef8..6642262 100644 --- a/extension/src/entries/popup/main.js +++ b/extension/src/entries/popup/main.js @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Vaughn Nugent +// Copyright (C) 2024 Vaughn Nugent // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -15,7 +15,7 @@ import { createApp } from "vue"; import { createPinia } from "pinia"; -import { identityPlugin, originPlugin, useBackgroundPiniaPlugin } from '../store' +import { identityPlugin, originPlugin, permissionsPlugin, useBackgroundPiniaPlugin } from '../store' import App from "./App.vue"; import Notifications from "@kyvg/vue3-notification"; import '@fontsource/noto-sans-masaram-gondi' @@ -35,6 +35,7 @@ const pinia = createPinia() .use(bgPlugin) //Add the background pinia plugin .use(identityPlugin) .use(originPlugin) + .use(permissionsPlugin) createApp(App) .use(Notifications) |