Compare commits
27 Commits
97a3a24378
...
main
Author | SHA1 | Date | |
---|---|---|---|
defddfadae
![]() |
|||
8a0fae3b32
![]() |
|||
f66b8301f0
|
|||
7112946e5b
|
|||
ac8a533079
|
|||
31e50e486b
![]() |
|||
69e43805b9
|
|||
ab7fbdd569
![]() |
|||
a0b7a23b7c
|
|||
8f3d144329
|
|||
3f9efeee3e
![]() |
|||
d592a81b7c
|
|||
145214e6cc
|
|||
4271ec7c21
![]() |
|||
1deffe8ee4
|
|||
bcac82b860
![]() |
|||
9da7515042
|
|||
a088d90c6a
![]() |
|||
9481498725
![]() |
|||
3d28254ae1
|
|||
1666c25d13
|
|||
a3ebf712f9
![]() |
|||
0ea3f3a118
|
|||
9d80e68a4e
|
|||
9ce77897d8
![]() |
|||
bf4afb03e6
|
|||
f134e6d4c3
|
@ -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/dev/app/Dockerfile
|
/docker-compose.yaml
|
||||||
/docker/prod/app/Dockerfile
|
/docker/dev/*/Dockerfile
|
||||||
|
/docker/prod/*/Dockerfile
|
||||||
|
4
.github/workflows/rust-check.yaml
vendored
4
.github/workflows/rust-check.yaml
vendored
@ -21,9 +21,9 @@ 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.46.5-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.46.5-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@0579bb9e1907e560c2f263f705f93655a44a07e5
|
||||||
|
8
.github/workflows/shellcheck-check.yaml
vendored
8
.github/workflows/shellcheck-check.yaml
vendored
@ -25,4 +25,10 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: ShellCheck check
|
- name: ShellCheck check
|
||||||
# https://www.shellcheck.net/wiki/Recursiveness
|
# https://www.shellcheck.net/wiki/Recursiveness
|
||||||
run: find . -type f -name "*.sh" -print0 | xargs -0 shellcheck
|
run: |
|
||||||
|
if find . -type f -name "*.sh" -print0 | grep -qz .; then
|
||||||
|
find . -type f -name "*.sh" -print0 | xargs -0 shellcheck
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "No shell scripts found. Skipping ShellCheck."
|
||||||
|
fi
|
||||||
|
17
.gitignore
vendored
17
.gitignore
vendored
@ -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
63
.idea/codeStyles/Project.xml
generated
Normal 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
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||||
|
</state>
|
||||||
|
</component>
|
2
.idea/dataSources.local.xml
generated
2
.idea/dataSources.local.xml
generated
@ -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>"</identifier-quote-string>
|
<identifier-quote-string>"</identifier-quote-string>
|
||||||
|
1070
.idea/dataSources/1658668c-c2b8-426d-a22f-16fbad9eff0b.xml
generated
1070
.idea/dataSources/1658668c-c2b8-426d-a22f-16fbad9eff0b.xml
generated
File diff suppressed because it is too large
Load Diff
@ -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
2
.idea/sqldialects.xml
generated
@ -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>
|
623
Cargo.lock
generated
623
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
22
Cargo.toml
22
Cargo.toml
@ -7,23 +7,23 @@ edition = "2021"
|
|||||||
# 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.38", features = ["serde", "unstable-locales"] }
|
chrono = { version = "0.4.39", features = ["serde", "unstable-locales"] }
|
||||||
dioxus = { version = "0.6.0", features = ["fullstack", "router"] }
|
dioxus = { version = "0.6.3", features = ["fullstack", "router"] }
|
||||||
feruca = { version = "0.10.0" }
|
feruca = { version = "0.10.1" }
|
||||||
serde = { version = "1.0.208" }
|
serde = { version = "1.0.217" }
|
||||||
serde_json = { version = "1.0.125" }
|
serde_json = { version = "1.0.138" }
|
||||||
serde_with = { version = "3.9.0", features = ["chrono_0_4"] }
|
serde_with = { version = "3.12.0", features = ["chrono_0_4"] }
|
||||||
tracing = "0.1.40"
|
tracing = "0.1.41"
|
||||||
unic-langid-impl = { version = "0.9.5", features = ["serde"] }
|
unic-langid-impl = { version = "0.9.5", features = ["serde"] }
|
||||||
validator = { version = "0.19.0", features = ["derive"] }
|
validator = { version = "0.19.0", features = ["derive"] }
|
||||||
|
|
||||||
diesel = { version = "2.2.2", features = ["chrono", "postgres", "postgres_backend", "serde_json"], optional = true }
|
diesel = { version = "2.2.7", 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.36", optional = true }
|
time = { version = "0.3.37", optional = true }
|
||||||
|
|
||||||
async-std = { version = "1.12.0", optional = true }
|
async-std = { version = "1.13.0", optional = true }
|
||||||
dioxus-i18n = { version = "0.3.0", optional = true }
|
dioxus-i18n = { version = "0.4.2", optional = true }
|
||||||
dioxus-query = { version = "0.6.0", optional = true }
|
dioxus-query = { version = "0.6.0", optional = true }
|
||||||
voca_rs = { version = "1.15.2", optional = true }
|
voca_rs = { version = "1.15.2", optional = true }
|
||||||
|
|
||||||
|
26
Dioxus.toml
26
Dioxus.toml
@ -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 = []
|
||||||
|
@ -12,11 +12,22 @@ services:
|
|||||||
- ./Cargo.toml:/srv/app/Cargo.toml
|
- ./Cargo.toml:/srv/app/Cargo.toml
|
||||||
- ./diesel.toml:/srv/app/diesel.toml
|
- ./diesel.toml:/srv/app/diesel.toml
|
||||||
- ./Dioxus.toml:/srv/app/Dioxus.toml
|
- ./Dioxus.toml:/srv/app/Dioxus.toml
|
||||||
- ./package.json:/srv/app/package.json
|
|
||||||
- ./package-lock.json:/srv/app/package-lock.json
|
|
||||||
restart: always
|
restart: always
|
||||||
ports: ["8000:8000"]
|
ports: ["8000:8000"]
|
||||||
depends_on: ["db"]
|
depends_on: ["db", "style-builder"]
|
||||||
|
|
||||||
|
style-builder:
|
||||||
|
build:
|
||||||
|
dockerfile: docker/dev/style-builder/Dockerfile
|
||||||
|
volumes:
|
||||||
|
- ./assets:/srv/app/assets
|
||||||
|
- ./src:/srv/app/src
|
||||||
|
- ./package.json:/srv/app/package.json
|
||||||
|
- ./package-lock.json:/srv/app/package-lock.json
|
||||||
|
# To prevent the container from exiting.
|
||||||
|
# See https://github.com/rails/rails/issues/44048.
|
||||||
|
tty: true
|
||||||
|
restart: always
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:16.4-bookworm
|
image: postgres:16.4-bookworm
|
||||||
|
@ -1,27 +1,17 @@
|
|||||||
|
# 1.83.0-bookworm
|
||||||
FROM rust@sha256:a45bf1f5d9af0a23b26703b3500d70af1abff7f984a7abef5a104b42c02a292b
|
FROM rust@sha256:a45bf1f5d9af0a23b26703b3500d70af1abff7f984a7abef5a104b42c02a292b
|
||||||
|
|
||||||
RUN cargo install dioxus-cli diesel_cli \
|
RUN cargo install dioxus-cli --version 0.6.3 \
|
||||||
&& apt-get update && apt-get install -y --no-install-recommends \
|
&& cargo install diesel_cli --version 2.2.7
|
||||||
nodejs=18.19.0+dfsg-6~deb12u2 \
|
|
||||||
npm=9.2.0~ds1-1 \
|
|
||||||
supervisor=4.2.5-1 \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
COPY . /srv/app
|
COPY . /srv/app
|
||||||
WORKDIR /srv/app
|
WORKDIR /srv/app
|
||||||
|
|
||||||
RUN npm install
|
RUN mkdir -p /.local/share/dioxus \
|
||||||
|
&& chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus
|
||||||
COPY docker/dev/app/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
||||||
|
|
||||||
RUN chown -R 1000:1000 /srv/app \
|
|
||||||
&& chown -R 1000:1000 /usr/local/cargo \
|
|
||||||
&& mkdir -p /.local/share/dioxus \
|
|
||||||
&& chown -R 1000:1000 /.local/share/dioxus
|
|
||||||
|
|
||||||
HEALTHCHECK CMD curl --fail -H "Accept: text/html" http://localhost:8000 || exit 1
|
HEALTHCHECK CMD curl --fail -H "Accept: text/html" http://localhost:8000 || exit 1
|
||||||
|
|
||||||
USER 1000:1000
|
USER 1000:1000
|
||||||
|
|
||||||
CMD ["sh", "docker/dev/app/entrypoint.sh"]
|
CMD ["dx", "serve", "--addr", "0.0.0.0", "--port", "8000"]
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
|
@ -1,23 +0,0 @@
|
|||||||
[supervisord]
|
|
||||||
nodaemon=true
|
|
||||||
logfile=/dev/null
|
|
||||||
logfile_maxbytes=0
|
|
||||||
pidfile=/dev/null
|
|
||||||
|
|
||||||
[program:npm]
|
|
||||||
command=npm run watch
|
|
||||||
directory=/srv/app
|
|
||||||
autostart=true
|
|
||||||
autorestart=true
|
|
||||||
stdout_logfile=/dev/fd/1
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
redirect_stderr=true
|
|
||||||
|
|
||||||
[program:dx]
|
|
||||||
command=dx serve --addr 0.0.0.0 --port 8000
|
|
||||||
directory=/srv/app
|
|
||||||
autostart=true
|
|
||||||
autorestart=true
|
|
||||||
stdout_logfile=/dev/fd/1
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
redirect_stderr=true
|
|
15
docker/dev/style-builder/Dockerfile
Normal file
15
docker/dev/style-builder/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# 23-alpine3.21
|
||||||
|
FROM node@sha256:c61b6b12a3c96373673cd52d7ecee2314e82bca5d541eecf0bc6aee870c8c6f7
|
||||||
|
|
||||||
|
WORKDIR /srv/app
|
||||||
|
|
||||||
|
COPY ./package.json ./package.json
|
||||||
|
COPY ./package-lock.json ./package-lock.json
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
USER 1000:1000
|
||||||
|
|
||||||
|
#checkov:skip=CKV_DOCKER_2: No need for (or even a simple way to do) a healthcheck.
|
||||||
|
|
||||||
|
CMD ["npm", "run", "watch"]
|
@ -1,23 +1,26 @@
|
|||||||
|
# 1.83.0-bookworm
|
||||||
FROM rust@sha256:a45bf1f5d9af0a23b26703b3500d70af1abff7f984a7abef5a104b42c02a292b AS builder
|
FROM rust@sha256:a45bf1f5d9af0a23b26703b3500d70af1abff7f984a7abef5a104b42c02a292b 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
|
||||||
|
|
||||||
RUN npm install \
|
RUN npm install \
|
||||||
&& npm run build \
|
&& npm run build \
|
||||||
&& dx build --release
|
&& dx bundle
|
||||||
|
|
||||||
|
# bookworm
|
||||||
FROM debian@sha256:b877a1a3fdf02469440f1768cf69c9771338a875b7add5e80c45b756c92ac20a AS runner
|
FROM debian@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/*
|
||||||
|
|
||||||
|
@ -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 {
|
||||||
|
@ -15,7 +15,7 @@ pub(crate) fn TaskListItem(task: TaskWithSubtasks) -> Element {
|
|||||||
div {
|
div {
|
||||||
class: "flex flex-col",
|
class: "flex flex-col",
|
||||||
div {
|
div {
|
||||||
class: "mt-2 grow font-medium",
|
class: "mt-1 grow font-medium",
|
||||||
{task.task().title()}
|
{task.task().title()}
|
||||||
},
|
},
|
||||||
div {
|
div {
|
||||||
|
@ -19,7 +19,7 @@ use diesel::prelude::*;
|
|||||||
use diesel::{ExpressionMethods, OptionalExtension, QueryDsl, RunQueryDsl, SelectableHelper};
|
use diesel::{ExpressionMethods, OptionalExtension, QueryDsl, RunQueryDsl, SelectableHelper};
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
#[cfg(feature = "server")]
|
#[cfg(feature = "server")]
|
||||||
use time::util::days_in_year_month;
|
use time::Month;
|
||||||
#[cfg(feature = "server")]
|
#[cfg(feature = "server")]
|
||||||
use validator::Validate;
|
use validator::Validate;
|
||||||
|
|
||||||
@ -178,10 +178,11 @@ pub(crate) async fn complete_task(task_id: i32) -> Result<Task, ServerFnError<Er
|
|||||||
*date = NaiveDate::from_ymd_opt(
|
*date = NaiveDate::from_ymd_opt(
|
||||||
date.year(),
|
date.year(),
|
||||||
date.month(),
|
date.month(),
|
||||||
reoccurrence.start_date().day().min(days_in_year_month(
|
reoccurrence.start_date().day().min(
|
||||||
date.year(),
|
Month::try_from(date.month() as u8)
|
||||||
(date.month() as u8).try_into().unwrap(),
|
.unwrap()
|
||||||
) as u32),
|
.length(date.year()) as u32,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import("tailwindcss").Config} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mode: "all",
|
mode: "all",
|
||||||
content: ["./src/**/*.{rs,html,css}", "./dist/**/*.html"],
|
content: ["./src/**/*.{rs,html,css}"],
|
||||||
theme: {
|
theme: {
|
||||||
fontFamily: {
|
fontFamily: {
|
||||||
sans: ["Inter", "sans-serif"],
|
sans: ["Inter", "sans-serif"],
|
||||||
|
Reference in New Issue
Block a user