Skip to content

Commit

Permalink
Merge pull request #87 from danieljancar/develop
Browse files Browse the repository at this point in the history
Minor Release
  • Loading branch information
danieljancar authored Aug 18, 2024
2 parents 4be12e2 + ad44473 commit 16c0903
Show file tree
Hide file tree
Showing 11 changed files with 178 additions and 23 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions apps/frontend/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div class="min-h-screen flex flex-col">
<app-news-banner />
<app-navbar />
<div class="flex-grow">
<router-outlet />
Expand Down
2 changes: 2 additions & 0 deletions apps/frontend/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -11,6 +12,7 @@ import { FooterComponent } from './shared/navigation/footer/footer.component'
NavbarComponent,
DisclaimerComponent,
FooterComponent,
NewsBannerComponent,
],
selector: 'app-root',
templateUrl: './app.component.html',
Expand Down
16 changes: 8 additions & 8 deletions apps/frontend/src/app/features/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
/>
} @else if (successMessage) {
<app-success
[title]="'Login Successful'"
[title]="'Connecting your wallet was successful.'"
[message]="successMessage"
[action]="'Go to Home'"
[route]="'/'"
aria-live="assertive"
aria-label="Logged in successfully"
aria-label="Wallet connection successful"
/>
} @else {
<div class="flex min-h-full flex-col justify-center px-6 py-12 lg:px-8">
Expand All @@ -29,10 +29,10 @@
<h2
class="mt-10 text-center text-2xl font-bold leading-9 tracking-tight text-gray-900"
>
Log in to your account
Connect your wallet
</h2>
<p class="mt-1 text-sm leading-6 text-gray-600 text-center">
Log in to your Stellar account using your private key.
Connect to your Stellar wallet using your private key.
</p>
</div>

Expand Down Expand Up @@ -71,9 +71,9 @@
'bg-indigo-600 hover:bg-indigo-700': loginForm.valid,
}"
>
@if (isLoading){
@if (isLoading) {
<app-button-spinner />
}@else{ Log in }
} @else { Connect }
</button>
</div>
</form>
Expand All @@ -88,11 +88,11 @@
</div>

<p class="mt-3 text-center text-sm text-gray-500">
Don't have an account?
Don't have a wallet?
<a
class="text-indigo-600 hover:underline cursor-pointer focus:outline-none focus:underline"
routerLink="/register"
>Register</a
>Create one</a
>
</p>
</div>
Expand Down
18 changes: 9 additions & 9 deletions apps/frontend/src/app/features/register/register.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
/>
} @else if (successMessage) {
<app-success
[title]="'Account Created'"
[title]="'Wallet created successfully'"
[message]="successMessage"
[action]="'Go to Home'"
[route]="'/'"
[showHomeButton]="false"
aria-live="assertive"
aria-label="Registered successfully"
aria-label="Wallet created successfully"
/>
<div class="mx-2.5 my-2">
<div
Expand Down Expand Up @@ -47,7 +47,7 @@ <h1 class="font-bold">Your public and secret keys</h1>
'bg-indigo-600 hover:bg-indigo-700': hasDownloaded
}"
>
Continue to login
Connect Wallet
</button>
</div>
</div>
Expand All @@ -64,10 +64,10 @@ <h1 class="font-bold">Your public and secret keys</h1>
<h2
class="mt-10 text-center text-2xl font-bold leading-9 tracking-tight text-gray-900"
>
Register with Stellar
Create new Stellar Wallet
</h2>
<p class="mt-1 text-sm leading-6 text-gray-600 text-center">
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.
</p>
</div>
Expand Down Expand Up @@ -133,9 +133,9 @@ <h1 class="font-bold">Your public and secret keys</h1>
'bg-indigo-600 hover:bg-indigo-700': publicKey && secretKey
}"
>
@if (isLoading){
@if (isLoading) {
<app-button-spinner />
}@else{ Register }
} @else { Create }
</button>
</div>
</form>
Expand All @@ -150,11 +150,11 @@ <h1 class="font-bold">Your public and secret keys</h1>
</div>

<p class="mt-3 text-center text-sm text-gray-500">
Already have an account?
Already have a wallet?
<a
class="text-indigo-600 hover:underline cursor-pointer focus:outline-none focus:underline"
routerLink="/login"
>Log in</a
>Connect instead</a
>
</p>
</div>
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
@if (!isDismissed) {
<div
class="relative isolate flex items-center gap-x-6 overflow-hidden bg-gray-50 px-6 py-2.5 sm:px-3.5 sm:before:flex-1"
>
<div
class="absolute left-[max(-7rem,calc(50%-52rem))] top-1/2 -z-10 -translate-y-1/2 transform-gpu blur-2xl"
aria-hidden="true"
>
<div
class="aspect-[577/310] w-[36.0625rem] bg-gradient-to-r from-[#6760a2] to-[#655ae4] opacity-30"
style="
clip-path: polygon(
74.8% 41.9%,
97.2% 73.2%,
100% 34.9%,
92.5% 0.4%,
87.5% 0%,
75% 28.6%,
58.5% 54.6%,
50.1% 56.8%,
46.9% 44%,
48.3% 17.4%,
24.7% 53.9%,
0% 27.9%,
11.9% 74.2%,
24.9% 54.1%,
68.6% 100%,
74.8% 41.9%
);
"
></div>
</div>
<div
class="absolute left-[max(45rem,calc(50%+8rem))] top-1/2 -z-10 -translate-y-1/2 transform-gpu blur-2xl"
aria-hidden="true"
>
<div
class="aspect-[577/310] w-[36.0625rem] bg-gradient-to-r from-[#655ae4] to-[#6760a2] opacity-30"
style="
clip-path: polygon(
74.8% 41.9%,
97.2% 73.2%,
100% 34.9%,
92.5% 0.4%,
87.5% 0%,
75% 28.6%,
58.5% 54.6%,
50.1% 56.8%,
46.9% 44%,
48.3% 17.4%,
24.7% 53.9%,
0% 27.9%,
11.9% 74.2%,
24.9% 54.1%,
68.6% 100%,
74.8% 41.9%
);
"
></div>
</div>
<p class="text-sm leading-6 text-gray-900">
<a
href="https://dev.to/gr1ll/votevault-our-journey-from-a-lunchtime-idea-to-dapp-2opf"
target="_blank"
rel="noopener noreferrer"
aria-label="Read our submission post for DEV Challenge!"
aria-describedby="banner"
>
<strong class="font-semibold">DEV Challenge</strong>
<svg
viewBox="0 0 2 2"
class="mx-2 inline h-0.5 w-0.5 fill-current"
aria-hidden="true"
>
<circle cx="1" cy="1" r="1" />
</svg>
See our submission post for VoteVault!&nbsp;<span aria-hidden="true"
>&rarr;</span
>
</a>
</p>
<div class="flex flex-1 justify-end">
<button
type="button"
class="-m-3 p-3 focus-visible:outline-offset-[-4px]"
(click)="dismiss()"
>
<span class="sr-only">Dismiss</span>
<svg
class="h-5 w-5 text-gray-900"
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
>
<path
d="M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"
/>
</svg>
</button>
</div>
</div>

}
Original file line number Diff line number Diff line change
@@ -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<NewsBannerComponent>

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [NewsBannerComponent],
}).compileComponents()

fixture = TestBed.createComponent(NewsBannerComponent)
component = fixture.componentInstance
fixture.detectChanges()
})

it('should create', () => {
expect(component).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
@@ -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
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
type="button"
class="rounded-md bg-gray-900 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-900"
>
Accept
Accept all
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <span aria-hidden="true">&rarr;</span>
Connect Wallet <span aria-hidden="true">&rarr;</span>
</a>
</div>
} @else {
Expand All @@ -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 <span aria-hidden="true">&rarr;</span>
Disconnect <span aria-hidden="true">&rarr;</span>
</button>
</div>
}
</nav>

<div *ngIf="isMenuOpen" aria-modal="true" class="lg:hidden" role="dialog">
@if (isMenuOpen) {
<div aria-modal="true" class="lg:hidden" role="dialog">
<div (click)="closeMenu()" class="fixed inset-0 z-10 bg-gray-900/50"></div>
<div
class="fixed inset-y-0 right-0 z-10 w-full overflow-y-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10"
Expand Down Expand Up @@ -145,7 +146,7 @@
class="-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50 focus:ring-2 focus:ring-gray-500"
routerLink="/login"
>
Log in
Connect Wallet <span aria-hidden="true">&rarr;</span>
</a>
</div>
} @else {
Expand All @@ -154,12 +155,13 @@
(click)="logout()"
class="-mx-3 block rounded-lg px-3 py-2.5 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50 focus:ring-2 focus:ring-gray-500"
>
Log out
Disconnect <span aria-hidden="true">&rarr;</span>
</button>
</div>
}
</div>
</div>
</div>
</div>
}
</header>

0 comments on commit 16c0903

Please sign in to comment.