mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-21 02:48:00 +00:00
updated config sync settings tab
This commit is contained in:
@@ -406,6 +406,14 @@ export class ConfigService {
|
|||||||
}
|
}
|
||||||
config.version = 6
|
config.version = 6
|
||||||
}
|
}
|
||||||
|
if (config.version < 7) {
|
||||||
|
if (!config.configSync?.host || config.configSync?.host === 'https://api.tabby.sh') {
|
||||||
|
config.configSync ??= {}
|
||||||
|
delete config.configSync.host
|
||||||
|
delete config.configSync.token
|
||||||
|
}
|
||||||
|
config.version = 7
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async maybeDecryptConfig (store) {
|
private async maybeDecryptConfig (store) {
|
||||||
|
@@ -20,7 +20,7 @@ ul.nav-tabs(ngbNav, #nav='ngbNav')
|
|||||||
)
|
)
|
||||||
i.fas.fa-external-link-alt
|
i.fas.fa-external-link-alt
|
||||||
|
|
||||||
.form-line
|
.form-line(*ngIf='config.store.configSync.token')
|
||||||
.header
|
.header
|
||||||
.title(translate) Secret sync token
|
.title(translate) Secret sync token
|
||||||
.description(translate) Get it from the Tabby Web settings window
|
.description(translate) Get it from the Tabby Web settings window
|
||||||
@@ -36,6 +36,11 @@ ul.nav-tabs(ngbNav, #nav='ngbNav')
|
|||||||
i.fas.fa-fw.fa-check.text-success(*ngIf='connectionSuccessful')
|
i.fas.fa-fw.fa-check.text-success(*ngIf='connectionSuccessful')
|
||||||
i.fas.fa-fw.fa-exclamation-triangle.text-danger(*ngIf='connectionSuccessful === false')
|
i.fas.fa-fw.fa-exclamation-triangle.text-danger(*ngIf='connectionSuccessful === false')
|
||||||
|
|
||||||
|
.alert.alert-info.d-flex.align-items-center
|
||||||
|
.me-auto
|
||||||
|
span(translate) Config sync requires an instance of the Tabby Web service.
|
||||||
|
a.ml-1((click)='openTabbyWebInfo()', href='#', translate) Learn more
|
||||||
|
|
||||||
ng-container(*ngIf='config.store.configSync.token')
|
ng-container(*ngIf='config.store.configSync.token')
|
||||||
.alert.alert-danger(*ngIf='connectionSuccessful === false')
|
.alert.alert-danger(*ngIf='connectionSuccessful === false')
|
||||||
i.fas.fa-exclamation-triangle
|
i.fas.fa-exclamation-triangle
|
||||||
|
@@ -141,4 +141,8 @@ export class ConfigSyncSettingsTabComponent extends BaseComponent {
|
|||||||
this.platform.openExternal(this.config.store.configSync.host)
|
this.platform.openExternal(this.config.store.configSync.host)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
openTabbyWebInfo () {
|
||||||
|
this.platform.openExternal('https://github.com/Eugeny/tabby-web')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,8 +4,8 @@ import { ConfigProvider, Platform } from 'tabby-core'
|
|||||||
export class SettingsConfigProvider extends ConfigProvider {
|
export class SettingsConfigProvider extends ConfigProvider {
|
||||||
defaults = {
|
defaults = {
|
||||||
configSync: {
|
configSync: {
|
||||||
host: 'https://api.tabby.sh',
|
host: null,
|
||||||
token: '',
|
token: null,
|
||||||
configID: null,
|
configID: null,
|
||||||
auto: false,
|
auto: false,
|
||||||
parts: {
|
parts: {
|
||||||
|
Reference in New Issue
Block a user