diff --git a/src/App.vue b/src/App.vue index 73af824e..e862e0ad 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,19 +4,14 @@ diff --git a/src/boot/firebaseConnection.ts b/src/boot/firebaseConnection.ts index c2fa5496..4db4b36a 100644 --- a/src/boot/firebaseConnection.ts +++ b/src/boot/firebaseConnection.ts @@ -1,6 +1,6 @@ //import FirebaseService from '../services/firebase/FirebaseService' -import FirebaseService from "src/services/firebase/FirebaseService"; +import FirebaseService from "src/services/firebase/FirebaseServices"; import {boot} from "quasar/wrappers"; // export default async () => { diff --git a/src/components/SidePanelFooter.vue b/src/components/SidePanelFooter.vue index 1aecd36f..8545bae7 100644 --- a/src/components/SidePanelFooter.vue +++ b/src/components/SidePanelFooter.vue @@ -121,7 +121,7 @@ - + You're logged in as {{ @@ -149,7 +149,7 @@ - Save snapshot + + Store the current numbers for comparison + - {{ snapshotDate() }} + + + + Reset Snapshot Counters + + {{ snapshotDate() }} @@ -23,7 +29,7 @@ - + {{ row['name' as keyof object] }} @@ -82,15 +88,15 @@ const devMode = ref(settingsStore.isEnabled('dev')) onMounted(() => { statsSnapshot.value = localstorage.getItem("stats") as object || undefined - rows.value = calcWindowRows() + rows.value = calcStatsRows() }) watch(() => useWindowsStore().currentChromeWindows, (newWindows, oldWindows) => { - rows.value = calcWindowRows() + rows.value = calcStatsRows() }) watch(() => useTabsStore().allTabsCount, (a,b) => { - rows.value = calcWindowRows() + rows.value = calcStatsRows() }) @@ -102,14 +108,14 @@ watchEffect(() => { }) watch(() => useTabsStore().tabsCount, (a, b) => { - rows.value = calcWindowRows() + rows.value = calcStatsRows() }) watch(() => useWindowsStore().currentChromeWindows, (a, b) => { - rows.value = calcWindowRows() + rows.value = calcStatsRows() }) -const calcWindowRows = () => { +const calcStatsRows = () => { return [ {name: 'Tabs', count: useTabsStore().allTabsCount, snapshot: getFromSnapshot('Tabs')}, {name: 'Tabsets', count: useTabsStore().tabsets.size, snapshot: getFromSnapshot('Tabsets')}, @@ -127,11 +133,13 @@ const calcWindowRows = () => { } const saveStatsSnapshot = () => { - localstorage.set("stats", { + const newStats = { date: new Date().getTime().toString(), - values: calcWindowRows() - }) - rows.value = calcWindowRows() + values: calcStatsRows() + } + localstorage.set("stats", newStats) + statsSnapshot.value = newStats + rows.value = calcStatsRows() } const getFromSnapshot = (ident: string) => { @@ -150,8 +158,11 @@ const getFromSnapshot = (ident: string) => { } const snapshotDate = () => { - const tstamp: string = statsSnapshot.value['date' as keyof object] as string - return date.formatDate(Number(tstamp), 'DD.MM.YY HH:mm') + if (statsSnapshot.value) { + const tstamp: string = statsSnapshot.value['date' as keyof object] as string + return date.formatDate(Number(tstamp), 'DD.MM.YY HH:mm') + } + return "---" } diff --git a/src/models/AppFeatures.ts b/src/models/AppFeatures.ts index f8da2fee..3211514c 100644 --- a/src/models/AppFeatures.ts +++ b/src/models/AppFeatures.ts @@ -5,7 +5,7 @@ import {AppFeature, FeatureIdent, FeatureType} from "src/models/AppFeature" export class AppFeatures { features: AppFeature[] = [ - new AppFeature(FeatureIdent.HELP, FeatureType.EXPERIMENTAL, 'Help Pages', 'o_help', ['bex']), + //new AppFeature(FeatureIdent.HELP, FeatureType.EXPERIMENTAL, 'Help Pages', 'o_help', ['bex']), new AppFeature(FeatureIdent.BOOKMARKS, FeatureType.OPTIONAL, 'Bookmarks', 'o_bookmarks', ['bex']) .setActivateCommands([new GrantPermissionCommand('bookmarks')]) @@ -75,7 +75,7 @@ export class AppFeatures { new AppFeature(FeatureIdent.TAB_HELPER, FeatureType.EXPERIMENTAL, 'Tab Helper', 'o_article', ['bex']), new AppFeature(FeatureIdent.AUTO_TAB_SWITCHER, FeatureType.EXPERIMENTAL, 'Auto Tab Switcher', 'o_switch_left', ['bex']), - new AppFeature(FeatureIdent.TABS_AS_TREE, FeatureType.EXPERIMENTAL, 'Tabs in Tree View', 'o_account_tree', ['all']), + //new AppFeature(FeatureIdent.TABS_AS_TREE, FeatureType.EXPERIMENTAL, 'Tabs in Tree View', 'o_account_tree', ['all']), new AppFeature(FeatureIdent.TABSET_SUBFOLDER, FeatureType.EXPERIMENTAL, 'Subfolder for Tabsets', 'o_folder', ['all']), new AppFeature(FeatureIdent.TABSETS_SHARING, FeatureType.EXPERIMENTAL, 'Sharing Tabsets', 'o_ios_share', ['all']) ] diff --git a/src/pages/SettingsPage.vue b/src/pages/SettingsPage.vue index 2f09b19e..818c3094 100644 --- a/src/pages/SettingsPage.vue +++ b/src/pages/SettingsPage.vue @@ -30,11 +30,12 @@ - + - - + + + + @@ -147,7 +148,7 @@ -
+
New Version Simulation
@@ -159,7 +160,7 @@
-
+
New Suggestion Simulation
@@ -385,34 +386,7 @@
- -
- - - To use feature toggles, you need to have a (free) account. - - -
- +
@@ -461,6 +435,7 @@ import {AccessItem, useAuthStore} from "stores/authStore"; import SharingSettings from "pages/helper/SharingSettings.vue"; import AccountSettings from "pages/helper/AccountSettings.vue"; import InfoLine from "pages/helper/InfoLine.vue"; +import FeatureToggleSettings from "pages/helper/FeatureToggleSettings.vue"; const {sendMsg, inBexMode} = useUtils() @@ -477,7 +452,6 @@ useUiStore().rightDrawerSetActiveTab(DrawerTabs.FEATURES) const view = ref('grid') const indexSize = ref(0) -const devEnabled = ref(settingsStore.isEnabled('dev')) const ddgEnabled = ref(!settingsStore.isEnabled('noDDG')) const ignoreExtensionsEnabled = ref(!settingsStore.isEnabled('extensionsAsTabs')) const permissionsList = ref([]) @@ -526,7 +500,6 @@ let suggestionsCounter = 0 watchEffect(() => { //console.log("watching settingsStore.activeToggles...", settingsStore.activeToggles) - devEnabled.value = settingsStore.isEnabled('dev') ddgEnabled.value = settingsStore.isEnabled('noDDG') ignoreExtensionsEnabled.value = settingsStore.isEnabled('extensionsAsTabs') }) @@ -669,12 +642,5 @@ const simulateStaticSuggestion = () => { const setTab = (a: any) => tab.value = a['tab' as keyof object] -const updateSettings = (ident: string, val: boolean) => { - console.log("settings updated to", ident, val) - settingsStore.setFeatureToggle(ident, val) -} - -const stageIdentifier = () => process.env.TABSETS_STAGE !== 'PRD' ? '(' + process.env.TABSETS_STAGE + ')' : '' - diff --git a/src/pages/SidePanelPage.vue b/src/pages/SidePanelPage.vue index 4f84f565..c24fe8ba 100644 --- a/src/pages/SidePanelPage.vue +++ b/src/pages/SidePanelPage.vue @@ -1,29 +1,29 @@