diff --git a/package.json b/package.json
index 604c1c70..c7d2bd6a 100644
--- a/package.json
+++ b/package.json
@@ -37,6 +37,7 @@
"@editorjs/header": "^2.7.0",
"@extractus/feed-extractor": "^7.0.1",
"@isomorphic-git/lightning-fs": "^4.6.0",
+ "@logtail/browser": "^0.4.19",
"@mozilla/readability": "^0.5.0",
"@quasar/extras": "^1.16.6",
"@stripe/stripe-js": "^2.2.2",
diff --git a/quasar.config.js b/quasar.config.js
index 29ba544b..3e4beaa3 100644
--- a/quasar.config.js
+++ b/quasar.config.js
@@ -30,7 +30,8 @@ module.exports = configure(function (ctx) {
//'i18n',
'constants',
'firebase',
- 'auth0'
+ 'auth0',
+ 'logtail'
],
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
diff --git a/src/App.vue b/src/App.vue
index e84876dc..5e671d36 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -18,6 +18,7 @@ import {useAuthStore} from "stores/auth";
import {useSettingsStore} from "stores/settingsStore";
import {Logz} from "src/services/logz/Logz";
import {EventEmitter} from "events";
+import {logtail} from "boot/logtail";
const tabsStore = useTabsStore()
const settingsStore = useSettingsStore()
@@ -100,7 +101,9 @@ watchEffect(() => {
const selectedTSId = localStorage.getItem("selectedTabset")
// })
- Logz.info({"message": "user logged in", "username": auth0.user.value?.name})
+ //Logz.info({"message": "user logged in", "username": auth0.user.value?.name})
+
+ logtail.info("user logged in", {"username": auth0.user.value?.name})
}
}
diff --git a/src/boot/constants.ts b/src/boot/constants.ts
index 4c8351c1..1426993b 100644
--- a/src/boot/constants.ts
+++ b/src/boot/constants.ts
@@ -1,4 +1,5 @@
import {boot} from 'quasar/wrappers'
+import {Logtail} from "@logtail/browser";
const INDEX_DB_VERSION = 18
@@ -38,6 +39,11 @@ const SYNC_COUCHDB_USERNAME = "sync.couchdb.username"
const SYNC_COUCHDB_PASSWORD = "sync.couchdb.password"
const SYNC_COUCHDB_URL = "sync.couchdb.url"
+
+const logtail = (process.env.MODE === "bex") ?
+ new Logtail("Ht8PY3XGQgqhMyNTcyGyJhXJ") :
+ new Logtail("pNfaHtRmWXGd3TFbsCXMHHbB")
+
export default boot(({}) => {
})
@@ -60,6 +66,7 @@ export {
SYNC_COUCHDB_USERNAME,
SYNC_COUCHDB_PASSWORD,
SYNC_COUCHDB_URL,
- TITLE_IDENT
+ TITLE_IDENT,
+ logtail
}
diff --git a/src/boot/logtail.ts b/src/boot/logtail.ts
new file mode 100644
index 00000000..c972fb7a
--- /dev/null
+++ b/src/boot/logtail.ts
@@ -0,0 +1,14 @@
+import {boot} from 'quasar/wrappers'
+import {Logtail} from "@logtail/browser";
+
+const logtail = (process.env.MODE === "bex") ?
+ new Logtail("Ht8PY3XGQgqhMyNTcyGyJhXJ") :
+ new Logtail("pNfaHtRmWXGd3TFbsCXMHHbB")
+
+export default boot(({}) => {
+})
+
+export {
+ logtail
+}
+
diff --git a/src/pages/SidePanelPage.vue b/src/pages/SidePanelPage.vue
index 75232ad8..5300df80 100644
--- a/src/pages/SidePanelPage.vue
+++ b/src/pages/SidePanelPage.vue
@@ -234,7 +234,11 @@
{{ toolbarTitle(tabsets as Tabset[]) }}
- Tabsets is synced via git
+ Tabsets are being synced
+
+
+ Tabsets are being synced automatically
diff --git a/src/services/persistence/GitPersistentService.ts b/src/services/persistence/GitPersistentService.ts
index 6760cb72..b7ed2e6f 100644
--- a/src/services/persistence/GitPersistentService.ts
+++ b/src/services/persistence/GitPersistentService.ts
@@ -23,7 +23,7 @@ import {useTabsStore} from "stores/tabsStore";
import {useSpacesStore} from "stores/spacesStore";
import {LocalStorage, uid} from "quasar";
import {SyncType} from "stores/appStore";
-import {SYNC_GITHUB_TOKEN} from "boot/constants";
+import {SUBSCRIPTION_ID_IDENT, SYNC_GITHUB_TOKEN, SYNC_GITHUB_URL} from "boot/constants";
if (typeof self !== 'undefined') {
self.Buffer = Buffer;
@@ -76,8 +76,9 @@ class GitPersistenceService implements PersistenceService {
useUiStore().dbReady = true
return Promise.resolve("done")
} else if (syncType === SyncType.MANAGED_GIT) {
+ const subscription = LocalStorage.getItem(SUBSCRIPTION_ID_IDENT) as string
console.log("=== initializing managed git ===", url)
- this.db = await this.initDatabase(url, this.tabsetsCorsProxy)
+ this.db = await this.initDatabase("https://tabsets.git/" + subscription, this.tabsetsCorsProxy)
console.log("=== initializing managed git done ===")
useUiStore().dbReady = true
return Promise.resolve("done")
diff --git a/yarn.lock b/yarn.lock
index 26e073be..4cd92209 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1937,6 +1937,38 @@
dependencies:
call-bind "^1.0.2"
+"@logtail/browser@^0.4.19":
+ version "0.4.19"
+ resolved "https://registry.yarnpkg.com/@logtail/browser/-/browser-0.4.19.tgz#05601693df03751252f648319aa9217f1366d64d"
+ integrity sha512-85exfHL4KbsfmzbYlVKwq7au4BuOceFNQJuPTNkt51dai5rBvhxf7k1VbYM8jCS8cHIj3VdyNLl+2VpsqokBRQ==
+ dependencies:
+ "@logtail/core" "^0.4.19"
+ "@logtail/tools" "^0.4.19"
+ cross-fetch "^3.0.4"
+
+"@logtail/core@^0.4.19":
+ version "0.4.19"
+ resolved "https://registry.yarnpkg.com/@logtail/core/-/core-0.4.19.tgz#bc657d77af0200267ab25682a5f9a30c55c274c7"
+ integrity sha512-IjvMwSyv2LucVoS+2PXzAVG5cTd/50W3dENpC+ePMlAfbKAR5h4eTIOT9GC7zcEBtog6RBJChHApyj4rOvgbYA==
+ dependencies:
+ "@logtail/tools" "^0.4.19"
+ "@logtail/types" "^0.4.19"
+ serialize-error "^8.1.0"
+
+"@logtail/tools@^0.4.19":
+ version "0.4.19"
+ resolved "https://registry.yarnpkg.com/@logtail/tools/-/tools-0.4.19.tgz#824df744bfedc13dbfe8ea1715bd2ed84523b72d"
+ integrity sha512-6wtf5iJgKMpF2sn8mHOEA2GzluXlBjt6aK0YXzv6IuRhKL4dzk52jjkFWXwgVfA4xf53nhHRGA/SrGOPm6K9bQ==
+ dependencies:
+ "@logtail/types" "^0.4.19"
+
+"@logtail/types@^0.4.19":
+ version "0.4.19"
+ resolved "https://registry.yarnpkg.com/@logtail/types/-/types-0.4.19.tgz#e2d49a9a718d4dcb15367fcd4b68cef32f1fe68e"
+ integrity sha512-VlrysIpc2H8faZkR0u07pUnuqAArLRgfCVbSD0dtvXgLbkCAGgCCqveAZk99uv6XVxXH/GhH3OUoUoFaGUSTwg==
+ dependencies:
+ js "^0.1.0"
+
"@malept/cross-spawn-promise@^1.1.0":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz#504af200af6b98e198bce768bc1730c6936ae01d"
@@ -4103,6 +4135,13 @@ commander@^9.3.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30"
integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==
+commander@~1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-1.1.1.tgz#50d1651868ae60eccff0a2d9f34595376bc6b041"
+ integrity sha512-71Rod2AhcH3JhkBikVpNd0pA+fWsmAaVoti6OR38T76chA7vE3pSerS0Jor4wDw+tOueD2zLVvFOw5H0Rcj7rA==
+ dependencies:
+ keypress "0.1.x"
+
commist@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/commist/-/commist-3.2.0.tgz#da9c8e5f245ac21510badc4b10c46b5bcc9b56cd"
@@ -4275,6 +4314,13 @@ cross-fetch@4.0.0, cross-fetch@^4.0.0:
dependencies:
node-fetch "^2.6.12"
+cross-fetch@^3.0.4:
+ version "3.1.8"
+ resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82"
+ integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==
+ dependencies:
+ node-fetch "^2.6.12"
+
cross-spawn-windows-exe@^1.1.0, cross-spawn-windows-exe@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/cross-spawn-windows-exe/-/cross-spawn-windows-exe-1.2.0.tgz#46253b0f497676e766faf4a7061004618b5ac5ec"
@@ -6870,6 +6916,13 @@ js-tokens@^4.0.0:
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
+js@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/js/-/js-0.1.0.tgz#e1d0afd55ea39c2b28da304e8143eaf2c133f366"
+ integrity sha512-ZBbGYOpact8QAH9RprFWL4RAESYwbDodxiuDjOnzwzzk9pBzKycoifGuUrHHcDixE/eLMKPHRaXenTgu1qXBqA==
+ dependencies:
+ commander "~1.1.1"
+
jsbn@~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
@@ -7026,6 +7079,11 @@ jwt-decode@^3.1.2:
resolved "https://registry.yarnpkg.com/jwt-decode/-/jwt-decode-3.1.2.tgz#3fb319f3675a2df0c2895c8f5e9fa4b67b04ed59"
integrity sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==
+keypress@0.1.x:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/keypress/-/keypress-0.1.0.tgz#4a3188d4291b66b4f65edb99f806aa9ae293592a"
+ integrity sha512-x0yf9PL/nx9Nw9oLL8ZVErFAk85/lslwEP7Vz7s5SI1ODXZIgit3C5qyWjw4DxOuO/3Hb4866SQh28a1V1d+WA==
+
keytar@^7.9.0:
version "7.9.0"
resolved "https://registry.yarnpkg.com/keytar/-/keytar-7.9.0.tgz#4c6225708f51b50cbf77c5aae81721964c2918cb"
@@ -9161,6 +9219,13 @@ serialize-error@^7.0.1:
dependencies:
type-fest "^0.13.1"
+serialize-error@^8.1.0:
+ version "8.1.0"
+ resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-8.1.0.tgz#3a069970c712f78634942ddd50fbbc0eaebe2f67"
+ integrity sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==
+ dependencies:
+ type-fest "^0.20.2"
+
serialize-javascript@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa"
@@ -9971,6 +10036,11 @@ type-fest@^0.16.0:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.16.0.tgz#3240b891a78b0deae910dbeb86553e552a148860"
integrity sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==
+type-fest@^0.20.2:
+ version "0.20.2"
+ resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"
+ integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==
+
type-fest@^0.21.3:
version "0.21.3"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37"