make webhook buttons have selected class only when the webhook is selected
This commit is contained in:
parent
4c5901d614
commit
d3c153dc26
1 changed files with 7 additions and 1 deletions
|
@ -14,7 +14,7 @@
|
|||
<div id="app">
|
||||
<div class="card navigation-card">
|
||||
<div class="navigation-buttons">
|
||||
<a v-for="(webhook, webhookIndex) in webhooks" @click="selectedWebhook = webhookIndex" class="button-default button-selected">{{ webhook.name }}</a>
|
||||
<a v-for="(webhook, webhookIndex) in webhooks" @click="selectedWebhook = webhookIndex" :class="getWebhookButtonClass(webhookIndex)">{{ webhook.name }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -111,6 +111,12 @@
|
|||
localStorage.clear();
|
||||
return;
|
||||
}
|
||||
},
|
||||
getWebhookButtonClass: function(webhookIndex) {
|
||||
if (this.selectedWebhook === webhookIndex) {
|
||||
return 'button-default button-selected';
|
||||
}
|
||||
return 'button-default';
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
Loading…
Reference in a new issue