Skip to content

Commit

Permalink
#56 add: consent page implementation (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbek committed Jan 29, 2024
1 parent 9b8c8ad commit dfdda08
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/components/ConsentPage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template>
<q-page class="flex flex-center" style="min-width: 400px; min-height: 300px">
Consent page
</q-page>
</template>
<script setup>
</script>
18 changes: 15 additions & 3 deletions src/pages/PopupPage.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<q-page v-if="!inputTokenDialog" class="flex bookmarks-page">
<q-page v-if="!inputTokenDialog && !userDataConsentPage" class="flex bookmarks-page">
<div class="q-pa-md">
<div class="row">
<div class="col">
Expand Down Expand Up @@ -108,6 +108,7 @@
</q-table>
</div>
</q-page>
<ConsentPage v-if="userDataConsentPage" />
<InputTokenDialog v-if="inputTokenDialog" @token-stored="closeWindow" @cancel="closeWindow" />
<AddBookmarkDialog v-model="addBookmarkDialog" :bookmark="editedBookmark" :webSocket="webSocket" @bookmark-stored="onBookmarkStored" />
</template>
Expand All @@ -118,6 +119,7 @@ import { getLocale, openUrl, truncateText } from '../helpers/utils'
import { QWebSocket } from '../services/qwebsocket'
import InputTokenDialog from '../components/InputTokenDialog.vue'
import AddBookmarkDialog from "components/AddBookmarkDialog.vue";
import ConsentPage from "components/ConsentPage.vue";
const columns = [
{ name: 'name', align: 'left', label: 'Name', field: 'name', sortable: true },
Expand All @@ -136,6 +138,7 @@ export default defineComponent({
let selectedNoteFolderIdWatchEnabled = true;
let addBookmarkDialog = ref(false);
const bookmarkEditDialog = ref(false);
let userDataConsentPage = ref(false);
const pagination = ref({
sortBy: 'name',
descending: false,
Expand Down Expand Up @@ -173,6 +176,13 @@ export default defineComponent({
// ]);
const inputTokenDialog = ref(false);
// DEBUG: remove userDataConsent
// chrome.storage.sync.remove(["userDataConsent"]);
chrome.storage.sync.get(function (data) {
userDataConsentPage.value = !data.userDataConsent || data.userDataConsent !== true;
});
// Creates a list of all tags of bookmarks
// Returns a sorted list of all tags
const allTags = computed(() => {
Expand Down Expand Up @@ -372,7 +382,7 @@ export default defineComponent({
// Return the variables that you want to use in the template
return {
columns,
getLocale,
userDataConsentPage,
bookmarks,
loadingBookmarks,
search,
Expand Down Expand Up @@ -404,11 +414,13 @@ export default defineComponent({
};
},
components: {
ConsentPage,
AddBookmarkDialog,
// BookmarkAllTabsButton: BookmarkAllTabsButton,
// ImportBrowserBookmarksDialog: ImportBrowserBookmarksDialog,
InputTokenDialog
}
},
methods: {getLocale}
})
// export default defineComponent({
Expand Down

0 comments on commit dfdda08

Please sign in to comment.