From c1eb560fc39659cf7abf01c2874fd83d19a9f12d Mon Sep 17 00:00:00 2001 From: tconfrey Date: Wed, 12 Jun 2024 12:41:41 -0400 Subject: [PATCH] distinguishing app version, ie 1.0.1 from BT file version saved in org text --- app/bt.js | 4 ++-- app/configManager.js | 4 ++-- app/fileManager.js | 5 +++++ app/messageManager.js | 2 +- versions/1.0.0/app/bt.js | 4 ++-- versions/1.0.0/app/configManager.js | 4 ++-- versions/1.0.0/app/fileManager.js | 5 +++++ versions/1.0.0/app/messageManager.js | 8 ++++---- versions/1.0.0/extension/manifest.json | 2 +- 9 files changed, 24 insertions(+), 14 deletions(-) diff --git a/app/bt.js b/app/bt.js index e03e721..ef1c012 100644 --- a/app/bt.js +++ b/app/bt.js @@ -103,8 +103,8 @@ function updateStats() { // NB before gtag calls some stats as for the previous session (eg BTSessionStartTime) // Record this launch and software version - const BTVersion = configManager.getProp('BTVersion'); - gtag('event', 'launch_'+BTVersion, {'event_category': 'General', 'event_label': BTVersion, + const BTAppVersion = configManager.getProp('BTAppVersion'); + gtag('event', 'launch_'+BTAppVersion, {'event_category': 'General', 'event_label': BTAppVersion, 'value': 1}); if (InitialInstall) { gtag('event', 'install', {'event_category': 'General', 'event_label': InitialInstall, diff --git a/app/configManager.js b/app/configManager.js index 4fbe210..f21aebd 100644 --- a/app/configManager.js +++ b/app/configManager.js @@ -26,7 +26,7 @@ const configManager = (() => { const Properties = { 'keys': ['CLIENT_ID', 'API_KEY', 'FB_KEY', 'STRIPE_KEY'], - 'localStorageProps': ['BTId', 'BTTimestamp', 'BTFileID', 'BTGDriveConnected', 'BTStats', 'BTLastShownMessageIndex', 'BTManagerHome', 'BTStickyTabs', + 'localStorageProps': ['BTId', 'BTTimestamp', 'BTFileID', 'BTAppVersion', 'BTGDriveConnected', 'BTStats', 'BTLastShownMessageIndex', 'BTManagerHome', 'BTStickyTabs', 'BTTheme', 'BTFavicons', 'BTNotes', 'BTDense', 'BTSize', 'BTTooltips', 'BTGroupingMode', 'BTDontShowIntro', 'BTExpiry'], 'orgProps': ['BTCohort', 'BTVersion', 'BTId'], 'stats': ['BTNumTabOperations', 'BTNumSaves', 'BTNumLaunches', 'BTInstallDate', 'BTSessionStartTime', 'BTLastActivityTime', 'BTSessionStartSaves', 'BTSessionStartOps', 'BTDaysOfUse'], @@ -37,7 +37,7 @@ const configManager = (() => { // takes message from background/Content script and pulls out settings Config = msg.Config || {}; if (!Config['BTStats']) Config['BTStats'] = {}; - if (msg.BTVersion) Config['BTVersion'] = msg.BTVersion; + if (msg.BTVersion) Config['BTAppVersion'] = msg.BTVersion; Keys.CLIENT_ID = msg.client_id; Keys.API_KEY = msg.api_key; Keys.FB_KEY = msg.fb_key; diff --git a/app/fileManager.js b/app/fileManager.js index 6f32da6..408f8a6 100644 --- a/app/fileManager.js +++ b/app/fileManager.js @@ -52,6 +52,11 @@ async function saveBT(localOnly = false, newContent = true) { // Don't force GDrive re-auth if we're just folding/unfolding console.log(`Writing BT to ${localOnly ? 'local only' : 'local + any remote'} Storage`); + + // BTVersion is incremented on each content change + let currentBTVersion = parseInt(configManager.getProp('BTVersion')) || 1; + newContent && configManager.setProp('BTVersion', currentBTVersion + 1); + BTFileText = BTAppNode.generateOrgFile(); if (window.LOCALTEST) return; diff --git a/app/messageManager.js b/app/messageManager.js index 4f10b57..f84230b 100644 --- a/app/messageManager.js +++ b/app/messageManager.js @@ -50,7 +50,7 @@ const messageManager = (() => { "Browser Tab Group to BrainTool Topic syncing is now enabled." ]; const introSlidesArray = [ - `

NB This is the 1.0 Release-Candidate please send feedback to braintool.extension@gmail.com

This window is the Topic Manager.

It allows you to open and close tabs, tab groups, and browser windows, organize them into nested Topics and find them again when you need them.

`, + `

This window is the Topic Manager.

It allows you to open and close tabs, tab groups, and browser windows, organize them into nested Topics and find them again when you need them.

`, `

The BrainTool Bookmarker tool lives in the browser bar.

It allows you to save the current tab, tab group, window or session under a named Topic, along with an optional note.

Pin it for easy access.

`, `

Use BrainTool to organize all the tabs you want to save and come back to. Hover over a row for tools to open and close groups of tabs, add notes and todo's or edit the topic hierarchy.

`, `

Everything is kept in plain text in a private local file that you own and can edit, or under your personal Google Drive account for cloud access.

`, diff --git a/versions/1.0.0/app/bt.js b/versions/1.0.0/app/bt.js index e03e721..ef1c012 100644 --- a/versions/1.0.0/app/bt.js +++ b/versions/1.0.0/app/bt.js @@ -103,8 +103,8 @@ function updateStats() { // NB before gtag calls some stats as for the previous session (eg BTSessionStartTime) // Record this launch and software version - const BTVersion = configManager.getProp('BTVersion'); - gtag('event', 'launch_'+BTVersion, {'event_category': 'General', 'event_label': BTVersion, + const BTAppVersion = configManager.getProp('BTAppVersion'); + gtag('event', 'launch_'+BTAppVersion, {'event_category': 'General', 'event_label': BTAppVersion, 'value': 1}); if (InitialInstall) { gtag('event', 'install', {'event_category': 'General', 'event_label': InitialInstall, diff --git a/versions/1.0.0/app/configManager.js b/versions/1.0.0/app/configManager.js index 4fbe210..f21aebd 100644 --- a/versions/1.0.0/app/configManager.js +++ b/versions/1.0.0/app/configManager.js @@ -26,7 +26,7 @@ const configManager = (() => { const Properties = { 'keys': ['CLIENT_ID', 'API_KEY', 'FB_KEY', 'STRIPE_KEY'], - 'localStorageProps': ['BTId', 'BTTimestamp', 'BTFileID', 'BTGDriveConnected', 'BTStats', 'BTLastShownMessageIndex', 'BTManagerHome', 'BTStickyTabs', + 'localStorageProps': ['BTId', 'BTTimestamp', 'BTFileID', 'BTAppVersion', 'BTGDriveConnected', 'BTStats', 'BTLastShownMessageIndex', 'BTManagerHome', 'BTStickyTabs', 'BTTheme', 'BTFavicons', 'BTNotes', 'BTDense', 'BTSize', 'BTTooltips', 'BTGroupingMode', 'BTDontShowIntro', 'BTExpiry'], 'orgProps': ['BTCohort', 'BTVersion', 'BTId'], 'stats': ['BTNumTabOperations', 'BTNumSaves', 'BTNumLaunches', 'BTInstallDate', 'BTSessionStartTime', 'BTLastActivityTime', 'BTSessionStartSaves', 'BTSessionStartOps', 'BTDaysOfUse'], @@ -37,7 +37,7 @@ const configManager = (() => { // takes message from background/Content script and pulls out settings Config = msg.Config || {}; if (!Config['BTStats']) Config['BTStats'] = {}; - if (msg.BTVersion) Config['BTVersion'] = msg.BTVersion; + if (msg.BTVersion) Config['BTAppVersion'] = msg.BTVersion; Keys.CLIENT_ID = msg.client_id; Keys.API_KEY = msg.api_key; Keys.FB_KEY = msg.fb_key; diff --git a/versions/1.0.0/app/fileManager.js b/versions/1.0.0/app/fileManager.js index 6f32da6..408f8a6 100644 --- a/versions/1.0.0/app/fileManager.js +++ b/versions/1.0.0/app/fileManager.js @@ -52,6 +52,11 @@ async function saveBT(localOnly = false, newContent = true) { // Don't force GDrive re-auth if we're just folding/unfolding console.log(`Writing BT to ${localOnly ? 'local only' : 'local + any remote'} Storage`); + + // BTVersion is incremented on each content change + let currentBTVersion = parseInt(configManager.getProp('BTVersion')) || 1; + newContent && configManager.setProp('BTVersion', currentBTVersion + 1); + BTFileText = BTAppNode.generateOrgFile(); if (window.LOCALTEST) return; diff --git a/versions/1.0.0/app/messageManager.js b/versions/1.0.0/app/messageManager.js index 0cbcef9..f84230b 100644 --- a/versions/1.0.0/app/messageManager.js +++ b/versions/1.0.0/app/messageManager.js @@ -20,9 +20,9 @@ const messageManager = (() => { const tipsArray = [ - "Add ':' at the end of a topic in the BT Bookmarker to create a new subtopic.", + "Add ':' at the end of a topic in the BT Saver to create a new subtopic.", "Double click on a table row to highlight its' open window, if any.", - "Type ':TODO' after a topic in the BT Bookmarker to make the item a TODO in the BT tree.", + "Type ':TODO' after a topic in the BT Saver to make the item a TODO in the BT tree.", "Create topics like ToRead or ToWatch to keep track of pages you want to come back to.", "You'll need to Refresh if you've been editing the BrainTool.org file directly.", `${OptionKey}-b is the BrainTool accelerator key. You can change that in extension settings`, @@ -32,7 +32,7 @@ const messageManager = (() => { "See BrainTool.org for the BrainTool blog and other info.", "Follow @ABrainTool on Twitter!", "Check out the Bookmark import/export functions under Actions", - "You can click on the topics shown in the Bookmarker instead of typing out the name.", + "You can click on the topics shown in the Saver instead of typing out the name.", "Use the forward (>>) button on the right to cycle through tips", `Double tap ${OptionKey}-b, or double click the toolbar icon, to surface the BrainTool side panel.`, `When you have an Edit card open, the ${OptionKey}-up/down arrows will open the next/previous card.`, @@ -45,7 +45,7 @@ const messageManager = (() => { "😀 You can use emojis to 🌞 brighten up your topic names. 👏 🛠" ]; const messageArray = [ - "Welcome to BrainTool 1.0!
See the release notes for a list of changes.", + "Welcome to the BrainTool 1.0 release candidate!
See the release notes for a list of changes.", "Local file syncing is now available. See Settings.
NB GDrive syncing must be off (see Actions).", "Browser Tab Group to BrainTool Topic syncing is now enabled." ]; diff --git a/versions/1.0.0/extension/manifest.json b/versions/1.0.0/extension/manifest.json index 9ce2994..745f6e4 100644 --- a/versions/1.0.0/extension/manifest.json +++ b/versions/1.0.0/extension/manifest.json @@ -3,7 +3,7 @@ "name": "__MSG_appName__", "description": "__MSG_appDesc__", "default_locale": "en", - "version": "1.0.0", + "version": "1.0.1", "permissions": ["tabs", "storage", "tabGroups", "webNavigation", "bookmarks"], "background": { "service_worker": "background.js"