20 Commits

Author SHA1 Message Date
94059f14bb chore: bump dependencies (#97) 2025-08-07 15:13:45 +00:00
744e23aa66 chore: bump dependencies
All checks were successful
actionlint check / actionlint check (pull_request) Successful in 7s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 3s
GitLeaks check / GitLeaks check (pull_request) Successful in 14s
hadolint check / hadolint check (pull_request) Successful in 15s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 7s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 8s
htmlhint check / htmlhint check (pull_request) Successful in 20s
markdownlint check / markdownlint check (pull_request) Successful in 32s
Prettier check / Prettier check (pull_request) Successful in 33s
checkov check / checkov check (pull_request) Successful in 1m20s
ShellCheck check / ShellCheck check (pull_request) Successful in 30s
Stylelint check / Stylelint check (pull_request) Successful in 27s
yamllint check / yamllint check (pull_request) Successful in 26s
Rust check / Rust check (pull_request) Successful in 12m52s
2025-08-07 16:33:20 +02:00
e9a208a9d1 ci: update the checks dependencies (#96) 2025-08-07 13:10:09 +00:00
0f1dfbadf8 style: satisfy Clippy warnings
All checks were successful
actionlint check / actionlint check (pull_request) Successful in 8s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 8s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 4s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 10s
GitLeaks check / GitLeaks check (pull_request) Successful in 14s
hadolint check / hadolint check (pull_request) Successful in 15s
htmlhint check / htmlhint check (pull_request) Successful in 33s
Prettier check / Prettier check (pull_request) Successful in 27s
markdownlint check / markdownlint check (pull_request) Successful in 27s
ShellCheck check / ShellCheck check (pull_request) Successful in 30s
checkov check / checkov check (pull_request) Successful in 1m21s
Stylelint check / Stylelint check (pull_request) Successful in 27s
yamllint check / yamllint check (pull_request) Successful in 26s
Rust check / Rust check (pull_request) Successful in 13m31s
2025-08-07 14:46:53 +02:00
907ddaacbe ci: update the checks dependencies
Some checks failed
dotenv-linter check / dotenv-linter check (pull_request) Successful in 8s
GitLeaks check / GitLeaks check (pull_request) Successful in 16s
actionlint check / actionlint check (pull_request) Successful in 7s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 4s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 7s
hadolint check / hadolint check (pull_request) Successful in 16s
htmlhint check / htmlhint check (pull_request) Successful in 27s
markdownlint check / markdownlint check (pull_request) Successful in 26s
Prettier check / Prettier check (pull_request) Successful in 35s
ShellCheck check / ShellCheck check (pull_request) Successful in 28s
checkov check / checkov check (pull_request) Successful in 1m21s
Stylelint check / Stylelint check (pull_request) Successful in 28s
yamllint check / yamllint check (pull_request) Successful in 25s
Rust check / Rust check (pull_request) Failing after 6m30s
2025-08-07 12:45:45 +02:00
defddfadae fix: the app title (#94) 2025-02-15 11:28:20 +00:00
8a0fae3b32 build: bump dependencies (#93) 2025-02-14 18:43:50 +00:00
f66b8301f0 build: bump the Dockerfile dependencies
All checks were successful
actionlint check / actionlint check (pull_request) Successful in 7s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 5s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 8s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 8s
GitLeaks check / GitLeaks check (pull_request) Successful in 8s
hadolint check / hadolint check (pull_request) Successful in 20s
htmlhint check / htmlhint check (pull_request) Successful in 21s
markdownlint check / markdownlint check (pull_request) Successful in 20s
Prettier check / Prettier check (pull_request) Successful in 28s
ShellCheck check / ShellCheck check (pull_request) Successful in 20s
checkov check / checkov check (pull_request) Successful in 1m19s
Stylelint check / Stylelint check (pull_request) Successful in 21s
yamllint check / yamllint check (pull_request) Successful in 46s
Rust check / Rust check (pull_request) Successful in 15m22s
2025-02-10 16:49:25 +01:00
7112946e5b build: bump the crate dependencies 2025-02-10 16:48:06 +01:00
ac8a533079 fix: the app title
All checks were successful
conventional pull request title check / conventional pull request title check (pull_request) Successful in 3s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 7s
actionlint check / actionlint check (pull_request) Successful in 11s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 7s
GitLeaks check / GitLeaks check (pull_request) Successful in 9s
hadolint check / hadolint check (pull_request) Successful in 11s
htmlhint check / htmlhint check (pull_request) Successful in 18s
markdownlint check / markdownlint check (pull_request) Successful in 17s
Prettier check / Prettier check (pull_request) Successful in 17s
Stylelint check / Stylelint check (pull_request) Successful in 23s
ShellCheck check / ShellCheck check (pull_request) Successful in 33s
yamllint check / yamllint check (pull_request) Successful in 24s
checkov check / checkov check (pull_request) Successful in 1m31s
Rust check / Rust check (pull_request) Successful in 15m23s
2025-02-10 16:38:58 +01:00
31e50e486b chore: update the JetBrains IDE configuration (#92) 2025-02-04 21:42:28 +00:00
69e43805b9 chore: update the JetBrains IDE configuration
All checks were successful
actionlint check / actionlint check (pull_request) Successful in 8s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 6s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 4s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 8s
GitLeaks check / GitLeaks check (pull_request) Successful in 11s
hadolint check / hadolint check (pull_request) Successful in 15s
htmlhint check / htmlhint check (pull_request) Successful in 32s
markdownlint check / markdownlint check (pull_request) Successful in 28s
Prettier check / Prettier check (pull_request) Successful in 23s
ShellCheck check / ShellCheck check (pull_request) Successful in 26s
checkov check / checkov check (pull_request) Successful in 1m17s
Stylelint check / Stylelint check (pull_request) Successful in 25s
yamllint check / yamllint check (pull_request) Successful in 18s
Rust check / Rust check (pull_request) Successful in 15m45s
2025-01-29 22:44:22 +01:00
ab7fbdd569 build: bump the Dockerfile dependencies (#91) 2025-01-29 21:43:34 +00:00
a0b7a23b7c ci: bump the Rust check dependencies
All checks were successful
actionlint check / actionlint check (pull_request) Successful in 5s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 4s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 3s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 7s
GitLeaks check / GitLeaks check (pull_request) Successful in 10s
hadolint check / hadolint check (pull_request) Successful in 11s
htmlhint check / htmlhint check (pull_request) Successful in 21s
markdownlint check / markdownlint check (pull_request) Successful in 27s
Prettier check / Prettier check (pull_request) Successful in 23s
Stylelint check / Stylelint check (pull_request) Successful in 24s
checkov check / checkov check (pull_request) Successful in 1m11s
ShellCheck check / ShellCheck check (pull_request) Successful in 28s
yamllint check / yamllint check (pull_request) Successful in 15s
Rust check / Rust check (pull_request) Successful in 15m47s
2025-01-29 22:22:31 +01:00
8f3d144329 build: bump the Dockerfile dependencies
Some checks failed
actionlint check / actionlint check (pull_request) Successful in 7s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 7s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 6s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 7s
GitLeaks check / GitLeaks check (pull_request) Successful in 9s
htmlhint check / htmlhint check (pull_request) Successful in 13s
markdownlint check / markdownlint check (pull_request) Successful in 13s
hadolint check / hadolint check (pull_request) Successful in 31s
Prettier check / Prettier check (pull_request) Successful in 14s
Rust check / Rust check (pull_request) Failing after 15s
Stylelint check / Stylelint check (pull_request) Successful in 24s
ShellCheck check / ShellCheck check (pull_request) Successful in 27s
yamllint check / yamllint check (pull_request) Successful in 27s
checkov check / checkov check (pull_request) Successful in 1m26s
2025-01-29 22:14:10 +01:00
3f9efeee3e chore: cleanup gitignore and dockerignore (#89) 2025-01-04 19:22:35 +00:00
d592a81b7c chore: clean up the dockerignore
All checks were successful
actionlint check / actionlint check (pull_request) Successful in 6s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 5s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 9s
htmlhint check / htmlhint check (pull_request) Successful in 17s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 3s
GitLeaks check / GitLeaks check (pull_request) Successful in 10s
hadolint check / hadolint check (pull_request) Successful in 14s
markdownlint check / markdownlint check (pull_request) Successful in 18s
Prettier check / Prettier check (pull_request) Successful in 16s
Stylelint check / Stylelint check (pull_request) Successful in 19s
ShellCheck check / ShellCheck check (pull_request) Successful in 47s
yamllint check / yamllint check (pull_request) Successful in 28s
checkov check / checkov check (pull_request) Successful in 1m38s
Rust check / Rust check (pull_request) Successful in 16m59s
2025-01-04 19:58:34 +01:00
145214e6cc chore: clean up the gitignore 2025-01-04 19:58:26 +01:00
4271ec7c21 refactor: use the dedicated stylesheet component instead of a link (#88) 2025-01-04 10:16:58 +00:00
1deffe8ee4 refactor: use the dedicated stylesheet component instead of a link
All checks were successful
actionlint check / actionlint check (pull_request) Successful in 5s
checkov check / checkov check (pull_request) Successful in 51s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 4s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 2s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 5s
GitLeaks check / GitLeaks check (pull_request) Successful in 7s
hadolint check / hadolint check (pull_request) Successful in 7s
htmlhint check / htmlhint check (pull_request) Successful in 10s
markdownlint check / markdownlint check (pull_request) Successful in 10s
Prettier check / Prettier check (pull_request) Successful in 10s
Rust check / Rust check (pull_request) Successful in 14m47s
ShellCheck check / ShellCheck check (pull_request) Successful in 14s
Stylelint check / Stylelint check (pull_request) Successful in 12s
yamllint check / yamllint check (pull_request) Successful in 13s
2025-01-04 10:44:05 +01:00
29 changed files with 1055 additions and 708 deletions

View File

@ -1,12 +1,11 @@
/.dioxus/ /.git
/.git/ /.github
/.github/ /node_modules
/debug/ /target
/node_modules/
/static/
/target/
.dockerignore .dockerignore
/docker-compose-dev.yml /docker-compose-dev.yaml
/docker-compose-prod.yml /docker-compose-prod.yaml
/docker-compose.yaml
/docker/dev/*/Dockerfile /docker/dev/*/Dockerfile
/docker/prod/*/Dockerfile /docker/prod/*/Dockerfile

View File

@ -22,7 +22,7 @@ jobs:
with: with:
python-version: "3.13.1" python-version: "3.13.1"
- name: Rust toolchain installation - name: Rust toolchain installation
uses: dtolnay/rust-toolchain@0579bb9e1907e560c2f263f705f93655a44a07e5 uses: dtolnay/rust-toolchain@6691ebadcb18182cc1391d07c9f295f657c593cd
- name: code checkout - name: code checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with: with:

View File

@ -21,18 +21,20 @@ jobs:
run: > run: >
apt-get update && apt-get install -y apt-get update && apt-get install -y
libgtk-3-dev=3.24.33-1ubuntu2.2 libgtk-3-dev=3.24.33-1ubuntu2.2
libjavascriptcoregtk-4.1-dev=2.46.4-0ubuntu0.22.04.1 libjavascriptcoregtk-4.1-dev=2.48.3-0ubuntu0.22.04.1
libsoup-3.0-dev=3.0.7-0ubuntu1 libsoup-3.0-dev=3.0.7-0ubuntu1
libwebkit2gtk-4.1-dev=2.46.4-0ubuntu0.22.04.1 libwebkit2gtk-4.1-dev=2.48.3-0ubuntu0.22.04.1
libxdo-dev=1:3.20160805.1-4 libxdo-dev=1:3.20160805.1-4
- name: Rust toolchain installation - name: Rust toolchain installation
uses: dtolnay/rust-toolchain@0579bb9e1907e560c2f263f705f93655a44a07e5 uses: dtolnay/rust-toolchain@6691ebadcb18182cc1391d07c9f295f657c593cd
with: with:
components: clippy, rustfmt components: clippy, rustfmt
- name: code checkout - name: code checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with: with:
fetch-depth: 0 fetch-depth: 0
- name: .env symlink creation
run: ln -s .env.example .env
- name: npm build - name: npm build
run: npm install && npm run build run: npm install && npm run build
- name: rustfmt check - name: rustfmt check

17
.gitignore vendored
View File

@ -1,12 +1,9 @@
/target/ /node_modules
/dist/ /target
/static/
/.dioxus/
/node_modules/
**/*.rs.bk /**/*.rs.bk
/.DS_Store
/.env
/.env.prod
.env /docker-compose.yaml
.env.prod
docker-compose.yaml

63
.idea/codeStyles/Project.xml generated Normal file
View File

@ -0,0 +1,63 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<HTMLCodeStyleSettings>
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
</HTMLCodeStyleSettings>
<JSCodeStyleSettings version="0">
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" />
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
<option name="SPACES_WITHIN_IMPORTS" value="true" />
</JSCodeStyleSettings>
<TypeScriptCodeStyleSettings version="0">
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" />
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
<option name="SPACES_WITHIN_IMPORTS" value="true" />
</TypeScriptCodeStyleSettings>
<VueCodeStyleSettings>
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
</VueCodeStyleSettings>
<codeStyleSettings language="HTML">
<option name="SOFT_MARGINS" value="80" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JavaScript">
<option name="SOFT_MARGINS" value="80" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="Markdown">
<option name="RIGHT_MARGIN" value="80" />
</codeStyleSettings>
<codeStyleSettings language="TypeScript">
<option name="SOFT_MARGINS" value="80" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="Vue">
<option name="SOFT_MARGINS" value="80" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="yaml">
<option name="SOFT_MARGINS" value="80" />
</codeStyleSettings>
</code_scheme>
</component>

5
.idea/codeStyles/codeStyleConfig.xml generated Normal file
View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="dataSourceStorageLocal" created-in="RR-243.22562.230"> <component name="dataSourceStorageLocal" created-in="RR-243.23654.116">
<data-source name="todo_baggins@localhost" uuid="1658668c-c2b8-426d-a22f-16fbad9eff0b"> <data-source name="todo_baggins@localhost" uuid="1658668c-c2b8-426d-a22f-16fbad9eff0b">
<database-info product="PostgreSQL" version="16.4 (Debian 16.4-1.pgdg120+1)" jdbc-version="4.2" driver-name="PostgreSQL JDBC Driver" driver-version="42.6.0" dbms="POSTGRES" exact-version="16.4" exact-driver-version="42.6"> <database-info product="PostgreSQL" version="16.4 (Debian 16.4-1.pgdg120+1)" jdbc-version="4.2" driver-name="PostgreSQL JDBC Driver" driver-version="42.6.0" dbms="POSTGRES" exact-version="16.4" exact-driver-version="42.6">
<identifier-quote-string>&quot;</identifier-quote-string> <identifier-quote-string>&quot;</identifier-quote-string>

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +1,2 @@
#n:public #n:public
!<md> [785, 0, null, null, -2147483648, -2147483648] !<md> [946, 0, null, null, -2147483648, -2147483648]

2
.idea/sqldialects.xml generated
View File

@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="SqlDialectMappings"> <component name="SqlDialectMappings">
<file url="file://$PROJECT_DIR$/migrations/00000000000000_diesel_initial_setup/down.sql" dialect="GenericSQL" />
<file url="file://$PROJECT_DIR$/migrations/00000000000000_diesel_initial_setup/up.sql" dialect="PostgreSQL" />
<file url="PROJECT" dialect="PostgreSQL" /> <file url="PROJECT" dialect="PostgreSQL" />
</component> </component>
</project> </project>

444
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -2,29 +2,29 @@
name = "todo-baggins" name = "todo-baggins"
version = "0.1.0" version = "0.1.0"
authors = ["Matouš Volf <git@matousvolf.cz>"] authors = ["Matouš Volf <git@matousvolf.cz>"]
edition = "2021" edition = "2024"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
chrono = { version = "0.4.39", features = ["serde", "unstable-locales"] } chrono = { version = "0.4.41", features = ["serde", "unstable-locales"] }
dioxus = { version = "0.6.1", features = ["fullstack", "router"] } dioxus = { version = "0.6.3", features = ["fullstack", "router"] }
feruca = { version = "0.10.1" } feruca = { version = "0.11.4" }
serde = { version = "1.0.217" } serde = { version = "1.0.219" }
serde_json = { version = "1.0.134" } serde_json = { version = "1.0.142" }
serde_with = { version = "3.12.0", features = ["chrono_0_4"] } serde_with = { version = "3.14.0", features = ["chrono_0_4"] }
tracing = "0.1.41" tracing = "0.1.41"
unic-langid-impl = { version = "0.9.5", features = ["serde"] } unic-langid-impl = { version = "0.9.6", features = ["serde"] }
validator = { version = "0.19.0", features = ["derive"] } validator = { version = "0.20.0", features = ["derive"] }
diesel = { version = "2.2.6", features = ["chrono", "postgres", "postgres_backend", "serde_json"], optional = true } diesel = { version = "2.2.12", features = ["chrono", "postgres", "postgres_backend", "serde_json"], optional = true }
diesel_migrations = { version = "2.2.0", features = ["postgres"], optional = true } diesel_migrations = { version = "2.2.0", features = ["postgres"], optional = true }
dotenvy = { version = "0.15.7", optional = true } dotenvy = { version = "0.15.7", optional = true }
time = { version = "0.3.37", optional = true } time = { version = "0.3.41", optional = true }
async-std = { version = "1.13.0", optional = true } async-std = { version = "1.13.1", optional = true }
dioxus-i18n = { version = "0.3.0", optional = true } dioxus-i18n = { version = "0.4.3", optional = true }
dioxus-query = { version = "0.6.0", optional = true } dioxus-query = { version = "0.6.1", optional = true }
voca_rs = { version = "1.15.2", optional = true } voca_rs = { version = "1.15.2", optional = true }
[features] [features]

View File

@ -3,14 +3,7 @@
# App (Project) Name # App (Project) Name
name = "todo-baggins" name = "todo-baggins"
# Dioxus App Default Platform # For font files to get referenced in CSS files by their original names, without the hash Dioxus appends.
# web, desktop, fullstack
default_platform = "fullstack"
# `build` & `serve` dist path
out_dir = "dist"
# resource (assets) file folder
asset_dir = "assets" asset_dir = "assets"
[web.app] [web.app]
@ -18,10 +11,17 @@ asset_dir = "assets"
# HTML title tag content # HTML title tag content
title = "Todo Baggins" title = "Todo Baggins"
[web.watcher] # include `assets` in web platform
[web.resource]
# when watcher trigger, regenerate the `index.html` # Additional CSS style files
reload_html = true style = []
# which files or dirs will be watcher monitoring # Additional JavaScript files
watch_path = ["src", "assets"] script = []
[web.resource.dev]
# Javascript code file
# serve: [dev-server] only
script = []

View File

@ -1,7 +1,7 @@
# 1.83.0-bookworm FROM rust:1.88.0-bookworm@sha256:5771a3cc2081935c59ac52b92d49c9e164d4fed92c9f6420aa8cc50364aead6e
FROM rust@sha256:a45bf1f5d9af0a23b26703b3500d70af1abff7f984a7abef5a104b42c02a292b
RUN cargo install dioxus-cli diesel_cli RUN cargo install dioxus-cli --version 0.6.3 \
&& cargo install diesel_cli --version 2.2.7
COPY . /srv/app COPY . /srv/app
WORKDIR /srv/app WORKDIR /srv/app
@ -13,4 +13,4 @@ HEALTHCHECK CMD curl --fail -H "Accept: text/html" http://localhost:8000 || exit
USER 1000:1000 USER 1000:1000
CMD ["dx", "serve", "--addr", "0.0.0.0", "--port", "8000"] CMD ["sleep", "infinity"]

View File

@ -1,11 +1,12 @@
FROM rust@sha256:a45bf1f5d9af0a23b26703b3500d70af1abff7f984a7abef5a104b42c02a292b AS builder FROM rust:1.88.0-bookworm@sha256:5771a3cc2081935c59ac52b92d49c9e164d4fed92c9f6420aa8cc50364aead6e AS builder
RUN cargo install dioxus-cli diesel_cli \ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get update && apt-get install -y --no-install-recommends \
nodejs=18.19.0+dfsg-6~deb12u2 \ nodejs=18.19.0+dfsg-6~deb12u2 \
npm=9.2.0~ds1-1 \ npm=9.2.0~ds1-1 \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/* \
&& cargo install dioxus-cli --version 0.6.3 \
&& cargo install diesel_cli --version 2.2.7
COPY . /srv/app COPY . /srv/app
WORKDIR /srv/app WORKDIR /srv/app
@ -14,10 +15,10 @@ RUN npm install \
&& npm run build \ && npm run build \
&& dx bundle && dx bundle
FROM debian@sha256:b877a1a3fdf02469440f1768cf69c9771338a875b7add5e80c45b756c92ac20a AS runner FROM debian:bookworm@sha256:b877a1a3fdf02469440f1768cf69c9771338a875b7add5e80c45b756c92ac20a AS runner
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y --no-install-recommends libpq5=15.8-0+deb12u1 \ && apt-get install -y --no-install-recommends libpq5=15.10-0+deb12u1 \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

View File

@ -35,10 +35,10 @@ pub(crate) fn App() -> Element {
rsx! { rsx! {
document::Link { rel: "icon", href: FAVICON } document::Link { rel: "icon", href: FAVICON }
document::Link { rel: "stylesheet", href: TAILWIND_CSS } document::Stylesheet { href: TAILWIND_CSS }
document::Link { rel: "stylesheet", href: FONTS_CSS } document::Stylesheet { href: FONTS_CSS }
document::Link { rel: "stylesheet", href: INPUT_NUMBER_ARROWS_CSS } document::Stylesheet { href: INPUT_NUMBER_ARROWS_CSS }
document::Link { rel: "stylesheet", href: INPUT_RANGE_CSS } document::Stylesheet { href: INPUT_RANGE_CSS }
document::Script { src: "https://kit.fontawesome.com/3c1b409f8f.js" } document::Script { src: "https://kit.fontawesome.com/3c1b409f8f.js" }
div { div {

View File

@ -2,8 +2,8 @@ use crate::components::task_list::TaskList;
use crate::internationalization::LocaleFromLanguageIdentifier; use crate::internationalization::LocaleFromLanguageIdentifier;
use crate::models::category::Category; use crate::models::category::Category;
use crate::models::task::TaskWithSubtasks; use crate::models::task::TaskWithSubtasks;
use crate::query::tasks::use_tasks_with_subtasks_in_category_query;
use crate::query::QueryValue; use crate::query::QueryValue;
use crate::query::tasks::use_tasks_with_subtasks_in_category_query;
use chrono::{Datelike, Local}; use chrono::{Datelike, Local};
use dioxus::core_macro::rsx; use dioxus::core_macro::rsx;
use dioxus::dioxus_core::Element; use dioxus::dioxus_core::Element;

View File

@ -1,7 +1,7 @@
use crate::components::task_list::TaskList; use crate::components::task_list::TaskList;
use crate::models::category::Category; use crate::models::category::Category;
use crate::query::tasks::use_tasks_with_subtasks_in_category_query;
use crate::query::QueryValue; use crate::query::QueryValue;
use crate::query::tasks::use_tasks_with_subtasks_in_category_query;
use dioxus::core_macro::rsx; use dioxus::core_macro::rsx;
use dioxus::dioxus_core::Element; use dioxus::dioxus_core::Element;
use dioxus::prelude::*; use dioxus::prelude::*;

View File

@ -3,8 +3,8 @@ use crate::components::task_list_item::TaskListItem;
use crate::internationalization::LocaleFromLanguageIdentifier; use crate::internationalization::LocaleFromLanguageIdentifier;
use crate::models::category::Category; use crate::models::category::Category;
use crate::models::task::TaskWithSubtasks; use crate::models::task::TaskWithSubtasks;
use crate::query::tasks::use_tasks_with_subtasks_in_category_query;
use crate::query::QueryValue; use crate::query::QueryValue;
use crate::query::tasks::use_tasks_with_subtasks_in_category_query;
use chrono::Local; use chrono::Local;
use dioxus::prelude::*; use dioxus::prelude::*;
use dioxus_i18n::t; use dioxus_i18n::t;

View File

@ -1,6 +1,6 @@
use crate::models::project::Project; use crate::models::project::Project;
use crate::query::projects::use_projects_query;
use crate::query::QueryValue; use crate::query::QueryValue;
use crate::query::projects::use_projects_query;
use dioxus::prelude::*; use dioxus::prelude::*;
use dioxus_query::prelude::QueryResult; use dioxus_query::prelude::QueryResult;

View File

@ -6,7 +6,7 @@ use crate::server::subtasks::{create_subtask, delete_subtask, edit_subtask};
use dioxus::core_macro::{component, rsx}; use dioxus::core_macro::{component, rsx};
use dioxus::dioxus_core::Element; use dioxus::dioxus_core::Element;
use dioxus::prelude::*; use dioxus::prelude::*;
use dioxus_query::prelude::{use_query_client, QueryResult}; use dioxus_query::prelude::{QueryResult, use_query_client};
#[component] #[component]
pub(crate) fn SubtasksForm(task: Task) -> Element { pub(crate) fn SubtasksForm(task: Task) -> Element {

View File

@ -13,7 +13,7 @@ use dioxus::core_macro::{component, rsx};
use dioxus::dioxus_core::Element; use dioxus::dioxus_core::Element;
use dioxus::prelude::*; use dioxus::prelude::*;
use dioxus_i18n::t; use dioxus_i18n::t;
use dioxus_query::prelude::{use_query_client, QueryResult}; use dioxus_query::prelude::{QueryResult, use_query_client};
const REMINDER_OFFSETS: [Option<Duration>; 17] = [ const REMINDER_OFFSETS: [Option<Duration>; 17] = [
None, None,

View File

@ -16,7 +16,7 @@ impl From<ValidationErrors> for ErrorVec<ProjectError> {
validation_errors validation_errors
.errors() .errors()
.iter() .iter()
.flat_map(|(&field, error_kind)| match field { .flat_map(|(field, error_kind)| match field.as_ref() {
"title" => match error_kind { "title" => match error_kind {
ValidationErrorsKind::Field(validation_errors) => validation_errors ValidationErrorsKind::Field(validation_errors) => validation_errors
.iter() .iter()
@ -45,7 +45,7 @@ impl From<diesel::result::Error> for ProjectError {
// Has to be implemented for Dioxus server functions. // Has to be implemented for Dioxus server functions.
impl Display for ProjectError { impl Display for ProjectError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self) write!(f, "{self:?}")
} }
} }

View File

@ -17,7 +17,7 @@ impl From<ValidationErrors> for ErrorVec<SubtaskError> {
validation_errors validation_errors
.errors() .errors()
.iter() .iter()
.flat_map(|(&field, error_kind)| match field { .flat_map(|(field, error_kind)| match field.as_ref() {
"title" => match error_kind { "title" => match error_kind {
ValidationErrorsKind::Field(validation_errors) => validation_errors ValidationErrorsKind::Field(validation_errors) => validation_errors
.iter() .iter()
@ -65,7 +65,7 @@ impl From<ErrorVec<Error>> for ErrorVec<SubtaskError> {
// Has to be implemented for Dioxus server functions. // Has to be implemented for Dioxus server functions.
impl Display for SubtaskError { impl Display for SubtaskError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self) write!(f, "{self:?}")
} }
} }

View File

@ -17,7 +17,7 @@ impl From<ValidationErrors> for ErrorVec<TaskError> {
validation_errors validation_errors
.errors() .errors()
.iter() .iter()
.flat_map(|(&field, error_kind)| match field { .flat_map(|(field, error_kind)| match field.as_ref() {
"title" => match error_kind { "title" => match error_kind {
ValidationErrorsKind::Field(validation_errors) => validation_errors ValidationErrorsKind::Field(validation_errors) => validation_errors
.iter() .iter()
@ -55,7 +55,7 @@ impl From<diesel::result::Error> for TaskError {
// Has to be implemented for Dioxus server functions. // Has to be implemented for Dioxus server functions.
impl Display for TaskError { impl Display for TaskError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self) write!(f, "{self:?}")
} }
} }

View File

@ -1,4 +1,4 @@
use diesel_migrations::{embed_migrations, EmbeddedMigrations, MigrationHarness}; use diesel_migrations::{EmbeddedMigrations, MigrationHarness, embed_migrations};
use std::error::Error; use std::error::Error;
const MIGRATIONS: EmbeddedMigrations = embed_migrations!("migrations"); const MIGRATIONS: EmbeddedMigrations = embed_migrations!("migrations");

View File

@ -1,7 +1,7 @@
use crate::query::{QueryErrors, QueryKey, QueryValue}; use crate::query::{QueryErrors, QueryKey, QueryValue};
use crate::server::projects::get_projects; use crate::server::projects::get_projects;
use dioxus::prelude::ServerFnError; use dioxus::prelude::ServerFnError;
use dioxus_query::prelude::{use_get_query, QueryResult, UseQuery}; use dioxus_query::prelude::{QueryResult, UseQuery, use_get_query};
pub(crate) fn use_projects_query() -> UseQuery<QueryValue, QueryErrors, QueryKey> { pub(crate) fn use_projects_query() -> UseQuery<QueryValue, QueryErrors, QueryKey> {
use_get_query([QueryKey::Projects, QueryKey::Tasks], fetch_projects) use_get_query([QueryKey::Projects, QueryKey::Tasks], fetch_projects)
@ -12,10 +12,10 @@ async fn fetch_projects(keys: Vec<QueryKey>) -> QueryResult<QueryValue, QueryErr
match get_projects().await { match get_projects().await {
Ok(projects) => Ok(QueryValue::Projects(projects)), Ok(projects) => Ok(QueryValue::Projects(projects)),
Err(ServerFnError::WrappedServerError(errors)) => Err(QueryErrors::Error(errors)), Err(ServerFnError::WrappedServerError(errors)) => Err(QueryErrors::Error(errors)),
Err(error) => panic!("Unexpected error: {:?}", error), Err(error) => panic!("Unexpected error: {error:?}"),
} }
.into() .into()
} else { } else {
panic!("Unexpected query keys: {:?}", keys); panic!("Unexpected query keys: {keys:?}");
} }
} }

View File

@ -1,7 +1,7 @@
use crate::query::{QueryErrors, QueryKey, QueryValue}; use crate::query::{QueryErrors, QueryKey, QueryValue};
use crate::server::subtasks::get_subtasks_of_task; use crate::server::subtasks::get_subtasks_of_task;
use dioxus::prelude::ServerFnError; use dioxus::prelude::ServerFnError;
use dioxus_query::prelude::{use_get_query, QueryResult, UseQuery}; use dioxus_query::prelude::{QueryResult, UseQuery, use_get_query};
pub(crate) fn use_subtasks_of_task_query( pub(crate) fn use_subtasks_of_task_query(
task_id: i32, task_id: i32,
@ -17,10 +17,10 @@ async fn fetch_subtasks_of_task(keys: Vec<QueryKey>) -> QueryResult<QueryValue,
match get_subtasks_of_task(*task_id).await { match get_subtasks_of_task(*task_id).await {
Ok(subtasks) => Ok(QueryValue::Subtasks(subtasks)), Ok(subtasks) => Ok(QueryValue::Subtasks(subtasks)),
Err(ServerFnError::WrappedServerError(errors)) => Err(QueryErrors::Error(errors)), Err(ServerFnError::WrappedServerError(errors)) => Err(QueryErrors::Error(errors)),
Err(error) => panic!("Unexpected error: {:?}", error), Err(error) => panic!("Unexpected error: {error:?}"),
} }
.into() .into()
} else { } else {
panic!("Unexpected query keys: {:?}", keys); panic!("Unexpected query keys: {keys:?}");
} }
} }

View File

@ -2,7 +2,7 @@ use crate::models::category::Category;
use crate::query::{QueryErrors, QueryKey, QueryValue}; use crate::query::{QueryErrors, QueryKey, QueryValue};
use crate::server::tasks::{get_tasks_in_category, get_tasks_with_subtasks_in_category}; use crate::server::tasks::{get_tasks_in_category, get_tasks_with_subtasks_in_category};
use dioxus::prelude::ServerFnError; use dioxus::prelude::ServerFnError;
use dioxus_query::prelude::{use_get_query, QueryResult, UseQuery}; use dioxus_query::prelude::{QueryResult, UseQuery, use_get_query};
#[allow(dead_code)] #[allow(dead_code)]
pub(crate) fn use_tasks_in_category_query( pub(crate) fn use_tasks_in_category_query(
@ -19,11 +19,11 @@ async fn fetch_tasks_in_category(keys: Vec<QueryKey>) -> QueryResult<QueryValue,
match get_tasks_in_category(category.clone()).await { match get_tasks_in_category(category.clone()).await {
Ok(tasks) => Ok(QueryValue::Tasks(tasks)), Ok(tasks) => Ok(QueryValue::Tasks(tasks)),
Err(ServerFnError::WrappedServerError(errors)) => Err(QueryErrors::Error(errors)), Err(ServerFnError::WrappedServerError(errors)) => Err(QueryErrors::Error(errors)),
Err(error) => panic!("Unexpected error: {:?}", error), Err(error) => panic!("Unexpected error: {error:?}"),
} }
.into() .into()
} else { } else {
panic!("Unexpected query keys: {:?}", keys); panic!("Unexpected query keys: {keys:?}");
} }
} }
@ -47,10 +47,10 @@ async fn fetch_tasks_with_subtasks_in_category(
match get_tasks_with_subtasks_in_category(category.clone()).await { match get_tasks_with_subtasks_in_category(category.clone()).await {
Ok(tasks) => Ok(QueryValue::TasksWithSubtasks(tasks)), Ok(tasks) => Ok(QueryValue::TasksWithSubtasks(tasks)),
Err(ServerFnError::WrappedServerError(errors)) => Err(QueryErrors::Error(errors)), Err(ServerFnError::WrappedServerError(errors)) => Err(QueryErrors::Error(errors)),
Err(error) => panic!("Unexpected error: {:?}", error), Err(error) => panic!("Unexpected error: {error:?}"),
} }
.into() .into()
} else { } else {
panic!("Unexpected query keys: {:?}", keys); panic!("Unexpected query keys: {keys:?}");
} }
} }