Skip to content

Commit

Permalink
### 1.10.0-rc.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Panico committed May 29, 2024
1 parent 25b2c64 commit cfc9771
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*Giovanni Troisi*
### **Copyrigth**: *Tiledesk SRL*

### 1.10.0-rc.3
### 1.10.0-rc.2
👉 **added**: status property to top left menu options to show/hide some options

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tiledesk/cds",
"author": "Tiledesk SRL",
"version": "1.10.0-rc.2",
"version": "1.10.0-rc.3",
"license": "MIT",
"homepage": "https://www.tiledesk.com",
"repository": {
Expand Down
12 changes: 11 additions & 1 deletion src/app/chatbot-design-studio/BrandResources.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from "@angular/core";
import { BrandService } from "../services/brand.service";
import { INFO_MENU_ITEMS, SHARE_MENU_ITEMS, SUPPORT_OPTIONS } from "./utils-menu";
import { INFO_MENU_ITEMS, LOGO_MENU_ITEMS, SHARE_MENU_ITEMS, SUPPORT_OPTIONS } from "./utils-menu";
import { BRAND_BASE_INFO, LOGOS_ITEMS, MEDIA } from "./utils-resources";
import { TYPE_URL } from "./utils";

Expand Down Expand Up @@ -36,6 +36,16 @@ export class BrandResources {
/** LOGOS_ITEMS */
Object.keys(LOGOS_ITEMS).forEach(key => { LOGOS_ITEMS[key].icon = this.brand[key] })

/** LOGO_MENU_ITEMS */
let logo_menu: Array<{ key: string, label: string, icon: string, type: TYPE_URL, status: "active" | "inactive", src?: string}> = Array.from([...LOGO_MENU_ITEMS, ...this.brand['LOGO_MENU_ITEMS']].reduce((m, o) => m.set(o.key, o), new Map).values());
logo_menu.forEach(el => {
if(!LOGO_MENU_ITEMS.find(a => a.key === el.key)) return;
LOGO_MENU_ITEMS.find(a => a.key === el.key).icon = el.icon
LOGO_MENU_ITEMS.find(a => a.key === el.key).src = el.src
LOGO_MENU_ITEMS.find(a => a.key === el.key).status = el.status
LOGO_MENU_ITEMS.find(a => a.key === el.key).icon = el.icon
})

/** INFO_MENU_ITEMS */
let result: Array<{ key: string, label: string, icon: string, type: TYPE_URL, status: "active" | "inactive", src?: string}> = Array.from([...INFO_MENU_ITEMS, ...this.brand['INFO_MENU_ITEMS']].reduce((m, o) => m.set(o.key, o), new Map).values());
result.forEach(el => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/chatbot-design-studio/utils-menu.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TYPE_URL } from "./utils"

export const LOGO_MENU_ITEMS: Array<{ key: string, label: string, icon: string, type: TYPE_URL, status:"active" | "inactive", src?: string}> = [
export var LOGO_MENU_ITEMS: Array<{ key: string, label: string, icon: string, type: TYPE_URL, status:"active" | "inactive", src?: string}> = [
{ key: 'GO_TO_DASHBOARD', label: 'GoToDashboard', icon: 'arrow_back', type: TYPE_URL.SELF, status: "active" },
// { key: 'EXPORT', label: 'Export', icon: 'file_download', type: TYPE_URL.SELF},
{ key: 'LOG_OUT', label: 'LogOut', icon: 'logout', type: TYPE_URL.SELF, status: "active" }
Expand Down

0 comments on commit cfc9771

Please sign in to comment.