Skip to content

Commit

Permalink
multi-file, more btns, mobile ui (v0.2.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
opensourcecheemsburgers committed Jul 8, 2023
1 parent 52b6b92 commit ba2fa37
Show file tree
Hide file tree
Showing 91 changed files with 2,464 additions and 901 deletions.
25 changes: 10 additions & 15 deletions .gitignore
100755 → 100644
Original file line number Diff line number Diff line change
@@ -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
15 changes: 3 additions & 12 deletions Cargo.toml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
error = { path = "./ubi-crates/error" }
md = { path = "./ubi-crates/md" }
Empty file modified README.md
100755 → 100644
Empty file.
Empty file modified build.sh
100755 → 100644
Empty file.
40 changes: 21 additions & 19 deletions frontend/Cargo.toml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,52 @@ 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 }
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"
yew-router = "0.17.0"
101 changes: 101 additions & 0 deletions frontend/Trunk.toml
Original file line number Diff line number Diff line change
@@ -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"
8 changes: 6 additions & 2 deletions frontend/css/fonts.css
100755 → 100644
Original file line number Diff line number Diff line change
@@ -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)
}
Empty file modified frontend/css/input.css
100755 → 100644
Empty file.
Empty file modified frontend/css/scrollbar.css
100755 → 100644
Empty file.
Empty file modified frontend/css/textarea.css
100755 → 100644
Empty file.
Empty file modified frontend/fonts/comfortaa.woff2
100755 → 100644
Empty file.
Binary file added frontend/fonts/fira.woff2
Binary file not shown.
Binary file removed frontend/fonts/inconsolata.woff2
Binary file not shown.
Empty file modified frontend/img/404.json
100755 → 100644
Empty file.
7 changes: 7 additions & 0 deletions frontend/img/btc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions frontend/img/xmr.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 2 additions & 7 deletions frontend/index_web.html → frontend/index.android.html
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@

<head>
<meta charset="utf-8" />
<meta
http-equiv="Content-Security-Policy"
content="default-src * data: blob: filesystem: about: ws: wss: 'unsafe-inline' 'unsafe-eval';
script-src * data: blob: 'unsafe-inline' 'wasm-unsafe-eval';
style-src * data: blob: 'unsafe-inline';
font-src * data: blob: 'unsafe-inline';" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Ubiquity</title>
<link data-trunk rel="css" href="./css/fonts.css" />
<link data-trunk rel="css" href="./css/output.css" />
<link data-trunk rel="css" href="./css/textarea.css" />
<link data-trunk rel="css" href="./css/scrollbar.css" />
<link data-trunk rel="copy-dir" href="img" />
<link data-trunk rel="copy-dir" href="fonts" />
<link data-trunk rel="rust" data-wasm-opt="z" />
<link data-trunk rel="rust" data-wasm-opt="z" data-cargo-features="mobile" />
</head>

</html>
Loading

0 comments on commit ba2fa37

Please sign in to comment.