Skip to content

Commit a07301e

Browse files
authored
Merge pull request #63 from SurCats0/main
Reworked Stat command
2 parents f13e8b2 + ca716a2 commit a07301e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1228
-526
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ FROM deps AS build
88
COPY . .
99
RUN npm run build # -> dist/
1010
RUN mkdir -p dist/fonts && cp -r src/fonts/. dist/fonts/
11+
RUN mkdir -p dist/assets && cp -r src/assets/. dist/assets/
1112

1213
FROM node:20-bookworm-slim AS run
1314
WORKDIR /app

bun.lock

Lines changed: 33 additions & 26 deletions
Large diffs are not rendered by default.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* @type {import('node-pg-migrate').ColumnDefinitions | undefined}
3+
*/
4+
export const shorthands = undefined;
5+
6+
/**
7+
* @param pgm {import('node-pg-migrate').MigrationBuilder}
8+
* @param run {() => void | undefined}
9+
* @returns {Promise<void> | void}
10+
*/
11+
export const up = (pgm) => {
12+
pgm.addColumn('users', { stat_background: { type: 'varchar(255)', notNull: false, default: 'bgMain.png' }});
13+
};
14+
15+
/**
16+
* @param pgm {import('node-pg-migrate').MigrationBuilder}
17+
* @param run {() => void | undefined}
18+
* @returns {Promise<void> | void}
19+
*/
20+
export const down = (pgm) => {
21+
pgm.dropColumn('users', 'stat_background');
22+
};

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,8 @@
4343
"prettier": "^3.6.2",
4444
"ts-node": "^10.9.2",
4545
"typescript": "^5.9.2"
46-
}
46+
},
47+
"trustedDependencies": [
48+
"skia-canvas"
49+
]
4750
}

src/@types/global.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,14 @@ declare module 'psqlDB' {
165165
mmr: number
166166
peak_mmr: number
167167
win_streak: number
168+
stat_background: string
168169
stats: {
169170
label: string
170171
value: string
171172
percentile: number
172173
isTop: boolean
173174
}[]
174-
previous_games: { change: number; time: Date }[]
175+
previous_games: { change: number; time: Date; deck: string; stake: string }[]
175176
elo_graph_data: { date: Date; rating: number }[]
176177
rank_name?: string | null
177178
rank_color?: string | null

src/assets/BlackBL.png

577 Bytes

src/assets/BlackBR.png

585 Bytes

src/assets/BlackTL.png

564 Bytes

src/assets/BlackTR.png

566 Bytes

src/assets/BlueBL.png

594 Bytes

0 commit comments

Comments
 (0)