diff --git a/ui/src/components/bulma/Secret.vue b/ui/src/components/bulma/Secret.vue index e108d4c..19b1043 100644 --- a/ui/src/components/bulma/Secret.vue +++ b/ui/src/components/bulma/Secret.vue @@ -19,22 +19,23 @@ enum ClickState { emits: ["load"], }) export default class extends Vue { - public click_state = ClickState.Green; + public state = ClickState.Green; public on_click(): void { - this.click_state = (this.click_state + 1) % 3; + this.state++; + this.state %= 3; - if (this.click_state === ClickState.Red) { + if (this.state === ClickState.Red) { this.$emit("load"); } } public get show(): boolean { - return this.click_state === ClickState.Red; + return this.state === ClickState.Red; } public get button_class(): string { - switch (this.click_state) { + switch (this.state) { case ClickState.Red: return "danger"; case ClickState.Yellow: @@ -45,7 +46,7 @@ export default class extends Vue { } public get button_icon(): string { - if (this.click_state === ClickState.Red) { + if (this.state === ClickState.Red) { return "eye-slash"; } else { return "eye";