mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
feat: remove ionic storage (#1839)
* feat: remove ionic storage * grayscal when disconncted, rename local storage service for clarity * remove storage from package lock * update patchDB Co-authored-by: Matt Hill <matthewonthemoon@gmail.com>
This commit is contained in:
committed by
Aiden McClelland
parent
78ad5d5879
commit
141a390105
@@ -46,9 +46,8 @@ export class LoginPage {
|
||||
})
|
||||
|
||||
this.password = ''
|
||||
this.authService
|
||||
.setVerified()
|
||||
.then(() => this.router.navigate([''], { replaceUrl: true }))
|
||||
this.authService.setVerified()
|
||||
this.router.navigate([''], { replaceUrl: true })
|
||||
} catch (e: any) {
|
||||
// code 7 is for incorrect password
|
||||
this.error = e.code === 7 ? 'Invalid Password' : e.message
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
PackageDataEntry,
|
||||
PackageState,
|
||||
} from 'src/app/services/patch-db/data-model'
|
||||
import { LocalStorageService } from 'src/app/services/local-storage.service'
|
||||
import { ClientStorageService } from 'src/app/services/client-storage.service'
|
||||
import { MarketplaceService } from 'src/app/services/marketplace.service'
|
||||
import { hasCurrentDeps } from 'src/app/util/has-deps'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
@@ -37,13 +37,13 @@ export class MarketplaceShowControlsComponent {
|
||||
@Input()
|
||||
localPkg!: PackageDataEntry | null
|
||||
|
||||
readonly showDevTools$ = this.localStorageService.showDevTools$
|
||||
readonly showDevTools$ = this.ClientStorageService.showDevTools$
|
||||
|
||||
readonly PackageState = PackageState
|
||||
|
||||
constructor(
|
||||
private readonly alertCtrl: AlertController,
|
||||
private readonly localStorageService: LocalStorageService,
|
||||
private readonly ClientStorageService: ClientStorageService,
|
||||
@Inject(AbstractMarketplaceService)
|
||||
private readonly marketplaceService: MarketplaceService,
|
||||
private readonly loadingCtrl: LoadingController,
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from 'src/app/modals/generic-input/generic-input.component'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { ServerConfigService } from 'src/app/services/server-config.service'
|
||||
import { LocalStorageService } from '../../../services/local-storage.service'
|
||||
import { ClientStorageService } from '../../../services/client-storage.service'
|
||||
import {
|
||||
ServerNameInfo,
|
||||
ServerNameService,
|
||||
@@ -36,7 +36,7 @@ export class PreferencesPage {
|
||||
private readonly modalCtrl: ModalController,
|
||||
private readonly api: ApiService,
|
||||
private readonly toastCtrl: ToastController,
|
||||
private readonly localStorageService: LocalStorageService,
|
||||
private readonly ClientStorageService: ClientStorageService,
|
||||
private readonly patch: PatchDB<DataModel>,
|
||||
private readonly serverNameService: ServerNameService,
|
||||
readonly serverConfig: ServerConfigService,
|
||||
@@ -83,7 +83,7 @@ export class PreferencesPage {
|
||||
this.clicks++
|
||||
if (this.clicks >= 5) {
|
||||
this.clicks = 0
|
||||
const newVal = await this.localStorageService.toggleShowDevTools()
|
||||
const newVal = this.ClientStorageService.toggleShowDevTools()
|
||||
const toast = await this.toastCtrl.create({
|
||||
header: newVal ? 'Dev tools unlocked' : 'Dev tools hidden',
|
||||
position: 'bottom',
|
||||
|
||||
@@ -12,7 +12,7 @@ import { ServerNameService } from 'src/app/services/server-name.service'
|
||||
import { Observable, of } from 'rxjs'
|
||||
import { ErrorToastService } from '@start9labs/shared'
|
||||
import { EOSService } from 'src/app/services/eos.service'
|
||||
import { LocalStorageService } from 'src/app/services/local-storage.service'
|
||||
import { ClientStorageService } from 'src/app/services/client-storage.service'
|
||||
import { OSUpdatePage } from 'src/app/modals/os-update/os-update.page'
|
||||
import { getAllPackages } from '../../../util/get-package-data'
|
||||
import { AuthService } from 'src/app/services/auth.service'
|
||||
@@ -29,7 +29,7 @@ export class ServerShowPage {
|
||||
readonly server$ = this.patch.watch$('server-info')
|
||||
readonly name$ = this.serverNameService.name$
|
||||
readonly showUpdate$ = this.eosService.showUpdate$
|
||||
readonly showDiskRepair$ = this.localStorageService.showDiskRepair$
|
||||
readonly showDiskRepair$ = this.ClientStorageService.showDiskRepair$
|
||||
|
||||
constructor(
|
||||
private readonly alertCtrl: AlertController,
|
||||
@@ -41,7 +41,7 @@ export class ServerShowPage {
|
||||
private readonly route: ActivatedRoute,
|
||||
private readonly patch: PatchDB<DataModel>,
|
||||
private readonly eosService: EOSService,
|
||||
private readonly localStorageService: LocalStorageService,
|
||||
private readonly ClientStorageService: ClientStorageService,
|
||||
private readonly serverNameService: ServerNameService,
|
||||
private readonly authService: AuthService,
|
||||
) {}
|
||||
@@ -511,11 +511,11 @@ export class ServerShowPage {
|
||||
return 0
|
||||
}
|
||||
|
||||
async addClick() {
|
||||
addClick() {
|
||||
this.clicks++
|
||||
if (this.clicks >= 5) {
|
||||
this.clicks = 0
|
||||
await this.localStorageService.toggleShowDiskRepair()
|
||||
this.ClientStorageService.toggleShowDiskRepair()
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.clicks = Math.max(this.clicks - 1, 0)
|
||||
|
||||
Reference in New Issue
Block a user