Compare commits
2 Commits
f3508de4eb
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
32c12186c1
|
|||
|
2f933d5302
|
6
.github/workflows/rust-check.yaml
vendored
6
.github/workflows/rust-check.yaml
vendored
@@ -34,9 +34,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: .env symlink creation
|
- name: .env symlink creation
|
||||||
run: ln -s .env.example .env
|
run: ln -s .env.dev .env
|
||||||
- name: npm build
|
- name: Tailwind CSS output creation
|
||||||
run: npm install && npm run build
|
run: touch assets/tailwind.css
|
||||||
- name: rustfmt check
|
- name: rustfmt check
|
||||||
run: cargo fmt --all --check
|
run: cargo fmt --all --check
|
||||||
- name: Clippy check
|
- name: Clippy check
|
||||||
|
|||||||
19
Dioxus.toml
19
Dioxus.toml
@@ -2,20 +2,5 @@
|
|||||||
|
|
||||||
[web.app]
|
[web.app]
|
||||||
|
|
||||||
# HTML title tag content
|
# HTML title tag content.
|
||||||
title = "todo_baggins"
|
title = "Todo Baggins"
|
||||||
|
|
||||||
# include `assets` in web platform
|
|
||||||
[web.resource]
|
|
||||||
|
|
||||||
# Additional CSS style files
|
|
||||||
style = []
|
|
||||||
|
|
||||||
# Additional JavaScript files
|
|
||||||
script = []
|
|
||||||
|
|
||||||
[web.resource.dev]
|
|
||||||
|
|
||||||
# Javascript code file
|
|
||||||
# serve: [dev-server] only
|
|
||||||
script = []
|
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
FROM rust:1.92.0-bookworm@sha256:9676d0547a259997add8f5924eb6b959c589ed39055338e23b99aba7958d6d31
|
FROM rust:1.92.0-bookworm@sha256:9676d0547a259997add8f5924eb6b959c589ed39055338e23b99aba7958d6d31
|
||||||
|
|
||||||
RUN useradd -m -u 1000 -s /bin/bash app_user
|
RUN useradd -m -u 1000 -s /bin/bash app_user \
|
||||||
|
&& rustup target add wasm32-unknown-unknown
|
||||||
RUN rustup target add wasm32-unknown-unknown
|
|
||||||
|
|
||||||
USER app_user
|
USER app_user
|
||||||
|
|
||||||
RUN cargo install --locked dioxus-cli --version 0.7.2 \
|
RUN cargo install --git https://github.com/diesel-rs/diesel --rev 2e85ba060d3d70ea605ea58a79b8a435749a7adc diesel_cli \
|
||||||
&& cargo install --locked diesel_cli --version 2.3.4
|
&& cargo install --git https://github.com/DioxusLabs/dioxus --rev 8f8b58ea80ba0ec8057807bcd58fb609f7a5f2b1 dioxus-cli
|
||||||
|
|
||||||
COPY --chown=app_user . /srv/app
|
COPY --chown=app_user . /srv/app
|
||||||
WORKDIR /srv/app
|
WORKDIR /srv/app
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ ARG ANDROID_BUNDLETOOL_VERSION=1.18.3
|
|||||||
ARG ANDROID_BUNDLETOOL_SHA256=a099cfa1543f55593bc2ed16a70a7c67fe54b1747bb7301f37fdfd6d91028e29
|
ARG ANDROID_BUNDLETOOL_SHA256=a099cfa1543f55593bc2ed16a70a7c67fe54b1747bb7301f37fdfd6d91028e29
|
||||||
ENV ANDROID_SDK_ROOT=/opt/android-sdk
|
ENV ANDROID_SDK_ROOT=/opt/android-sdk
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
openjdk-17-jdk-headless=17.0.17+10-1~deb12u1 \
|
openjdk-17-jdk-headless=17.0.17+10-1~deb12u1 \
|
||||||
&& curl -fsSL -o /tmp/cmdline-tools.zip "https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_COMMAND_LINE_TOOLS_VERSION}_latest.zip" \
|
&& curl -fsSL -o /tmp/cmdline-tools.zip "https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_COMMAND_LINE_TOOLS_VERSION}_latest.zip" \
|
||||||
|
|||||||
@@ -46,8 +46,15 @@ mod server_only {
|
|||||||
let mut disconnected_client_ids = HashSet::new();
|
let mut disconnected_client_ids = HashSet::new();
|
||||||
let subscribed_clients = SUBSCRIBED_CLIENTS.read().await;
|
let subscribed_clients = SUBSCRIBED_CLIENTS.read().await;
|
||||||
for (id, client) in subscribed_clients.iter() {
|
for (id, client) in subscribed_clients.iter() {
|
||||||
if let Err(_) = client.websocket.lock().await.send(UpdateEvent).await {
|
if client
|
||||||
disconnected_client_ids.insert(id.clone());
|
.websocket
|
||||||
|
.lock()
|
||||||
|
.await
|
||||||
|
.send(UpdateEvent)
|
||||||
|
.await
|
||||||
|
.is_err()
|
||||||
|
{
|
||||||
|
disconnected_client_ids.insert(*id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
drop(subscribed_clients);
|
drop(subscribed_clients);
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
|
/* stylelint-disable-next-line import-notation */
|
||||||
@import "tailwindcss";
|
@import "tailwindcss";
|
||||||
|
|||||||
Reference in New Issue
Block a user