Improve error and state handling when moving an app
This commit is contained in:
@@ -49,7 +49,8 @@ async function onSubmitMove() {
|
||||
|
||||
originalVolumeId.value = volumeId.value;
|
||||
|
||||
moveBusy.value = false;
|
||||
// give app refresh some time, ideally we wait for the task
|
||||
setTimeout(() => moveBusy.value = false, 4000);
|
||||
}
|
||||
|
||||
function onMountAdd() {
|
||||
@@ -161,16 +162,17 @@ onMounted(async () => {
|
||||
<FormGroup v-if="volumeId !== DEFAULT_VOLUME_ID">
|
||||
<label for="volumePrefixInput">Subdirectory</label>
|
||||
<TextInput id="volumePrefixInput" placeholder="Prefix within the Volume" v-model="volumePrefix" />
|
||||
<div v-if="moveError">{{ moveError }}</div>
|
||||
</FormGroup>
|
||||
</fieldset>
|
||||
</form>
|
||||
</FormGroup>
|
||||
|
||||
<div v-if="moveError" class="error-label">{{ moveError }}</div>
|
||||
<br/>
|
||||
|
||||
<Button @click="onSubmitMove()" :loading="moveBusy" :disabled="moveBusy || app.error || app.taskId || originalVolumeId === volumeId" v-tooltip="app.error ? 'App is in error state' : (app.taskId ? 'App is busy' : '')">{{ $t('app.storage.appdata.moveAction') }}</Button>
|
||||
|
||||
<hr>
|
||||
<hr style="margin-top: 20px;">
|
||||
|
||||
<FormGroup>
|
||||
<label>{{ $t('app.storage.mounts.title') }} <sup><a href="https://docs.cloudron.io/apps/#mounts" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></label>
|
||||
|
||||
Reference in New Issue
Block a user