Skip to content

Commit

Permalink
Add checkbox to settings
Browse files Browse the repository at this point in the history
resolve #5
  • Loading branch information
NataliaPlatova committed Aug 11, 2023
1 parent 7c50c6e commit 9a47cdb
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/store/LINKaStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface LINKaStore {
mouseActivation: boolean,
borders: number;
enabled: boolean;
clickSound: boolean,
clickSound: boolean;
animation: boolean
},
ui: {
Expand Down
2 changes: 1 addition & 1 deletion src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ const store = createStore<LINKaStore>({
},
pcHash(state, hash) {
state.pcHash = hash
},
}
},

actions: {
Expand Down
2 changes: 1 addition & 1 deletion src/views/SetExplorerView.appbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
:color="animation ? 'primary' : ''"
@click="switchAnimation"
:title="
(animation ? 'Выключить' : 'Включить') + ' анимацию'
(animation ? 'Выключить' : 'Включить') + ' анимацию изображений'
"
>
<v-icon>{{ animation? "mdi-pause" : "mdi-play" }}</v-icon>
Expand Down
18 changes: 17 additions & 1 deletion src/views/SettingsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,15 @@
<v-col xs="6">
<v-checkbox
v-model="clickSound"
label="звук щелчка при активации кнопки"
label="Звук щелчка при активации кнопки"
/>
</v-col>
</v-row>
<v-row>
<v-col xs="6">
<v-checkbox
v-model="animation"
label="Анимация изображений"
/>
</v-col>
</v-row>
Expand Down Expand Up @@ -151,6 +159,14 @@ export default class SettingsView extends Vue.with(Props) {
this.$store.commit("button_mouseActivation", value);
}
get animation () {
return this.$store.state.button.animation;
}
set animation (value: boolean) {
this.$store.dispatch("button_animation");
}
get isExitButton () {
return this.$store.state.ui.exitButton;
}
Expand Down

0 comments on commit 9a47cdb

Please # to comment.