split notedeck into crates
This splits notedeck into crates, separating the browser chrome and individual apps: * notedeck: binary file, browser chrome * notedeck_columns: our columns app * enostr: same as before We still need to do more work to cleanly separate the chrome apis from the app apis. Soon I will create notedeck-notebook to see what makes sense to be shared between the apps. Some obvious ones that come to mind: 1. ImageCache We will likely want to move this to the notedeck crate, as most apps will want some kind of image cache. In web browsers, web pages do not need to worry about this, so we will likely have to do something similar 2. Ndb Since NdbRef is threadsafe and Ndb is an Arc<NdbRef>, it can be safely copied to each app. This will simplify things. In the future we might want to create an abstraction over this? Maybe each app shouldn't have access to the same database... we assume the data in DBs are all public anyways, but if we have unwrapped giftwraps that could be a problem. 3. RelayPool / Subscription Manager The browser should probably maintain these. Then apps can use ken's high level subscription manager api and not have to worry about connection pool details 4. Accounts Accounts and key management should be handled by the chrome. Apps should only have a simple signer interface. That's all for now, just something to think about! Signed-off-by: William Casarin <jb55@jb55.com>
132
Cargo.lock
generated
@@ -163,7 +163,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8619b80c242aa7bd638b5c7ddd952addeecb71f69c75e33f1d47b2804f8f883a"
|
||||
dependencies = [
|
||||
"android_log-sys",
|
||||
"env_logger 0.10.2",
|
||||
"env_logger",
|
||||
"log",
|
||||
"once_cell",
|
||||
]
|
||||
@@ -177,55 +177,6 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstream"
|
||||
version = "0.6.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"anstyle-parse",
|
||||
"anstyle-query",
|
||||
"anstyle-wincon",
|
||||
"colorchoice",
|
||||
"is_terminal_polyfill",
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle"
|
||||
version = "1.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-parse"
|
||||
version = "0.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
|
||||
dependencies = [
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-query"
|
||||
version = "1.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
|
||||
dependencies = [
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-wincon"
|
||||
version = "3.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.87"
|
||||
@@ -765,12 +716,6 @@ version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
|
||||
|
||||
[[package]]
|
||||
name = "colorchoice"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
|
||||
|
||||
[[package]]
|
||||
name = "com"
|
||||
version = "0.6.0"
|
||||
@@ -821,16 +766,6 @@ dependencies = [
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "console_error_panic_hook"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "core-foundation"
|
||||
version = "0.9.4"
|
||||
@@ -1242,7 +1177,6 @@ dependencies = [
|
||||
name = "enostr"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"env_logger 0.11.5",
|
||||
"ewebsock",
|
||||
"hex",
|
||||
"nostr",
|
||||
@@ -1286,16 +1220,6 @@ dependencies = [
|
||||
"syn 2.0.89",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_filter"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab"
|
||||
dependencies = [
|
||||
"log",
|
||||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.10.2"
|
||||
@@ -1309,19 +1233,6 @@ dependencies = [
|
||||
"termcolor",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.11.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
"env_filter",
|
||||
"humantime",
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "epaint"
|
||||
version = "0.29.1"
|
||||
@@ -2087,12 +1998,6 @@ dependencies = [
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "is_terminal_polyfill"
|
||||
version = "1.70.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.10.5"
|
||||
@@ -2591,9 +2496,20 @@ version = "0.2.0"
|
||||
dependencies = [
|
||||
"android-activity 0.4.3",
|
||||
"android_logger",
|
||||
"eframe",
|
||||
"notedeck_columns",
|
||||
"tokio",
|
||||
"tracing-appender",
|
||||
"tracing-subscriber",
|
||||
"winit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "notedeck_columns"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"base32",
|
||||
"bitflags 2.6.0",
|
||||
"console_error_panic_hook",
|
||||
"dirs",
|
||||
"eframe",
|
||||
"egui",
|
||||
@@ -2603,7 +2519,7 @@ dependencies = [
|
||||
"egui_virtual_list",
|
||||
"ehttp 0.2.0",
|
||||
"enostr",
|
||||
"env_logger 0.10.2",
|
||||
"env_logger",
|
||||
"hex",
|
||||
"image",
|
||||
"indexmap",
|
||||
@@ -2625,12 +2541,9 @@ dependencies = [
|
||||
"tracing",
|
||||
"tracing-appender",
|
||||
"tracing-subscriber",
|
||||
"tracing-wasm",
|
||||
"url",
|
||||
"urlencoding",
|
||||
"uuid",
|
||||
"wasm-bindgen-futures",
|
||||
"winit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4657,17 +4570,6 @@ dependencies = [
|
||||
"tracing-log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-wasm"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4575c663a174420fa2d78f4108ff68f65bf2fbb7dd89f33749b6e826b3626e07"
|
||||
dependencies = [
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "try-lock"
|
||||
version = "0.2.5"
|
||||
@@ -4870,12 +4772,6 @@ version = "0.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
|
||||
|
||||
[[package]]
|
||||
name = "utf8parse"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||
|
||||
[[package]]
|
||||
name = "uuid"
|
||||
version = "1.10.0"
|
||||
|
||||
163
Cargo.toml
@@ -1,63 +1,51 @@
|
||||
[package]
|
||||
name = "notedeck"
|
||||
version = "0.2.0"
|
||||
authors = ["William Casarin <jb55@jb55.com>"]
|
||||
edition = "2021"
|
||||
default-run = "notedeck"
|
||||
#rust-version = "1.60"
|
||||
license = "GPLv3"
|
||||
description = "A multiplatform nostr client"
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
members = [
|
||||
"crates/notedeck",
|
||||
"crates/notedeck_columns", # Replace with the name of your subcrate
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
"crates/enostr",
|
||||
]
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
||||
[dependencies]
|
||||
egui = { version = "0.29.1", features = ["serde"] }
|
||||
eframe = { version = "0.29.1", default-features = false, features = [ "wgpu", "wayland", "x11", "android-native-activity" ] }
|
||||
egui_extras = { version = "0.29.1", features = ["all_loaders"] }
|
||||
nostrdb = { git = "https://github.com/damus-io/nostrdb-rs", rev = "71154e4100775f6932ee517da4350c433ba14ec7" }
|
||||
#egui-android = { git = "https://github.com/jb55/egui-android.git" }
|
||||
ehttp = "0.2.0"
|
||||
egui_tabs = "0.2.0"
|
||||
egui_nav = "0.2.0"
|
||||
egui_virtual_list = "0.5.0"
|
||||
reqwest = { version = "0.12.4", default-features = false, features = [ "rustls-tls-native-roots" ] }
|
||||
image = { version = "0.25", features = ["jpeg", "png", "webp"] }
|
||||
log = "0.4.17"
|
||||
poll-promise = { version = "0.3.0", features = ["tokio"] }
|
||||
serde_derive = "1"
|
||||
serde = { version = "1", features = ["derive"] } # You only need this if you want app persistence
|
||||
tracing = "0.1.40"
|
||||
enostr = { path = "enostr" }
|
||||
serde_json = "1.0.89"
|
||||
env_logger = "0.10.0"
|
||||
puffin_egui = { git = "https://github.com/jb55/puffin", package = "puffin_egui", rev = "70ff86d5503815219b01a009afd3669b7903a057", optional = true }
|
||||
puffin = { git = "https://github.com/jb55/puffin", package = "puffin", rev = "70ff86d5503815219b01a009afd3669b7903a057", optional = true }
|
||||
hex = "0.4.3"
|
||||
[workspace.dependencies]
|
||||
base32 = "0.4.0"
|
||||
bitflags = "2.5.0"
|
||||
dirs = "5.0.1"
|
||||
eframe = { version = "0.29.1", default-features = false, features = [ "wgpu", "wayland", "x11", "android-native-activity" ] }
|
||||
egui = { version = "0.29.1", features = ["serde"] }
|
||||
egui_extras = { version = "0.29.1", features = ["all_loaders"] }
|
||||
egui_nav = "0.2.0"
|
||||
egui_tabs = "0.2.0"
|
||||
egui_virtual_list = "0.5.0"
|
||||
ehttp = "0.2.0"
|
||||
enostr = { path = "crates/enostr" }
|
||||
env_logger = "0.10.0"
|
||||
ewebsock = { version = "0.2.0", features = ["tls"] }
|
||||
hex = "0.4.3"
|
||||
image = { version = "0.25", features = ["jpeg", "png", "webp"] }
|
||||
indexmap = "2.6.0"
|
||||
log = "0.4.17"
|
||||
nostr = { version = "0.30.0" }
|
||||
nostrdb = { git = "https://github.com/damus-io/nostrdb-rs", rev = "71154e4100775f6932ee517da4350c433ba14ec7" }
|
||||
notedeck = { path = "crates/notedeck" }
|
||||
notedeck_columns = { path = "crates/notedeck_columns" }
|
||||
open = "5.3.0"
|
||||
poll-promise = { version = "0.3.0", features = ["tokio"] }
|
||||
puffin = { git = "https://github.com/jb55/puffin", package = "puffin", rev = "70ff86d5503815219b01a009afd3669b7903a057" }
|
||||
puffin_egui = { git = "https://github.com/jb55/puffin", package = "puffin_egui", rev = "70ff86d5503815219b01a009afd3669b7903a057" }
|
||||
reqwest = { version = "0.12.4", default-features = false, features = [ "rustls-tls-native-roots" ] }
|
||||
serde = { version = "1", features = ["derive"] } # You only need this if you want app persistence
|
||||
serde_derive = "1"
|
||||
serde_json = "1.0.89"
|
||||
strum = "0.26"
|
||||
strum_macros = "0.26"
|
||||
bitflags = "2.5.0"
|
||||
uuid = { version = "1.10.0", features = ["v4"] }
|
||||
indexmap = "2.6.0"
|
||||
dirs = "5.0.1"
|
||||
tokio = { version = "1.16", features = ["macros", "rt-multi-thread", "fs"] }
|
||||
tracing = "0.1.40"
|
||||
tracing-appender = "0.2.3"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
url = "2.5.2"
|
||||
urlencoding = "2.1.3"
|
||||
open = "5.3.0"
|
||||
url = "2.5"
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.13.0"
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
security-framework = "2.11.0"
|
||||
|
||||
|
||||
[features]
|
||||
default = []
|
||||
profiling = ["puffin", "puffin_egui", "eframe/puffin"]
|
||||
uuid = { version = "1.10.0", features = ["v4"] }
|
||||
|
||||
[profile.small]
|
||||
inherits = 'release'
|
||||
@@ -66,72 +54,3 @@ lto = true # Enable link-time optimization
|
||||
codegen-units = 1 # Reduce number of codegen units to increase optimizations
|
||||
panic = 'abort' # Abort on panic
|
||||
strip = true # Strip symbols from binary*
|
||||
|
||||
# web:
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
console_error_panic_hook = "0.1.6"
|
||||
tracing-wasm = "0.2"
|
||||
wasm-bindgen-futures = "0.4"
|
||||
|
||||
# native:
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
tokio = { version = "1.16", features = ["macros", "rt-multi-thread", "fs"] }
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
|
||||
|
||||
[target.'cfg(target_os = "android")'.dependencies]
|
||||
android_logger = "0.11.1"
|
||||
android-activity = { version = "0.4", features = [ "native-activity" ] }
|
||||
winit = { version = "0.30.5", features = [ "android-native-activity" ] }
|
||||
#winit = { git="https://github.com/rust-windowing/winit.git", rev = "2a58b785fed2a3746f7c7eebce95bce67ddfd27c", features = ["android-native-activity"] }
|
||||
|
||||
[package.metadata.bundle]
|
||||
identifier = "com.damus.notedeck"
|
||||
icon = ["assets/app_icon.icns"]
|
||||
|
||||
[package.metadata.android]
|
||||
package = "com.damus.app"
|
||||
apk_name = "damus"
|
||||
#assets = "assets"
|
||||
|
||||
[[package.metadata.android.uses_feature]]
|
||||
name = "android.hardware.vulkan.level"
|
||||
required = true
|
||||
version = 1
|
||||
|
||||
[[package.metadata.android.uses_permission]]
|
||||
name = "android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
max_sdk_version = 18
|
||||
|
||||
[[package.metadata.android.uses_permission]]
|
||||
name = "android.permission.READ_EXTERNAL_STORAGE"
|
||||
max_sdk_version = 18
|
||||
|
||||
[package.metadata.android.signing.release]
|
||||
path = "damus.keystore"
|
||||
keystore_password = "damuskeystore"
|
||||
|
||||
[[package.metadata.android.uses_permission]]
|
||||
name = "android.permission.INTERNET"
|
||||
|
||||
[package.metadata.android.application]
|
||||
label = "Damus"
|
||||
|
||||
[package.metadata.generate-rpm]
|
||||
assets = [
|
||||
{ source = "target/release/notedeck", dest = "/usr/bin/notedeck", mode = "755" },
|
||||
]
|
||||
|
||||
[[bin]]
|
||||
name = "notedeck"
|
||||
path = "src/bin/notedeck.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "ui_preview"
|
||||
path = "src/ui_preview/main.rs"
|
||||
|
||||
#[patch.crates-io]
|
||||
#egui = "0.29.1"
|
||||
#eframe = "0.29.1"
|
||||
#emath = "0.29.1"
|
||||
#egui_extras = "0.29.1"
|
||||
|
||||
@@ -11,8 +11,7 @@ serde_derive = "1"
|
||||
serde = { version = "1", features = ["derive"] } # You only need this if you want app persistence
|
||||
serde_json = "1.0.89"
|
||||
nostr = { version = "0.30.0" }
|
||||
nostrdb = { git = "https://github.com/damus-io/nostrdb-rs", rev = "71154e4100775f6932ee517da4350c433ba14ec7" }
|
||||
hex = "0.4.3"
|
||||
tracing = "0.1.40"
|
||||
env_logger = "0.11.1"
|
||||
url = "2.5.2"
|
||||
nostrdb = { workspace = true }
|
||||
hex = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
url = { workspace = true }
|
||||
@@ -173,7 +173,6 @@ mod tests {
|
||||
fn test_handle_valid_event() -> Result<()> {
|
||||
use tracing::debug;
|
||||
|
||||
env_logger::init();
|
||||
let valid_event_msg = r#"["EVENT", "random_string", {"id":"70b10f70c1318967eddf12527799411b1a9780ad9c43858f5e5fcd45486a13a5","pubkey":"379e863e8357163b5bce5d2688dc4f1dcc2d505222fb8d74db600f30535dfdfe","created_at":1612809991,"kind":1,"tags":[],"content":"test","sig":"273a9cd5d11455590f4359500bccb7a89428262b96b3ea87a756b770964472f8c3e87f5d5e64d8d2e859a71462a3f477b554565c4f2f326cb01dd7620db71502"}]"#;
|
||||
|
||||
let id = "70b10f70c1318967eddf12527799411b1a9780ad9c43858f5e5fcd45486a13a5";
|
||||
71
crates/notedeck/Cargo.toml
Normal file
@@ -0,0 +1,71 @@
|
||||
[package]
|
||||
name = "notedeck"
|
||||
version = "0.2.0"
|
||||
authors = ["William Casarin <jb55@jb55.com>", "kernelkind <kernelkind@gmail.com>"]
|
||||
edition = "2021"
|
||||
default-run = "notedeck"
|
||||
#rust-version = "1.60"
|
||||
license = "GPLv3"
|
||||
description = "A nostr browser"
|
||||
|
||||
[dependencies]
|
||||
notedeck_columns = { workspace = true }
|
||||
tracing-subscriber = { workspace = true }
|
||||
tracing-appender = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
eframe = { workspace = true }
|
||||
|
||||
[[bin]]
|
||||
name = "notedeck"
|
||||
path = "src/notedeck.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "ui_preview"
|
||||
path = "src/preview.rs"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
profiling = ["notedeck_columns/puffin"]
|
||||
|
||||
[target.'cfg(target_os = "android")'.dependencies]
|
||||
android_logger = "0.11.1"
|
||||
android-activity = { version = "0.4", features = [ "native-activity" ] }
|
||||
winit = { version = "0.30.5", features = [ "android-native-activity" ] }
|
||||
#winit = { git="https://github.com/rust-windowing/winit.git", rev = "2a58b785fed2a3746f7c7eebce95bce67ddfd27c", features = ["android-native-activity"] }
|
||||
|
||||
[package.metadata.bundle]
|
||||
identifier = "com.damus.notedeck"
|
||||
icon = ["assets/app_icon.icns"]
|
||||
|
||||
[package.metadata.android]
|
||||
package = "com.damus.app"
|
||||
apk_name = "damus"
|
||||
#assets = "assets"
|
||||
|
||||
[[package.metadata.android.uses_feature]]
|
||||
name = "android.hardware.vulkan.level"
|
||||
required = true
|
||||
version = 1
|
||||
|
||||
[[package.metadata.android.uses_permission]]
|
||||
name = "android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
max_sdk_version = 18
|
||||
|
||||
[[package.metadata.android.uses_permission]]
|
||||
name = "android.permission.READ_EXTERNAL_STORAGE"
|
||||
max_sdk_version = 18
|
||||
|
||||
[package.metadata.android.signing.release]
|
||||
path = "damus.keystore"
|
||||
keystore_password = "damuskeystore"
|
||||
|
||||
[[package.metadata.android.uses_permission]]
|
||||
name = "android.permission.INTERNET"
|
||||
|
||||
[package.metadata.android.application]
|
||||
label = "Damus"
|
||||
|
||||
[package.metadata.generate-rpm]
|
||||
assets = [
|
||||
{ source = "target/release/notedeck", dest = "/usr/bin/notedeck", mode = "755" },
|
||||
]
|
||||
@@ -1,6 +1,6 @@
|
||||
#![warn(clippy::all, rust_2018_idioms)]
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
||||
use notedeck::{
|
||||
use notedeck_columns::{
|
||||
app_creation::generate_native_options,
|
||||
storage::{DataPath, DataPathType},
|
||||
Damus,
|
||||
@@ -1,11 +1,11 @@
|
||||
use notedeck::ui::configure_deck::ConfigureDeckView;
|
||||
use notedeck::ui::edit_deck::EditDeckView;
|
||||
use notedeck::ui::{
|
||||
use notedeck_columns::ui::configure_deck::ConfigureDeckView;
|
||||
use notedeck_columns::ui::edit_deck::EditDeckView;
|
||||
use notedeck_columns::ui::{
|
||||
account_login_view::AccountLoginView, accounts::AccountsView, add_column::AddColumnView,
|
||||
DesktopSidePanel, PostView, Preview, PreviewApp, PreviewConfig, ProfilePic, ProfilePreview,
|
||||
RelayView,
|
||||
};
|
||||
use notedeck::{
|
||||
use notedeck_columns::{
|
||||
app_creation::{generate_mobile_emulator_native_options, generate_native_options, setup_cc},
|
||||
storage::DataPath,
|
||||
};
|
||||
@@ -93,7 +93,7 @@ async fn main() {
|
||||
"light mode previews: {}",
|
||||
if light_mode { "enabled" } else { "disabled" }
|
||||
);
|
||||
let is_mobile = is_mobile.unwrap_or(notedeck::ui::is_compiled_as_mobile());
|
||||
let is_mobile = is_mobile.unwrap_or(notedeck_columns::ui::is_compiled_as_mobile());
|
||||
let runner = PreviewRunner::new(is_mobile, light_mode);
|
||||
|
||||
previews!(
|
||||
58
crates/notedeck_columns/Cargo.toml
Normal file
@@ -0,0 +1,58 @@
|
||||
[package]
|
||||
name = "notedeck_columns"
|
||||
version = "0.2.0"
|
||||
authors = ["William Casarin <jb55@jb55.com>"]
|
||||
edition = "2021"
|
||||
#rust-version = "1.60"
|
||||
license = "GPLv3"
|
||||
description = "A tweetdeck-style notedeck app"
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
||||
[dependencies]
|
||||
base32 = { workspace = true }
|
||||
bitflags = { workspace = true }
|
||||
dirs = { workspace = true }
|
||||
eframe = { workspace = true }
|
||||
egui = { workspace = true }
|
||||
egui_extras = { workspace = true }
|
||||
egui_nav = { workspace = true }
|
||||
egui_tabs = { workspace = true }
|
||||
egui_virtual_list = { workspace = true }
|
||||
ehttp = { workspace = true }
|
||||
enostr = { workspace = true }
|
||||
env_logger = { workspace = true }
|
||||
hex = { workspace = true }
|
||||
image = { workspace = true }
|
||||
indexmap = { workspace = true }
|
||||
log = { workspace = true }
|
||||
nostrdb = { workspace = true }
|
||||
open = { workspace = true }
|
||||
poll-promise = { workspace = true }
|
||||
puffin = { workspace = true, optional = true }
|
||||
puffin_egui = { workspace = true, optional = true }
|
||||
reqwest = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_derive = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
strum = { workspace = true }
|
||||
strum_macros = { workspace = true }
|
||||
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "fs"] }
|
||||
tracing = { workspace = true }
|
||||
tracing-appender = { workspace = true }
|
||||
tracing-subscriber = { workspace = true }
|
||||
url = { workspace = true }
|
||||
urlencoding = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.13.0"
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
security-framework = "2.11.0"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
profiling = ["puffin", "puffin_egui", "eframe/puffin"]
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 266 KiB After Width: | Height: | Size: 266 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 286 KiB After Width: | Height: | Size: 286 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 806 B After Width: | Height: | Size: 806 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 554 B |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 912 B After Width: | Height: | Size: 912 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 969 B After Width: | Height: | Size: 969 B |
|
Before Width: | Height: | Size: 808 B After Width: | Height: | Size: 808 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |