Fixing some leftover `showToast(obj)` (#2735)

This commit is contained in:
Emma 2022-10-17 08:33:20 -04:00 committed by GitHub
parent 198c3fa5d2
commit b5c486bf1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 18 deletions

View File

@ -627,12 +627,8 @@ export default Vue.extend({
}) })
.catch(err => { .catch(err => {
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
showToast({ showToast(`${errorMessage}: ${err}`, 10000, () => {
message: `${errorMessage}: ${err}`,
time: 10000,
action: () => {
this.copyToClipboard({ content: err }) this.copyToClipboard({ content: err })
}
}) })
console.error(err) console.error(err)
if (this.backendPreference === 'local' && this.backendFallback && !err.toString().includes('private')) { if (this.backendPreference === 'local' && this.backendFallback && !err.toString().includes('private')) {
@ -851,12 +847,8 @@ export default Vue.extend({
.catch(err => { .catch(err => {
console.error(err) console.error(err)
const errorMessage = this.$t('Invidious API Error (Click to copy)') const errorMessage = this.$t('Invidious API Error (Click to copy)')
showToast({ showToast(`${errorMessage}: ${err.responseText}`, 10000, () => {
message: `${errorMessage}: ${err.responseText}`,
time: 10000,
action: () => {
this.copyToClipboard({ content: err.responseText }) this.copyToClipboard({ content: err.responseText })
}
}) })
console.error(err) console.error(err)
if (this.backendPreference === 'invidious' && this.backendFallback) { if (this.backendPreference === 'invidious' && this.backendFallback) {
@ -1042,12 +1034,8 @@ export default Vue.extend({
}) })
.catch(err => { .catch(err => {
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
showToast({ showToast(`${errorMessage}: ${err}`, 10000, () => {
message: `${errorMessage}: ${err}`,
time: 10000,
action: () => {
this.copyToClipboard({ content: err }) this.copyToClipboard({ content: err })
}
}) })
console.error(err) console.error(err)
if (!process.env.IS_ELECTRON || (this.backendPreference === 'local' && this.backendFallback)) { if (!process.env.IS_ELECTRON || (this.backendPreference === 'local' && this.backendFallback)) {