Skip to content

Commit

Permalink
refactor: code style fixes applied by npm run lint -- --fix
Browse files Browse the repository at this point in the history
Signed-off-by: ernolf <raphael.gradenwitz@googlemail.com>
  • Loading branch information
ernolf committed Jul 22, 2024
1 parent 2311905 commit d508993
Showing 1 changed file with 37 additions and 30 deletions.
67 changes: 37 additions & 30 deletions src/components/PersonalTotpSettings.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<!--
- @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
-
- @author 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
-
- @license GNU AGPL version 3 or any later version
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
- @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
-
- @author 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
-
- @license GNU AGPL version 3 or any later version
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<template>
<div id="twofactor-totp-settings">
Expand Down Expand Up @@ -49,7 +49,9 @@
v-model="tokenLength"
:disabled="loading || !enabled"
@change="onSettingsChange">
<option v-for="length in tokenLengthOptions" :key="length" :value="length">{{ length }}</option>
<option v-for="length in tokenLengthOptions" :key="length" :value="length">
{{ length }}
</option>
</select>

<!-- Hash Algorithm Select -->
Expand All @@ -60,15 +62,20 @@
v-model="hashAlgorithm"
:disabled="loading || !enabled"
@change="onSettingsChange">
<option value="1">SHA1</option>
<option value="2">SHA256</option>
<option value="3">SHA512</option>
<option value="1">
SHA1
</option>
<option value="2">
SHA256
</option>
<option value="3">
SHA512
</option>
</select>

<!-- Save Button -->
<button
@click="updateSettings"
:disabled="!settingsChanged || loading">
<button :disabled="!settingsChanged || loading"
@click="updateSettings">
{{ t('twofactor_totp', 'Save') }}
</button>
</div>
Expand Down Expand Up @@ -115,6 +122,10 @@ export default {
return this.$store.state.totpState
},
},
created() {
this.fetchSettings()
},
methods: {
toggleEnabled() {
if (this.loading) {
Expand Down Expand Up @@ -244,10 +255,6 @@ export default {
},
},
created() {
this.fetchSettings()
},
}
</script>

Expand Down

0 comments on commit d508993

Please sign in to comment.