From 8f41369d1c2d8827f922fd0d0a5dc551c7a0827d Mon Sep 17 00:00:00 2001 From: Daniel Jancar <112062588+danieljancar@users.noreply.github.com> Date: Sun, 18 Aug 2024 15:01:36 +0200 Subject: [PATCH 1/3] Update README.md Signed-off-by: Daniel Jancar <112062588+danieljancar@users.noreply.github.com> --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c9c7cbf..2894144 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,7 @@ We also got some additional features we thought about and couldn't implement yet - **Full Test Coverage**: We want to have full test coverage for the platform. - **Automated Testing**: We already have implemented some automated testing and linting, also in the `release.yml` action, where the app is automatically deployed. If we add full test coverage, we can also add automated testing to the deployment process (spec and e2e tests). - **Dynamic OG Tags**: We want to implement dynamic OG tags for the vote pages, so users can share the vote on social media platforms even better. +- **Fees and Tokenization**: In a production environment, fees will need to be covered either by the vote creator or the participants. This could involve tokenization mechanisms where a small fee is charged for vote creation or participation, ensuring the platform remains sustainable. # Contributing From fd95b37968241c9bd0740e2ab2376538e7f54b9d Mon Sep 17 00:00:00 2001 From: Daniel Jancar Date: Sun, 18 Aug 2024 18:38:08 +0200 Subject: [PATCH 2/3] feat: add news banner and update to connect wallet for better understanding --- apps/frontend/src/app/app.component.html | 1 + apps/frontend/src/app/app.component.ts | 2 + .../app/features/login/login.component.html | 16 +-- .../features/register/register.component.html | 18 ++-- .../banner/news-banner.component.css | 0 .../banner/news-banner.component.html | 99 +++++++++++++++++++ .../banner/news-banner.component.spec.ts | 21 ++++ .../banner/news-banner.component.ts | 25 +++++ .../navigation/navbar/navbar.component.html | 12 ++- 9 files changed, 172 insertions(+), 22 deletions(-) create mode 100644 apps/frontend/src/app/shared/navigation/banner/news-banner.component.css create mode 100644 apps/frontend/src/app/shared/navigation/banner/news-banner.component.html create mode 100644 apps/frontend/src/app/shared/navigation/banner/news-banner.component.spec.ts create mode 100644 apps/frontend/src/app/shared/navigation/banner/news-banner.component.ts diff --git a/apps/frontend/src/app/app.component.html b/apps/frontend/src/app/app.component.html index 60dcb1e..20dcb21 100644 --- a/apps/frontend/src/app/app.component.html +++ b/apps/frontend/src/app/app.component.html @@ -1,4 +1,5 @@
+
diff --git a/apps/frontend/src/app/app.component.ts b/apps/frontend/src/app/app.component.ts index d2c895c..ad62213 100644 --- a/apps/frontend/src/app/app.component.ts +++ b/apps/frontend/src/app/app.component.ts @@ -3,6 +3,7 @@ import { RouterModule } from '@angular/router' import { NavbarComponent } from './shared/navigation/navbar/navbar.component' import { DisclaimerComponent } from './shared/navigation/disclaimer/disclaimer.component' import { FooterComponent } from './shared/navigation/footer/footer.component' +import { NewsBannerComponent } from './shared/navigation/banner/news-banner.component' @Component({ standalone: true, @@ -11,6 +12,7 @@ import { FooterComponent } from './shared/navigation/footer/footer.component' NavbarComponent, DisclaimerComponent, FooterComponent, + NewsBannerComponent, ], selector: 'app-root', templateUrl: './app.component.html', diff --git a/apps/frontend/src/app/features/login/login.component.html b/apps/frontend/src/app/features/login/login.component.html index 861bb95..6d5c420 100644 --- a/apps/frontend/src/app/features/login/login.component.html +++ b/apps/frontend/src/app/features/login/login.component.html @@ -9,12 +9,12 @@ /> } @else if (successMessage) { } @else {
@@ -29,10 +29,10 @@

- Log in to your account + Connect your wallet

- Log in to your Stellar account using your private key. + Connect to your Stellar wallet using your private key.

@@ -71,9 +71,9 @@ 'bg-indigo-600 hover:bg-indigo-700': loginForm.valid, }" > - @if (isLoading){ + @if (isLoading) { - }@else{ Log in } + } @else { Connect }
@@ -88,11 +88,11 @@

- Don't have an account? + Don't have a wallet? RegisterCreate one

diff --git a/apps/frontend/src/app/features/register/register.component.html b/apps/frontend/src/app/features/register/register.component.html index 2dd6191..32286f8 100644 --- a/apps/frontend/src/app/features/register/register.component.html +++ b/apps/frontend/src/app/features/register/register.component.html @@ -9,13 +9,13 @@ /> } @else if (successMessage) {
Your public and secret keys 'bg-indigo-600 hover:bg-indigo-700': hasDownloaded }" > - Continue to login + Connect Wallet
@@ -64,10 +64,10 @@

Your public and secret keys

- Register with Stellar + Create new Stellar Wallet

- Register a new account on the Stellar network, please ensure you save your + Create a new wallet on the Stellar network, please ensure you save your wallets private key in a secure place on the next screen.

@@ -133,9 +133,9 @@

Your public and secret keys

'bg-indigo-600 hover:bg-indigo-700': publicKey && secretKey }" > - @if (isLoading){ + @if (isLoading) { - }@else{ Register } + } @else { Create } @@ -150,11 +150,11 @@

Your public and secret keys

- Already have an account? + Already have a wallet? Log inConnect instead

diff --git a/apps/frontend/src/app/shared/navigation/banner/news-banner.component.css b/apps/frontend/src/app/shared/navigation/banner/news-banner.component.css new file mode 100644 index 0000000..e69de29 diff --git a/apps/frontend/src/app/shared/navigation/banner/news-banner.component.html b/apps/frontend/src/app/shared/navigation/banner/news-banner.component.html new file mode 100644 index 0000000..10baef2 --- /dev/null +++ b/apps/frontend/src/app/shared/navigation/banner/news-banner.component.html @@ -0,0 +1,99 @@ +@if (!isDismissed) { + + +} diff --git a/apps/frontend/src/app/shared/navigation/banner/news-banner.component.spec.ts b/apps/frontend/src/app/shared/navigation/banner/news-banner.component.spec.ts new file mode 100644 index 0000000..6ac65a4 --- /dev/null +++ b/apps/frontend/src/app/shared/navigation/banner/news-banner.component.spec.ts @@ -0,0 +1,21 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing' +import { NewsBannerComponent } from './news-banner.component' + +describe('NewsBannerComponent', () => { + let component: NewsBannerComponent + let fixture: ComponentFixture + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [NewsBannerComponent], + }).compileComponents() + + fixture = TestBed.createComponent(NewsBannerComponent) + component = fixture.componentInstance + fixture.detectChanges() + }) + + it('should create', () => { + expect(component).toBeTruthy() + }) +}) diff --git a/apps/frontend/src/app/shared/navigation/banner/news-banner.component.ts b/apps/frontend/src/app/shared/navigation/banner/news-banner.component.ts new file mode 100644 index 0000000..a3d549d --- /dev/null +++ b/apps/frontend/src/app/shared/navigation/banner/news-banner.component.ts @@ -0,0 +1,25 @@ +import { Component, OnInit } from '@angular/core' +import { CommonModule } from '@angular/common' +import { CookieService } from 'ngx-cookie-service' + +@Component({ + selector: 'app-news-banner', + standalone: true, + imports: [CommonModule], + templateUrl: './news-banner.component.html', + styleUrl: './news-banner.component.css', +}) +export class NewsBannerComponent implements OnInit { + protected isDismissed = false + + constructor(private cookieService: CookieService) {} + + ngOnInit() { + this.isDismissed = this.cookieService.check('news-banner') + } + + dismiss() { + this.cookieService.set('news-banner', 'dismissed', 1) + this.isDismissed = true + } +} diff --git a/apps/frontend/src/app/shared/navigation/navbar/navbar.component.html b/apps/frontend/src/app/shared/navigation/navbar/navbar.component.html index a18a0f6..dc1f3d0 100644 --- a/apps/frontend/src/app/shared/navigation/navbar/navbar.component.html +++ b/apps/frontend/src/app/shared/navigation/navbar/navbar.component.html @@ -66,7 +66,7 @@ class="text-sm font-semibold leading-6 text-gray-900 focus:ring-2 focus:ring-gray-500" routerLink="/login" > - Log in + Connect Wallet } @else { @@ -75,13 +75,14 @@ (click)="logout()" class="text-sm font-semibold leading-6 text-gray-900 focus:ring-2 focus:ring-gray-500" > - Log out + Disconnect } - + } From ad4447367abc5d2be052cb987f22dde81badad4d Mon Sep 17 00:00:00 2001 From: Daniel Jancar Date: Sun, 18 Aug 2024 20:45:18 +0200 Subject: [PATCH 3/3] fix: improve news banner and disclaimer --- .../app/shared/navigation/banner/news-banner.component.html | 4 ++++ .../shared/navigation/disclaimer/disclaimer.component.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/frontend/src/app/shared/navigation/banner/news-banner.component.html b/apps/frontend/src/app/shared/navigation/banner/news-banner.component.html index 10baef2..35e6025 100644 --- a/apps/frontend/src/app/shared/navigation/banner/news-banner.component.html +++ b/apps/frontend/src/app/shared/navigation/banner/news-banner.component.html @@ -61,6 +61,10 @@

DEV Challenge - Accept + Accept all