From 4c3db702e65f32f199bbf8ba1f7461f12df0ce97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20Gr=C3=A4f?= Date: Sat, 17 Feb 2024 13:47:46 +0100 Subject: [PATCH] TAB-489 remove isomorphic-git --- package.json | 2 - src/App.vue | 22 +- src/pages/SidePanelPage.vue | 9 - src/pages/helper/SyncingSettings.vue | 97 +-- src/services/AppService.ts | 15 +- ...vice.ts => FirestorePersistenceService.ts} | 8 +- .../persistence/GitPersistentService.ts | 680 ------------------ src/services/usePersistenceService.ts | 7 +- src/stores/appStore.ts | 1 - src/stores/authStore.ts | 21 +- yarn.lock | 105 +-- 11 files changed, 33 insertions(+), 934 deletions(-) rename src/services/persistence/{FsPersistenceService.ts => FirestorePersistenceService.ts} (97%) delete mode 100644 src/services/persistence/GitPersistentService.ts diff --git a/package.json b/package.json index 92cc68f5..3db394ff 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "@editorjs/editorjs": "^2.27.2", "@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", @@ -59,7 +58,6 @@ "html-to-text": "^9.0.4", "idb": "^8.0.0", "idraw": "^0.3.1", - "isomorphic-git": "^1.25.5", "jwt-decode": "^3.1.2", "keytar": "^7.9.0", "lodash": "^4.17.21", diff --git a/src/App.vue b/src/App.vue index f337d451..f987eb4e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -13,7 +13,7 @@ import {getAuth, isSignInWithEmailLink, onAuthStateChanged, signInWithEmailLink, import {CURRENT_USER_EMAIL, CURRENT_USER_ID} from "boot/constants"; import {useSuggestionsStore} from "stores/suggestionsStore"; import {StaticSuggestionIdent, Suggestion} from "src/models/Suggestion"; -import {useRoute, useRouter} from "vue-router"; +import {useRouter} from "vue-router"; import {collection, doc, getDoc, getDocs} from "firebase/firestore"; import {Account, UserData} from "src/models/Account"; import FirebaseService from "src/services/firebase/FirebaseService"; @@ -28,7 +28,6 @@ const {handleError} = useNotificationHandler() const emitter = new EventEmitter() emitter.setMaxListeners(12) - FirebaseService.init() const auth = FirebaseService.getAuth() const firestore = FirebaseService.getFirestore() @@ -39,26 +38,9 @@ onAuthStateChanged(auth, async (user) => { // https://firebase.google.com/docs/reference/js/auth.user console.log("%conAuthStateChanged: about to log in", "border:1px solid green") - // --- if we do this in useAuthStore.setUser(), we cannot properly run vitest anymore (!?!) // TODO revisit now try { - const userDoc = await getDoc(doc(firestore, "users", user.uid)) - const userData = userDoc.data() as UserData - const account = new Account(user.uid, userData) - console.log("created account object", account) - const querySnapshot = await getDocs(collection(firestore, "users", user.uid, "subscriptions")) - const products = new Set() - querySnapshot.forEach((doc) => { - const subscriptionData = doc.data() - if (subscriptionData.data && subscriptionData.data.metadata) { - products.add(subscriptionData.data.metadata.product) - } - account.setProducts(Array.from(products)) - //console.log("hier", account, products) - }) - // --- end of statement - - await AppService.init($q, router, true, user, account) + await AppService.init($q, router, true, user) } catch (error:any) { console.log("%ccould not initialize appService due to " + error, "background-color:orangered") console.error("error", error, typeof error, error.code, error.message) diff --git a/src/pages/SidePanelPage.vue b/src/pages/SidePanelPage.vue index f68000f2..4f84f565 100644 --- a/src/pages/SidePanelPage.vue +++ b/src/pages/SidePanelPage.vue @@ -308,15 +308,6 @@ diff --git a/src/pages/helper/SyncingSettings.vue b/src/pages/helper/SyncingSettings.vue index 3d453685..ca70af4d 100644 --- a/src/pages/helper/SyncingSettings.vue +++ b/src/pages/helper/SyncingSettings.vue @@ -25,15 +25,6 @@ Your tabset data is only available on your local machine and the current browser. If you want to use tabsets on other computers and/or browsers, you need to set up syncing. -
- Sync your tabsets across browsers and computers via a github repository.
- This is suitable if you do not have too many tabsets and performance is not your first concern.

- You need to provide a github repository URL and a personal access token (e.g. for - github: github example).

- Initially, the repository should be empty. If you chose a public repository, everybody is able to access your stored tabsets. -
Sync your tabsets across browsers and computers via a database (not yet supported)
@@ -43,47 +34,6 @@
- - - - - -