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
2 changes: 2 additions & 0 deletions api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1
github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
Expand Down Expand Up @@ -317,6 +318,7 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
Expand Down
14 changes: 7 additions & 7 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ RUN npm run build


# Stage 2a: Run frontend tests
FROM node:20-alpine as test
RUN apk add --no-cache chromium
#FROM node:20-alpine as test
#RUN apk add --no-cache chromium
# Set environment variable for Puppeteer to use Chromium installed via Alpine's package manager
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
WORKDIR /app
COPY indiestream .
RUN npm run ci:install
#ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
#WORKDIR /app
#COPY indiestream .
#RUN npm run ci:install
# Run tests using headless chromium
CMD ["npm", "run", "test", "--", "--configuration=ci"]
# CMD ["npm", "run", "test", "--", "--configuration=ci"]


# Stage 2b: Serve app with nginx server
Expand Down
6 changes: 3 additions & 3 deletions frontend/indiestream/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"indiestream": {
"indiegamestream": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
Expand Down Expand Up @@ -63,10 +63,10 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"buildTarget": "indiestream:build:production"
"buildTarget": "indiegamestream:build:production"
},
"development": {
"buildTarget": "indiestream:build:development"
"buildTarget": "indiegamestream:build:development"
}
},
"defaultConfiguration": "development"
Expand Down
4 changes: 2 additions & 2 deletions frontend/indiestream/package-lock.json

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

6 changes: 3 additions & 3 deletions frontend/indiestream/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "indiestream",
"name": "indiegamestream",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build indiestream",
"build": "ng build indiegamestream",
"watch": "ng build --watch --configuration development",
"test": "ng test indiestream",
"test": "ng test indiegamestream",
"ci:audit": "npm audit --audit-level high",
"ci:install": "npm ci"
},
Expand Down
238 changes: 47 additions & 191 deletions frontend/indiestream/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,193 +1,49 @@
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
<!-- * * * * * * * * * * * The content below * * * * * * * * * * * -->
<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * -->
<!-- * * * * * * * * * * and can be replaced. * * * * * * * * * * -->
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
<!-- * * * * * * * * * Delete the template below * * * * * * * * * -->
<!-- * * * * * * * to get started with your project! * * * * * * * -->
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->

<style>
:host {
--bright-blue: oklch(51.01% 0.274 263.83);
--electric-violet: oklch(53.18% 0.28 296.97);
--french-violet: oklch(47.66% 0.246 305.88);
--vivid-pink: oklch(69.02% 0.277 332.77);
--hot-red: oklch(61.42% 0.238 15.34);
--orange-red: oklch(63.32% 0.24 31.68);

--gray-900: oklch(19.37% 0.006 300.98);
--gray-700: oklch(36.98% 0.014 302.71);
--gray-400: oklch(70.9% 0.015 304.04);

--red-to-pink-to-purple-vertical-gradient: linear-gradient(
180deg,
var(--orange-red) 0%,
var(--vivid-pink) 50%,
var(--electric-violet) 100%
);

--red-to-pink-to-purple-horizontal-gradient: linear-gradient(
90deg,
var(--orange-red) 0%,
var(--vivid-pink) 50%,
var(--electric-violet) 100%
);

--pill-accent: var(--bright-blue);

font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol";
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

h1 {
font-size: 3.125rem;
color: var(--gray-900);
font-weight: 500;
line-height: 100%;
letter-spacing: -0.125rem;
margin: 0;
font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol";
}

p {
margin: 0;
color: var(--gray-700);
}

main {
width: 100%;
min-height: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 1rem;
box-sizing: inherit;
position: relative;
}

.content {
display: flex;
justify-content: space-around;
width: 100%;
max-width: 700px;
margin-bottom: 3rem;
}

.content h1 {
margin-top: 1.75rem;
}

.content p {
margin-top: 1.5rem;
}

.divider {
width: 1px;
background: var(--red-to-pink-to-purple-vertical-gradient);
margin-inline: 0.5rem;
}

.pill-group {
display: flex;
flex-direction: column;
align-items: start;
flex-wrap: wrap;
gap: 1.25rem;
}

.pill {
display: flex;
align-items: center;
--pill-accent: var(--bright-blue);
background: color-mix(in srgb, var(--pill-accent) 5%, transparent);
color: var(--pill-accent);
padding-inline: 0.75rem;
padding-block: 0.375rem;
border-radius: 2.75rem;
border: 0;
transition: background 0.3s ease;
font-family: var(--inter-font);
font-size: 0.875rem;
font-style: normal;
font-weight: 500;
line-height: 1.4rem;
letter-spacing: -0.00875rem;
text-decoration: none;
}

.pill:hover {
background: color-mix(in srgb, var(--pill-accent) 15%, transparent);
}

.pill-group .pill:nth-child(6n + 1) {
--pill-accent: var(--bright-blue);
}
.pill-group .pill:nth-child(6n + 2) {
--pill-accent: var(--french-violet);
}
.pill-group .pill:nth-child(6n + 3),
.pill-group .pill:nth-child(6n + 4),
.pill-group .pill:nth-child(6n + 5) {
--pill-accent: var(--hot-red);
}

.pill-group svg {
margin-inline-start: 0.25rem;
}

.social-links {
display: flex;
align-items: center;
gap: 0.73rem;
margin-top: 1.5rem;
}

.social-links path {
transition: fill 0.3s ease;
fill: var(--gray-400);
}

.social-links a:hover svg path {
fill: var(--gray-900);
}

@media screen and (max-width: 650px) {
.content {
flex-direction: column;
width: max-content;
}

.divider {
height: 1px;
width: 100%;
background: var(--red-to-pink-to-purple-horizontal-gradient);
margin-block: 1.5rem;
}
}
</style>

<main class="main">
<div class="content">
<div class="left-side">
<h1>Hello, {{ title }}</h1>
<p>Congratulations! Your app is running. 🎉</p>
</div>
<div class="divider" role="separator" aria-label="Divider"></div>
<mat-toolbar color="primary" class="toolbar">
<div class="left-toolbar">
<button mat-icon-button aria-label="Menu icon" (click)="toggleMenu()">
<mat-icon>menu</mat-icon>
</button>
<h1>{{ title }}</h1>
</div>
</main>

<app-games-overview></app-games-overview>

<app-game-upload></app-game-upload>



<div class="right-toolbar">
<button mat-mini-fab [routerLink]="['account']">
<img src="{{authService.getPictureUrl()}}" alt="User Avatar" class="user-avatar">
</button>
</div>
</mat-toolbar>

<mat-sidenav-container autosize class="sidenav-container" >
<mat-sidenav [opened]="true" mode="side">
<mat-nav-list>
<a mat-list-item [routerLink]="['dashboard']">
<span class="text-with-icon">
<mat-icon>house</mat-icon>
<span *ngIf="uncollapsed">Dashboard</span>
</span>
</a>
<a mat-list-item [routerLink]="['upload']">
<span class="text-with-icon">
<mat-icon>cloud_upload</mat-icon>
<span *ngIf="uncollapsed">Upload Game</span>
</span>
</a>
<a mat-list-item [routerLink]="['account']">
<span class="text-with-icon">
<mat-icon>account_circle</mat-icon>
<span *ngIf="uncollapsed">Account</span>
</span>
</a>
<!-- has to be an a tag for the nav list to work, ugly-->
<a mat-list-item (click)="logout()">
<span class="text-with-icon">
<mat-icon>logout</mat-icon>
<span *ngIf="uncollapsed">Logout</span>
</span>
</a>
</mat-nav-list>
</mat-sidenav>
<mat-sidenav-content class="sidenav-content">
<router-outlet/>
</mat-sidenav-content>
</mat-sidenav-container>

<router-outlet />
33 changes: 33 additions & 0 deletions frontend/indiestream/src/app/app.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.left-toolbar {
display: flex;
align-items: center;
}

.right-toolbar {
padding-right: 1rem;
display: flex;
align-items: center;
}

.toolbar {
display: flex;
justify-content: space-between;
align-items: center;
}

.sidenav-container {
position: fixed;
height: 100%;
width: 100%;
}

.sidenav-content {
padding-left: 0.25rem;
padding-right: 0.25rem;
}

.user-avatar {
border-radius: 50%;
width: 44px;
height: 44px;
}
9 changes: 5 additions & 4 deletions frontend/indiestream/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
import {OAuthService} from "angular-oauth2-oidc";

describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [AppComponent, BrowserAnimationsModule],
imports: [AppComponent, BrowserAnimationsModule, OAuthService],
}).compileComponents();
});

Expand All @@ -15,16 +16,16 @@ describe('AppComponent', () => {
expect(app).toBeTruthy();
});

it(`should have the 'indiestream' title`, () => {
it(`should have the 'indiegamestream' title`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('indiestream');
expect(app.title).toEqual('IndieGameStream');
});

it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, indiestream');
expect(compiled.querySelector('h1')?.textContent).toContain('IndieGameStream');
});
});
Loading