diff --git a/Cargo.lock b/Cargo.lock index b22a85b..44e5990 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -635,6 +635,7 @@ dependencies = [ "glib 0.21.5", "gtk", "iced", + "image", "inotify", "log", "lz4_flex", @@ -2679,6 +2680,19 @@ dependencies = [ "icu_properties", ] +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "moxcms", + "num-traits", + "png 0.18.1", +] + [[package]] name = "image-webp" version = "0.2.4" @@ -3189,6 +3203,16 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + [[package]] name = "muda" version = "0.17.1" @@ -3205,7 +3229,7 @@ dependencies = [ "objc2-core-foundation", "objc2-foundation 0.3.2", "once_cell", - "png", + "png 0.17.16", "thiserror 2.0.18", "windows-sys 0.60.2", ] @@ -3966,6 +3990,19 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.11.0", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + [[package]] name = "polling" version = "3.11.0" @@ -4100,6 +4137,12 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" +[[package]] +name = "pxfm" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c5ccf5294c6ccd63a74f1565028353830a9c2f5eb0c682c355c471726a6e3f" + [[package]] name = "quick-error" version = "2.0.1" @@ -5207,7 +5250,7 @@ dependencies = [ "bytemuck", "cfg-if", "log", - "png", + "png 0.17.16", "tiny-skia-path", ] @@ -5519,7 +5562,7 @@ dependencies = [ "objc2-core-graphics", "objc2-foundation 0.3.2", "once_cell", - "png", + "png 0.17.16", "thiserror 2.0.18", "windows-sys 0.60.2", ] diff --git a/config.toml b/config.toml index bdc4d25..45ab9a1 100644 --- a/config.toml +++ b/config.toml @@ -173,6 +173,21 @@ bind_addr = "0.0.0.0:7878" # Authentication: server validates clients via the framework UserStore. # No extra config needed for the server. Clients set auth_token below. +# Trash settings +# ────────────── +# When a file is deleted it is moved into .bh_filesync/trash/ under the root, +# mirroring the original folder structure. An index.json inside the trash +# directory records metadata (original path, deletion time, size, …) for +# every entry so files can be listed and restored via the API. +# +# trash_expiry_days — automatically purge entries older than N days. +# 0 or omitted → keep forever (manual purge only). +# trash_expiry_days = 30 + +# full_scan_interval_secs — how often to do a full filesystem re-scan to +# catch changes that inotify may have missed. Default: 900 (15 minutes). +# full_scan_interval_secs = 900 + exclude_patterns = [ # ── Python ──────────────────────────────────────────────── "**/venv/**", diff --git a/crates/core/assets/bytehive_icon_128x128.png b/crates/core/assets/bytehive_icon_128x128.png new file mode 100644 index 0000000..401b439 Binary files /dev/null and b/crates/core/assets/bytehive_icon_128x128.png differ diff --git a/crates/core/assets/bytehive_icon_256x256.png b/crates/core/assets/bytehive_icon_256x256.png new file mode 100644 index 0000000..108b1b2 Binary files /dev/null and b/crates/core/assets/bytehive_icon_256x256.png differ diff --git a/crates/core/assets/bytehive_icon_32x32.png b/crates/core/assets/bytehive_icon_32x32.png new file mode 100644 index 0000000..681e3dc Binary files /dev/null and b/crates/core/assets/bytehive_icon_32x32.png differ diff --git a/crates/core/assets/bytehive_icon_64x64.png b/crates/core/assets/bytehive_icon_64x64.png new file mode 100644 index 0000000..6871ecf Binary files /dev/null and b/crates/core/assets/bytehive_icon_64x64.png differ diff --git a/crates/core/assets/bytehive_icon_96x96.png b/crates/core/assets/bytehive_icon_96x96.png new file mode 100644 index 0000000..70b238e Binary files /dev/null and b/crates/core/assets/bytehive_icon_96x96.png differ diff --git a/crates/core/assets/dashboard.html b/crates/core/assets/dashboard.html index 52ea85d..0a77735 100644 --- a/crates/core/assets/dashboard.html +++ b/crates/core/assets/dashboard.html @@ -3,6 +3,13 @@ + + Bytehive — Ops diff --git a/crates/core/assets/filebrowser.html b/crates/core/assets/filebrowser.html index 9efb9cb..5d5f08d 100644 --- a/crates/core/assets/filebrowser.html +++ b/crates/core/assets/filebrowser.html @@ -3,6 +3,13 @@ + + Files — Bytehive diff --git a/crates/core/assets/password_share.html b/crates/core/assets/password_share.html index 91cee03..980310d 100644 --- a/crates/core/assets/password_share.html +++ b/crates/core/assets/password_share.html @@ -3,6 +3,13 @@ + + Protected Share — Bytehive diff --git a/crates/core/assets/portal.html b/crates/core/assets/portal.html index 5b17051..6ee2956 100644 --- a/crates/core/assets/portal.html +++ b/crates/core/assets/portal.html @@ -3,6 +3,13 @@ + + Bytehive @@ -688,7 +695,10 @@ id="inp-user" autocomplete="username" placeholder="username" - onkeydown="if(event.key==='Enter')document.getElementById('inp-pass').focus()" + onkeydown=" + if (event.key === 'Enter') + document.getElementById('inp-pass').focus(); + " />
@@ -698,7 +708,7 @@ id="inp-pass" autocomplete="current-password" placeholder="••••••••" - onkeydown="if(event.key==='Enter')doLogin()" + onkeydown="if (event.key === 'Enter') doLogin();" />