mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 13:30:02 +00:00
feat(core): Eugeny/tabby#8680 push all quick-connect provider into profile selector
This commit is contained in:
parent
fcac52a844
commit
3857beb46b
@ -219,6 +219,7 @@ export default class AppModule { // eslint-disable-line @typescript-eslint/no-ex
|
|||||||
name: this.translate.instant('Quick connect'),
|
name: this.translate.instant('Quick connect'),
|
||||||
freeInputPattern: this.translate.instant('Connect to "%s"...'),
|
freeInputPattern: this.translate.instant('Connect to "%s"...'),
|
||||||
icon: 'fas fa-arrow-right',
|
icon: 'fas fa-arrow-right',
|
||||||
|
description: `(${provider.name.toUpperCase()})`,
|
||||||
callback: query => {
|
callback: query => {
|
||||||
const p = provider.quickConnect(query)
|
const p = provider.quickConnect(query)
|
||||||
if (p) {
|
if (p) {
|
||||||
|
@ -177,17 +177,19 @@ export class ProfilesService {
|
|||||||
})
|
})
|
||||||
} catch { }
|
} catch { }
|
||||||
|
|
||||||
if (this.getProviders().some(x => x.supportsQuickConnect)) {
|
this.getProviders().filter(x => x.supportsQuickConnect).forEach(provider => {
|
||||||
options.push({
|
options.push({
|
||||||
name: this.translate.instant('Quick connect'),
|
name: this.translate.instant('Quick connect'),
|
||||||
freeInputPattern: this.translate.instant('Connect to "%s"...'),
|
freeInputPattern: this.translate.instant('Connect to "%s"...'),
|
||||||
|
description: `(${provider.name.toUpperCase()})`,
|
||||||
icon: 'fas fa-arrow-right',
|
icon: 'fas fa-arrow-right',
|
||||||
callback: query => {
|
callback: query => {
|
||||||
const profile = this.quickConnect(query)
|
const profile = provider.quickConnect(query)
|
||||||
resolve(profile)
|
resolve(profile)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
})
|
||||||
|
|
||||||
await this.selector.show(this.translate.instant('Select profile or enter an address'), options)
|
await this.selector.show(this.translate.instant('Select profile or enter an address'), options)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
reject(err)
|
reject(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user