Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: PR Validation

on:
pull_request:
branches: [dev]

concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run lint
- run: bunx prettier --check "src/**/*.{ts,html,css}"

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bunx tsc --noEmit -p tsconfig.app.json

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run test

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run build
19 changes: 11 additions & 8 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"eslint": "^10.7.0",
"jsdom": "^27.4.0",
"postcss": "^8.5.16",
"prettier": "^3.9.5",
"tailwindcss": "^4.3.2",
"typescript": "~6.0.3",
"typescript-eslint": "^8.63.0",
Expand Down
8 changes: 4 additions & 4 deletions src/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export const appConfig: ApplicationConfig = {
? [
provideServiceWorker('ngsw-worker.js', {
enabled: true,
registrationStrategy: 'registerWhenStable:30000'
})
registrationStrategy: 'registerWhenStable:30000',
}),
]
: [])
]
: []),
],
};
50 changes: 42 additions & 8 deletions src/app/app.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,46 @@
<nav class="bg-light-bg-secondary dark:bg-dark-bg-secondary border-b border-light-border dark:border-dark-border shadow-light dark:shadow-dark sticky top-0 z-100">
<div class="max-w-[1200px] mx-auto px-8 py-4 flex justify-between items-center max-md:flex-col max-md:gap-4">
<a routerLink="/" class="text-2xl font-bold text-accent-primary hover:text-accent-primary-hover no-underline">Watch List</a>
<nav
class="bg-light-bg-secondary dark:bg-dark-bg-secondary border-b border-light-border dark:border-dark-border shadow-light dark:shadow-dark sticky top-0 z-100"
>
<div
class="max-w-[1200px] mx-auto px-8 py-4 flex justify-between items-center max-md:flex-col max-md:gap-4"
>
<a
routerLink="/"
class="text-2xl font-bold text-accent-primary hover:text-accent-primary-hover no-underline"
>Watch List</a
>
<div class="flex gap-6 max-md:flex-wrap max-md:justify-center items-center">
<a routerLink="/" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}" class="text-light-font dark:text-dark-font no-underline font-medium py-2 transition-colors duration-200 hover:text-accent-primary [&.active]:text-accent-primary [&.active]:border-b-2 [&.active]:border-accent-primary">Home</a>
<a routerLink="/items" routerLinkActive="active" class="text-light-font dark:text-dark-font no-underline font-medium py-2 transition-colors duration-200 hover:text-accent-primary [&.active]:text-accent-primary [&.active]:border-b-2 [&.active]:border-accent-primary">Items</a>
<a routerLink="/history" routerLinkActive="active" class="text-light-font dark:text-dark-font no-underline font-medium py-2 transition-colors duration-200 hover:text-accent-primary [&.active]:text-accent-primary [&.active]:border-b-2 [&.active]:border-accent-primary">History</a>
<a routerLink="/groups" routerLinkActive="active" class="text-light-font dark:text-dark-font no-underline font-medium py-2 transition-colors duration-200 hover:text-accent-primary [&.active]:text-accent-primary [&.active]:border-b-2 [&.active]:border-accent-primary">Groups</a>
<a routerLink="/settings" routerLinkActive="active" class="text-light-font dark:text-dark-font no-underline font-medium py-2 transition-colors duration-200 hover:text-accent-primary [&.active]:text-accent-primary [&.active]:border-b-2 [&.active]:border-accent-primary">Settings</a>
<a
routerLink="/"
routerLinkActive="active"
[routerLinkActiveOptions]="{ exact: true }"
class="text-light-font dark:text-dark-font no-underline font-medium py-2 transition-colors duration-200 hover:text-accent-primary [&.active]:text-accent-primary [&.active]:border-b-2 [&.active]:border-accent-primary"
>Home</a
>
<a
routerLink="/items"
routerLinkActive="active"
class="text-light-font dark:text-dark-font no-underline font-medium py-2 transition-colors duration-200 hover:text-accent-primary [&.active]:text-accent-primary [&.active]:border-b-2 [&.active]:border-accent-primary"
>Items</a
>
<a
routerLink="/history"
routerLinkActive="active"
class="text-light-font dark:text-dark-font no-underline font-medium py-2 transition-colors duration-200 hover:text-accent-primary [&.active]:text-accent-primary [&.active]:border-b-2 [&.active]:border-accent-primary"
>History</a
>
<a
routerLink="/groups"
routerLinkActive="active"
class="text-light-font dark:text-dark-font no-underline font-medium py-2 transition-colors duration-200 hover:text-accent-primary [&.active]:text-accent-primary [&.active]:border-b-2 [&.active]:border-accent-primary"
>Groups</a
>
<a
routerLink="/settings"
routerLinkActive="active"
class="text-light-font dark:text-dark-font no-underline font-medium py-2 transition-colors duration-200 hover:text-accent-primary [&.active]:text-accent-primary [&.active]:border-b-2 [&.active]:border-accent-primary"
>Settings</a
>
<app-theme-switcher />
</div>
</div>
Expand Down
26 changes: 18 additions & 8 deletions src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,40 @@ import { Routes } from '@angular/router';
export const routes: Routes = [
{
path: '',
loadComponent: () => import('./components/home/home.component').then(m => m.HomeComponent)
loadComponent: () => import('./components/home/home.component').then((m) => m.HomeComponent),
},
{
path: 'items',
loadComponent: () => import('./components/item-list/item-list.component').then(m => m.ItemListComponent)
loadComponent: () =>
import('./components/item-list/item-list.component').then((m) => m.ItemListComponent),
},
{
path: 'items/add',
loadComponent: () => import('./components/add-item/add-item.component').then(m => m.AddItemComponent)
loadComponent: () =>
import('./components/add-item/add-item.component').then((m) => m.AddItemComponent),
},
{
path: 'items/:id',
loadComponent: () => import('./components/item-detail/item-detail.component').then(m => m.ItemDetailComponent)
loadComponent: () =>
import('./components/item-detail/item-detail.component').then((m) => m.ItemDetailComponent),
},
{
path: 'groups',
loadComponent: () => import('./components/group-manager/group-manager.component').then(m => m.GroupManagerComponent)
loadComponent: () =>
import('./components/group-manager/group-manager.component').then(
(m) => m.GroupManagerComponent,
),
},
{
path: 'history',
loadComponent: () => import('./components/watch-history/watch-history.component').then(m => m.WatchHistoryComponent)
loadComponent: () =>
import('./components/watch-history/watch-history.component').then(
(m) => m.WatchHistoryComponent,
),
},
{
path: 'settings',
loadComponent: () => import('./components/settings/settings.component').then(m => m.SettingsComponent)
}
loadComponent: () =>
import('./components/settings/settings.component').then((m) => m.SettingsComponent),
},
];
2 changes: 1 addition & 1 deletion src/app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ThemeSwitcherComponent } from './components/theme-switcher/theme-switch
selector: 'app-root',
imports: [RouterOutlet, RouterLink, RouterLinkActive, ThemeSwitcherComponent],
templateUrl: './app.html',
styles: [':host { display: block; min-height: 100vh; }']
styles: [':host { display: block; min-height: 100vh; }'],
})
export class App {
protected readonly title = signal('watch-list');
Expand Down
Loading
Loading