Skip to content

Commit

Permalink
Replace custom input field with NcTextField
Browse files Browse the repository at this point in the history
Signed-off-by: julia.kirschenheuter <[email protected]>
  • Loading branch information
JuliaKirschenheuter committed Aug 31, 2023
1 parent aba3f99 commit caf9789
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 14 deletions.
13 changes: 8 additions & 5 deletions apps/files_sharing/src/components/SelectShareFolderDialogue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@

<template>
<div class="share-folder">
<span>{{ t('files_sharing', 'Set default folder for accepted shares') }} </span>

<!-- Folder picking form -->
<form class="share-folder__form" @reset.prevent.stop="resetFolder">
<input class="share-folder__picker"
<NcTextField class="share-folder__picker"
type="text"
:label="t('files_sharing', 'Set default folder for accepted shares')"
:placeholder="readableDirectory"
@click.prevent="pickFolder">
@click.prevent="pickFolder" />

<!-- Show reset button if folder is different -->
<input v-if="readableDirectory !== defaultDirectory"
Expand All @@ -44,12 +43,16 @@ import path from 'path'
import { generateUrl } from '@nextcloud/router'
import { getFilePickerBuilder, showError } from '@nextcloud/dialogs'
import { loadState } from '@nextcloud/initial-state'
import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js'

const defaultDirectory = loadState('files_sharing', 'default_share_folder', '/')
const directory = loadState('files_sharing', 'share_folder', defaultDirectory)

export default {
name: 'SelectShareFolderDialogue',
components: {
NcTextField,
},
data() {
return {
directory,
Expand Down Expand Up @@ -109,7 +112,7 @@ export default {

&__picker {
cursor: pointer;
min-width: 266px;
max-width: 300px;
}

// Make the reset button looks like text
Expand Down
4 changes: 2 additions & 2 deletions dist/files_sharing-personal-settings.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/user-status-modal-8299.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/user-status-modal-8299.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/user_status-menu.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/user_status-menu.js.map

Large diffs are not rendered by default.

0 comments on commit caf9789

Please sign in to comment.