Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5 from fleetbase/dev-v0.2.2
Browse files Browse the repository at this point in the history
Patch branding settings by saving logo/icon file id and generate secu…
  • Loading branch information
roncodes authored Sep 15, 2023
2 parents acd7753 + 76edf34 commit b99cefd
Show file tree
Hide file tree
Showing 6 changed files with 1,205 additions and 1,264 deletions.
10 changes: 6 additions & 4 deletions app/controllers/console/admin/branding.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ export default class ConsoleAdminBrandingController extends Controller {
path: `uploads/system`,
type: `system`,
},
({ url }) => {
this.model.icon_url = url;
(uploadedFile) => {
this.model.icon_uuid = uploadedFile.id;
this.model.icon_url = uploadedFile.url;
this.isLoading = false;
}
);
Expand All @@ -116,8 +117,9 @@ export default class ConsoleAdminBrandingController extends Controller {
path: `uploads/system`,
type: `system`,
},
({ url }) => {
this.model.logo_url = url;
(uploadedFile) => {
this.model.logo_uuid = uploadedFile.id;
this.model.logo_url = uploadedFile.url;
this.isLoading = false;
}
);
Expand Down
9 changes: 7 additions & 2 deletions app/models/brand.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import Model, { attr } from '@ember-data/model';

export default class BrandModel extends Model {
/** @ids */
@attr('string') uuid;
@attr('string') icon_url;
@attr('string') logo_url;
@attr('string') logo_uuid;
@attr('string') icon_uuid;

/** @attributes */
@attr('string') default_theme;
@attr('string') logo_url;
@attr('string') icon_url;
}
4 changes: 4 additions & 0 deletions app/serializers/brand.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import ApplicationSerializer from '@fleetbase/ember-core/serializers/application';
import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';

export default class BrandSerializer extends ApplicationSerializer.extend(EmbeddedRecordsMixin) {}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fleetbase/console",
"version": "0.2.1",
"version": "0.2.2",
"private": true,
"description": "Fleetbase Console",
"repository": "",
Expand Down
Loading

0 comments on commit b99cefd

Please sign in to comment.