Skip to content

Commit 10eda0a

Browse files
feat(settings): add Confetti admin settings component
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent a054564 commit 10eda0a

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

src/views/Settings/Confetti.vue

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!--
2+
- SPDX-FileCopyrightText: 2026 LibreCode coop and LibreCode contributors
3+
- SPDX-License-Identifier: AGPL-3.0-or-later
4+
-->
5+
<template>
6+
<NcSettingsSection
7+
:name="t('libresign', 'Confetti animation')"
8+
:description="t('libresign', 'Control whether a confetti animation is shown after a document is signed.')">
9+
<NcCheckboxRadioSwitch type="switch"
10+
v-model="showConfetti"
11+
@update:modelValue="saveShowConfetti">
12+
{{ t('libresign', 'Show confetti animation after signing') }}
13+
</NcCheckboxRadioSwitch>
14+
</NcSettingsSection>
15+
</template>
16+
<script>
17+
import { loadState } from '@nextcloud/initial-state'
18+
import { t } from '@nextcloud/l10n'
19+
20+
import NcCheckboxRadioSwitch from '@nextcloud/vue/components/NcCheckboxRadioSwitch'
21+
import NcSettingsSection from '@nextcloud/vue/components/NcSettingsSection'
22+
23+
export default {
24+
name: 'ConfettiSettings',
25+
components: {
26+
NcSettingsSection,
27+
NcCheckboxRadioSwitch,
28+
},
29+
data() {
30+
return {
31+
showConfetti: loadState('libresign', 'show_confetti_after_signing', true) === true,
32+
}
33+
},
34+
methods: {
35+
t,
36+
saveShowConfetti() {
37+
OCP.AppConfig.setValue('libresign', 'show_confetti_after_signing', this.showConfetti ? '1' : '0')
38+
},
39+
},
40+
}
41+
</script>

0 commit comments

Comments
 (0)