From f5b546b5f4a4654026ab522febb036500b080ec3 Mon Sep 17 00:00:00 2001 From: vivganes Date: Sat, 18 Nov 2023 08:28:13 +0530 Subject: [PATCH] new looks from clarity --- angular.json | 4 +- package-lock.json | 31 +- package.json | 6 +- src/app/app.component.html | 22 +- src/app/app.component.ts | 10 +- .../event-card/event-card.component.html | 21 +- .../event-card/event-card.component.ts | 22 +- src/app/pipe/short-number.pipe.ts | 2 +- src/assets/clr-ui-dark.css | 15502 -------------- src/assets/clr-ui.css | 17282 ---------------- src/index.html | 1 - src/styles.scss | 20 + 12 files changed, 92 insertions(+), 32831 deletions(-) delete mode 100644 src/assets/clr-ui-dark.css delete mode 100644 src/assets/clr-ui.css diff --git a/angular.json b/angular.json index 7b5adb3..29154b9 100644 --- a/angular.json +++ b/angular.json @@ -32,7 +32,7 @@ "src/.well-known" ], "styles": [ - "src/styles.scss" + "node_modules/@clr/ui/clr-ui.min.css", "src/styles.scss" ], "scripts": [], "serviceWorker": true, @@ -99,7 +99,7 @@ "src/.well-known" ], "styles": [ - "src/styles.scss" + "node_modules/@clr/ui/clr-ui.min.css", "src/styles.scss" ], "scripts": [] } diff --git a/package-lock.json b/package-lock.json index 814d65f..c63ae0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,9 +17,9 @@ "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", "@angular/service-worker": "^16.2.0", - "@cds/core": "^6.7.0", - "@clr/angular": "^15.12.4", - "@clr/ui": "^15.12.4", + "@cds/core": "6.8.0", + "@clr/angular": "16.0.3", + "@clr/ui": "16.0.3", "@fractalsoftware/random-avatar-generator": "^1.0.11", "@getalby/bitcoin-connect": "^2.3.1", "@ngx-translate/core": "^15.0.0", @@ -2374,9 +2374,9 @@ "optional": true }, "node_modules/@cds/core": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@cds/core/-/core-6.7.0.tgz", - "integrity": "sha512-egrsxwOJQXlhOdmrK5uEYmfpeJohdnjw7EKXBtxzyfuJCBRS3Qx+0hI+3CdvX9Ra0EZosjjNZyNCiCWnGFEX0Q==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/@cds/core/-/core-6.8.0.tgz", + "integrity": "sha512-KL3/tfJgCwcLuUpG5lSJcpTkwUN4y7/P68fcEbaid5qCSrTuZPoldKsjypXwXDZUmQRup1oe+jMuFkIP9ZT9lg==", "dependencies": { "lit": "^2.1.3", "ramda": "^0.29.0", @@ -2388,9 +2388,9 @@ } }, "node_modules/@clr/angular": { - "version": "15.12.4", - "resolved": "https://registry.npmjs.org/@clr/angular/-/angular-15.12.4.tgz", - "integrity": "sha512-CgJnIZyKGfYYRzfI6HLtQ82zgZkzYR0sm/HgjDXB1cN2rmthRfHgMZTTUO1QXLShujgmzk3dNjxq2GYG/s9dlQ==", + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/@clr/angular/-/angular-16.0.3.tgz", + "integrity": "sha512-ZZhakqFojuBFvhVGlVRq6xUB4py/qmBQqMuTFQwIPlb63T83CX+JHU0JG4l2/+XxQOTuyBrkgUdA3RAysTLTfQ==", "dependencies": { "tslib": "^2.3.0" }, @@ -2398,14 +2398,17 @@ "@angular/cdk": "15 || 16", "@angular/common": "15 || 16", "@angular/core": "15 || 16", - "@cds/core": "^5.6.0 || ^6.0.0", - "@clr/ui": "15.12.4" + "@cds/core": ">= 6.7.0", + "@clr/ui": "16.0.3" } }, "node_modules/@clr/ui": { - "version": "15.12.4", - "resolved": "https://registry.npmjs.org/@clr/ui/-/ui-15.12.4.tgz", - "integrity": "sha512-uGfJeO1gnIYT9WdrmT0w1qiNWsNU47YtMpxlFHZ7/LFO6Zd2kIClWMWpTwDvYgPsh0v4YNriRpy/VOMtjPaMyQ==" + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/@clr/ui/-/ui-16.0.3.tgz", + "integrity": "sha512-oxA/lTE+KXYXn+P83Sno3f6Dw9GKvyXp0FncSVG3iTPbkZ+SKNmbepEEqbWGT1N/nc8NJVnfmAQMebE1ydzF/w==", + "peerDependencies": { + "@cds/core": "^6.7.0" + } }, "node_modules/@colors/colors": { "version": "1.5.0", diff --git a/package.json b/package.json index 87ce08b..aede8cf 100644 --- a/package.json +++ b/package.json @@ -23,9 +23,9 @@ "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", "@angular/service-worker": "^16.2.0", - "@cds/core": "^6.7.0", - "@clr/angular": "^15.12.4", - "@clr/ui": "^15.12.4", + "@cds/core": "6.8.0", + "@clr/angular": "16.0.3", + "@clr/ui": "16.0.3", "@fractalsoftware/random-avatar-generator": "^1.0.11", "@getalby/bitcoin-connect": "^2.3.1", "@ngx-translate/core": "^15.0.0", diff --git a/src/app/app.component.html b/src/app/app.component.html index 9284339..48f53f5 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -6,15 +6,15 @@ zapddit -
- -
+ + +
- + @@ -30,8 +30,14 @@ Login + + Onboarding Wizard + Profile Preferences + + Logout +
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index e187f6f..2ed6f4f 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, OnDestroy} from '@angular/core'; +import { Component, OnInit, OnDestroy, Inject} from '@angular/core'; import {TranslateService} from "@ngx-translate/core"; import '@cds/core/icon/register.js'; @@ -53,6 +53,7 @@ import { BreakpointState } from '@angular/cdk/layout'; import { BtcConnectService } from './service/btc-connect.service'; +import { DOCUMENT } from '@angular/common'; ClarityIcons.addIcons( connectIcon, @@ -108,7 +109,8 @@ export class AppComponent implements OnInit, OnDestroy{ currentLanguage:string; constructor(private translate: TranslateService, public ndkProvider: NdkproviderService, router: Router, - private breakpointObserver: BreakpointObserver, private communityService:CommunityService, private topicService:TopicService, private btcConnectService:BtcConnectService) { + private breakpointObserver: BreakpointObserver, private communityService:CommunityService, + private topicService:TopicService, private btcConnectService:BtcConnectService, @Inject(DOCUMENT) private document: Document) { translate.setDefaultLang('en'); var language = localStorage.getItem(Constants.LANGUAGE); @@ -183,9 +185,7 @@ export class AppComponent implements OnInit, OnDestroy{ } setTheme(dark:boolean){ - if((document.getElementById('zapddit-theme'))){ - (document.getElementById('zapddit-theme')).href="/assets/clr-ui"+(dark?"-dark":"")+".css"; - } + this.document.body.setAttribute('cds-theme',(dark?'dark':'light')) this.darkTheme = dark; } diff --git a/src/app/component/event-card/event-card.component.html b/src/app/component/event-card/event-card.component.html index 45ab8c2..a723b84 100644 --- a/src/app/component/event-card/event-card.component.html +++ b/src/app/component/event-card/event-card.component.html @@ -90,10 +90,10 @@
-
+
-
+
@@ -193,15 +193,15 @@