Skip to content

Commit 696545b

Browse files
Replace input filed with password field and added password error message
Remove unneeded NcDateTimePicker Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
1 parent cdb6f37 commit 696545b

File tree

8 files changed

+18
-12
lines changed

8 files changed

+18
-12
lines changed

apps/files_sharing/src/views/SharingDetailsTab.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@
105105
<NcCheckboxRadioSwitch :checked.sync="isPasswordProtected" :disabled="isPasswordEnforced">
106106
{{ t('files_sharing', 'Set password') }}
107107
</NcCheckboxRadioSwitch>
108-
<NcInputField v-if="isPasswordProtected"
109-
:type="hasUnsavedPassword ? 'text' : 'password'"
110-
:value="hasUnsavedPassword ? share.newPassword : '***************'"
108+
<NcPasswordField v-if="isPasswordProtected"
109+
:value="hasUnsavedPassword ? share.newPassword : ''"
111110
:error="passwordError"
111+
:helper-text="errorPasswordLabel"
112112
:required="isPasswordEnforced"
113113
:label="t('files_sharing', 'Password')"
114114
@update:value="onPasswordChange" />
@@ -219,8 +219,8 @@ import { getLanguage } from '@nextcloud/l10n'
219219
220220
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
221221
import NcInputField from '@nextcloud/vue/dist/Components/NcInputField.js'
222+
import NcPasswordField from '@nextcloud/vue/dist/Components/NcPasswordField.js'
222223
import NcAvatar from '@nextcloud/vue/dist/Components/NcAvatar.js'
223-
import NcDateTimePicker from '@nextcloud/vue/dist/Components/NcDateTimePicker.js'
224224
import NcDateTimePickerNative from '@nextcloud/vue/dist/Components/NcDateTimePickerNative.js'
225225
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
226226
import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'
@@ -256,7 +256,7 @@ export default {
256256
NcAvatar,
257257
NcButton,
258258
NcInputField,
259-
NcDateTimePicker,
259+
NcPasswordField,
260260
NcDateTimePickerNative,
261261
NcCheckboxRadioSwitch,
262262
NcLoadingIcon,
@@ -646,6 +646,12 @@ export default {
646646
advancedControlExpandedValue() {
647647
return this.advancedSectionAccordionExpanded ? 'true' : 'false'
648648
},
649+
errorPasswordLabel() {
650+
if (this.passwordError) {
651+
return t('files_sharing', "Password field can't be empty")
652+
}
653+
return undefined
654+
},
649655
},
650656
watch: {
651657
setCustomPermissions(isChecked) {

dist/3638-3638.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/3638-3638.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/5211-5211.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

dist/5211-5211.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/files_sharing-files_sharing_tab.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-files_sharing_tab.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)