Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template updates #400

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
057bff2
add custom fly deploy action
PenguinWithATie Sep 29, 2024
9549c00
add internationalization templates, sync with latest translations (#335)
PenguinWithATie Oct 17, 2024
7d28926
timer_refactor (#345)
PenguinWithATie Oct 21, 2024
53ec2f7
Fixes displayed template
IongIer Oct 21, 2024
4e56b39
consolidate cookies (#347)
PenguinWithATie Oct 25, 2024
f97b557
Styles according to leptosfmt 0.1.32 (#349)
klautcomputing Oct 28, 2024
4095365
websocket refactor (#348)
PenguinWithATie Oct 29, 2024
84a526b
Adds RL banner for new season
IongIer Oct 30, 2024
c3c9ab8
add takeback config (#350)
PenguinWithATie Oct 30, 2024
4b0ad80
add move times to FE (#351)
PenguinWithATie Oct 30, 2024
f317023
add more delay to profile scroll (#353)
PenguinWithATie Oct 31, 2024
29c70a3
Tweaks sideboard css to better fit new movetimes
IongIer Oct 31, 2024
25ef76f
Hides move times in history for non realtime games
IongIer Nov 4, 2024
ab33f04
Adds romanian translation (#358)
IongIer Nov 4, 2024
680346e
Adds German locales (#357)
klautcomputing Nov 4, 2024
f47d1ab
Exposes ro and de, removes very incomplete locales, fixes typo
IongIer Nov 5, 2024
79ce07d
add history timer display (#362)
PenguinWithATie Nov 7, 2024
c8505eb
working on filtering (#344)
kd2718 Nov 8, 2024
04df0ea
Update flake.nix, remove duplication and add missing dependencies
frisoft Nov 9, 2024
cb24b57
Removes rapid league banner
IongIer Nov 12, 2024
e29c714
Fixes mistakes in German locales
klautcomputing Nov 7, 2024
a4d44a2
Add PosgreSQL commands to flake.nix (#366)
frisoft Nov 14, 2024
7724ee4
PWA (#367)
frisoft Nov 21, 2024
79b1cea
Adds Hungarian locales (#378)
klautcomputing Nov 22, 2024
7f77c27
Fixes comunity -> community (#379)
klautcomputing Nov 22, 2024
2ba1527
Bumps up version of wasm-bindgen
IongIer Nov 22, 2024
1947bd1
sync translations
PenguinWithATie Nov 22, 2024
69ac412
sounds_refactor (#386)
PenguinWithATie Nov 24, 2024
72754d6
Update nix flake.lock for wasm-bindgen-cli 0.2.95 (#387)
frisoft Nov 24, 2024
d2486ce
Makes disconnect obvious
IongIer Nov 23, 2024
0f55aa3
add markdown rendering to tournaments (#389)
PenguinWithATie Nov 25, 2024
a6774eb
Optimise PWA cache (#388)
frisoft Nov 25, 2024
b42b9a1
restyle profile (#390)
PenguinWithATie Nov 26, 2024
13bbb7e
Changes date in pgn file name
klautcomputing Nov 29, 2024
75a7d23
sort challenges, use animated for (#391)
PenguinWithATie Nov 30, 2024
279d606
Adds Fair Play Cup notification
klautcomputing Dec 5, 2024
2f52297
fix pwa cookie (#396)
PenguinWithATie Dec 8, 2024
46500d9
Changes max days 14 -> 20 for KotH
klautcomputing Dec 7, 2024
2b6be2d
Adds finish tournament functionality
klautcomputing Dec 9, 2024
00d6559
Shows game result on profile games
klautcomputing Dec 9, 2024
28dc74d
Makes game result obvious on game page
IongIer Dec 9, 2024
375b686
Fixes unclear string for draw on the board
IongIer Dec 9, 2024
0ef22e6
Merge remote-tracking branch 'origin/main' into template_updates
IongIer Dec 11, 2024
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
697 changes: 361 additions & 336 deletions Cargo.lock

Large diffs are not rendered by default.

75 changes: 39 additions & 36 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,59 +9,62 @@ lto = true
opt-level = 'z'

[workspace.dependencies]
leptos = { version = "0.6", features = ["nightly"] }
leptos-use = { version = "0.13.5" }
leptos_meta = { version = "0.6", features = ["nightly"] }
leptos_router = { version = "0.6", features = ["nightly"] }
leptos_actix = { version = "0.6" }
leptos_icons = { version = "0.3"}
leptos_i18n = { version = "0.4"}
icondata = {version = "0.4"}
actix-web = { version = "4", features = ["macros"] }
actix-files = { version = "0.6" }
actix-web-actors = { version = "4.3.0" }
actix = "0.13.5"
actix-rt = "2.10.0"
actix-files = { version = "0.6" }
actix-identity = { version = "0.8" }
actix-rt = "2.10.0"
actix-session = { version = "0.10", features = ["cookie-session"] }
actix-web = { version = "4", features = ["macros"] }
actix-web-actors = { version = "4.3.0" }
anyhow = "1"
argon2 = "0.5"
sha2 = "0.10"
serde = { version = "1" }
serde_with = { version = "3.9" }
http-serde = { version = "2" }
serde_json = { version = "1" }
bb8 = { version = "0.8" }
bimap = {version = "0.6.3", features = ["serde"] }
cfg-if = "1.0.0"
chrono = { version = "0.4", features = ["serde"] }
codee = { version = "0.2", features = ["msgpack_serde", "base64"] }
console_error_panic_hook = "0.1.7"
console_log = "1.0.0"
codee = { version = "0.2", features = ["msgpack_serde", "base64"] }
regex = "1.10"
http = "1.1.0"
log = "0.4.22"
simple_logger = "5.0"
thiserror = "1"
anyhow = "1"
tokio = { version = "1.39.2", features = ["full"] }
wasm-bindgen = "0.2.93"
wasm-bindgen-futures = "0.4"
web-sys = {version = "0.3.70", features = ["AbortController", "AbortSignal", "AudioContext", "AudioBuffer", "AudioBufferSourceNode", "AudioDestinationNode", "Blob", "Clipboard", "HtmlDocument", "SvgPoint", "SvgsvgElement", "SvgGraphicsElement", "SvgRect", "SvgMatrix", "Url", "Window"] }
bb8 = { version = "0.8" }
cookie = "0.18"
diesel = { version = "2.2", features = ["postgres", "chrono", "uuid", "serde_json"] }
diesel-async = { version = "0.5", features = ["postgres", "bb8"] }
diesel_migrations = { version = "2.2", features = ["postgres"]}
uuid = { version = "1.10", features = ["v4", "js", "serde"] }
nanoid = "0.4"
dotenvy = "0.15"
http = "1.1.0"
http-serde = { version = "2" }
icondata = {version = "0.5"}
indoc = "2"
itertools = "0.13.0"
lazy_static = "1.5"
leptix_primitives = { version = "0.2" }
leptos = { version = "0.6", features = ["nightly"] }
leptos-use = { version = "0.13" }
leptos_actix = { version = "0.6" }
leptos_i18n = { version = "0.4", features = ["suppress_key_warnings"] }
leptos_icons = { version = "0.3"}
leptos_meta = { version = "0.6", features = ["nightly"] }
leptos_router = { version = "0.6", features = ["nightly"] }
log = "0.4.22"
markdown = "1.0.0-alpha"
nanoid = "0.4"
rand = "0.8"
rand_core = "0.6"
cookie = "0.18"
regex = "1.10"
serde = { version = "1" }
serde_json = { version = "1" }
serde_with = { version = "3.9" }
sha2 = "0.10"
simple_logger = "5.0"
skillratings = "0.27"
chrono = { version = "0.4", features = ["serde"] }
itertools = "0.13.0"
leptix_primitives = { version = "0.2" }
thiserror = "1"
tokio = { version = "1.39.2", features = ["full"] }
tree-ds = {version = "0.1.5", features = ["serde", "compact_serde"] }
bimap = {version = "0.6.3", features = ["serde"] }
uuid = { version = "1.10", features = ["v4", "js", "serde"] }
walkdir = "2.5"
wasm-bindgen = "0.2.95"
wasm-bindgen-futures = "0.4"
web-sys = {version = "0.3.70", features = ["AbortController", "AbortSignal", "AudioContext", "AudioBuffer", "AudioBufferSourceNode", "AudioDestinationNode", "Blob", "Clipboard", "HtmlDocument", "SvgPoint", "SvgsvgElement", "SvgGraphicsElement", "SvgRect", "SvgMatrix", "Url", "Window"] }

# Defines a size-optimized profile for the WASM bundle in release mode
[profile.wasm-release]
inherits = "release"
Expand Down
28 changes: 15 additions & 13 deletions apis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,55 +7,57 @@ edition = "2021"
crate-type = ["cdylib", "rlib"]

[dependencies]
actix = { workspace = true, optional = true }
actix-files = { workspace = true, optional = true }
actix-identity = { workspace = true, optional = true }
actix-rt = { workspace = true, optional = true }
actix-session = { workspace = true, optional = true }
actix-web = { workspace = true, optional = true, features = ["macros"] }
actix-web-actors = { workspace = true, optional = true }
actix = { workspace = true, optional = true }
anyhow = { workspace = true }
argon2 = { workspace = true, optional = true }
bimap = {workspace = true}
cfg-if = { workspace = true }
chrono = { workspace = true }
codee ={ workspace = true }
console_error_panic_hook = { workspace = true }
cookie = { workspace = true }
db = { path = "../db", optional = true }
diesel = { workspace = true, optional = true }
diesel_migrations = { workspace = true, optional = true }
diesel-async = { workspace = true, optional = true }
diesel_migrations = { workspace = true, optional = true }
hive = { path = "../engine" }
shared_types = { path = "../shared_types" }
http = { workspace = true }
http-serde = { workspace = true }
icondata = { workspace = true }
indoc = { workspace = true }
lazy_static = { workspace = true }
leptix_primitives = {workspace = true}
leptos = { workspace = true }
leptos-use = { workspace = true }
leptos_actix = { workspace = true, optional = true }
leptos_i18n = { workspace = true }
leptos_icons = { workspace = true }
leptos_meta = { workspace = true }
leptos_router = { workspace = true }
leptos_icons = { workspace = true }
leptos_i18n = { workspace = true }
icondata = { workspace = true }
log = { workspace = true }
markdown = {workspace = true}
rand = { workspace = true }
rand_core = { workspace = true }
regex = { workspace = true }
lazy_static = { workspace = true }
serde = { workspace = true, features = ["derive"] }
http-serde = { workspace = true }
serde_json = { workspace = true }
sha2 = { workspace = true }
shared_types = { path = "../shared_types" }
simple_logger = { workspace = true }
thiserror = { workspace = true }
anyhow = { workspace = true }
tokio = { workspace = true, optional = true }
tree-ds = {workspace = true}
uuid = { workspace = true }
walkdir = {workspace = true}
wasm-bindgen = { workspace = true}
wasm-bindgen-futures = { workspace = true}
web-sys = { workspace = true }
leptix_primitives = {workspace = true}
tree-ds = {workspace = true}
bimap = {workspace = true}
walkdir = {workspace = true}
[features]
csr = ["leptos/csr", "leptos_meta/csr", "leptos_router/csr", "leptos_i18n/csr"]
hydrate = ["leptos/hydrate", "leptos_meta/hydrate", "leptos_router/hydrate", "leptos_i18n/hydrate"]
Expand Down
8 changes: 4 additions & 4 deletions apis/locales/ca/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"win": "Victòries"
},
"stats_box": {
"wins": "Victòries: {{count}}",
"draws": "Empats: {{count}}",
"total": "Total: {{count}}",
"losses": "Derrotes: {{count}}"
"wins": "Victòries",
"draws": "Empats",
"total": "Total",
"losses": "Derrotes"
},
"player_color": "Color del jugador:",
"game_result": "Resultat de la partida:",
Expand Down
8 changes: 4 additions & 4 deletions apis/locales/de/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"all": "Alle"
},
"stats_box": {
"total": "Gesamt: {{count}}",
"wins": "Siege: {{count}}",
"losses": "Niederlagen: {{count}}",
"draws": "Unentschieden: {{count}}"
"total": "Gesamt",
"wins": "Siege",
"losses": "Niederlagen",
"draws": "Unentschieden"
},
"player_color": "Spieler*innenfarbe:",
"game_result": "Spielergebnis:",
Expand Down
8 changes: 4 additions & 4 deletions apis/locales/en/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"all": "All"
},
"stats_box": {
"total": "Total: {{count}}",
"wins": "Wins: {{count}}",
"losses": "Losses: {{count}}",
"draws": "Draws: {{count}}"
"total": "Total",
"wins": "Wins",
"losses": "Losses",
"draws": "Draws"
},
"player_color": "Player color:",
"game_result": "Game result:",
Expand Down
8 changes: 4 additions & 4 deletions apis/locales/es/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"all": "Todos"
},
"stats_box": {
"total": "Total: {{count}}",
"wins": "Victorias: {{count}}",
"losses": "Derrotas: {{count}}",
"draws": "Empates: {{count}}"
"total": "Total",
"wins": "Victorias",
"losses": "Derrotas",
"draws": "Empates"
},
"player_color": "Color del jugador:",
"game_result": "Resultado de la partida:",
Expand Down
8 changes: 4 additions & 4 deletions apis/locales/fr/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"all": "Tout"
},
"stats_box": {
"total": "Total : {{count}}",
"draws": "Matchs nuls : {{count}}",
"wins": "Victoires : {{count}}",
"losses": "Défaites : {{count}}"
"total": "Total",
"draws": "Matchs nuls",
"wins": "Victoires",
"losses": "Défaites"
},
"game_result": "Résultat de la partie :",
"player_color": "Couleur du joueur :"
Expand Down
8 changes: 4 additions & 4 deletions apis/locales/hu/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"all": "Mind"
},
"stats_box": {
"total": "Összesen: {{count}}",
"draws": "Döntetlenek: {{count}}",
"wins": "Győzelmek: {{count}}",
"losses": "Vereségek: {{count}}"
"total": "Összesen",
"draws": "Döntetlenek",
"wins": "Győzelmek",
"losses": "Vereségek"
},
"player_color": "Játékos színe:",
"include_speeds": "Kiválasztott játékidők:"
Expand Down
8 changes: 4 additions & 4 deletions apis/locales/it/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"win": "Vittorie"
},
"stats_box": {
"total": "Total: {{count}}",
"wins": "Vittorie: {{count}}",
"losses": "Sconfitte: {{count}}",
"draws": "Patte: {{count}}"
"total": "Total",
"wins": "Vittorie",
"losses": "Sconfitte",
"draws": "Patte"
},
"player_color": "Colore giocatore:",
"game_result": "Risultato della partita:",
Expand Down
8 changes: 4 additions & 4 deletions apis/locales/pt/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"draw": "Empate"
},
"stats_box": {
"total": "Total: {{count}}",
"draws": "Empates: {{count}}",
"losses": "Derrotas: {{count}}",
"wins": "Vitórias: {{count}}"
"total": "Total",
"draws": "Empates",
"losses": "Derrotas",
"wins": "Vitórias"
},
"player_color": "Cor do jogador:",
"game_result": "Resultado do jogo:",
Expand Down
8 changes: 4 additions & 4 deletions apis/locales/ro/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"all": "Toate"
},
"stats_box": {
"total": "Total: {{count}}",
"wins": "Victorii: {{count}}",
"losses": "Înfrângeri: {{count}}",
"draws": "Remize: {{count}}"
"total": "Total",
"wins": "Victorii",
"losses": "Înfrângeri",
"draws": "Remize"
},
"player_color": "Culoarea jucătorului:",
"game_result": "Rezultat:",
Expand Down
8 changes: 4 additions & 4 deletions apis/locales/ru/profile.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"stats_box": {
"wins": "Побед: {{count}}",
"total": "Всего: {{count}}",
"draws": "Ничьих: {{count}}",
"losses": "Поражений: {{count}}"
"wins": "Побед",
"total": "Всего",
"draws": "Ничьих",
"losses": "Поражений"
},
"game_result": "Результат партии:",
"include_speeds": "Контроль времени:",
Expand Down
15 changes: 15 additions & 0 deletions apis/src/common/markdown.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use markdown::{Constructs, Options, ParseOptions};

pub fn markdown_to_html(markdown: &str) -> Option<String> {
let options = &Options {
parse: ParseOptions {
constructs: Constructs {
label_start_image: false,
..Default::default()
},
..Default::default()
},
..Default::default()
};
markdown::to_html_with_options(markdown, options).ok()
}
2 changes: 2 additions & 0 deletions apis/src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ mod game_action;
mod game_reaction;
mod hex;
mod hex_stack;
mod markdown;
mod move_info;
mod piece_type;
mod rating_change_info;
Expand All @@ -21,6 +22,7 @@ pub use game_action::GameAction;
pub use game_reaction::GameReaction;
pub use hex::{ActiveState, Direction, Hex, HexType};
pub use hex_stack::HexStack;
pub use markdown::markdown_to_html;
pub use move_info::MoveInfo;
pub use piece_type::PieceType;
pub use rating_change_info::RatingChangeInfo;
Expand Down
Loading