mirror of
https://github.com/fleetbase/fleetbase.git
synced 2026-01-06 06:15:51 +00:00
merged with main
This commit is contained in:
@@ -2,6 +2,7 @@ import Controller from '@ember/controller';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { action } from '@ember/object';
|
||||
import { isArray } from '@ember/array';
|
||||
|
||||
export default class ConsoleAdminBrandingController extends Controller {
|
||||
/**
|
||||
@@ -51,13 +52,43 @@ export default class ConsoleAdminBrandingController extends Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Unset a branding settings
|
||||
* Unsets the value of a given key or array of keys on the model.
|
||||
*
|
||||
* @param {String} key
|
||||
* @action
|
||||
* @param {string | string[]} key - The key or keys to unset on the model.
|
||||
* @param {*} [newValue=null] - The new value to set for the given key or keys. Defaults to null.
|
||||
* @memberof ConsoleAdminBrandingController
|
||||
*/
|
||||
@action unset(key, newValue = null) {
|
||||
this.model[key] = newValue;
|
||||
if (isArray(key)) {
|
||||
return key.forEach((k) => this.unset(k, undefined));
|
||||
}
|
||||
|
||||
this.model.set(key, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets the icon properties on the model.
|
||||
*
|
||||
* @action
|
||||
* @returns {void} - No return value.
|
||||
* @memberof ConsoleAdminBrandingController
|
||||
*/
|
||||
@action unsetIcon() {
|
||||
this.unset(['icon_uuid', 'icon_url']);
|
||||
this.model.set('icon_url', '/images/icon.png');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets the logo properties on the model.
|
||||
*
|
||||
* @action
|
||||
* @returns {void} - No return value.
|
||||
* @memberof ConsoleAdminBrandingController
|
||||
*/
|
||||
@action unsetLogo() {
|
||||
this.unset(['logo_uuid', 'logo_url']);
|
||||
this.model.set('logo_url', '/images/fleetbase-logo-svg.svg');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</a>
|
||||
</FileUpload>
|
||||
</div>
|
||||
<a href="javascript:;" class="text-danger text-xs mt-1" {{on "click" (fn this.unset "icon_url" "/images/icon.png")}}>Reset to default</a>
|
||||
<a href="javascript:;" class="text-danger text-xs mt-1" {{on "click" this.unsetIcon}}>Reset to default</a>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label>Logo</label>
|
||||
@@ -54,7 +54,7 @@
|
||||
</a>
|
||||
</FileUpload>
|
||||
</div>
|
||||
<a href="javascript:;" class="text-danger text-xs mt-1" {{on "click" (fn this.unset "logo_url" "/images/fleetbase-logo-svg.svg")}}>Reset to default</a>
|
||||
<a href="javascript:;" class="text-danger text-xs mt-1" {{on "click" this.unsetLogo}}>Reset to default</a>
|
||||
</div>
|
||||
<InputGroup @name="Default Theme">
|
||||
<Select @value={{@model.default_theme}} @onSelect={{this.setTheme}} @options={{this.themeOptions}} />
|
||||
|
||||
@@ -21,7 +21,7 @@ module.exports = function (environment) {
|
||||
},
|
||||
|
||||
API: {
|
||||
host: fixApiHost(getenv('API_HOST'), getenv('API_SECURE')),
|
||||
host: fixApiHost(getenv('API_HOST'), toBoolean(getenv('API_SECURE'))),
|
||||
namespace: getenv('API_NAMESPACE', 'int/v1'),
|
||||
},
|
||||
|
||||
|
||||
8
console/environments/.env.development
Normal file
8
console/environments/.env.development
Normal file
@@ -0,0 +1,8 @@
|
||||
API_HOST=http://localhost:8000
|
||||
API_NAMESPACE=int/v1
|
||||
SOCKETCLUSTER_PATH=/socketcluster/
|
||||
SOCKETCLUSTER_HOST=localhost
|
||||
SOCKETCLUSTER_SECURE=false
|
||||
SOCKETCLUSTER_PORT=38000
|
||||
OSRM_HOST=https://bundle.routing.fleetbase.io
|
||||
OSRM_SERVERS=https://canada.routing.fleetbase.io,https://us.routing.fleetbase.io
|
||||
9
console/environments/.env.production
Normal file
9
console/environments/.env.production
Normal file
@@ -0,0 +1,9 @@
|
||||
API_HOST=
|
||||
API_NAMESPACE=int/v1
|
||||
API_SECURE=true
|
||||
SOCKETCLUSTER_PATH=/socketcluster/
|
||||
SOCKETCLUSTER_HOST=
|
||||
SOCKETCLUSTER_SECURE=true
|
||||
SOCKETCLUSTER_PORT=38000
|
||||
OSRM_HOST=https://bundle.routing.fleetbase.io
|
||||
OSRM_SERVERS=https://canada.routing.fleetbase.io,https://us.routing.fleetbase.io
|
||||
0
console/environments/.gitkeep
Normal file
0
console/environments/.gitkeep
Normal file
16
console/pnpm-lock.yaml
generated
16
console/pnpm-lock.yaml
generated
@@ -2496,9 +2496,9 @@ packages:
|
||||
engines: {node: 14.* || >= 16}
|
||||
dependencies:
|
||||
date-fns: 2.30.0
|
||||
ember-auto-import: 2.6.3(webpack@5.74.0)
|
||||
ember-auto-import: 2.4.2(webpack@5.74.0)
|
||||
ember-cli-babel: 7.26.11
|
||||
ember-cli-htmlbars: 6.3.0
|
||||
ember-cli-htmlbars: 6.1.0
|
||||
ember-cli-notifications: 8.0.0(@babel/core@7.23.2)(postcss@8.4.21)
|
||||
ember-concurrency: 2.3.7(@babel/core@7.23.2)
|
||||
ember-concurrency-decorators: 2.0.3(@babel/core@7.23.2)
|
||||
@@ -2602,7 +2602,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
/@fleetbase/fleetops-data@0.1.1:
|
||||
resolution: {integrity: sha512-x3BsFR4hZ3P/2LSMqOx4XVgaahVs1Nr4fWFOPoS1FyF/XI8LU1EO6CNA/oimlLLC+0tbddQlT9wttXUrDOm5uw==}
|
||||
resolution: {integrity: sha512-x3BsFR4hZ3P/2LSMqOx4XVgaahVs1Nr4fWFOPoS1FyF/XI8LU1EO6CNA/oimlLLC+0tbddQlT9wttXUrDOm5uw==, tarball: https://npm.pkg.github.com/download/@fleetbase/fleetops-data/0.1.1/5de00fb4d99013cc86ecc55f85e8086bbfa56b30}
|
||||
engines: {node: 14.* || >= 16}
|
||||
dependencies:
|
||||
date-fns: 2.30.0
|
||||
@@ -2708,7 +2708,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
/@fleetbase/leaflet-routing-machine@3.2.16:
|
||||
resolution: {integrity: sha512-af0mKH3VKIGEfYEGXS9cedhgniwgkNwjC/Gp9ZEzXGTX2/13PyMdd1XOQTamaItPbh5x2uK2/n1BP0vIJ7ObEQ==}
|
||||
resolution: {integrity: sha512-sd+Cn3TmWQKyx3Wtx+nFfkejV0f/3ugY6Gl71NUBhaEZ5SlwiR/npibHWXXXQWA377TFSXTc3MKjY+MnpO2uAA==, tarball: https://npm.pkg.github.com/download/@fleetbase/leaflet-routing-machine/3.2.16/f5c1d638b5d1ebd0a81544ae49740005eec27a92}
|
||||
dependencies:
|
||||
'@mapbox/corslite': 0.0.7
|
||||
'@mapbox/polyline': 0.2.0
|
||||
@@ -2729,7 +2729,7 @@ packages:
|
||||
'@fortawesome/free-solid-svg-icons': 6.4.0
|
||||
ember-cli-babel: 7.26.11
|
||||
ember-cli-es6-transform: 1.0.0
|
||||
ember-cli-htmlbars: 6.1.0
|
||||
ember-cli-htmlbars: 6.3.0
|
||||
ember-engines: 0.8.23(@ember/legacy-built-in-components@0.4.1)(ember-source@4.6.0)
|
||||
ember-intl: 6.0.0-beta.6(webpack@5.74.0)
|
||||
ember-tag-input: 3.1.0
|
||||
@@ -2876,7 +2876,7 @@ packages:
|
||||
broccoli-source: 3.0.1
|
||||
camel-case: 4.1.2
|
||||
ember-ast-helpers: 0.3.5
|
||||
ember-auto-import: 2.6.3(webpack@5.74.0)
|
||||
ember-auto-import: 2.4.2(webpack@5.74.0)
|
||||
ember-cli-babel: 7.26.11
|
||||
ember-cli-htmlbars: 5.7.2
|
||||
ember-get-config: 2.1.1
|
||||
@@ -7354,7 +7354,7 @@ packages:
|
||||
broccoli-merge-trees: 4.2.0
|
||||
broccoli-postcss: 6.1.0
|
||||
ember-cli-babel: 7.26.11
|
||||
ember-cli-htmlbars: 6.3.0
|
||||
ember-cli-htmlbars: 6.1.0
|
||||
ember-decorators-polyfill: 1.1.5(@babel/core@7.23.2)
|
||||
ember-get-config: 0.5.0
|
||||
ember-on-modifier: 1.0.1(@babel/core@7.23.2)
|
||||
@@ -8054,7 +8054,7 @@ packages:
|
||||
'@embroider/macros': 1.13.2
|
||||
'@glimmer/component': 1.1.2(@babel/core@7.23.2)
|
||||
'@glimmer/tracking': 1.1.2
|
||||
ember-auto-import: 2.6.3(webpack@5.74.0)
|
||||
ember-auto-import: 2.4.2(webpack@5.74.0)
|
||||
ember-modifier: 3.2.7(@babel/core@7.23.2)
|
||||
tracked-built-ins: 3.3.0
|
||||
transitivePeerDependencies:
|
||||
|
||||
Submodule packages/core-api updated: 0b0fb9cde5...b47debd7b3
Submodule packages/dev-engine updated: 7bd488190f...36eae70b65
Submodule packages/ember-core updated: 490c6d3821...f17cab2159
Submodule packages/ember-ui updated: 0af42f9345...76b784e2b1
Submodule packages/fleetops updated: 49cbcd58ad...73909ae258
Submodule packages/iam-engine updated: 68204f8e57...8cc83d365e
Submodule packages/storefront updated: cbc8c467f4...affa19ebee
Reference in New Issue
Block a user