Skip to content

Commit

Permalink
Replace input filed with password field and added password error message
Browse files Browse the repository at this point in the history
Remove unneeded NcDateTimePicker

Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>

(cherry picked from commit 696545b)
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
  • Loading branch information
JuliaKirschenheuter committed Dec 15, 2023
1 parent 49bff0f commit b00165e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 336 deletions.
16 changes: 11 additions & 5 deletions apps/files_sharing/src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@
<NcCheckboxRadioSwitch :checked.sync="isPasswordProtected" :disabled="isPasswordEnforced">
{{ t('files_sharing', 'Set password') }}
</NcCheckboxRadioSwitch>
<NcInputField v-if="isPasswordProtected"
:type="hasUnsavedPassword ? 'text' : 'password'"
:value="hasUnsavedPassword ? share.newPassword : '***************'"
<NcPasswordField v-if="isPasswordProtected"
:value="hasUnsavedPassword ? share.newPassword : ''"
:error="passwordError"
:helper-text="errorPasswordLabel"
:required="isPasswordEnforced"
:label="t('files_sharing', 'Password')"
@update:value="onPasswordChange" />
Expand Down Expand Up @@ -219,8 +219,8 @@ import { getLanguage } from '@nextcloud/l10n'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcInputField from '@nextcloud/vue/dist/Components/NcInputField.js'
import NcPasswordField from '@nextcloud/vue/dist/Components/NcPasswordField.js'
import NcAvatar from '@nextcloud/vue/dist/Components/NcAvatar.js'
import NcDateTimePicker from '@nextcloud/vue/dist/Components/NcDateTimePicker.js'
import NcDateTimePickerNative from '@nextcloud/vue/dist/Components/NcDateTimePickerNative.js'
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'
Expand Down Expand Up @@ -256,7 +256,7 @@ export default {
NcAvatar,
NcButton,
NcInputField,
NcDateTimePicker,
NcPasswordField,
NcDateTimePickerNative,
NcCheckboxRadioSwitch,
NcLoadingIcon,
Expand Down Expand Up @@ -646,6 +646,12 @@ export default {
advancedControlExpandedValue() {
return this.advancedSectionAccordionExpanded ? 'true' : 'false'
},
errorPasswordLabel() {
if (this.passwordError) {
return t('files_sharing', "Password field can't be empty")
}
return undefined
},
},
watch: {
setCustomPermissions(isChecked) {
Expand Down
3 changes: 0 additions & 3 deletions dist/5211-5211.js

This file was deleted.

324 changes: 0 additions & 324 deletions dist/5211-5211.js.LICENSE.txt

This file was deleted.

1 change: 0 additions & 1 deletion dist/5211-5211.js.map

This file was deleted.

Loading

0 comments on commit b00165e

Please sign in to comment.