From 2c0afd02684cdf3bda374731b0359665e00ed95d Mon Sep 17 00:00:00 2001 From: Mihajlo Medjedovic Date: Thu, 23 May 2024 16:16:47 +0200 Subject: [PATCH] feat(dark mode): removing custom css rules so clarity can handle dark/light modes. Handsontable css for dark mode --- client/src/app/app.component.scss | 94 +++++++--------- client/src/app/editor/editor.component.html | 20 ++-- client/src/app/editor/editor.component.scss | 10 +- client/src/app/editor/editor.component.ts | 1 - client/src/app/group/group.component.html | 2 +- client/src/app/home/home.component.html | 10 +- client/src/app/lineage/lineage.component.html | 2 +- .../src/app/metadata/metadata.component.html | 2 +- .../approve-details.component.html | 8 +- .../app/review/approve/approve.component.html | 19 +--- .../review/submitter/submitter.component.html | 20 +--- client/src/app/role/role.component.html | 2 +- client/src/app/services/app.service.ts | 1 + .../app/shared/dc-tree/dc-tree.component.html | 2 +- .../requests-modal.component.scss | 1 - .../shared/viewboxes/viewboxes.component.html | 1 + .../shared/viewboxes/viewboxes.component.ts | 2 + client/src/app/stage/stage.component.html | 2 + client/src/app/stage/stage.component.ts | 6 +- .../system/models/environment-info.model.ts | 1 + client/src/app/system/system.component.html | 12 +- client/src/app/system/system.component.scss | 3 +- client/src/app/user/user.component.html | 2 +- client/src/app/viewer/viewer.component.html | 34 +++--- client/src/app/viewer/viewer.component.scss | 53 +++++++-- client/src/app/viewer/viewer.component.ts | 8 +- client/src/app/xlmap/xlmap.component.html | 12 +- client/src/app/xlmap/xlmap.component.ts | 6 + client/src/styles.scss | 103 ++++++++++++++---- sas/sasjs/sasjsconfig.json | 2 +- 30 files changed, 273 insertions(+), 168 deletions(-) diff --git a/client/src/app/app.component.scss b/client/src/app/app.component.scss index d1741a0..3719952 100644 --- a/client/src/app/app.component.scss +++ b/client/src/app/app.component.scss @@ -133,49 +133,19 @@ header { color: #fff; } -@media screen and (max-width: 768px) { - .navBarResp { - display: flex; - justify-content: flex-start; - background: #495A67; - color: #fff; - } - - .main-container .sub-nav.clr-nav-level-1 .nav .nav-link, .main-container .sub-nav.clr-nav-level-2 .nav .nav-link, .main-container .subnav.clr-nav-level-1 .nav .nav-link, .main-container .subnav.clr-nav-level-2 .nav .nav-link { - padding: 0 .5rem 0 1rem; - width: 100%; - max-width: 100%; - overflow: hidden; - text-overflow: ellipsis; - border-radius: .125rem 0 0 .125rem; - color: #95c84b; - } - - - - .card-block, .card-footer { - padding: 10px 0px 0px 0px; - } - - .main-container[_ngcontent-c0] .content-container[_ngcontent-c0] .content-area[_ngcontent-c0] { - padding: 0rem 0rem 0rem 0rem; - } - -} ::ng-deep { .htInvalid { - background: black!important; -} + background: black!important; + } @media screen and (max-width:480px) { - h2 { - font-size: .7rem!important; - + h2 { + font-size: .7rem!important; + } + h3 { + font-size: .7rem; + } } - h3 { - font-size: .7rem; - } -} .nav-link { padding: 0rem 1rem 0rem 1rem; @@ -299,7 +269,7 @@ header { filter: brightness(1.2); } - .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) ~ .handsontable tbody tr th, .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) ~ .handsontable:not(.ht_clone_top) thead tr th:first-child { + .ht_master:not(.emptyColumns) ~ .handsontable tbody tr th, .ht_master:not(.emptyColumns) ~ .handsontable:not(.ht_clone_top) thead tr th:first-child { background-color: #2d4048; } } @@ -317,20 +287,11 @@ header { } } - .card { - box-shadow: 0 0.125rem 0 0 #d7d7d7; - border-radius: .0rem; - border: 1px solid transparent; - // min-height: calc(100vh - 150px); - } - .datagrid-compact, .datagrid-history{ .datagrid { border-collapse: separate; border: 1px solid transparent; border-radius: .125rem; - background-color: #fff; - color: #565656; margin: 0; margin-top: 1rem; max-width: 100%; @@ -352,8 +313,8 @@ header { } .datagrid-footer { position: absolute; - right: 15px; - top: 2px; + right: 30px; + top: 1px; } .datagrid .datagrid-head { background-color: #fff; @@ -387,8 +348,6 @@ header { border-collapse: separate; border: 1px solid transparent; border-radius: 0px; - background-color: #fff; - color: #565656; margin: 0; margin-top: 1rem; max-width: 100%; @@ -399,7 +358,6 @@ header { font-size: .45833rem; font-weight: 600; letter-spacing: .03em; - background-color: #fff; vertical-align: bottom; border-bottom: 1px solid #ccc; text-transform: uppercase; @@ -422,4 +380,34 @@ header { max-width: 400px; width: 100%; } +} + +@media screen and (max-width: 768px) { + .navBarResp { + display: flex; + justify-content: flex-start; + background: #495A67; + color: #fff; + } + + .main-container .sub-nav.clr-nav-level-1 .nav .nav-link, .main-container .sub-nav.clr-nav-level-2 .nav .nav-link, .main-container .subnav.clr-nav-level-1 .nav .nav-link, .main-container .subnav.clr-nav-level-2 .nav .nav-link { + padding: 0 .5rem 0 1rem; + width: 100%; + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + border-radius: .125rem 0 0 .125rem; + color: #95c84b; + } + + + + .card-block, .card-footer { + padding: 10px 0px 0px 0px; + } + + .main-container[_ngcontent-c0] .content-container[_ngcontent-c0] .content-area[_ngcontent-c0] { + padding: 0rem 0rem 0rem 0rem; + } + } \ No newline at end of file diff --git a/client/src/app/editor/editor.component.html b/client/src/app/editor/editor.component.html index fa4c73d..76bb5b2 100644 --- a/client/src/app/editor/editor.component.html +++ b/client/src/app/editor/editor.component.html @@ -362,8 +362,8 @@ Loading... -
-

Loading table

+
+

Loading table

@@ -372,8 +372,8 @@ -
-

Loading table error

+
+

Loading table error

@@ -398,6 +398,7 @@ hotId="hotInstance" id="hotTable" class="edit-hot" + className="htDark" [class.hidden]="hotTable.hidden" [licenseKey]="hotTable.licenseKey" > @@ -486,11 +487,13 @@ support@datacontroller.io
-
- +
+
@@ -520,6 +522,7 @@ [disabled]="!validationDone" type="submit" class="btn btn-sm btn-success-outline m-0" + tabindex="0" (click)="saveTable(hotTable.data)" > Submit @@ -528,6 +531,7 @@ id="cancelSubmitBtn" type="button" class="btn btn-sm btn-outline" + tabindex="0" (click)="cancelSubmit(); submit = false; validationDone = 0" > Cancel diff --git a/client/src/app/editor/editor.component.scss b/client/src/app/editor/editor.component.scss index acd1f82..e3d8e95 100644 --- a/client/src/app/editor/editor.component.scss +++ b/client/src/app/editor/editor.component.scss @@ -21,12 +21,12 @@ hot-table { .handsontable tbody th.ht__highlight, .handsontable thead th.ht__highlight { &.primaryKeyHeaderStyle { - background: #306b00b0; + background-color: #306b00b0 !important; } } .primaryKeyHeaderStyle { - background: #306b006e; + background-color: #306b006e !important; } th.readonlyCell { @@ -41,6 +41,12 @@ hot-table { } } +.submit-reason { + min-height: 120px; + max-height: 120px; + height: 120px; +} + .infoBar { margin-top:14px; background: #495967; diff --git a/client/src/app/editor/editor.component.ts b/client/src/app/editor/editor.component.ts index e188734..de38f95 100644 --- a/client/src/app/editor/editor.component.ts +++ b/client/src/app/editor/editor.component.ts @@ -3193,7 +3193,6 @@ export class EditorComponent implements OnInit, AfterViewInit { rowHeights: 24, maxRows: this.licenceState.value.editor_rows_allowed || Infinity, invalidCellClassName: 'htInvalid', - className: 'htDark', dropdownMenu: { items: { make_read_only: { diff --git a/client/src/app/group/group.component.html b/client/src/app/group/group.component.html index 492873a..509113d 100644 --- a/client/src/app/group/group.component.html +++ b/client/src/app/group/group.component.html @@ -28,7 +28,7 @@

diff --git a/client/src/app/home/home.component.html b/client/src/app/home/home.component.html index 97b3106..cb446a9 100644 --- a/client/src/app/home/home.component.html +++ b/client/src/app/home/home.component.html @@ -87,7 +87,7 @@ (click)="!tableLocked ? onTableClick(libTable, library) : ''" class="clr-treenode-link" [class.dc-locked-control]="tableLocked" - [class.table-active]="libTabActive(library.LIBRARYREF, libTable)" + [class.active]="libTabActive(library.LIBRARYREF, libTable)" > @@ -128,12 +128,12 @@ size="60" class="is-info icon-dc-fill" > -

+

Please select a table -

-

+

+

No Editable Tables Configured -

+

diff --git a/client/src/app/lineage/lineage.component.html b/client/src/app/lineage/lineage.component.html index 97ecfbf..de97743 100644 --- a/client/src/app/lineage/lineage.component.html +++ b/client/src/app/lineage/lineage.component.html @@ -141,7 +141,7 @@ size="60" class="is-info icon-dc-fill" > -

Please select a column or table

+

Please select a column or table

diff --git a/client/src/app/metadata/metadata.component.html b/client/src/app/metadata/metadata.component.html index 97a7186..c8b2563 100644 --- a/client/src/app/metadata/metadata.component.html +++ b/client/src/app/metadata/metadata.component.html @@ -73,7 +73,7 @@ size="60" class="is-info icon-dc-fill" > -

Please select a type

+

Please select a type

diff --git a/client/src/app/review/approve-details/approve-details.component.html b/client/src/app/review/approve-details/approve-details.component.html index b505669..10916d5 100644 --- a/client/src/app/review/approve-details/approve-details.component.html +++ b/client/src/app/review/approve-details/approve-details.component.html @@ -311,8 +311,8 @@ class="h-24vh d-flex flex-column justify-content-center align-items-center" > Loading... -
-

Loading table

+
+

Loading table

@@ -519,8 +519,8 @@ class="h-25vh d-flex flex-column justify-content-center align-items-center" > Loading... -
-

Loading table

+
+

Loading table

diff --git a/client/src/app/review/approve/approve.component.html b/client/src/app/review/approve/approve.component.html index 5c3520b..d7ed3a1 100644 --- a/client/src/app/review/approve/approve.component.html +++ b/client/src/app/review/approve/approve.component.html @@ -99,21 +99,10 @@ - - items per page - - - {{ pagination.firstItem + 1 }} - {{ pagination.lastItem + 1 }} of - {{ pagination.totalItems }} approvals + + + Items per page + {{ pagination.firstItem + 1 }} - {{ pagination.lastItem + 1 }} of {{ pagination.totalItems }} approvals diff --git a/client/src/app/review/submitter/submitter.component.html b/client/src/app/review/submitter/submitter.component.html index f9e6547..3c1fe92 100644 --- a/client/src/app/review/submitter/submitter.component.html +++ b/client/src/app/review/submitter/submitter.component.html @@ -86,22 +86,10 @@ - - items per page - - - {{ pagination.firstItem + 1 }} - - {{ pagination.lastItem + 1 }} of - {{ pagination.totalItems }} submissions + + + Items per page + {{ pagination.firstItem + 1 }} - {{ pagination.lastItem + 1 }} of {{ pagination.totalItems }} submissions diff --git a/client/src/app/role/role.component.html b/client/src/app/role/role.component.html index ce26f76..d264f29 100644 --- a/client/src/app/role/role.component.html +++ b/client/src/app/role/role.component.html @@ -27,7 +27,7 @@

diff --git a/client/src/app/services/app.service.ts b/client/src/app/services/app.service.ts index 105026e..92093ad 100644 --- a/client/src/app/services/app.service.ts +++ b/client/src/app/services/app.service.ts @@ -95,6 +95,7 @@ export class AppService { MEMSIZE: res.MEMSIZE, SYSPROCESSMODE: res.SYSPROCESSMODE, SYSHOSTNAME: res.SYSHOSTNAME, + SYSUSERID: res.SYSUSERID, SYSHOSTINFOLONG: res.SYSHOSTINFOLONG, SYSENCODING: res.SYSENCODING, AUTOEXEC: res.AUTOEXEC, diff --git a/client/src/app/shared/dc-tree/dc-tree.component.html b/client/src/app/shared/dc-tree/dc-tree.component.html index eceabef..677dbe6 100644 --- a/client/src/app/shared/dc-tree/dc-tree.component.html +++ b/client/src/app/shared/dc-tree/dc-tree.component.html @@ -93,7 +93,7 @@ " class="clr-treenode-link" [class.dc-locked-control]="tableLocked" - [class.table-active]="libTabActive(library.LIBRARYREF, libTable)" + [class.active]="libTabActive(library.LIBRARYREF, libTable)" > diff --git a/client/src/app/shared/requests-modal/requests-modal.component.scss b/client/src/app/shared/requests-modal/requests-modal.component.scss index a410079..37484d3 100644 --- a/client/src/app/shared/requests-modal/requests-modal.component.scss +++ b/client/src/app/shared/requests-modal/requests-modal.component.scss @@ -70,7 +70,6 @@ border-radius: 3px; border: 1px solid #e2e2e2; - background-color: #fbfbfb; height: 48vh; overflow: auto; diff --git a/client/src/app/shared/viewboxes/viewboxes.component.html b/client/src/app/shared/viewboxes/viewboxes.component.html index 50c6b38..8f8079f 100644 --- a/client/src/app/shared/viewboxes/viewboxes.component.html +++ b/client/src/app/shared/viewboxes/viewboxes.component.html @@ -389,6 +389,7 @@ *ngIf="viewboxTableIndex > -1" [hotId]="'hotInstance_viewbox_' + viewbox.id" id="hotTable" + className="htDark" [readOnly]="true" [modifyColWidth]="maxWidthCheker" [copyPaste]="viewboxTables[viewboxTableIndex].hotTable.copyPaste" diff --git a/client/src/app/shared/viewboxes/viewboxes.component.ts b/client/src/app/shared/viewboxes/viewboxes.component.ts index 9566441..b757793 100644 --- a/client/src/app/shared/viewboxes/viewboxes.component.ts +++ b/client/src/app/shared/viewboxes/viewboxes.component.ts @@ -433,6 +433,8 @@ export class ViewboxesComponent implements OnInit, AfterViewInit, OnDestroy { viewboxTable!.hotTable.headerPks.indexOf(column) > -1 if (isPKCol) th.classList.add('primaryKeyHeaderStyle') + // Dark mode + th.classList.add('darkTH') } }) hotInstance?.render() diff --git a/client/src/app/stage/stage.component.html b/client/src/app/stage/stage.component.html index 9015138..a81ab4e 100644 --- a/client/src/app/stage/stage.component.html +++ b/client/src/app/stage/stage.component.html @@ -118,12 +118,14 @@ diff --git a/client/src/app/stage/stage.component.ts b/client/src/app/stage/stage.component.ts index abe0e48..4eb702f 100644 --- a/client/src/app/stage/stage.component.ts +++ b/client/src/app/stage/stage.component.ts @@ -32,7 +32,11 @@ export class StageComponent implements OnInit { height: 500, settings: {}, licenseKey: undefined, - maxRows: this.licenceState.value.stage_rows_allowed || Infinity + maxRows: this.licenceState.value.stage_rows_allowed || Infinity, + afterGetColHeader: (column, th, headerLevel) => { + // Dark mode + th.classList.add('darkTH') + }, } constructor( diff --git a/client/src/app/system/models/environment-info.model.ts b/client/src/app/system/models/environment-info.model.ts index b44ae44..4dcae15 100644 --- a/client/src/app/system/models/environment-info.model.ts +++ b/client/src/app/system/models/environment-info.model.ts @@ -6,6 +6,7 @@ export interface EnvironmentInfo { MEMSIZE: string SYSPROCESSMODE: string SYSHOSTNAME: string + SYSUSERID: string SYSHOSTINFOLONG: string SYSENCODING: string AUTOEXEC: string diff --git a/client/src/app/system/system.component.html b/client/src/app/system/system.component.html index 51b3c52..f91fbdd 100644 --- a/client/src/app/system/system.component.html +++ b/client/src/app/system/system.component.html @@ -36,6 +36,10 @@ SYSHOSTNAME: {{ environmentInfo?.SYSHOSTNAME }}

+

+ SYSUSERID: + {{ environmentInfo?.SYSUSERID }} +

SYSHOSTINFOLONG: {{ environmentInfo?.SYSHOSTINFOLONG }} @@ -47,10 +51,6 @@

AUTOEXEC: {{ environmentInfo?.AUTOEXEC }}

-

- DC ADMIN GROUP: - {{ environmentInfo?.DC_ADMIN_GROUP }} -

@@ -73,6 +73,10 @@

HTTP: {{ http ? 'YES' : 'NO' }}

+

+ DC Admin Group: + {{ environmentInfo?.DC_ADMIN_GROUP }} +

diff --git a/client/src/app/system/system.component.scss b/client/src/app/system/system.component.scss index 307e7db..57c64a5 100644 --- a/client/src/app/system/system.component.scss +++ b/client/src/app/system/system.component.scss @@ -27,7 +27,8 @@ } .dark { - color: black; + font-weight: bold; + margin-left: 5px; } @media (max-width: 993px) { diff --git a/client/src/app/user/user.component.html b/client/src/app/user/user.component.html index 0d20d4b..fb67bdc 100644 --- a/client/src/app/user/user.component.html +++ b/client/src/app/user/user.component.html @@ -27,7 +27,7 @@

diff --git a/client/src/app/viewer/viewer.component.html b/client/src/app/viewer/viewer.component.html index a5c7aaa..fd78523 100644 --- a/client/src/app/viewer/viewer.component.html +++ b/client/src/app/viewer/viewer.component.html @@ -93,7 +93,7 @@ (click)="!tableLocked ? onTableClick(libTable, library) : ''" class="clr-treenode-link" [class.dc-locked-control]="tableLocked" - [class.table-active]="libTabActive(library.LIBRARYREF, libTable)" + [class.active]="libTabActive(library.LIBRARYREF, libTable)" > @@ -197,7 +197,7 @@