Clean up publishing
Signed-off-by: Gary Kim <gary@garykim.dev>
This commit is contained in:
parent
09f1c637da
commit
e1382e2bc5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -21,33 +21,27 @@
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<h3>{{ t('files', 'Transfer ownership') }} </h3>
|
<h3>{{ t('files', 'Transfer ownership of a file or folder') }} </h3>
|
||||||
<p>
|
|
||||||
{{ t('files', 'Select a file or directory to be transferred to another user. It may take some time until the process is done.') }}
|
|
||||||
</p>
|
|
||||||
<form @submit.prevent="submit">
|
<form @submit.prevent="submit">
|
||||||
<ol>
|
<p>
|
||||||
<li>
|
<span>{{ readableDirectory }}</span>
|
||||||
<div class="step-header">
|
<button v-if="directory === undefined" @click.prevent="start">
|
||||||
{{ t('files', 'File or directory be transferred') }}
|
{{ t('files', 'Choose file or folder to transfer') }}
|
||||||
</div>
|
</button>
|
||||||
<span v-if="directory === undefined">{{ t('files', 'Nothing selected') }}</span>
|
<button v-else @click.prevent="start">
|
||||||
<span v-else>{{ directory }}</span>
|
{{ t('files', 'Change') }}
|
||||||
<button class="primary" @click.prevent="start">
|
|
||||||
{{ t('files', 'Select') }}
|
|
||||||
</button>
|
</button>
|
||||||
<span class="error">{{ directoryPickerError }}</span>
|
<span class="error">{{ directoryPickerError }}</span>
|
||||||
</li>
|
</p>
|
||||||
<li>
|
<p>
|
||||||
<div class="step-header">
|
<label>
|
||||||
{{ t('files', 'New owner') }}
|
<span>{{ t('files', 'New owner') }}</span>
|
||||||
</div>
|
|
||||||
<Multiselect
|
<Multiselect
|
||||||
v-model="selectedUser"
|
v-model="selectedUser"
|
||||||
:options="formatedUserSuggestions"
|
:options="formatedUserSuggestions"
|
||||||
:multiple="false"
|
:multiple="false"
|
||||||
:searchable="true"
|
:searchable="true"
|
||||||
:placeholder="t('core', 'Target user …')"
|
:placeholder="t('files', 'Search users')"
|
||||||
:preselect-first="true"
|
:preselect-first="true"
|
||||||
:preserve-search="true"
|
:preserve-search="true"
|
||||||
:loading="loadingUsers"
|
:loading="loadingUsers"
|
||||||
|
@ -56,16 +50,17 @@
|
||||||
:internal-search="false"
|
:internal-search="false"
|
||||||
:clear-on-select="false"
|
:clear-on-select="false"
|
||||||
:user-select="true"
|
:user-select="true"
|
||||||
@search-change="findUserDebounced" />
|
@search-change="findUserDebounced"
|
||||||
</li>
|
class="middle-align" />
|
||||||
<li>
|
</label>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
<input type="submit"
|
<input type="submit"
|
||||||
class="primary"
|
class="primary"
|
||||||
:value="submitButtonText"
|
:value="submitButtonText"
|
||||||
:disabled="!canSubmit">
|
:disabled="!canSubmit">
|
||||||
<span class="error">{{ submitError }}</span>
|
<span class="error">{{ submitError }}</span>
|
||||||
</li>
|
</p>
|
||||||
</ol>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -80,7 +75,7 @@ import Vue from 'vue'
|
||||||
|
|
||||||
import logger from '../logger'
|
import logger from '../logger'
|
||||||
|
|
||||||
const picker = getFilePickerBuilder(t('files', 'Select a file or directory to be transferred'))
|
const picker = getFilePickerBuilder(t('files', 'Choose a file or folder to transfer'))
|
||||||
.setMultiSelect(false)
|
.setMultiSelect(false)
|
||||||
.setModal(true)
|
.setModal(true)
|
||||||
.setType(1)
|
.setType(1)
|
||||||
|
@ -118,9 +113,16 @@ export default {
|
||||||
},
|
},
|
||||||
submitButtonText() {
|
submitButtonText() {
|
||||||
if (!this.canSubmit) {
|
if (!this.canSubmit) {
|
||||||
return t('files', 'Set options above')
|
return t('files', 'Transfer')
|
||||||
}
|
}
|
||||||
return t('files', 'Transfer "{path}" to {userid}', { path: this.directory, userid: this.uid })
|
const components = this.readableDirectory.split('/')
|
||||||
|
return t('files', 'Transfer {path} to {userid}', { path: components[components.length - 1], userid: this.selectedUser.displayName })
|
||||||
|
},
|
||||||
|
readableDirectory() {
|
||||||
|
if (!this.directory) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
return this.directory.substring(1)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -216,5 +218,11 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.middle-align {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
margin-top: 12px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue