Skip to content

Commit

Permalink
distinguishing app version, ie 1.0.1 from BT file version saved in or…
Browse files Browse the repository at this point in the history
…g text
  • Loading branch information
tconfrey committed Jun 12, 2024
1 parent 954c3c0 commit c1eb560
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 14 deletions.
4 changes: 2 additions & 2 deletions app/bt.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions app/configManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand All @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions app/fileManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion app/messageManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const messageManager = (() => {
"Browser Tab Group to BrainTool Topic syncing is now enabled."
];
const introSlidesArray = [
`<p><i style="color: #A22; font-size: 12px;">NB This is the 1.0 Release-Candidate please send feedback to [email protected]</i></p><p>This window is the <b>Topic Manager</b>.</p><p>It allows you to open and close tabs, tab groups, and browser windows, organize them into nested <b>Topics</b> and find them again when you need them.</p><img class="introImage" src="resources/slide1.png"/>`,
`<p>This window is the <b>Topic Manager</b>.</p><p>It allows you to open and close tabs, tab groups, and browser windows, organize them into nested <b>Topics</b> and find them again when you need them.</p><img class="introImage" src="resources/slide1.png"/>`,
`<p>The BrainTool <b>Bookmarker</b> tool lives in the browser bar.</p><p>It allows you to save the current tab, tab group, window or session under a named <b>Topic</b>, along with an optional note.</p><p>Pin it for easy access.</p><img class="introImage" src="resources/slide2.png"/>`,
`<p>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.</p><img class="introImage" src="resources/slide3.png"/>`,
`<p>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.</p><img class="introImage" src="resources/slide4.png"/>`,
Expand Down
4 changes: 2 additions & 2 deletions versions/1.0.0/app/bt.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions versions/1.0.0/app/configManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand All @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions versions/1.0.0/app/fileManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
8 changes: 4 additions & 4 deletions versions/1.0.0/app/messageManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand All @@ -32,7 +32,7 @@ const messageManager = (() => {
"See BrainTool.org for the BrainTool blog and other info.",
"Follow <a target='_blank' href='https://twitter.com/ABraintool'>@ABrainTool</a> 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.`,
Expand All @@ -45,7 +45,7 @@ const messageManager = (() => {
"<span class='emoji'>&#128512;</span> You can use emojis to <span class='emoji'>&#127774;</span> brighten up your topic names. <span class='emoji'>&#128079; &#128736;</span>"
];
const messageArray = [
"Welcome to BrainTool 1.0!<br/>See the <a target='_blank' href='https://braintool.org/support/releaseNotes.html'>release notes</a> for a list of changes.",
"Welcome to the BrainTool 1.0 release candidate!<br/>See the <a target='_blank' href='https://braintool.org/support/releaseNotes.html'>release notes</a> for a list of changes.",
"Local file syncing is now available. See Settings.<br/>NB GDrive syncing must be off (see Actions).",
"Browser Tab Group to BrainTool Topic syncing is now enabled."
];
Expand Down
2 changes: 1 addition & 1 deletion versions/1.0.0/extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c1eb560

Please sign in to comment.