diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 index 53bf3e9..344684b --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,13 @@ -/tailwind -/target/ +target/ *.iml Cargo.lock -/.idea/ -/.vscode/ -/frontend/.idea/ -/frontend/target/ -/frontend/node_modules/ -/frontend/dist/ -/frontend/img/lottie.js -/frontend/css/output.css -/frontend/package-lock.json -/frontend/Cargo.lock -src-tauri/target/ -src-tauri/Cargo.lock -src-tauri/.idea/ +.vscode/ +target/ +node_modules/ +dist/ +lottie.js +output.css +package-lock.json +target/ +.idea/ src-tauri/icons diff --git a/Cargo.toml b/Cargo.toml old mode 100755 new mode 100644 index 48b5992..382931e --- a/Cargo.toml +++ b/Cargo.toml @@ -2,37 +2,28 @@ members = ["src-tauri", "frontend", "ubi-crates/*"] [workspace.package] -version = "0.0.1" +version = "0.2.0" authors = ["Stephen Power"] description = "A cross-platform markdown editor." license = "GPL" edition = "2021" -rust-version = "1.60" [profile.release] panic = "abort" codegen-units = 1 lto = true opt-level = "z" -# strip = true [workspace.dependencies] ron = "0.8" - serde = { version = "1.0.154", features = ["derive"] } log = { version = "0.4", features = ["release_max_level_info"] } walkdir = "2.3.2" thiserror = "1.0.38" dirs = "5.0.0" -toml = "0.7.2" -figment = { version = "0.10.8", features = ["toml"] } -yew = { version = "0.20.0", features = ["csr"] } -gloo = "0.8" -web-sys = { version = "0.3.35", features=["Navigator", "HtmlButtonElement", "HtmlDivElement", "Event", "EventTarget", "MouseEvent", "InputEvent"]} -wasm-bindgen = "0.2.84" getrandom = { version = "0.2.8", features = ["js"] } markdown = "1.0.0-alpha.7" urlencoding = "2.1.2" -rfd = "0.11.3" config = { path = "./ubi-crates/config" } -error = { path = "./ubi-crates/error" } \ No newline at end of file +error = { path = "./ubi-crates/error" } +md = { path = "./ubi-crates/md" } \ No newline at end of file diff --git a/README.md b/README.md old mode 100755 new mode 100644 diff --git a/build.sh b/build.sh old mode 100755 new mode 100644 diff --git a/frontend/Cargo.toml b/frontend/Cargo.toml old mode 100755 new mode 100644 index 02d3c1c..ee3e0d9 --- a/frontend/Cargo.toml +++ b/frontend/Cargo.toml @@ -3,21 +3,15 @@ name = "frontend" version = "0.0.1" edition = "2021" -[profile.release] -panic = "abort" -codegen-units = 1 -lto = true -opt-level = "z" -# strip = true - [features] +web = [] desktop = [] +mobile = [] [dev-dependencies] -wasm-bindgen-test = "0.2" +wasm-bindgen-test = "0.3.36" [dependencies] -time = { version = "0.3.15", features = ["wasm-bindgen"] } serde_json = "1.0.96" serde = { workspace = true } @@ -25,28 +19,36 @@ log = { workspace = true } walkdir = { workspace = true } thiserror = { workspace = true } dirs = { workspace = true } -toml = { workspace = true } -figment = { workspace = true } -web-sys = { workspace = true } config = { workspace = true } error = { workspace = true } +md = { workspace = true } + + +web-sys = { version = "0.3.63", features=["DataTransfer", "Element", "Navigator", "HtmlAnchorElement", "HtmlButtonElement", "HtmlDialogElement", "Navigator", "Clipboard", +"HtmlDivElement", "HtmlDocument", "HtmlInputElement", "HtmlLabelElement", "HtmlTextAreaElement", "Event", "EventTarget", "MouseEvent", "InputEvent", "KeyEvent", "KeyboardEvent", "KeyboardEventInit", +"TouchEvent", "TouchList", "Touch", "DomTokenList"]} +wasm-bindgen = "=0.2.86" +wasm-bindgen-cli = "=0.2.86" +wasm-bindgen-futures = "=0.4.36" +js-sys = "0.3.63" +serde-wasm-bindgen = "0.5.0" + +yew = { version = "0.20.0", features = ["csr"] } +gloo = "0.8" +gloo-timers = "0.2.6" -yew = { workspace = true } -gloo = { workspace = true } -wasm-bindgen = { workspace = true } -wasm-bindgen-futures = "0.4.34" getrandom = { workspace = true } markdown = { workspace = true } urlencoding = { workspace = true } -rfd="0.10" - tauri-sys = { git = "https://github.com/bicarlsen/tauri-sys.git", branch = "fs", features = [ "all", ] } undo = "0.49.0" +regex = "1.8.4" +lazy_static = "1.4.0" wasm-logger = "0.2.0" -yew-router = "0.17.0" \ No newline at end of file +yew-router = "0.17.0" diff --git a/frontend/Trunk.toml b/frontend/Trunk.toml new file mode 100644 index 0000000..a31d0f8 --- /dev/null +++ b/frontend/Trunk.toml @@ -0,0 +1,101 @@ +# An example Trunk.toml with all possible fields along with their defaults. + +[build] +# The index HTML file to drive the bundling process. +# target = "index.desktop.html" +# Build in release mode. +release = true +# The output dir for all final assets. +dist = "dist" +# The public URL from which assets are to be served. +public_url = "/" +# Whether to include hash values in the output file names. +filehash = true + +[watch] +# Paths to watch. The `build.target`'s parent folder is watched by default. +watch = [] +# Paths to ignore. +ignore = [] + +[serve] +# The address to serve on. +address = "127.0.0.1" +# The port to serve on. +port = 8080 +# Open a browser tab once the initial build is complete. +open = false +# Disable auto-reload of the web app. +no_autoreload = false + +[clean] +# The output dir for all final assets. +dist = "dist" +# Optionally perform a cargo clean. +cargo = false + +[tools] +# Default dart-sass version to download. +sass = "1.54.9" +# Default wasm-bindgen version to download. +wasm_bindgen = "0.2.86" +# Default wasm-opt version to download. +wasm_opt = "version_110" + +## proxy +# Proxies are optional, and default to `None`. +# Proxies are only run as part of the `trunk serve` command. + +[[proxy]] +# This WebSocket proxy example has a backend and ws field. This example will listen for +# WebSocket connections at `/api/ws` and proxy them to `ws://localhost:9000/api/ws`. +backend = "ws://localhost:9000/api/ws" +ws = true + +[[proxy]] +# This proxy example has a backend and a rewrite field. Requests received on `rewrite` will be +# proxied to the backend after rewriting the `rewrite` prefix to the `backend`'s URI prefix. +# E.G., `/api/v1/resource/x/y/z` -> `/resource/x/y/z` +rewrite = "/api/v1/" +backend = "http://localhost:9000/" + +[[proxy]] +# This proxy specifies only the backend, which is the only required field. In this example, +# request URIs are not modified when proxied. +backend = "http://localhost:9000/api/v2/" + +[[proxy]] +# This proxy example has an insecure field. In this example, +# connections to https://localhost:9000/api/v3/ will not have certificate validation performed. +# This is useful for development with a server using self-signed certificates. +backend = "https://localhost:9000/api/v3/" +insecure = true + +## hooks +# Hooks are optional, and default to `None`. +# Hooks are executed as part of Trunk's main build pipeline, no matter how it is run. + +# [[hooks]] +# # This hook example shows all the current available fields. It will execute the equivalent of +# # typing "echo Hello Trunk!" right at the start of the build process (even before the HTML file +# # is read). By default, the command is spawned directly and no shell is used. +# stage = "pre_build" +# command = "echo" +# command_arguments = ["Hello", "Trunk!"] + +# [[hooks]] +# # This hook example shows running a command inside a shell. As a result, features such as variable +# # interpolation are available. This shows the TRUNK_STAGING_DIR environment variable, one of a set +# # of default variables that Trunk inserts into your hook's environment. Additionally, this hook +# # uses the build stage, meaning it executes in parallel with all of the existing asset pipelines. +# # stage = "build" +# # command = "sh" +# # command_arguments = ["-c", "echo Staging directory: $TRUNK_STAGING_DIR"] + +# [[hooks]] +# # This hook example shows how command_arguments defaults to an empty list when absent. It also uses +# # the post_build stage, meaning it executes after the rest of the build is complete, just before +# # the staging directory is copied over the dist directory. This means that it has access to all +# # built assets, including the HTML file generated by trunk. +# stage = "post_build" +# command = "ls" \ No newline at end of file diff --git a/frontend/css/fonts.css b/frontend/css/fonts.css old mode 100755 new mode 100644 index 4a4b3c2..e9f3c3f --- a/frontend/css/fonts.css +++ b/frontend/css/fonts.css @@ -1,10 +1,14 @@ @font-face { font-family: "Comfortaa"; src: local(Comfortaa), url("../fonts/comfortaa.woff2"); +} +@font-face { + font-family: "Fira Mono"; + src: local(Fira Mono), url("../fonts/fira.woff2"); } @font-face { - font-family: "Inconsolata"; - src: local(Inconsolata), url("../fonts/inconsolata.woff2"); + font-family: "Inter"; + src: local(Inter) } \ No newline at end of file diff --git a/frontend/css/input.css b/frontend/css/input.css old mode 100755 new mode 100644 diff --git a/frontend/css/scrollbar.css b/frontend/css/scrollbar.css old mode 100755 new mode 100644 diff --git a/frontend/css/textarea.css b/frontend/css/textarea.css old mode 100755 new mode 100644 diff --git a/frontend/fonts/comfortaa.woff2 b/frontend/fonts/comfortaa.woff2 old mode 100755 new mode 100644 diff --git a/frontend/fonts/fira.woff2 b/frontend/fonts/fira.woff2 new file mode 100644 index 0000000..04e3fad Binary files /dev/null and b/frontend/fonts/fira.woff2 differ diff --git a/frontend/fonts/inconsolata.woff2 b/frontend/fonts/inconsolata.woff2 deleted file mode 100755 index 3a228c0..0000000 Binary files a/frontend/fonts/inconsolata.woff2 and /dev/null differ diff --git a/frontend/img/404.json b/frontend/img/404.json old mode 100755 new mode 100644 diff --git a/frontend/img/btc.svg b/frontend/img/btc.svg new file mode 100644 index 0000000..6dc9d58 --- /dev/null +++ b/frontend/img/btc.svg @@ -0,0 +1,7 @@ + + diff --git a/frontend/img/xmr.svg b/frontend/img/xmr.svg new file mode 100644 index 0000000..ae15da0 --- /dev/null +++ b/frontend/img/xmr.svg @@ -0,0 +1,7 @@ + + diff --git a/frontend/index_web.html b/frontend/index.android.html old mode 100755 new mode 100644 similarity index 55% rename from frontend/index_web.html rename to frontend/index.android.html index ca25068..5af27c2 --- a/frontend/index_web.html +++ b/frontend/index.android.html @@ -3,12 +3,7 @@
- +