Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] Replace input filed with password field and added password error message #42118

Merged
merged 1 commit into from Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 11 additions & 5 deletions apps/files_sharing/src/views/SharingDetailsTab.vue
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/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.