From d6cc05a31294285b79507443ba577753bd3e5d1c Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Mon, 3 Jan 2022 18:19:11 +0100 Subject: [PATCH 1/2] save --- src/app/home/home.page.scss | 8 ++++++-- src/app/shared/header/header.page.ts | 20 +++++++++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/app/home/home.page.scss b/src/app/home/home.page.scss index 8b6ee1ac6..955c24836 100644 --- a/src/app/home/home.page.scss +++ b/src/app/home/home.page.scss @@ -4,6 +4,10 @@ ion-tab-bar{ --color: #061b52; } +ion-icon { + color: blue; +} + // Badge // -------------------------------------------------- @@ -18,7 +22,7 @@ ion-badge {/* */ /* display: inline-block;*/ - min-width: 18px; + min-width: 18px; font-size: $badge-font-size; /* font-weight: $badge-font-weight; line-height: 1; @@ -41,4 +45,4 @@ ion-badge {/* */ ion-tabs.tab .bottoms{ display: none; } -} \ No newline at end of file +} diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts index 3a7671340..b8d9446ec 100644 --- a/src/app/shared/header/header.page.ts +++ b/src/app/shared/header/header.page.ts @@ -99,7 +99,25 @@ export class HeaderPage implements OnInit { } locationPathname(): string { - return window.location.pathname + let path = window.location.pathname; + if(path.includes('/home/events')){ + return '/home/events'; + } + else if(path.includes('/home/agenda')){ + return '/home/agenda'; + } + else if(path.includes('/home/gabinete-digital')){ + return '/home/gabinete-digital'; + } + else if(path.includes('/home/publications')){ + return '/home/publications'; + } + else if(path.includes('/home/chat')){ + return '/home/chat'; + } + else{ + return path; + } } async openSearch() { From d22e602f137df28b68a7754aa4fbe7cedb75f437 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Tue, 4 Jan 2022 15:34:03 +0100 Subject: [PATCH 2/2] Added new icons change icon color when selected in mobile and tablet --- src/app/home/home.page.html | 31 ++++++++------ src/app/home/home.page.scss | 6 +-- src/app/home/home.page.ts | 40 ++++++++++++++++++- .../icon/tab/icons-nav-actions-selected.svg | 5 +++ src/assets/icon/tab/icons-nav-actions.svg | 5 +++ .../icon/tab/icons-nav-agenda-selected.svg | 4 ++ src/assets/icon/tab/icons-nav-agenda.svg | 4 ++ .../icon/tab/icons-nav-chat-selected.svg | 4 ++ src/assets/icon/tab/icons-nav-chat.svg | 4 ++ .../icon/tab/icons-nav-gabinete-selected.svg | 4 ++ src/assets/icon/tab/icons-nav-gabinete.svg | 4 ++ .../icon/tab/icons-nav-home-selected.svg | 3 ++ src/assets/icon/tab/icons-nav-home.svg | 5 +++ 13 files changed, 102 insertions(+), 17 deletions(-) create mode 100644 src/assets/icon/tab/icons-nav-actions-selected.svg create mode 100644 src/assets/icon/tab/icons-nav-actions.svg create mode 100644 src/assets/icon/tab/icons-nav-agenda-selected.svg create mode 100644 src/assets/icon/tab/icons-nav-agenda.svg create mode 100644 src/assets/icon/tab/icons-nav-chat-selected.svg create mode 100644 src/assets/icon/tab/icons-nav-chat.svg create mode 100644 src/assets/icon/tab/icons-nav-gabinete-selected.svg create mode 100644 src/assets/icon/tab/icons-nav-gabinete.svg create mode 100644 src/assets/icon/tab/icons-nav-home-selected.svg create mode 100644 src/assets/icon/tab/icons-nav-home.svg diff --git a/src/app/home/home.page.html b/src/app/home/home.page.html index 96fb9d42e..159253fb0 100644 --- a/src/app/home/home.page.html +++ b/src/app/home/home.page.html @@ -1,33 +1,38 @@ - - - + + + Início - - - + + + Agenda - - - + + + + Gabinete - - + + + Ações - - + + + + Chat + diff --git a/src/app/home/home.page.scss b/src/app/home/home.page.scss index 955c24836..7210b1585 100644 --- a/src/app/home/home.page.scss +++ b/src/app/home/home.page.scss @@ -1,11 +1,11 @@ ion-tab-bar{ --background: #f9f9f9; - --color: #061b52; + --color: #797979; } -ion-icon { - color: blue; +ion-tab-button{ + --color-selected: #061b52; } // Badge diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index 7d4f59046..999b9592b 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -57,6 +57,13 @@ export class HomePage implements OnInit { showAttendees: false, showAttendeeModal: false } + tabButton = { + home: false, + agenda: false, + gabinete: false, + actions: false, + chat: false, + } eventToaprove: any = { back: false, serialNumber: "", @@ -150,11 +157,42 @@ export class HomePage implements OnInit { } myWorker.postMessage('ali'); */ + this.clearTabButtonSelection(); + } + + clearTabButtonSelection(){ + this.tabButton.home = false; + this.tabButton.agenda = false; + this.tabButton.gabinete = false; + this.tabButton.actions = false; + this.tabButton.chat = false; + } + + selectedTab(url?:string){ + this.clearTabButtonSelection(); + if(url =='/home/events'){ + this.tabButton.home = true; + } + else if(url == '/home/agenda'){ + this.tabButton.agenda = true; + } + else if(url =='/home/gabinete-digital'){ + this.tabButton.gabinete = true; + } + else if(url =='/home/publications'){ + this.tabButton.actions = true; + } + else if(url == '/home/chat'){ + this.tabButton.chat = true; + } + else{ + this.clearTabButtonSelection(); + } } logDeviceInfo = async () => { const info = await Device.getInfo(); - + console.log('Device info',info); }; diff --git a/src/assets/icon/tab/icons-nav-actions-selected.svg b/src/assets/icon/tab/icons-nav-actions-selected.svg new file mode 100644 index 000000000..71b564d51 --- /dev/null +++ b/src/assets/icon/tab/icons-nav-actions-selected.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/icon/tab/icons-nav-actions.svg b/src/assets/icon/tab/icons-nav-actions.svg new file mode 100644 index 000000000..50f5fef81 --- /dev/null +++ b/src/assets/icon/tab/icons-nav-actions.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/icon/tab/icons-nav-agenda-selected.svg b/src/assets/icon/tab/icons-nav-agenda-selected.svg new file mode 100644 index 000000000..4aaf75c7e --- /dev/null +++ b/src/assets/icon/tab/icons-nav-agenda-selected.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icon/tab/icons-nav-agenda.svg b/src/assets/icon/tab/icons-nav-agenda.svg new file mode 100644 index 000000000..abcfa1e1b --- /dev/null +++ b/src/assets/icon/tab/icons-nav-agenda.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icon/tab/icons-nav-chat-selected.svg b/src/assets/icon/tab/icons-nav-chat-selected.svg new file mode 100644 index 000000000..e31e28ccd --- /dev/null +++ b/src/assets/icon/tab/icons-nav-chat-selected.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icon/tab/icons-nav-chat.svg b/src/assets/icon/tab/icons-nav-chat.svg new file mode 100644 index 000000000..b4781298a --- /dev/null +++ b/src/assets/icon/tab/icons-nav-chat.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icon/tab/icons-nav-gabinete-selected.svg b/src/assets/icon/tab/icons-nav-gabinete-selected.svg new file mode 100644 index 000000000..44a02ba44 --- /dev/null +++ b/src/assets/icon/tab/icons-nav-gabinete-selected.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icon/tab/icons-nav-gabinete.svg b/src/assets/icon/tab/icons-nav-gabinete.svg new file mode 100644 index 000000000..592210b02 --- /dev/null +++ b/src/assets/icon/tab/icons-nav-gabinete.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icon/tab/icons-nav-home-selected.svg b/src/assets/icon/tab/icons-nav-home-selected.svg new file mode 100644 index 000000000..8dbe504b4 --- /dev/null +++ b/src/assets/icon/tab/icons-nav-home-selected.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icon/tab/icons-nav-home.svg b/src/assets/icon/tab/icons-nav-home.svg new file mode 100644 index 000000000..0c712e2d1 --- /dev/null +++ b/src/assets/icon/tab/icons-nav-home.svg @@ -0,0 +1,5 @@ + + + + +