From fa9380e652794edfa01d4ad4a8544d8122984dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadeusz=20So=C5=9Bnierz?= Date: Thu, 3 Sep 2020 20:23:09 +0200 Subject: [PATCH 1/6] feat(webmail): Integrate startdesk as a webmail "folder" --- src/app/app.component.html | 5 +++++ src/app/app.component.ts | 11 +++++++++++ src/app/app.module.ts | 5 +++++ src/styles.scss | 4 ++-- 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index d8049445f..62fa8b58b 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -72,6 +72,11 @@ {{ draftDeskService.draftModels.length }} + + +

Overview

+
+ diff --git a/src/app/app.component.ts b/src/app/app.component.ts index c3863f578..24fbc1619 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -97,6 +97,7 @@ export class AppComponent implements OnInit, AfterViewInit, CanvasTableSelectLis selectedFolder = 'Inbox'; composeSelected: boolean; draftsSelected: boolean; + overviewSelected: boolean; timeOfDay: string; @@ -384,6 +385,7 @@ export class AppComponent implements OnInit, AfterViewInit, CanvasTableSelectLis ).subscribe((event: NavigationEnd) => { this.composeSelected = this.router.url === '/compose?new=true'; this.draftsSelected = this.router.url === '/compose'; + this.overviewSelected = this.router.url === '/overview'; }); // Download visible messages in the background @@ -477,6 +479,15 @@ export class AppComponent implements OnInit, AfterViewInit, CanvasTableSelectLis ); } + public overview() { + this.router.navigate(['/overview']); + setTimeout(() => { + if (this.mobileQuery.matches && this.sidemenu.opened) { + this.sidemenu.close(); + } + }, 0); + } + renameFolder(folder: RenameFolderEvent) { this.rmmapi.renameFolder( folder.id, folder.name diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 5d210d8f2..30ef31680 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -81,6 +81,7 @@ import { HotkeyModule } from 'angular2-hotkeys'; import { RMM } from './rmm'; import { PopularRecipientsComponent } from './popular-recipients/popular-recipients.component'; import { OverviewComponent } from './start/overview.component'; +import { StartDeskComponent } from './start/startdesk.component'; import { SearchService } from './xapian/searchservice'; import { SavedSearchesComponent } from './saved-searches/saved-searches.component'; import { SavedSearchesService } from './saved-searches/saved-searches.service'; @@ -107,6 +108,10 @@ const routes: Routes = [ path: 'compose', component: DraftDeskComponent }, + { + path: 'overview', + component: StartDeskComponent + }, { path: 'welcome', component: WelcomeDeskComponent diff --git a/src/styles.scss b/src/styles.scss index e41f6033b..9699baee2 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -605,13 +605,13 @@ a.mainMenu, mat-menu a, .mat-nav-list a { } @media(min-width: 1025px) { - #composeButton, #draftsButton { + #composeButton, #draftsButton, #overviewButton { display: block; } } @media(max-width: 1024px) { - #composeButton, #draftsButton { + #composeButton, #draftsButton, #overviewButton { display: none; } } From 9d90cdfcf69c6f3b1202c33d2791ecfc9eeb2737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadeusz=20So=C5=9Bnierz?= Date: Thu, 3 Sep 2020 20:23:47 +0200 Subject: [PATCH 2/6] style(startdesk): Make startedesk layout fit webmail better --- src/app/start/startdesk.component.html | 4 + src/app/start/startdesk.component.scss | 202 +++++++++++++------------ 2 files changed, 106 insertions(+), 100 deletions(-) diff --git a/src/app/start/startdesk.component.html b/src/app/start/startdesk.component.html index a68ffd284..312ef4031 100644 --- a/src/app/start/startdesk.component.html +++ b/src/app/start/startdesk.component.html @@ -1,3 +1,4 @@ +
@@ -93,6 +95,7 @@

Activity highlights

+ diff --git a/src/app/start/startdesk.component.scss b/src/app/start/startdesk.component.scss index ecc7dfbbe..6a1136215 100644 --- a/src/app/start/startdesk.component.scss +++ b/src/app/start/startdesk.component.scss @@ -4,116 +4,118 @@ $rmm-default-highlight: mat-palette($mat-light-blue, 50, 25, 75); #startdesk { position: relative; margin: 0px 20px 100px 30px; - + #heading { - display: flex; + display: flex; } #title { - display: flex; - flex-grow: 1; + display: flex; + flex-grow: 1; } #panelControls { - display: flex; - flex-grow: 1; - justify-content: flex-end; - align-items: center; + display: flex; + flex-grow: 1; + justify-content: flex-end; + align-items: center; } h3 { - margin: 0; - padding: 0; - } - mat-card { - float: left; - margin: 0 20px 20px 0; - width: 90%; - padding: 20px; - } - #panelControls mat-icon { - vertical-align: bottom; - line-height: 24px; - } - #panelControlSmall { - font-size: 16px; - width: 16px; - height: auto; - } - #panelControlMedium { - font-size: 24px; - width: 24px; - height: auto; - } - #panelControlLarge { - font-size: 40px; - width: 40px; - height: auto; - } - #dashdeskOverviewContainer { - display: block; - width: 100%; - height: 100%; - - .dashdeskOverview { - width: 90%; - } - .dashdeskOverview mat-card { - display: flex; - } - .contact { - width: 33%; - font-weight: bold; - } - .contact mat-icon { - margin-right: 10px; - font-size: 40px; - width: 40px; - height: auto; - } - .contact h4 { - display: inline; - margin: 10px 0; - } - .messages { - margin: 0 5px; - } - .subject { - width: 66%; - text-decoration: underline; - } - .subject ul { - margin: 0; - } - .subject li { - list-style-type: square; - } - } - #dashdeskSections { - mat-card { - width: 43%; - height: 250px; - padding: 20px; - } - mat-card div { - margin: 10px 0; - } - mat-card h3 mat-icon { - font-size: 1.4em; - height: 1em; - margin-right: 20px; - } - .start_chart { - font-size: 3em; - height: auto; - } + margin: 0; + padding: 0; } +} - .noMessagesCard { +.dashdeskOverview mat-card { + //float: left; + //margin: 0 20px 20px 0; + //width: 90%; + padding: 20px; + margin: 20px; +} +#panelControls mat-icon { + vertical-align: bottom; + line-height: 24px; +} +#panelControlSmall { + font-size: 16px; + width: 16px; + height: auto; +} +#panelControlMedium { + font-size: 24px; + width: 24px; + height: auto; +} +#panelControlLarge { + font-size: 40px; + width: 40px; + height: auto; +} +#dashdeskOverviewContainer { + display: block; +// width: 100%; +// height: 100%; +// +// .dashdeskOverview { +// width: 90%; +// } + .dashdeskOverview mat-card { display: flex; - justify-content: center; } - - #hilightsSettings { - display: flex; - justify-content: space-around; - align-items: center; + .contact { + width: 33%; + font-weight: bold; } + .contact mat-icon { + margin-right: 10px; + font-size: 40px; + width: 40px; + height: auto; + } + .contact h4 { + display: inline; + margin: 10px 0; + } + .messages { + margin: 0 5px; + } + .subject { + width: 66%; + text-decoration: underline; + } + .subject ul { + margin: 0; + } + .subject li { + list-style-type: square; + } +} +#dashdeskSections { + mat-card { + width: 43%; + height: 250px; + padding: 20px; + } + mat-card div { + margin: 10px 0; + } + mat-card h3 mat-icon { + font-size: 1.4em; + height: 1em; + margin-right: 20px; + } + .start_chart { + font-size: 3em; + height: auto; + } +} + +.noMessagesCard { + display: flex; + justify-content: center; +} + +#hilightsSettings { + display: flex; + justify-content: space-around; + align-items: center; } From 1c2e2491ed937c8033d3fc77d4605419465f85c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadeusz=20So=C5=9Bnierz?= Date: Thu, 3 Sep 2020 20:24:08 +0200 Subject: [PATCH 3/6] fix(startdesk): Remove timeperiod-specific wording --- src/app/start/startdesk.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/start/startdesk.component.html b/src/app/start/startdesk.component.html index 312ef4031..8680f6c6f 100644 --- a/src/app/start/startdesk.component.html +++ b/src/app/start/startdesk.component.html @@ -44,7 +44,7 @@

Activity highlights

{{ sender.icon }}

{{ sender.name }}

-
{{ sender.emails.length }} messages today
+
{{ sender.emails.length }} messages
    From 2c23e8dd033e617889a91605b09e4a33db5ada2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadeusz=20So=C5=9Bnierz?= Date: Thu, 3 Sep 2020 20:24:39 +0200 Subject: [PATCH 4/6] fix(startdesk): Remove Sent messages from overview --- src/app/start/startdesk.component.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/start/startdesk.component.ts b/src/app/start/startdesk.component.ts index 1ecd174a8..f4bdc16bd 100644 --- a/src/app/start/startdesk.component.ts +++ b/src/app/start/startdesk.component.ts @@ -86,8 +86,13 @@ export class StartDeskComponent implements OnInit { const dateRange = this.dateRange(); const messages = this.searchService.getMessagesInTimeRange( dateRange[0], dateRange[1] - ).map(id => this.searchService.getDocData(id) - ).filter(msg => !this.unreadOnly || !msg.seen); + ).map( + id => this.searchService.getDocData(id) + ).filter( + msg => !this.unreadOnly || !msg.seen + ).filter( + msg => msg.folder !== 'Sent' + ); // Ideally, we'll obtain a list of mailing lists from List-ID across the entirety of search index // We don't have that luxury currently, so this hack will have to do From 6d7b36c92ae80295e2f43dc14ece46bad1a61568 Mon Sep 17 00:00:00 2001 From: Geir Thomas Andersen Date: Wed, 16 Sep 2020 02:23:53 +0200 Subject: [PATCH 5/6] style(start): Condense layout in heading area and made cards wider. --- src/app/start/startdesk.component.html | 31 +++++++++++--------- src/app/start/startdesk.component.scss | 40 +++++++++++++++++++------- 2 files changed, 46 insertions(+), 25 deletions(-) diff --git a/src/app/start/startdesk.component.html b/src/app/start/startdesk.component.html index 8680f6c6f..7169f397d 100644 --- a/src/app/start/startdesk.component.html +++ b/src/app/start/startdesk.component.html @@ -15,20 +15,23 @@

    Runbox Dash Desk

    -

    blur_onCommunication overview

    -

    Activity highlights

    -
    - - Time span - - Today - Yesterday - Last 3 days - Last 7 days - Custom (NYI) - - - Unread only +

    blur_on Communication overview

    +
    +

    Activity highlights

    +
    + + + Today + Yesterday + Last 3 days + Last 7 days + Custom (NYI) + + +
    +
    + Unread only +
    diff --git a/src/app/start/startdesk.component.scss b/src/app/start/startdesk.component.scss index 6a1136215..fa16567e5 100644 --- a/src/app/start/startdesk.component.scss +++ b/src/app/start/startdesk.component.scss @@ -29,7 +29,7 @@ $rmm-default-highlight: mat-palette($mat-light-blue, 50, 25, 75); //margin: 0 20px 20px 0; //width: 90%; padding: 20px; - margin: 20px; + margin: 10px 0; } #panelControls mat-icon { vertical-align: bottom; @@ -61,6 +61,34 @@ $rmm-default-highlight: mat-palette($mat-light-blue, 50, 25, 75); .dashdeskOverview mat-card { display: flex; } + .noMessagesCard { + display: flex; + justify-content: center; + } + + #hilightsHeading { + display: flex; + margin: 10px 0; + } + #hilightsHeader { + margin: 10px 0; + display: flex; + flex-grow: 1; + justify-content: space-around; + align-items: center; + } + #hilightsSettings { + display: flex; + flex-grow: 1; + justify-content: space-around; + align-items: center; + } + #unreadOnly { + display: flex; + flex-grow: 1; + justify-content: space-around; + align-items: center; + } .contact { width: 33%; font-weight: bold; @@ -109,13 +137,3 @@ $rmm-default-highlight: mat-palette($mat-light-blue, 50, 25, 75); } } -.noMessagesCard { - display: flex; - justify-content: center; -} - -#hilightsSettings { - display: flex; - justify-content: space-around; - align-items: center; -} From c697811b7fdd4607cd506d4aa1e0edb5e5b24c6a Mon Sep 17 00:00:00 2001 From: Geir Thomas Andersen Date: Mon, 9 Nov 2020 19:31:25 +0100 Subject: [PATCH 6/6] feat(start): Add folder selector. --- src/app/start/startdesk.component.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/start/startdesk.component.html b/src/app/start/startdesk.component.html index c9f3d5ef8..4a1564e46 100644 --- a/src/app/start/startdesk.component.html +++ b/src/app/start/startdesk.component.html @@ -28,6 +28,12 @@

    Activity highlights

    Custom (NYI) + + + Current folder + All folders + +
    Unread only @@ -128,5 +134,3 @@

    assignmentTask highlights

    Upcoming: Destroy One Ring insert_chart
    --> -
    - -->