Merge pull request #19275 from nextcloud/bugfix/18626/owner-transfer-multiselect
Bugfix/18626/owner transfer multiselect
This commit is contained in:
commit
8fcd1d1426
3 changed files with 27 additions and 23 deletions
BIN
apps/files/js/dist/personal-settings.js
vendored
BIN
apps/files/js/dist/personal-settings.js
vendored
Binary file not shown.
BIN
apps/files/js/dist/personal-settings.js.map
vendored
BIN
apps/files/js/dist/personal-settings.js.map
vendored
Binary file not shown.
|
@ -34,25 +34,26 @@
|
||||||
<span class="error">{{ directoryPickerError }}</span>
|
<span class="error">{{ directoryPickerError }}</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="new-owner-row">
|
<p class="new-owner-row">
|
||||||
<label>
|
<label for="targetUser">
|
||||||
<span>{{ t('files', 'New owner') }}</span>
|
<span>{{ t('files', 'New owner') }}</span>
|
||||||
<Multiselect
|
|
||||||
v-model="selectedUser"
|
|
||||||
:options="formatedUserSuggestions"
|
|
||||||
:multiple="false"
|
|
||||||
:searchable="true"
|
|
||||||
:placeholder="t('files', 'Search users')"
|
|
||||||
:preselect-first="true"
|
|
||||||
:preserve-search="true"
|
|
||||||
:loading="loadingUsers"
|
|
||||||
track-by="user"
|
|
||||||
label="displayName"
|
|
||||||
:internal-search="false"
|
|
||||||
:clear-on-select="false"
|
|
||||||
:user-select="true"
|
|
||||||
class="middle-align"
|
|
||||||
@search-change="findUserDebounced" />
|
|
||||||
</label>
|
</label>
|
||||||
|
<Multiselect
|
||||||
|
id="targetUser"
|
||||||
|
v-model="selectedUser"
|
||||||
|
:options="formatedUserSuggestions"
|
||||||
|
:multiple="false"
|
||||||
|
:searchable="true"
|
||||||
|
:placeholder="t('files', 'Search users')"
|
||||||
|
:preselect-first="true"
|
||||||
|
:preserve-search="true"
|
||||||
|
:loading="loadingUsers"
|
||||||
|
track-by="user"
|
||||||
|
label="displayName"
|
||||||
|
:internal-search="false"
|
||||||
|
:clear-on-select="false"
|
||||||
|
:user-select="true"
|
||||||
|
class="middle-align"
|
||||||
|
@search-change="findUserDebounced" />
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<input type="submit"
|
<input type="submit"
|
||||||
|
@ -95,6 +96,9 @@ export default {
|
||||||
loadingUsers: false,
|
loadingUsers: false,
|
||||||
selectedUser: null,
|
selectedUser: null,
|
||||||
userSuggestions: {},
|
userSuggestions: {},
|
||||||
|
config: {
|
||||||
|
minSearchStringLength: parseInt(OC.config['sharing.minSearchStringLength'], 10) || 0,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -127,6 +131,7 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.findUserDebounced = debounce(this.findUser, 300)
|
this.findUserDebounced = debounce(this.findUser, 300)
|
||||||
|
this.findUser('')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
start() {
|
start() {
|
||||||
|
@ -151,7 +156,7 @@ export default {
|
||||||
async findUser(query) {
|
async findUser(query) {
|
||||||
this.query = query.trim()
|
this.query = query.trim()
|
||||||
|
|
||||||
if (query.length < 3) {
|
if (query.length < this.config.minSearchStringLength) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,16 +236,15 @@ p {
|
||||||
label {
|
label {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-grow: 1;
|
|
||||||
|
|
||||||
span {
|
span {
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.multiselect {
|
.multiselect {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
max-width: 280px;
|
max-width: 280px;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.transfer-select-row {
|
.transfer-select-row {
|
||||||
|
|
Loading…
Reference in a new issue