Skip to content

Commit

Permalink
Use latest components
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Apr 12, 2022
1 parent 566ec3e commit 35d5bf3
Showing 1 changed file with 17 additions and 35 deletions.
52 changes: 17 additions & 35 deletions src/AdminSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,54 +60,34 @@
<ul class="password-policy__settings-list">
<li />
<li>
<input id="password-policy__settings__enforce-non-common"
v-model="config.enforceNonCommonPassword"
type="checkbox"
class="checkbox"
@change="updateBoolSetting('enforceNonCommonPassword')">
<label for="password-policy__settings__enforce-non-common">
<CheckboxRadioSwitch :checked.sync="config.enforceNonCommonPassword"
@update:checked="updateBoolSetting('enforceNonCommonPassword')">
{{ t('password_policy', 'Forbid common passwords') }}
</label>
</CheckboxRadioSwitch>
</li>
<li>
<input id="password-policy__settings__enforce-upper-lower-case"
v-model="config.enforceUpperLowerCase"
type="checkbox"
class="checkbox"
@change="updateBoolSetting('enforceUpperLowerCase')">
<label for="password-policy__settings__enforce-upper-lower-case">
<CheckboxRadioSwitch :checked.sync="config.enforceUpperLowerCase"
@update:checked="updateBoolSetting('enforceUpperLowerCase')">
{{ t('password_policy', 'Enforce upper and lower case characters') }}
</label>
</CheckboxRadioSwitch>
</li>
<li>
<input id="password-policy__settings__enforce-numeric-char"
v-model="config.enforceNumericCharacters"
type="checkbox"
class="checkbox"
@change="updateBoolSetting('enforceNumericCharacters')">
<label for="password-policy__settings__enforce-numeric-char">
<CheckboxRadioSwitch :checked.sync="config.enforceNumericCharacters"
@update:checked="updateBoolSetting('enforceNumericCharacters')">
{{ t('password_policy', 'Enforce numeric characters') }}
</label>
</CheckboxRadioSwitch>
</li>
<li>
<input id="password-policy__settings__enforce-special-char"
v-model="config.enforceSpecialCharacters"
type="checkbox"
class="checkbox"
@change="updateBoolSetting('enforceSpecialCharacters')">
<label for="password-policy__settings__enforce-special-char">
<CheckboxRadioSwitch :checked.sync="config.enforceSpecialCharacters"
@update:checked="updateBoolSetting('enforceSpecialCharacters')">
{{ t('password_policy', 'Enforce special characters') }}
</label>
</CheckboxRadioSwitch>
</li>
<li>
<input id="password-policy__settings__enforce-haveibeenpwned"
v-model="config.enforceHaveIBeenPwned"
type="checkbox"
class="checkbox"
@change="updateBoolSetting('enforceHaveIBeenPwned')">
<label for="password-policy__settings__enforce-haveibeenpwned">
<CheckboxRadioSwitch :checked.sync="config.enforceHaveIBeenPwned"
@update:checked="updateBoolSetting('enforceHaveIBeenPwned')">
{{ t('password_policy', 'Check password against the list of breached passwords from haveibeenpwned.com') }}
</label>
</CheckboxRadioSwitch>
<p class="havibeenpwned-hint">
{{ t('password_policy', 'This check creates a hash of the password and sends the first 5 characters of this hash to the haveibeenpwned.com API to retrieve a list of all hashes that start with those. Then it checks on the Nextcloud instance if the password hash is in the result set.') }}
</p>
Expand All @@ -118,11 +98,13 @@

<script>
import { loadState } from '@nextcloud/initial-state'
import CheckboxRadioSwitch from '@nextcloud/vue/dist/Components/CheckboxRadioSwitch'
import SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection'

export default {
name: 'AdminSettings',
components: {
CheckboxRadioSwitch,
SettingsSection,
},

Expand Down

0 comments on commit 35d5bf3

Please sign in to comment.