-
-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathConfetti.vue
More file actions
41 lines (39 loc) · 1.17 KB
/
Confetti.vue
File metadata and controls
41 lines (39 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!--
- SPDX-FileCopyrightText: 2026 LibreCode coop and LibreCode contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<NcSettingsSection
:name="t('libresign', 'Confetti animation')"
:description="t('libresign', 'Control whether a confetti animation is shown after a document is signed.')">
<NcCheckboxRadioSwitch type="switch"
v-model="showConfetti"
@update:modelValue="saveShowConfetti">
{{ t('libresign', 'Show confetti animation after signing') }}
</NcCheckboxRadioSwitch>
</NcSettingsSection>
</template>
<script>
import { loadState } from '@nextcloud/initial-state'
import { t } from '@nextcloud/l10n'
import NcCheckboxRadioSwitch from '@nextcloud/vue/components/NcCheckboxRadioSwitch'
import NcSettingsSection from '@nextcloud/vue/components/NcSettingsSection'
export default {
name: 'ConfettiSettings',
components: {
NcSettingsSection,
NcCheckboxRadioSwitch,
},
data() {
return {
showConfetti: loadState('libresign', 'show_confetti_after_signing', true) === true,
}
},
methods: {
t,
saveShowConfetti() {
OCP.AppConfig.setValue('libresign', 'show_confetti_after_signing', this.showConfetti ? '1' : '0')
},
},
}
</script>