optimization imports from site.js
This commit is contained in:
parent
a106e23ff8
commit
8b5772f996
11 changed files with 223 additions and 246 deletions
|
@ -5,6 +5,7 @@ import loading from '../components/loading/loading';
|
|||
import { appRouter } from '../components/appRouter';
|
||||
import baseAlert from '../components/alert';
|
||||
import baseConfirm from '../components/confirm/confirm';
|
||||
import globalize from '../scripts/globalize';
|
||||
|
||||
export function getCurrentUser() {
|
||||
return window.ApiClient.getCurrentUser(false);
|
||||
|
@ -88,12 +89,12 @@ export function navigate(url, preserveQueryString) {
|
|||
|
||||
export function processPluginConfigurationUpdateResult() {
|
||||
loading.hide();
|
||||
toast(Globalize.translate('MessageSettingsSaved'));
|
||||
toast(globalize.translate('MessageSettingsSaved'));
|
||||
}
|
||||
|
||||
export function processServerConfigurationUpdateResult(result) {
|
||||
loading.hide();
|
||||
toast.default(Globalize.translate('MessageSettingsSaved'));
|
||||
toast.default(globalize.translate('MessageSettingsSaved'));
|
||||
}
|
||||
|
||||
export function processErrorResponse(response) {
|
||||
|
@ -118,7 +119,7 @@ export function alert(options) {
|
|||
});
|
||||
} else {
|
||||
baseAlert.default({
|
||||
title: options.title || Globalize.translate('HeaderAlert'),
|
||||
title: options.title || globalize.translate('HeaderAlert'),
|
||||
text: options.message
|
||||
}).then(options.callback || function () {});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue