Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.safeApply(this.scope, ({ username, messages, actionUrl, hiddenFormInputs }) => {
swal.close()
// must exist in the list
this.recipient = {
id: this.recipientId,
username: username
}
this.messages = messages
// scroll to bottom
this.ionicScrollDelegate.scrollBottom(false)
this.actionUrl = actionUrl
this.hiddenFormInputs = hiddenFormInputs
}).subscribe()
}
.safeApply(this.scope, ({ responseText, result }) => {
if (result) {
swal.close()
this.ngToast.success(`<i class="ion-ios-checkmark"> 成功發佈主題!</i>`)
this.onBack()
} else {
swal({
animation: false,
title: '發佈失敗',
text: `HKEPC 傳回:「${responseText}」`,
type: 'error',
confirmButtonText: '確定'
})
}
}).subscribe(
() => {},
.safeApply(this.scope, ({ responseText, result }) => {
if (result) {
swal.close()
this.ngToast.success(`<i class="ion-ios-checkmark"> 成功報告!</i>`)
this.onBack()
} else {
swal({
animation: false,
title: '發佈失敗',
text: `HKEPC 傳回:「${responseText}」`,
type: 'error',
confirmButtonText: '確定'
})
}
}).subscribe(
() => {},
closeLoading () {
swal.close()
}
public ngOnDestroy(): void {
if (this.isCurrentlyShown) {
Swal.close();
}
}
.on('click', (evt) => {
cfg.onSelectRoot(currentPath);
Swal.close();
})
},
if (!startsWith(url, 'http://') && !startsWith(url, 'https://')) {
throw new AppError('Please enter a valid web address.', { title: 'Upload failed.', level: 'warning' })
}
Swal.fire({
title: 'Downloading...',
text: 'One moment, please.',
showConfirmButton: false,
allowOutsideClick: false,
allowEscapeKey: false,
})
try {
const file = await File.fromUrl(url)
Swal.close()
this.add(file)
} catch (error) {
throw new AppError('There was a problem trying to download the file. Make sure you have an Internet connection.', { title: 'Upload failed.', level: 'warning', error })
}
}
export const alertClose = () =>{
Swal.close()
}
onPopstate() {
Swal.close();
}