Compare commits
77 Commits
Author | SHA1 | Date | |
---|---|---|---|
996f16a313 | |||
0f8b1a4729 | |||
badefb0f7f | |||
2ba037fab5 | |||
637134081a | |||
96c17ffe85 | |||
8db158afe9 | |||
6015349c6f | |||
cd191a6f61 | |||
08bfe767bb | |||
6a4ebf56c4 | |||
1e4cafc07f | |||
623bdd8d42 | |||
51b3ff2e22 | |||
816ee5c454 | |||
9a3f004c72 | |||
f528da171b | |||
b23921a28c | |||
e045ded046 | |||
859b7ab3cc | |||
34432e9622 | |||
3af371703b | |||
fcef4e428e | |||
ca8e270c5e | |||
a9d35c604e | |||
8c24a29de2 | |||
e079a1177e | |||
7bf053e452 | |||
328f665c5c | |||
05fe82eff1 | |||
3143ce1058 | |||
85d18190a7 | |||
45434f5a2d | |||
922b7ea633 | |||
f0f01ccda1 | |||
947bd5dedc | |||
a2a9fd25b5 | |||
afdc700a64 | |||
f5ba173b24 | |||
7459649829 | |||
31c1f3fc40 | |||
df1d9df212 | |||
680a18d15a | |||
40f31ba723 | |||
f9974a3430 | |||
c5249da57e | |||
85e00e8d52 | |||
5841c77913 | |||
84d2972869 | |||
94407bc7c4 | |||
47695d7e4f | |||
529d8b8020 | |||
3db6ced4d2 | |||
e5614da846 | |||
71a5b77235 | |||
7617738ab2 | |||
9c3d3e0767 | |||
294068ee97 | |||
29a7ab3a6b | |||
b4cee2447d | |||
a4091c92e4 | |||
77a9540be4 | |||
f8f5a38add | |||
4c7482b919 | |||
f10c623aa8 | |||
4e090ed281 | |||
1b9c616e16 | |||
7fe575a651 | |||
f33c54ba26 | |||
a9094fd1ed | |||
47d98aba82 | |||
c8efbb92f5 | |||
e460fdefe8 | |||
7ed9df1e9d | |||
094e00842a | |||
608894ee1e | |||
895725dc66 |
31
.drone.yml
Normal file
31
.drone.yml
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: build
|
||||
|
||||
steps:
|
||||
- name: build-backend
|
||||
image: plugins/docker
|
||||
settings:
|
||||
insecure: true
|
||||
repo: 10.5.0.103:1222/simrail-backend
|
||||
registry: 10.5.0.103:1222
|
||||
context: './packages/backend'
|
||||
dockerfile: './packages/backend/Dockerfile'
|
||||
tags:
|
||||
- latest
|
||||
|
||||
- name: build-frontend
|
||||
image: plugins/docker
|
||||
settings:
|
||||
insecure: true
|
||||
repo: 10.5.0.103:1222/simrail-frontend
|
||||
registry: 10.5.0.103:1222
|
||||
context: './packages/frontend'
|
||||
dockerfile: './packages/frontend/Dockerfile'
|
||||
tags:
|
||||
- latest
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
7
.idea/copyright/profiles_settings.xml
generated
Normal file
7
.idea/copyright/profiles_settings.xml
generated
Normal file
@ -0,0 +1,7 @@
|
||||
<component name="CopyrightManager">
|
||||
<settings default="gnu agpl alekswilc">
|
||||
<module2copyright>
|
||||
<element module="Project Files" copyright="gnu agpl alekswilc" />
|
||||
</module2copyright>
|
||||
</settings>
|
||||
</component>
|
10
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
10
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@ -0,0 +1,10 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<Languages>
|
||||
<language minSize="457" name="TypeScript" />
|
||||
</Languages>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
6
.idea/jsLibraryMappings.xml
generated
Normal file
6
.idea/jsLibraryMappings.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptLibraryMappings">
|
||||
<file url="file://$PROJECT_DIR$/packages/frontend" libraries="{script}" />
|
||||
</component>
|
||||
</project>
|
@ -4,7 +4,6 @@
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"build": "yarn workspace backend build && yarn workspace frontend build",
|
||||
"postbuild": "copyfiles --error ./LICENSE.txt ./dist && copyfiles --error ./LICENSE.txt ./dist/frontend/",
|
||||
"start": "concurrently --kill-others-on-fail \"yarn workspace backend start\" \"yarn workspace frontend dev\""
|
||||
},
|
||||
"workspaces": [
|
||||
|
20
packages/backend/Dockerfile
Normal file
20
packages/backend/Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
FROM node:21-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN yarn add -D typescript
|
||||
RUN yarn rawbuild
|
||||
|
||||
RUN ls
|
||||
|
||||
|
||||
# Install Doppler CLI
|
||||
RUN wget -q -t3 'https://packages.doppler.com/public/cli/rsa.8004D9FF50437357.key' -O /etc/apk/keys/cli@doppler-8004D9FF50437357.rsa.pub && \
|
||||
echo 'https://packages.doppler.com/public/cli/alpine/any-version/main' | tee -a /etc/apk/repositories && \
|
||||
apk add doppler
|
||||
|
||||
|
||||
|
||||
ENTRYPOINT ["doppler", "run", "--"]
|
||||
CMD ["node", "/app/dist"]
|
@ -4,7 +4,8 @@
|
||||
"main": "../../dist/backend/index.js",
|
||||
"version": "3.0.0",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build": "docker build --progress=plain -t simrailpro:backend .",
|
||||
"rawbuild": "yarn tsc",
|
||||
"start": "yarn build && doppler run node ../../dist/backend/index.js"
|
||||
},
|
||||
"author": "Aleksander <alekswilc> Wilczyński",
|
||||
@ -15,6 +16,7 @@
|
||||
"@types/node": "^22.10.1",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"copyfiles": "^2.4.1",
|
||||
"tsc": "^2.0.4",
|
||||
"typescript": "^5.5.4"
|
||||
},
|
||||
"type": "module",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
@ -66,10 +66,9 @@ export class ActivePlayersRoute
|
||||
|
||||
app.get("/train", async (req, res) =>
|
||||
{
|
||||
const s = req.query.q?.toString().split(",").map(x => new RegExp(escapeRegexString(x), "i"));
|
||||
const s = req.query.query?.toString().split(",").map(x => new RegExp(escapeRegexString(x), "i"));
|
||||
const sserver = req.query.server?.toString();
|
||||
|
||||
|
||||
let a: ActiveTrain[] = [];
|
||||
|
||||
for (const data of sserver ? [ client.trains[ sserver as Server["ServerCode"] ] ] : Object.values(client.trains))
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
@ -64,10 +64,10 @@ export class LogRoute
|
||||
|
||||
if (process.env.IMGPROXY_KEY)
|
||||
{
|
||||
log.player.avatar = generateUrl(log.player.avatar);
|
||||
log.player.avatar = generateUrl(log.player.avatar, "rs:auto:256:256:1/f:png");
|
||||
}
|
||||
|
||||
res.status(200).json(new SuccessResponseBuilder().setCode(200).setData(log.toJSON()));
|
||||
res.status(200).json(new SuccessResponseBuilder().setCode(200).setData(log.toJSON()).toJSON());
|
||||
});
|
||||
|
||||
return app;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
@ -114,7 +114,7 @@ export class ProfilesRoute
|
||||
|
||||
if (process.env.IMGPROXY_KEY)
|
||||
{
|
||||
player.avatar = generateUrl(player.avatar);
|
||||
player.avatar = generateUrl(player.avatar, "rs:auto:256:256:1/f:png");
|
||||
}
|
||||
|
||||
res.json(
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
@ -24,6 +24,7 @@ import { TrainsModule } from "./modules/trains.js";
|
||||
import { Server, Station, Train } from "@simrail/types";
|
||||
import dayjs from "dayjs";
|
||||
import { TMProfile } from "./mongo/profile.js";
|
||||
import { GitUtil } from "./util/git.js";
|
||||
|
||||
;(async () =>
|
||||
{
|
||||
@ -47,6 +48,7 @@ import { TMProfile } from "./mongo/profile.js";
|
||||
}
|
||||
|
||||
ApiModule.load(); // TODO: use fastify
|
||||
GitUtil.getData();
|
||||
|
||||
if (process.env.NODE_ENV === "development")
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
2
packages/backend/src/types/typings.d.ts
vendored
2
packages/backend/src/types/typings.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
@ -18,7 +18,7 @@ import { IPlayerPayload, IPlayerStatsPayload } from "../types/player.js";
|
||||
import { MProfile } from "../mongo/profile.js";
|
||||
import { assert } from "node:console";
|
||||
|
||||
const STEAM_API_KEY = process.env.STEAM_APIKEY;
|
||||
const steamKeys: string[] = JSON.parse(process.env.STEAM_APIKEY!);
|
||||
|
||||
const steamFetch = (url: string) =>
|
||||
{
|
||||
@ -28,12 +28,13 @@ const steamFetch = (url: string) =>
|
||||
{
|
||||
const req = () =>
|
||||
{
|
||||
const steamKey = steamKeys[ Math.floor(Math.random() * steamKeys.length) ];
|
||||
|
||||
fetch(url, { signal: AbortSignal.timeout(10000) }).then(x => x.json())
|
||||
fetch(url.replace("[STEAMKEY]", steamKey), { signal: AbortSignal.timeout(10000) }).then(x => x.json())
|
||||
.then(x => res(x))
|
||||
.catch(() =>
|
||||
{
|
||||
console.log("STEAM request failed! ", url.replace(STEAM_API_KEY!, "[XXX]"), retries);
|
||||
console.log("STEAM request failed! ", url.replace("[STEAMKEY]", steamKey), retries);
|
||||
|
||||
retries++;
|
||||
setTimeout(() => req(), retries * 1000);
|
||||
@ -54,7 +55,7 @@ export class PlayerUtil
|
||||
|
||||
if (!player)
|
||||
{
|
||||
const data = await steamFetch(`https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v2/?key=${ STEAM_API_KEY }&format=json&steamids=${ steamId }`) as IPlayerPayload;
|
||||
const data = await steamFetch(`https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v2/?key=[STEAMKEY]&format=json&steamids=${ steamId }`) as IPlayerPayload;
|
||||
|
||||
assert(data.response.players, "Expected data.response.players to be truthy");
|
||||
|
||||
@ -149,7 +150,7 @@ export class PlayerUtil
|
||||
|
||||
public static async getPlayerSteamData(steamId: string)
|
||||
{
|
||||
const data = await steamFetch(`https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v2/?key=${ STEAM_API_KEY }&format=json&steamids=${ steamId }`) as IPlayerPayload;
|
||||
const data = await steamFetch(`https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v2/?key=[STEAMKEY]&format=json&steamids=${ steamId }`) as IPlayerPayload;
|
||||
|
||||
if (!data?.response?.players?.length)
|
||||
{
|
||||
@ -161,7 +162,7 @@ export class PlayerUtil
|
||||
|
||||
public static async getPlayerStats(steamId: string)
|
||||
{
|
||||
const data = await steamFetch(`https://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v0002/?appid=1422130&key=${ STEAM_API_KEY }&steamid=${ steamId }`) as IPlayerStatsPayload;
|
||||
const data = await steamFetch(`https://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v0002/?appid=1422130&key=[STEAMKEY]&steamid=${ steamId }`) as IPlayerStatsPayload;
|
||||
|
||||
if (!data.playerstats?.stats)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,3 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* See LICENSE for more.
|
||||
*/
|
||||
|
||||
|
||||
import wcmatch from "wildcard-match";
|
||||
|
||||
/*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
@ -18,30 +18,32 @@ import { execSync } from "child_process";
|
||||
|
||||
export class GitUtil
|
||||
{
|
||||
private static cache: { lastUpdated: number, version?: string, commit?: string } = undefined!;
|
||||
private static cache: { version?: string, commit?: string } = undefined!;
|
||||
|
||||
public static getLatestVersion()
|
||||
private static getLatestVersion()
|
||||
{
|
||||
try
|
||||
{
|
||||
const data = execSync("git describe --tags --exact-match").toString();
|
||||
return data.replace("\n", "");
|
||||
} catch
|
||||
{
|
||||
return undefined;
|
||||
}
|
||||
return process.env.CURRENT_VERSION;
|
||||
// try
|
||||
// {
|
||||
// const data = execSync("git describe --tags --exact-match").toString();
|
||||
// return data.replace("\n", "");
|
||||
// } catch
|
||||
// {
|
||||
// return undefined;
|
||||
// }
|
||||
}
|
||||
|
||||
public static getLatestCommit()
|
||||
private static getLatestCommit()
|
||||
{
|
||||
try
|
||||
{
|
||||
const data = execSync("git rev-parse --short HEAD").toString();
|
||||
return data.replace("\n", "");
|
||||
} catch
|
||||
{
|
||||
return undefined;
|
||||
}
|
||||
return process.env.CURRENT_COMMIT;
|
||||
// try
|
||||
// {
|
||||
// const data = execSync("git rev-parse --short HEAD").toString();
|
||||
// return data.replace("\n", "");
|
||||
// } catch
|
||||
// {
|
||||
// return undefined;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@ -55,7 +57,6 @@ export class GitUtil
|
||||
const data = {
|
||||
version: this.getLatestVersion(),
|
||||
commit: this.getLatestCommit(),
|
||||
lastUpdated: Date.now(),
|
||||
};
|
||||
|
||||
this.cache = data;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
@ -26,9 +26,9 @@ export const imgProxySign = (target: string) =>
|
||||
return hmac.digest("base64url");
|
||||
};
|
||||
|
||||
export const generateUrl = (url: string, options: string = "preset:simrailpro") =>
|
||||
export const generateUrl = (url: string, options: string = "rs:auto:128:128:1/f:png") =>
|
||||
{
|
||||
if (url.includes('https://imgproxy.alekswilc.dev/')) return url;
|
||||
if (url.includes('https://proxy.cdn.alekswilc.dev/')) return url;
|
||||
|
||||
if (process.env.NODE_ENV === "development")
|
||||
{
|
||||
@ -38,5 +38,5 @@ export const generateUrl = (url: string, options: string = "preset:simrailpro")
|
||||
}
|
||||
|
||||
const signature = imgProxySign(`/${ options }/plain/${ url }`);
|
||||
return `https://imgproxy.alekswilc.dev/${ signature }/${ options }/plain/${ url }`;
|
||||
return `https://proxy.cdn.alekswilc.dev/${ signature }/${ options }/plain/${ url }`;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -55,7 +55,7 @@
|
||||
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
||||
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
||||
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
||||
"outDir": "../../dist/backend", /* Specify an output folder for all emitted files. */
|
||||
"outDir": "./dist", /* Specify an output folder for all emitted files. */
|
||||
// "removeComments": true, /* Disable emitting comments. */
|
||||
// "noEmit": true, /* Disable emitting files from a compilation. */
|
||||
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
||||
|
17
packages/frontend/Dockerfile
Normal file
17
packages/frontend/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM node:18-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json .
|
||||
|
||||
RUN npm install
|
||||
|
||||
RUN npm i -g serve vite
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run rawbuild
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD [ "serve", "-s", "dist" ]
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
~ Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
~ Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -5,8 +5,9 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
"rawbuild": "vite build",
|
||||
"preview": "vite preview",
|
||||
"build": "docker build --progress=plain -t simrailpro:frontend ."
|
||||
},
|
||||
"dependencies": {
|
||||
"dayjs": "^1.11.13",
|
||||
@ -35,7 +36,7 @@
|
||||
"prettier": "^3.0.0",
|
||||
"prettier-plugin-tailwindcss": "^0.4.1",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"vite": "^4.4.7",
|
||||
"vite": "^6.2.0",
|
||||
"webpack": "^5.88.2"
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
@ -76,10 +76,13 @@ export const Header = (props: {
|
||||
<div className="flex items-center gap-3 2xsm:gap-7">
|
||||
<ul className="flex items-center gap-2 2xsm:gap-4">
|
||||
<a className="cursor-pointer" onClick={ () => i18n.changeLanguage("pl") }>
|
||||
<ReactCountryFlag countryCode={ "PL" } svg alt={'PL'} />
|
||||
<ReactCountryFlag countryCode={ "PL" } svg alt={ "PL" }/>
|
||||
</a>
|
||||
<a className="cursor-pointer" onClick={ () => i18n.changeLanguage("en") }>
|
||||
<ReactCountryFlag countryCode={ "US" } svg alt={'EN'}/>
|
||||
<ReactCountryFlag countryCode={ "US" } svg alt={ "EN" }/>
|
||||
</a>
|
||||
<a className="cursor-pointer" onClick={ () => i18n.changeLanguage("cs") }>
|
||||
<ReactCountryFlag countryCode={ "CZ" } svg alt={ "CZ" }/>
|
||||
</a>
|
||||
</ul>
|
||||
<ul className="flex items-center gap-2 2xsm:gap-4">
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,3 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* See LICENSE for more.
|
||||
*/
|
||||
|
||||
|
||||
import { Dispatch, SetStateAction } from "react";
|
||||
|
||||
export const ConfirmModal = ({ showModal, setShowModal, onConfirm, title, description }: {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
@ -44,8 +44,8 @@ export const StationLog = ({ data }: { data: TLogStationData }) =>
|
||||
className="overflow-hidden rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark">
|
||||
<div className="px-4 pt-6 text-center lg:pb-8 xl:pb-11.5">
|
||||
<div
|
||||
className="mx-auto w-full max-w-30 rounded-full bg-white/20 p-1 backdrop-blur sm:h-44 sm:max-w-44 sm:p-3">
|
||||
<div className="relative drop-shadow-2">
|
||||
className="mx-auto max-w-44 rounded-full">
|
||||
<div className="relative">
|
||||
<img className="rounded-full"
|
||||
src={ data.player.avatar }
|
||||
alt="Player"/>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
@ -44,8 +44,8 @@ export const TrainLog = ({ data }: { data: TLogTrainData }) =>
|
||||
className="overflow-hidden rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark">
|
||||
<div className="px-4 pt-6 text-center lg:pb-8 xl:pb-11.5">
|
||||
<div
|
||||
className="mx-auto w-full max-w-30 rounded-full bg-white/20 p-1 backdrop-blur sm:h-44 sm:max-w-44 sm:p-3">
|
||||
<div className="relative drop-shadow-2">
|
||||
className="mx-auto max-w-44 rounded-full">
|
||||
<div className="relative">
|
||||
<img className="rounded-full"
|
||||
src={ data.player.avatar }
|
||||
alt="Player"/>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
@ -87,7 +87,7 @@ export const ProfileCard = ({ data }: { data: TProfileData }) =>
|
||||
className="overflow-hidden rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark">
|
||||
<div className="px-4 pt-6 text-center lg:pb-8 xl:pb-11.5">
|
||||
<div
|
||||
className="mx-auto max-w-30 rounded-full p-1">
|
||||
className="mx-auto max-w-44 rounded-full">
|
||||
<div className="relative rounded-full">
|
||||
<img className="rounded-full" src={ data.player.avatar } alt="profile"/>
|
||||
{ data.active &&
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,3 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* See LICENSE for more.
|
||||
*/
|
||||
|
||||
|
||||
import { useContext, createContext, ReactNode } from "react";
|
||||
import useSWR from "swr";
|
||||
import { get } from "../util/fetcher.ts";
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
@ -35,7 +35,7 @@ function useLocalStorage<T>(
|
||||
return item ? JSON.parse(item) : initialValue;
|
||||
} catch
|
||||
{
|
||||
return item ? item : initialValue;
|
||||
return (item && item !== "undefined") ? item : initialValue;
|
||||
}
|
||||
}
|
||||
} catch (error)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
@ -19,7 +19,7 @@ import { initReactI18next } from "react-i18next";
|
||||
import LanguageDetector from "i18next-browser-languagedetector";
|
||||
import translationsInEng from "./languages/en.json";
|
||||
import translationsInPl from "./languages/pl.json";
|
||||
// import translationsInCz from "./languages/cs.json";
|
||||
import translationsInCs from "./languages/cs.json";
|
||||
|
||||
const resources = {
|
||||
en: {
|
||||
@ -28,9 +28,9 @@ const resources = {
|
||||
pl: {
|
||||
translation: translationsInPl,
|
||||
},
|
||||
// cs: {
|
||||
// translation: translationsInCz,
|
||||
// }
|
||||
cs: {
|
||||
translation: translationsInCs,
|
||||
}
|
||||
};
|
||||
|
||||
void i18n
|
||||
|
173
packages/frontend/src/i18n/languages/cs.json
Normal file
173
packages/frontend/src/i18n/languages/cs.json
Normal file
@ -0,0 +1,173 @@
|
||||
{
|
||||
"search": {
|
||||
"placeholder": "například alekswilc",
|
||||
"placeholder_with_station": "například alekswilc,Katowice",
|
||||
"none": "Žádné"
|
||||
},
|
||||
"home": {
|
||||
"stats": {
|
||||
"trains": "vlaků",
|
||||
"dispatchers": "výpravčích",
|
||||
"profiles": "profilů"
|
||||
},
|
||||
"title": "Simrail Stats",
|
||||
"description": "Nejlepší stránka se záznamy a statistikami hráčů SimRail!",
|
||||
"buttons": {
|
||||
"project": "Stránka projektu",
|
||||
"forum": "Stránka na fóru SimRail",
|
||||
"discord": "Discord server"
|
||||
},
|
||||
"footer": {
|
||||
"license": "Licence:",
|
||||
"powered": "Založeno na:",
|
||||
"thanks": "Speciální poděkování: <bahu>BAHU.PRO hosting</bahu>, <simrailelite>Simrail ELITE discord</simrailelite>, komunita SimRail a moje přítelkyně",
|
||||
"author": "Pro komunitu SimRail vytvořeno s ❤️ uživatelem <anchor>{{author}}</anchor> "
|
||||
}
|
||||
},
|
||||
"notfound": {
|
||||
"title": "Stránka nenalezena",
|
||||
"description": "Vypadá to, že ses ztratil...",
|
||||
"button": "Vrátit se na hlavní stránku"
|
||||
},
|
||||
"leaderboard": {
|
||||
"train": {
|
||||
"distance": "Ujetá vzdálenost: {{distance}} km",
|
||||
"points": "Získané body: {{points}}"
|
||||
},
|
||||
"station": {
|
||||
"time": "Čas strávený v režimu výpravčího: {{time}}"
|
||||
},
|
||||
"buttons": {
|
||||
"trainDistance": "Největší ujetá vzdálenost",
|
||||
"trainPoints": "Nejvyšší počet body",
|
||||
"dispatcherTime": "Nejvíce hodin nahráno v režimu výpravčího"
|
||||
}
|
||||
},
|
||||
"content_loader": {
|
||||
"error": {
|
||||
"header": "Chyba načtení stránky",
|
||||
"description": "Zkontrolujte vaše internetové připojení a načtěte stránku znovu",
|
||||
"report": "Nahlásit chybu",
|
||||
"refresh": "Načíst znovu"
|
||||
},
|
||||
"notfound": {
|
||||
"header": "Nebyla nalezena žádná data",
|
||||
"description": "Vaše vyhledávání nevrátilo žádné výsledky."
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
"stats": {
|
||||
"distance": "Strojvedoucí",
|
||||
"time": "Výpravčí"
|
||||
},
|
||||
"trains": {
|
||||
"header": "Statistiky vlaků",
|
||||
"train": "Vlak",
|
||||
"distance": "Vzdálenost",
|
||||
"points": "Body",
|
||||
"time": "Čas"
|
||||
},
|
||||
"stations": {
|
||||
"header": "Statistiky stanic",
|
||||
"station": "Stanice",
|
||||
"time": "Čas"
|
||||
},
|
||||
"errors": {
|
||||
"notfound": {
|
||||
"title": "Profil nebyl nalezen",
|
||||
"description": "Profil tohoto hráče nemohl být nalezen, nebo si hráč nastavil soukromý Steam účet."
|
||||
},
|
||||
"blacklist": {
|
||||
"title": "Profil není možné zobrazit",
|
||||
"description": "Profil hráče nemohl být zobrazen kvůli aktivním činnostem moderátorů."
|
||||
}
|
||||
},
|
||||
"info": "Tyto statistiky jsou shromažďovány od {{date}}.",
|
||||
"active": {
|
||||
"train": "Řídí vlak {{train}} na serveru {{server}}",
|
||||
"station": "Výpravčí ve stanici {{station}} na serveru {{server}}"
|
||||
}
|
||||
},
|
||||
"log": {
|
||||
"errors": {
|
||||
"notfound": {
|
||||
"title": "Podrobnosti nebyly nalezeny",
|
||||
"description": "Podrobnosti tohoto uživatele nebyly nalezeny."
|
||||
},
|
||||
"blacklist": {
|
||||
"title": "Tyto podrobnosti není možné zobrazit",
|
||||
"description": "Podrobnosti hráče nemohly být zobrazeny kvůli aktivním činnostem moderátorů."
|
||||
}
|
||||
},
|
||||
"station": {
|
||||
"header": "Opouští stanici",
|
||||
"server": "Server: {{server}}",
|
||||
"station": "Stanice: {{name}} - {{short}}",
|
||||
"joined": "Čas připojení do stanice: {{date}}",
|
||||
"left": "Čas odpojení ze stanice: {{date}}",
|
||||
"spent": "Čas strávený ve stanici: {{date}}"
|
||||
},
|
||||
"train": {
|
||||
"header": "Opouští vlak",
|
||||
"server": "Server: {{server}}",
|
||||
"train": "Vlak: {{name}} {{number}}",
|
||||
"joined": "Čas připojení do vlaku: {{date}}",
|
||||
"left": "Čas odpojení z vlaku: {{date}}",
|
||||
"spent": "Čas strávený ve vlaku: {{date}}",
|
||||
"distance": "Vzdálenost: {{distance}} km",
|
||||
"points": "Body: {{points}}"
|
||||
},
|
||||
"toasts": {
|
||||
"copied": "Odkaz byl zkopírován!",
|
||||
"report": "Údaje byly zkopírovány do schránky. Můžete je použít v kanálu #multiplayer-help-requests na oficiálním Discord serveru SimRailu. Nezapomeňte připsat důvod nahlášení!"
|
||||
},
|
||||
"buttons": {
|
||||
"report": "Nahlásit",
|
||||
"copy": "Zkopírovat odkaz",
|
||||
"profile": "Profil",
|
||||
"record": "Zobrazit"
|
||||
}
|
||||
},
|
||||
"sidebar": {
|
||||
"home": "Hlavní stránka",
|
||||
"logs": "Záznamy",
|
||||
"stations": "Stanice",
|
||||
"trains": "Vlaky",
|
||||
"leaderboard": "Žebříčky hráčů",
|
||||
"active_players": "Aktivní hráči",
|
||||
"info": "INFO",
|
||||
"admin": "ADMIN",
|
||||
"logged": "Přihlášen jako {{username}}",
|
||||
"logout": "Odhlásit se",
|
||||
"profiles": "Profily"
|
||||
},
|
||||
"icons": {
|
||||
"admin": "Administrátor",
|
||||
"leaderboard_hidden": "Žebříček je skrytý",
|
||||
"hidden": "Profil je skrytý"
|
||||
},
|
||||
"admin": {
|
||||
"header": "Akce moderátora",
|
||||
"hideLeaderboard": {
|
||||
"modal": {
|
||||
"title": "Jste si jisti?",
|
||||
"description": "Tato akce skryje profil uživatele z žebříčků."
|
||||
},
|
||||
"button": "Skrýt profil v žebříčku",
|
||||
"button2": "Zobrazit profil v žebříčku",
|
||||
"alert": "Profil hráče je skrytý."
|
||||
},
|
||||
"hide": {
|
||||
"modal": {
|
||||
"title": "Jste si jisti?",
|
||||
"description": "Tato akce skryje profil uživatele ze zobrazování v žebříčku."
|
||||
},
|
||||
"button": "Skrýt profil",
|
||||
"alert": "Profil hráče je skrytý."
|
||||
},
|
||||
"update": {
|
||||
"button": "Vynutit aktualizaci",
|
||||
"alert": "Profil je aktualizován!"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
2
packages/frontend/src/lib.d.ts
vendored
2
packages/frontend/src/lib.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
@ -36,7 +36,7 @@ export const Leaderboard = () =>
|
||||
const { data, error, isLoading } = useSWR(`/leaderboard/${ queryType }/?${ params.toString() }`, get, { refreshInterval: 10_000, errorRetryCount: 5 });
|
||||
|
||||
const [ searchItem, setSearchItem ] = useState(searchParams.get("query") ?? "");
|
||||
const [ sortBy, setSortBy ] = useState(searchParams.get("sort_by") ?? "");
|
||||
const [ sortBy, setSortBy ] = useState(searchParams.get("sort_by") ?? "distance");
|
||||
const [ searchValue ] = useDebounce(searchItem, 500);
|
||||
|
||||
const [ page, setPage ] = useState(parseInt(searchParams.get("page") as string) || 1);
|
||||
@ -44,7 +44,7 @@ export const Leaderboard = () =>
|
||||
useEffect(() =>
|
||||
{
|
||||
setSearchItem(searchParams.get("query") ?? "");
|
||||
setSortBy(searchParams.get("sort_by") ?? "");
|
||||
setSortBy(searchParams.get("sort_by") ?? "distance");
|
||||
setPage(parseInt(searchParams.get("page") as string) || 1);
|
||||
}, []);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
2
packages/frontend/src/react-app-env.d.ts
vendored
2
packages/frontend/src/react-app-env.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
* Copyright (C) 2025 Aleksander <alekswilc> Wilczyński (aleks@alekswilc.dev)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
@ -21,6 +21,6 @@ import react from "@vitejs/plugin-react";
|
||||
export default defineConfig({
|
||||
plugins: [ react() ],
|
||||
build: {
|
||||
outDir: "../../dist/frontend",
|
||||
outDir: "./dist/",
|
||||
}
|
||||
});
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user