diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 4c7d183..53bf3e9 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ Cargo.lock src-tauri/target/ src-tauri/Cargo.lock src-tauri/.idea/ +src-tauri/icons diff --git a/Cargo.toml b/Cargo.toml old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/frontend/Cargo.toml b/frontend/Cargo.toml old mode 100644 new mode 100755 diff --git a/frontend/css/fonts.css b/frontend/css/fonts.css old mode 100644 new mode 100755 diff --git a/frontend/css/input.css b/frontend/css/input.css old mode 100644 new mode 100755 diff --git a/frontend/css/scrollbar.css b/frontend/css/scrollbar.css old mode 100644 new mode 100755 diff --git a/frontend/css/textarea.css b/frontend/css/textarea.css old mode 100644 new mode 100755 diff --git a/frontend/fonts/comfortaa.woff2 b/frontend/fonts/comfortaa.woff2 old mode 100644 new mode 100755 diff --git a/frontend/fonts/inconsolata.woff2 b/frontend/fonts/inconsolata.woff2 old mode 100644 new mode 100755 diff --git a/frontend/img/404.json b/frontend/img/404.json old mode 100644 new mode 100755 diff --git a/frontend/index_desktop.html b/frontend/index_desktop.html old mode 100644 new mode 100755 diff --git a/frontend/index_web.html b/frontend/index_web.html old mode 100644 new mode 100755 diff --git a/frontend/package.json b/frontend/package.json old mode 100644 new mode 100755 diff --git a/frontend/src/components/container.rs b/frontend/src/components/container.rs old mode 100644 new mode 100755 diff --git a/frontend/src/components/divider.rs b/frontend/src/components/divider.rs old mode 100644 new mode 100755 diff --git a/frontend/src/components/dual_view.rs b/frontend/src/components/dual_view.rs old mode 100644 new mode 100755 diff --git a/frontend/src/components/header.rs b/frontend/src/components/header.rs old mode 100644 new mode 100755 diff --git a/frontend/src/components/link_btn.rs b/frontend/src/components/link_btn.rs old mode 100644 new mode 100755 diff --git a/frontend/src/components/markdown_input.rs b/frontend/src/components/markdown_input.rs old mode 100644 new mode 100755 diff --git a/frontend/src/components/markdown_preview.rs b/frontend/src/components/markdown_preview.rs old mode 100644 new mode 100755 diff --git a/frontend/src/components/mod.rs b/frontend/src/components/mod.rs old mode 100644 new mode 100755 diff --git a/frontend/src/components/modal.rs b/frontend/src/components/modal.rs old mode 100644 new mode 100755 diff --git a/frontend/src/components/single_view.rs b/frontend/src/components/single_view.rs old mode 100644 new mode 100755 diff --git a/frontend/src/components/theme_card.rs b/frontend/src/components/theme_card.rs old mode 100644 new mode 100755 diff --git a/frontend/src/components/tooltip.rs b/frontend/src/components/tooltip.rs old mode 100644 new mode 100755 diff --git a/frontend/src/components/welcome_hero.rs b/frontend/src/components/welcome_hero.rs old mode 100644 new mode 100755 diff --git a/frontend/src/contexts/config.rs b/frontend/src/contexts/config.rs old mode 100644 new mode 100755 diff --git a/frontend/src/contexts/markdown.rs b/frontend/src/contexts/markdown.rs old mode 100644 new mode 100755 index 207b129..2530740 --- a/frontend/src/contexts/markdown.rs +++ b/frontend/src/contexts/markdown.rs @@ -10,6 +10,8 @@ use yew::prelude::*; use gloo::storage::LocalStorage; use gloo::storage::Storage; +pub const MD_KEY: AttrValue = AttrValue::Static("md_key"); + #[derive(Clone, Debug, PartialEq)] pub struct Markdown { pub text: AttrValue, @@ -26,12 +28,12 @@ impl Markdown { } fn load_from_storage() -> Option { - let load_result: Result = LocalStorage::get(DOCS_KEY); + let load_result: Result = LocalStorage::get(MD_KEY); match load_result { Ok(item) => { let text = AttrValue::from(item); - Some(Markdown::from(text, DOCS_KEY)) + Some(Markdown::from(text, MD_KEY)) }, Err(err) => { log!("Err: {}", err.to_string()); @@ -54,7 +56,7 @@ impl MarkdownContext { } pub fn update_markdown(&self, text: AttrValue) -> Result<(), UbiquityError> { - let markdown = Markdown::from(text.clone(), DOCS_KEY); + let markdown = Markdown::from(text.clone(), MD_KEY); self.inner.set(markdown); self.save_to_browser_storage(text)?; Ok(()) @@ -91,7 +93,7 @@ impl MarkdownContext { let read_file: String = tauri_sys::tauri::invoke("read_file", &MarkdownPath {path}).await.unwrap(); let text: AttrValue = AttrValue::from(read_file); - let key: AttrValue = AttrValue::from("read_file_md"); + let key: AttrValue = MD_KEY; ctx_clone.add_markdown(Markdown::from(text, key)); }); Ok(()) diff --git a/frontend/src/contexts/mod.rs b/frontend/src/contexts/mod.rs old mode 100644 new mode 100755 diff --git a/frontend/src/contexts/modals.rs b/frontend/src/contexts/modals.rs old mode 100644 new mode 100755 diff --git a/frontend/src/errors/mod.rs b/frontend/src/errors/mod.rs old mode 100644 new mode 100755 diff --git a/frontend/src/icons/mod.rs b/frontend/src/icons/mod.rs old mode 100644 new mode 100755 diff --git a/frontend/src/main.rs b/frontend/src/main.rs old mode 100644 new mode 100755 diff --git a/frontend/src/pages/about.rs b/frontend/src/pages/about.rs old mode 100644 new mode 100755 diff --git a/frontend/src/pages/background.rs b/frontend/src/pages/background.rs old mode 100644 new mode 100755 diff --git a/frontend/src/pages/home.rs b/frontend/src/pages/home.rs old mode 100644 new mode 100755 diff --git a/frontend/src/pages/mod.rs b/frontend/src/pages/mod.rs old mode 100644 new mode 100755 diff --git a/frontend/src/pages/settings.rs b/frontend/src/pages/settings.rs old mode 100644 new mode 100755 diff --git a/frontend/src/pages/welcome.rs b/frontend/src/pages/welcome.rs old mode 100644 new mode 100755 diff --git a/frontend/src/strings/strings.ron b/frontend/src/strings/strings.ron old mode 100644 new mode 100755 diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js old mode 100644 new mode 100755 diff --git a/package-lock.json b/package-lock.json new file mode 100755 index 0000000..923be18 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "ubiquity", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} diff --git a/rust-toolchain.toml b/rust-toolchain.toml old mode 100644 new mode 100755 diff --git a/screenshots/ubi.png b/screenshots/ubi.png old mode 100644 new mode 100755 diff --git a/screenshots/ubi_about.png b/screenshots/ubi_about.png old mode 100644 new mode 100755 diff --git a/screenshots/ubi_settings.png b/screenshots/ubi_settings.png old mode 100644 new mode 100755 diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml old mode 100644 new mode 100755 diff --git a/src-tauri/build.rs b/src-tauri/build.rs old mode 100644 new mode 100755 diff --git a/src-tauri/icons/128x128.png b/src-tauri/icons/128x128.png old mode 100644 new mode 100755 diff --git a/src-tauri/icons/128x128@2x.png b/src-tauri/icons/128x128@2x.png old mode 100644 new mode 100755 diff --git a/src-tauri/icons/32x32.png b/src-tauri/icons/32x32.png old mode 100644 new mode 100755 diff --git a/src-tauri/icons/Square107x107Logo.png b/src-tauri/icons/Square107x107Logo.png old mode 100644 new mode 100755 diff --git a/src-tauri/icons/Square142x142Logo.png b/src-tauri/icons/Square142x142Logo.png old mode 100644 new mode 100755 diff --git a/src-tauri/icons/Square150x150Logo.png b/src-tauri/icons/Square150x150Logo.png old mode 100644 new mode 100755 diff --git a/src-tauri/icons/Square284x284Logo.png b/src-tauri/icons/Square284x284Logo.png old mode 100644 new mode 100755 diff --git a/src-tauri/icons/Square30x30Logo.png b/src-tauri/icons/Square30x30Logo.png old mode 100644 new mode 100755 diff --git a/src-tauri/icons/Square310x310Logo.png b/src-tauri/icons/Square310x310Logo.png old mode 100644 new mode 100755 diff --git a/src-tauri/icons/Square44x44Logo.png b/src-tauri/icons/Square44x44Logo.png old mode 100644 new mode 100755 diff --git a/src-tauri/icons/Square71x71Logo.png b/src-tauri/icons/Square71x71Logo.png old mode 100644 new mode 100755 diff --git a/src-tauri/icons/Square89x89Logo.png b/src-tauri/icons/Square89x89Logo.png old mode 100644 new mode 100755 diff --git a/src-tauri/icons/StoreLogo.png b/src-tauri/icons/StoreLogo.png old mode 100644 new mode 100755 diff --git a/src-tauri/icons/icon.icns b/src-tauri/icons/icon.icns old mode 100644 new mode 100755 diff --git a/src-tauri/icons/icon.ico b/src-tauri/icons/icon.ico old mode 100644 new mode 100755 diff --git a/src-tauri/icons/icon.png b/src-tauri/icons/icon.png old mode 100644 new mode 100755 diff --git a/src-tauri/icons/icon.svg b/src-tauri/icons/icon.svg old mode 100644 new mode 100755 diff --git a/src-tauri/src/commands.rs b/src-tauri/src/commands.rs old mode 100644 new mode 100755 diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs old mode 100644 new mode 100755 diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json old mode 100644 new mode 100755 index 6b138a3..4f1690e --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -7,8 +7,8 @@ "withGlobalTauri": true }, "package": { - "productName": "ubiquity", - "version": "0.0.1" + "productName": "Ubiquity", + "version": "0.1.0" }, "tauri": { "allowlist": { @@ -85,7 +85,7 @@ } }, "security": { - "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'wasm-unsafe-eval' 'unsafe-eval' 'unsafe-inline' 'self'; script-src blob: data: filesystem: ws: wss: http: https: tauri: 'wasm-unsafe-eval' 'unsafe-eval' 'unsafe-inline' 'self'" + "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'wasm-unsafe-eval' 'self'; script-src blob: data: filesystem: ws: wss: http: https: tauri: 'wasm-unsafe-eval' 'self'" }, "updater": { "active": false diff --git a/ubi-crates/config/Cargo.toml b/ubi-crates/config/Cargo.toml old mode 100644 new mode 100755 diff --git a/ubi-crates/config/src/error.rs b/ubi-crates/config/src/error.rs old mode 100644 new mode 100755 diff --git a/ubi-crates/config/src/lib.rs b/ubi-crates/config/src/lib.rs old mode 100644 new mode 100755 diff --git a/ubi-crates/error/Cargo.toml b/ubi-crates/error/Cargo.toml old mode 100644 new mode 100755 diff --git a/ubi-crates/error/src/lib.rs b/ubi-crates/error/src/lib.rs old mode 100644 new mode 100755