Fully replace gulp with vite
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
/* global $ */
|
||||
/* global angular */
|
||||
/* global EventSource */
|
||||
/* global async */
|
||||
/* global $, angular, async */
|
||||
|
||||
// keep in sync with box/src/notfications.js
|
||||
const NOTIFICATION_TYPES = {
|
||||
@@ -621,21 +618,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
.error(defaultErrorHandler(callback));
|
||||
}
|
||||
|
||||
function head(url, config, callback) {
|
||||
if (arguments.length !== 3) {
|
||||
console.error('HEAD', arguments);
|
||||
throw('Wrong number of arguments');
|
||||
}
|
||||
|
||||
config = config || {};
|
||||
config.headers = config.headers || {};
|
||||
config.headers.Authorization = 'Bearer ' + token;
|
||||
|
||||
return $http.head(client.apiOrigin + url, config)
|
||||
.success(defaultSuccessHandler(callback))
|
||||
.error(defaultErrorHandler(callback));
|
||||
}
|
||||
|
||||
function post(url, data, config, callback) {
|
||||
if (arguments.length !== 4) {
|
||||
console.error('POST', arguments);
|
||||
@@ -713,7 +695,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
this._installedAppsById = {};
|
||||
this._appTags = [];
|
||||
// window.location fallback for websocket connections which do not have relative uris
|
||||
this.apiOrigin = 'https://my.nebulon.space'; //window.location.origin;
|
||||
this.apiOrigin = window.cloudronApiOrigin || window.location.origin;
|
||||
this.avatar = '';
|
||||
this.background = '';
|
||||
this._availableLanguages = ['en'];
|
||||
@@ -2821,8 +2803,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
localStorage.setItem('redirectToHash', window.location.hash);
|
||||
|
||||
// start oidc flow
|
||||
// window.location.href = this.apiOrigin + '/openid/auth?client_id=' + ('<%= apiOrigin %>' ? TOKEN_TYPES.ID_DEVELOPMENT : TOKEN_TYPES.ID_WEBADMIN) + '&scope=openid email profile&response_type=code token&redirect_uri=' + window.location.origin + '/authcallback.html';
|
||||
window.location.href = this.apiOrigin + '/openid/auth?client_id=' + TOKEN_TYPES.ID_DEVELOPMENT + '&scope=openid email profile&response_type=code token&redirect_uri=' + window.location.origin + '/authcallback.html';
|
||||
window.location.href = this.apiOrigin + '/openid/auth?client_id=' + (window.cloudronApiOrigin ? TOKEN_TYPES.ID_DEVELOPMENT : TOKEN_TYPES.ID_WEBADMIN) + '&scope=openid email profile&response_type=code token&redirect_uri=' + window.location.origin + '/authcallback.html';
|
||||
};
|
||||
|
||||
Client.prototype.logout = function () {
|
||||
|
||||
Reference in New Issue
Block a user