This repository was archived by the owner on Feb 12, 2021. It is now read-only.
File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 458
458
data : function ( ) {
459
459
return {
460
460
isSwitched : false ,
461
+ switchDisabled : false ,
461
462
pluginVersion : '' ,
462
463
state : '' ,
463
464
isDownloading : false ,
470
471
template : `
471
472
<div>
472
473
<div class="plugin-item">
473
- <b-switch v-model="isSwitched" @input="handleChange($event)" size="is-small"></b-switch>
474
+ <b-switch v-model="isSwitched" @input="handleChange($event)" size="is-small" :disabled="switchDisabled" ></b-switch>
474
475
<span class="plugin-name centered" v-on:click="openUI()">{{ plugin.displayName }}</span>
475
476
<span class="plugin-profile centered">{{ plugin.profile }}</span>
476
477
<span class="plugin-info centered">
517
518
if ( state === 'started' ) {
518
519
this . plugin . errors = [ ]
519
520
}
521
+
522
+ if ( [ 'started' , 'connected' , 'stopped' , 'error' ] . includes ( state ) ) {
523
+ this . switchDisabled = false
524
+ }
520
525
} ,
521
526
handleSwitchedOn : async function ( ) {
527
+ this . switchDisabled = true
522
528
const persistedFlags = ( await Grid . Config . getItem ( 'flags' ) ) || { }
523
529
const flags = persistedFlags [ this . plugin . pluginRef . name ]
524
530
const setupHandler = event => {
You can’t perform that action at this time.
0 commit comments