Compare commits
No commits in common. "6a823bf02e2b6366916daddb7314864a7d6478cd" and "0836830df2be3d367856adacec40cb3296b38187" have entirely different histories.
6a823bf02e
...
0836830df2
@ -1,27 +0,0 @@
|
||||
name: Release
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: remote
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Create Release
|
||||
uses: https://git.kjan.de/actions/semantic-release@main
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
@ -1,8 +1,4 @@
|
||||
import {
|
||||
APP_INITIALIZER,
|
||||
ApplicationConfig,
|
||||
provideExperimentalZonelessChangeDetection,
|
||||
} from '@angular/core';
|
||||
import { APP_INITIALIZER, ApplicationConfig, provideExperimentalZonelessChangeDetection } from '@angular/core';
|
||||
import { provideRouter } from '@angular/router';
|
||||
|
||||
import { routes } from './app.routes';
|
||||
|
@ -1,16 +1,6 @@
|
||||
import { Routes } from '@angular/router';
|
||||
import { LandingPageComponent } from './landing-page/landing-page.component';
|
||||
import { HomepageComponent } from './homepage/homepage/homepage.component';
|
||||
import { authGuard } from './auth.guard';
|
||||
import {LandingPageComponent} from "./landing-page/landing-page.component";
|
||||
|
||||
export const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: LandingPageComponent,
|
||||
},
|
||||
{
|
||||
path: 'home',
|
||||
component: HomepageComponent,
|
||||
canActivate: [authGuard],
|
||||
}
|
||||
{ path: '', component: LandingPageComponent }
|
||||
];
|
||||
|
@ -2,14 +2,15 @@ import { CanActivateFn } from '@angular/router';
|
||||
import { inject } from '@angular/core';
|
||||
import { KeycloakService } from 'keycloak-angular';
|
||||
|
||||
export const authGuard: CanActivateFn = async () => {
|
||||
export const authGuard: CanActivateFn = async (route, state) => {
|
||||
const keycloakService = inject(KeycloakService);
|
||||
|
||||
const isLoggedIn = keycloakService.isLoggedIn();
|
||||
|
||||
if (isLoggedIn) {
|
||||
return true;
|
||||
} else {
|
||||
keycloakService.login();
|
||||
return false;
|
||||
}
|
||||
|
||||
keycloakService.login();
|
||||
return false;
|
||||
};
|
||||
|
@ -1,29 +0,0 @@
|
||||
<nav class="bg-black border-b border-amber-600/30 sticky top-0 z-50">
|
||||
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
|
||||
<!-- logo goes here -->
|
||||
<div class="flex gap-4">
|
||||
<button class="btn-primary" (click)="logout()">Ausloggen</button>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn-primary">Benutzer</button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="grid grid-cols-3">
|
||||
<div class="w-1/3 h-1/4">
|
||||
<p>Spiel Vorschau</p>
|
||||
<p>Spiel Name</p>
|
||||
<button type="button" class="btn-primary">Jetzt spielen</button>
|
||||
</div>
|
||||
<div class="w-1/3 h-1/4">
|
||||
<p>Spiel Vorschau</p>
|
||||
<p>Spiel Name</p>
|
||||
<button type="button" class="btn-primary">Jetzt spielen</button>
|
||||
</div>
|
||||
<div class="w-1/3 h-1/4">
|
||||
<p>Spiel Vorschau</p>
|
||||
<p>Spiel Name</p>
|
||||
<button type="button" class="btn-primary">Jetzt spielen</button>
|
||||
</div>
|
||||
</div>
|
@ -1,17 +0,0 @@
|
||||
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
|
||||
import { KeycloakService } from 'keycloak-angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-homepage',
|
||||
standalone: true,
|
||||
imports: [],
|
||||
templateUrl: './homepage.component.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class HomepageComponent {
|
||||
private keycloakService: KeycloakService = inject(KeycloakService);
|
||||
|
||||
logout() {
|
||||
this.keycloakService.logout();
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
<button (click)="login()">Einloggen</button>
|
@ -1,5 +1,4 @@
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { KeycloakService } from 'keycloak-angular';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-landing-page',
|
||||
@ -8,9 +7,5 @@ import { KeycloakService } from 'keycloak-angular';
|
||||
templateUrl: './landing-page.component.html',
|
||||
})
|
||||
export class LandingPageComponent {
|
||||
private keycloakService: KeycloakService = inject(KeycloakService);
|
||||
|
||||
login() {
|
||||
this.keycloakService.login();
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1 @@
|
||||
@import 'tailwindcss';
|
||||
|
||||
.btn-primary {
|
||||
@apply px-4 py-2 cursor-pointer relative font-bold rounded-lg transition-all duration-300 ease-out transform-gpu hover:scale-105 will-change-transform bg-gradient-to-r from-emerald-500 to-emerald-400 text-black hover:shadow-xl hover:shadow-emerald-500/20;
|
||||
}
|
||||
.btn-secondary {
|
||||
@apply px-4 py-2 cursor-pointer relative font-bold rounded-lg transition-all duration-300 ease-out transform-gpu hover:scale-105 will-change-transform bg-white/10 text-white hover:bg-white/20;
|
||||
}
|
||||
@import "tailwindcss";
|
||||
|
@ -1,15 +0,0 @@
|
||||
module.exports = {
|
||||
|
||||
branches: ['main'],
|
||||
plugins: [
|
||||
'@semantic-release/commit-analyzer',
|
||||
'@semantic-release/release-notes-generator',
|
||||
'@semantic-release/changelog',
|
||||
["@saithodev/semantic-release-gitea", {
|
||||
"giteaUrl": "https://git.simonis.lol"
|
||||
}],
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user