Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use showError in TransferOwnershipDialogue #42720

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
use showError in TransferOwnershipDialogue
Signed-off-by: Simon L <szaimen@e.mail.de>
  • Loading branch information
szaimen committed Jan 16, 2024
commit 816d5299de661e5818665969f4e011c5e68cee0c
6 changes: 3 additions & 3 deletions apps/files/src/components/TransferOwnershipDialogue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<NcButton v-else @click.prevent="start">
{{ t('files', 'Change') }}
</NcButton>
<span class="error">{{ directoryPickerError }}</span>
</p>
<p class="new-owner-row">
<label for="targetUser">
Expand All @@ -55,7 +54,6 @@
:disabled="!canSubmit">
{{ submitButtonText }}
</NcButton>
<span class="error">{{ submitError }}</span>
</p>
</form>
</div>
Expand All @@ -65,7 +63,7 @@
import axios from '@nextcloud/axios'
import debounce from 'debounce'
import { generateOcsUrl } from '@nextcloud/router'
import { getFilePickerBuilder, showSuccess } from '@nextcloud/dialogs'
import { getFilePickerBuilder, showSuccess, showError } from '@nextcloud/dialogs'
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
import Vue from 'vue'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
Expand Down Expand Up @@ -147,6 +145,7 @@ export default {
logger.error(`Selecting object for transfer aborted: ${error.message || 'Unknown error'}`, { error })

this.directoryPickerError = error.message || t('files', 'Unknown error')
showError(this.directoryPickerError)
})
},
async findUser(query) {
Expand Down Expand Up @@ -212,6 +211,7 @@ export default {
} else {
this.submitError = error.message || t('files', 'Unknown error')
}
showError(this.submitError)
})
},
},
Expand Down
Loading