From 3a1541630089a432839becd226e2e8fd4cc42af7 Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Mon, 1 Dec 2025 21:02:55 +0700 Subject: font --- backend/main.py | 10 ++++++++-- frontend/.DS_Store | Bin 0 -> 6148 bytes frontend/assets/.DS_Store | Bin 0 -> 6148 bytes .../fonts/Inter-Italic-VariableFont_opsz,wght.ttf | Bin 0 -> 904532 bytes .../assets/fonts/Inter-VariableFont_opsz,wght.ttf | Bin 0 -> 874708 bytes frontend/assets/img/dryer_clothes.png | Bin 0 -> 36448 bytes frontend/assets/img/dryer_off.png | Bin 0 -> 31935 bytes frontend/assets/img/dryer_on.png | Bin 0 -> 41171 bytes frontend/assets/img/washer_clothes.png | Bin 0 -> 37298 bytes frontend/assets/img/washer_off.png | Bin 0 -> 32719 bytes frontend/assets/img/washer_on.png | Bin 0 -> 40206 bytes frontend/dryer_clothes.png | Bin 36448 -> 0 bytes frontend/dryer_off.png | Bin 31935 -> 0 bytes frontend/dryer_on.png | Bin 41171 -> 0 bytes frontend/main.js | 20 ++++++++++---------- frontend/start/index.html | 8 ++++---- frontend/status/index.html | 8 ++++---- frontend/style.css | 13 ++++++++++++- frontend/washer_clothes.png | Bin 37298 -> 0 bytes frontend/washer_off.png | Bin 32719 -> 0 bytes frontend/washer_on.png | Bin 40206 -> 0 bytes 21 files changed, 38 insertions(+), 21 deletions(-) create mode 100644 frontend/.DS_Store create mode 100644 frontend/assets/.DS_Store create mode 100644 frontend/assets/fonts/Inter-Italic-VariableFont_opsz,wght.ttf create mode 100644 frontend/assets/fonts/Inter-VariableFont_opsz,wght.ttf create mode 100644 frontend/assets/img/dryer_clothes.png create mode 100644 frontend/assets/img/dryer_off.png create mode 100644 frontend/assets/img/dryer_on.png create mode 100644 frontend/assets/img/washer_clothes.png create mode 100644 frontend/assets/img/washer_off.png create mode 100644 frontend/assets/img/washer_on.png delete mode 100644 frontend/dryer_clothes.png delete mode 100644 frontend/dryer_off.png delete mode 100644 frontend/dryer_on.png delete mode 100644 frontend/washer_clothes.png delete mode 100644 frontend/washer_off.png delete mode 100644 frontend/washer_on.png diff --git a/backend/main.py b/backend/main.py index a667439..ce8f103 100644 --- a/backend/main.py +++ b/backend/main.py @@ -290,14 +290,14 @@ def check_status(response: fastapi.Response, session_key: Annotated[str | None, # --- fetch machine status for block @app.post("/status") -def get_machine_status(data: BlockRequestData): +def get_machine_status(data: BlockRequestData, auth_block: Annotated[str | None, fastapi.Cookie()] = None): block_idx = data.block - 1 return [machine_status[block_idx], machine_times[block_idx], machine_durations[block_idx]] # --- get laundr(y/ies) information of user @app.post("/laundry") -def get_laundry_info(response: fastapi.Response, session_key: Annotated[str | None, fastapi.Cookie()] = None): +def get_laundry_info(response: fastapi.Response, session_key: Annotated[str | None, fastapi.Cookie()] = None, auth_block: Annotated[str | None, fastapi.Cookie()] = None): if session_key: result = [] @@ -350,3 +350,9 @@ def finish_laundry(data: FinishRequestData, response: fastapi.Response, session_ else: response.status_code = fastapi.status.HTTP_401_UNAUTHORIZED return "you got no session key, cannot" + + +# --- get information from uri search query +@app.post("/info") +def uri_to_information(data: FinishRequestData): + pass diff --git a/frontend/.DS_Store b/frontend/.DS_Store new file mode 100644 index 0000000..49fe6a7 Binary files /dev/null and b/frontend/.DS_Store differ diff --git a/frontend/assets/.DS_Store b/frontend/assets/.DS_Store new file mode 100644 index 0000000..4e6198d Binary files /dev/null and b/frontend/assets/.DS_Store differ diff --git a/frontend/assets/fonts/Inter-Italic-VariableFont_opsz,wght.ttf b/frontend/assets/fonts/Inter-Italic-VariableFont_opsz,wght.ttf new file mode 100644 index 0000000..43ed4f5 Binary files /dev/null and b/frontend/assets/fonts/Inter-Italic-VariableFont_opsz,wght.ttf differ diff --git a/frontend/assets/fonts/Inter-VariableFont_opsz,wght.ttf b/frontend/assets/fonts/Inter-VariableFont_opsz,wght.ttf new file mode 100644 index 0000000..e31b51e Binary files /dev/null and b/frontend/assets/fonts/Inter-VariableFont_opsz,wght.ttf differ diff --git a/frontend/assets/img/dryer_clothes.png b/frontend/assets/img/dryer_clothes.png new file mode 100644 index 0000000..babfc36 Binary files /dev/null and b/frontend/assets/img/dryer_clothes.png differ diff --git a/frontend/assets/img/dryer_off.png b/frontend/assets/img/dryer_off.png new file mode 100644 index 0000000..9919a01 Binary files /dev/null and b/frontend/assets/img/dryer_off.png differ diff --git a/frontend/assets/img/dryer_on.png b/frontend/assets/img/dryer_on.png new file mode 100644 index 0000000..7851dd5 Binary files /dev/null and b/frontend/assets/img/dryer_on.png differ diff --git a/frontend/assets/img/washer_clothes.png b/frontend/assets/img/washer_clothes.png new file mode 100644 index 0000000..b16688a Binary files /dev/null and b/frontend/assets/img/washer_clothes.png differ diff --git a/frontend/assets/img/washer_off.png b/frontend/assets/img/washer_off.png new file mode 100644 index 0000000..0be7233 Binary files /dev/null and b/frontend/assets/img/washer_off.png differ diff --git a/frontend/assets/img/washer_on.png b/frontend/assets/img/washer_on.png new file mode 100644 index 0000000..7b811a4 Binary files /dev/null and b/frontend/assets/img/washer_on.png differ diff --git a/frontend/dryer_clothes.png b/frontend/dryer_clothes.png deleted file mode 100644 index babfc36..0000000 Binary files a/frontend/dryer_clothes.png and /dev/null differ diff --git a/frontend/dryer_off.png b/frontend/dryer_off.png deleted file mode 100644 index 9919a01..0000000 Binary files a/frontend/dryer_off.png and /dev/null differ diff --git a/frontend/dryer_on.png b/frontend/dryer_on.png deleted file mode 100644 index 7851dd5..0000000 Binary files a/frontend/dryer_on.png and /dev/null differ diff --git a/frontend/main.js b/frontend/main.js index 06938ed..e677c68 100644 --- a/frontend/main.js +++ b/frontend/main.js @@ -106,25 +106,25 @@ async function updateMachines() { for (let i = 0; i < status[0].length; i++) { if (status[0][i] == "RUNNING") { if ((i + 1) % 2 == 0) { - machine_imgs[i].src = "/washer_on.png"; + machine_imgs[i].src = "/assets/img/washer_on.png"; } else { - machine_imgs[i].src = "/dryer_on.png"; + machine_imgs[i].src = "/assets/img/dryer_on.png"; } const now = Date.now(); const start = Date.parse(status[1][i]); machine_txts[i].innerHTML = Math.ceil(((start + (status[2][i] * 60000)) - now) / 60000).toString() + " min(s) left"; } else if (status[0][i] == "FINISHED") { if ((i + 1) % 2 == 0) { - machine_imgs[i].src = "/washer_clothes.png"; + machine_imgs[i].src = "/assets/img/washer_clothes.png"; } else { - machine_imgs[i].src = "/dryer_clothes.png"; + machine_imgs[i].src = "/assets/img/dryer_clothes.png"; } machine_txts[i].innerHTML = "Idle" } else { if ((i + 1) % 2 == 0) { - machine_imgs[i].src = "/washer_off.png"; + machine_imgs[i].src = "/assets/img/washer_off.png"; } else { - machine_imgs[i].src = "/dryer_off.png"; + machine_imgs[i].src = "/assets/img/dryer_off.png"; } machine_txts[i].innerHTML = "Idle" } @@ -155,19 +155,19 @@ async function startLoadTimers() {
Dryer 1 - +
Washer 1 - +
Dryer 2 - +
Washer 2 - +
diff --git a/frontend/start/index.html b/frontend/start/index.html index ec3f976..aff7020 100644 --- a/frontend/start/index.html +++ b/frontend/start/index.html @@ -34,22 +34,22 @@
Dryer 1 - +
Washer 1 - +
Dryer 2 - +
Washer 2 - +
diff --git a/frontend/status/index.html b/frontend/status/index.html index 61a2e06..49103f3 100644 --- a/frontend/status/index.html +++ b/frontend/status/index.html @@ -32,22 +32,22 @@
Dryer 1 - +
Washer 1 - +
Dryer 2 - +
Washer 2 - +
diff --git a/frontend/style.css b/frontend/style.css index 5713576..1820d2b 100644 --- a/frontend/style.css +++ b/frontend/style.css @@ -1,3 +1,10 @@ +@font-face { + font-family: "Inter"; + src: + url("/assets/fonts/Inter-VariableFont_opsz,wght.tff") + url("/assets/fonts/Inter-Italic-VariableFont_opsz,wght.tff"); +} + :root { --col-1: #93B6B1; --col-2: #E8DEB6; @@ -15,7 +22,7 @@ body { flex-direction: column; gap: 16px; padding: 16px; - font-family: sans-serif; + font-family: Inter, sans-serif; } .section-container { @@ -231,3 +238,7 @@ body { #logo { font-size: 2rem; } + +button { + font-family: Inter, sans-serif; +} diff --git a/frontend/washer_clothes.png b/frontend/washer_clothes.png deleted file mode 100644 index b16688a..0000000 Binary files a/frontend/washer_clothes.png and /dev/null differ diff --git a/frontend/washer_off.png b/frontend/washer_off.png deleted file mode 100644 index 0be7233..0000000 Binary files a/frontend/washer_off.png and /dev/null differ diff --git a/frontend/washer_on.png b/frontend/washer_on.png deleted file mode 100644 index 7b811a4..0000000 Binary files a/frontend/washer_on.png and /dev/null differ -- cgit v1.2.3