put preferred clients first
This commit is contained in:
parent
8a23b9a49e
commit
daa6e21d75
@ -54,7 +54,7 @@ export class ClientListViewModel extends ViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_filterClients() {
|
_filterClients() {
|
||||||
this.clientList = this._clients.filter(client => {
|
const clientVMs = this._clients.filter(client => {
|
||||||
const platformMaturities = this.platforms.map(p => client.getMaturity(p));
|
const platformMaturities = this.platforms.map(p => client.getMaturity(p));
|
||||||
const isStable = platformMaturities.includes(Maturity.Stable) || platformMaturities.includes(Maturity.Beta);
|
const isStable = platformMaturities.includes(Maturity.Stable) || platformMaturities.includes(Maturity.Beta);
|
||||||
const isSupported = client.platforms.some(p => this.platforms.includes(p));
|
const isSupported = client.platforms.some(p => this.platforms.includes(p));
|
||||||
@ -70,6 +70,9 @@ export class ClientListViewModel extends ViewModel {
|
|||||||
link: this._link,
|
link: this._link,
|
||||||
pickClient: client => this._pickClient(client)
|
pickClient: client => this._pickClient(client)
|
||||||
})));
|
})));
|
||||||
|
const preferredClientVMs = clientVMs.filter(c => c.hasPreferredWebInstance);
|
||||||
|
const otherClientVMs = clientVMs.filter(c => !c.hasPreferredWebInstance);
|
||||||
|
this.clientList = preferredClientVMs.concat(otherClientVMs);
|
||||||
this.emitChange();
|
this.emitChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user