mirror of
https://github.com/Eugeny/tabby
synced 2024-12-12 22:32:57 +00:00
lint
This commit is contained in:
parent
4d146941f4
commit
21df033012
3 changed files with 7 additions and 7 deletions
|
@ -16,7 +16,7 @@ export { BootstrapData, PluginInfo, BOOTSTRAP_DATA } from './mainProcess'
|
|||
export { HostWindowService } from './hostWindow'
|
||||
export { HostAppService, Platform } from './hostApp'
|
||||
export { FileProvider } from './fileProvider'
|
||||
export { ProfileProvider, Profile, PartialProfile, ProfileSettingsComponent, ProfileGroup, PartialProfileGroup} from './profileProvider'
|
||||
export { ProfileProvider, Profile, PartialProfile, ProfileSettingsComponent, ProfileGroup, PartialProfileGroup } from './profileProvider'
|
||||
export { PromptModalComponent } from '../components/promptModal.component'
|
||||
export * from './commands'
|
||||
|
||||
|
|
|
@ -372,7 +372,7 @@ export class ConfigService {
|
|||
continue
|
||||
}
|
||||
|
||||
let group = groups.find(x => x.name === (p.group))
|
||||
let group = groups.find(x => x.name === p.group)
|
||||
if (!group) {
|
||||
group = {
|
||||
id: `${uuidv4()}`,
|
||||
|
@ -387,6 +387,7 @@ export class ConfigService {
|
|||
for (const g of groups) {
|
||||
if (profileGroupCollapsed[g.name]) {
|
||||
const collapsed = profileGroupCollapsed[g.name]
|
||||
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
||||
delete profileGroupCollapsed[g.name]
|
||||
profileGroupCollapsed[g.id] = collapsed
|
||||
}
|
||||
|
|
|
@ -80,8 +80,6 @@ export class ProfilesService {
|
|||
return list
|
||||
}
|
||||
|
||||
|
||||
|
||||
providerForProfile <T extends Profile> (profile: PartialProfile<T>): ProfileProvider<T>|null {
|
||||
const provider = this.profileProviders.find(x => x.id === profile.type) ?? null
|
||||
return provider as unknown as ProfileProvider<T>|null
|
||||
|
@ -248,7 +246,8 @@ export class ProfilesService {
|
|||
/**
|
||||
* Set global defaults for a given profile provider
|
||||
*/
|
||||
setProviderDefaults (provider: ProfileProvider<Profile>, pdefaults: any) {
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
setProviderDefaults (provider: ProfileProvider<Profile>, pdefaults: any): void {
|
||||
this.config.store.profileDefaults[provider.id] = pdefaults
|
||||
}
|
||||
|
||||
|
@ -284,7 +283,7 @@ export class ProfilesService {
|
|||
let groups: PartialProfileGroup<ProfileGroup>[] = this.config.store.groups ?? []
|
||||
groups = groups.map(x => {
|
||||
x.editable = true
|
||||
x.collapsed = profileGroupCollapsed[x.id ?? ''] ?? false
|
||||
x.collapsed = profileGroupCollapsed[x.id] ?? false
|
||||
|
||||
if (includeProfiles) {
|
||||
x.profiles = profiles.filter(p => p.group === x.id)
|
||||
|
@ -326,7 +325,7 @@ export class ProfilesService {
|
|||
/**
|
||||
* Save ProfileGroup collapse state in localStorage
|
||||
*/
|
||||
saveProfileGroupCollapse(group: PartialProfileGroup<ProfileGroup>) {
|
||||
saveProfileGroupCollapse (group: PartialProfileGroup<ProfileGroup>): void {
|
||||
const profileGroupCollapsed = JSON.parse(window.localStorage.profileGroupCollapsed ?? '{}')
|
||||
profileGroupCollapsed[group.id] = group.collapsed
|
||||
window.localStorage.profileGroupCollapsed = JSON.stringify(profileGroupCollapsed)
|
||||
|
|
Loading…
Reference in a new issue