Compare commits
6 Commits
chrome-0.0
...
chrome-0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2960743e1 | ||
|
|
4b7d8d4a8d | ||
|
|
a973b1edad | ||
|
|
312a3666d7 | ||
|
|
142b313867 | ||
|
|
b21701f677 |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "gooti-extension",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "gooti-extension",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"dependencies": {
|
||||
"@angular/animations": "^19.0.0",
|
||||
"@angular/common": "^19.0.0",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "gooti-extension",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"custom": {
|
||||
"chrome": {
|
||||
"version": "0.0.1"
|
||||
"version": "0.0.2"
|
||||
},
|
||||
"firefox": {
|
||||
"version": "0.0.0"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"version": "0.0.1",
|
||||
"homepage_url": "https://getgooti.com",
|
||||
"permissions": [
|
||||
"activeTab",
|
||||
"windows",
|
||||
"storage"
|
||||
],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Component, inject, OnInit } from '@angular/core';
|
||||
import { RouterOutlet } from '@angular/router';
|
||||
import { LoggerService } from '@common';
|
||||
import { StartupService } from './services/startup/startup.service';
|
||||
import { LoggerService, StartupService } from '@common';
|
||||
import { getNewStorageServiceConfig } from './common/data/get-new-storage-service-config';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
@@ -15,6 +15,7 @@ export class AppComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
this.#logger.initialize('Gooti Chrome Extension');
|
||||
this.#startup.startOver();
|
||||
|
||||
this.#startup.startOver(getNewStorageServiceConfig());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { StorageServiceConfig } from '@common';
|
||||
import { ChromeSessionHandler } from './chrome-session-handler';
|
||||
import { ChromeSyncYesHandler } from './chrome-sync-yes-handler';
|
||||
import { ChromeSyncNoHandler } from './chrome-sync-no-handler';
|
||||
import { ChromeMetaHandler } from './chrome-meta-handler';
|
||||
|
||||
export const getNewStorageServiceConfig = () => {
|
||||
const storageConfig: StorageServiceConfig = {
|
||||
browserSessionHandler: new ChromeSessionHandler(),
|
||||
browserSyncYesHandler: new ChromeSyncYesHandler(),
|
||||
browserSyncNoHandler: new ChromeSyncNoHandler(),
|
||||
gootiMetaHandler: new ChromeMetaHandler(),
|
||||
};
|
||||
|
||||
return storageConfig;
|
||||
};
|
||||
@@ -4,9 +4,10 @@ import {
|
||||
BrowserSyncFlow,
|
||||
ConfirmComponent,
|
||||
DateHelper,
|
||||
StartupService,
|
||||
StorageService,
|
||||
} from '@common';
|
||||
import { StartupService } from '../../../services/startup/startup.service';
|
||||
import { getNewStorageServiceConfig } from '../../../common/data/get-new-storage-service-config';
|
||||
|
||||
@Component({
|
||||
selector: 'app-settings',
|
||||
@@ -43,7 +44,7 @@ export class SettingsComponent implements OnInit {
|
||||
async onDeleteVault() {
|
||||
try {
|
||||
await this.#storage.deleteVault();
|
||||
this.#startup.startOver();
|
||||
this.#startup.startOver(getNewStorageServiceConfig());
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
// TODO
|
||||
@@ -68,7 +69,7 @@ export class SettingsComponent implements OnInit {
|
||||
await this.#storage.deleteVault(true);
|
||||
await this.#storage.importVault(vault);
|
||||
this.#storage.isInitialized = false;
|
||||
this.#startup.startOver();
|
||||
this.#startup.startOver(getNewStorageServiceConfig());
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
// TODO
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { BrowserSyncData, StorageService } from '@common';
|
||||
import { StartupService } from '../../../services/startup/startup.service';
|
||||
import { BrowserSyncData, StartupService, StorageService } from '@common';
|
||||
import { getNewStorageServiceConfig } from '../../../common/data/get-new-storage-service-config';
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
@@ -27,7 +27,7 @@ export class HomeComponent {
|
||||
console.log(vault);
|
||||
|
||||
await this.#storage.importVault(vault);
|
||||
this.#startup.startOver();
|
||||
this.#startup.startOver(getNewStorageServiceConfig());
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
// TODO
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
import { ConfirmComponent, StorageService } from '@common';
|
||||
import { StartupService } from '../../services/startup/startup.service';
|
||||
import { ConfirmComponent, StartupService, StorageService } from '@common';
|
||||
import { getNewStorageServiceConfig } from '../../common/data/get-new-storage-service-config';
|
||||
|
||||
@Component({
|
||||
selector: 'app-vault-login',
|
||||
@@ -46,7 +46,7 @@ export class VaultLoginComponent {
|
||||
async onClickDeleteVault() {
|
||||
try {
|
||||
await this.#storage.deleteVault();
|
||||
this.#startup.startOver();
|
||||
this.#startup.startOver(getNewStorageServiceConfig());
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
// TODO
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import { LoggerService, StorageService, StorageServiceConfig } from '@common';
|
||||
import { ChromeSessionHandler } from '../../common/data/chrome-session-handler';
|
||||
import { ChromeSyncYesHandler } from '../../common/data/chrome-sync-yes-handler';
|
||||
import { ChromeSyncNoHandler } from '../../common/data/chrome-sync-no-handler';
|
||||
import { ChromeMetaHandler } from '../../common/data/chrome-meta-handler';
|
||||
import { Router } from '@angular/router';
|
||||
import { LoggerService } from '../logger/logger.service';
|
||||
import {
|
||||
StorageService,
|
||||
StorageServiceConfig,
|
||||
} from '../storage/storage.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@@ -14,14 +14,7 @@ export class StartupService {
|
||||
readonly #storage = inject(StorageService);
|
||||
readonly #router = inject(Router);
|
||||
|
||||
async startOver() {
|
||||
const storageConfig: StorageServiceConfig = {
|
||||
browserSessionHandler: new ChromeSessionHandler(),
|
||||
browserSyncYesHandler: new ChromeSyncYesHandler(),
|
||||
browserSyncNoHandler: new ChromeSyncNoHandler(),
|
||||
gootiMetaHandler: new ChromeMetaHandler(),
|
||||
};
|
||||
|
||||
async startOver(storageConfig: StorageServiceConfig) {
|
||||
this.#storage.initialize(storageConfig);
|
||||
|
||||
// Step 0:
|
||||
@@ -21,6 +21,7 @@ export * from './lib/services/storage/browser-sync-handler';
|
||||
export * from './lib/services/storage/browser-session-handler';
|
||||
export * from './lib/services/storage/gooti-meta-handler';
|
||||
export * from './lib/services/logger/logger.service';
|
||||
export * from './lib/services/startup/startup.service';
|
||||
|
||||
// Components
|
||||
export * from './lib/components/icon-button/icon-button.component';
|
||||
|
||||
Reference in New Issue
Block a user