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 <[email protected]>

(cherry picked from commit 696545b)
Signed-off-by: julia.kirschenheuter <[email protected]>
  • Loading branch information
JuliaKirschenheuter authored and ShGKme committed Dec 18, 2023
1 parent 36f9106 commit cd06bf3
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 15 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: 3 additions & 0 deletions dist/3638-3638.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/3638-3638.js.map

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions dist/5211-5211.js

This file was deleted.

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

This file was deleted.

4 changes: 2 additions & 2 deletions dist/core-common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-common.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-files_sharing_tab.js.map

Large diffs are not rendered by default.

0 comments on commit cd06bf3

Please sign in to comment.