Skip to content

Commit

Permalink
Fix import bug
Browse files Browse the repository at this point in the history
  • Loading branch information
opensourcecheemsburgers committed Jun 5, 2023
1 parent cdfc467 commit 52b6b92
Show file tree
Hide file tree
Showing 74 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ Cargo.lock
src-tauri/target/
src-tauri/Cargo.lock
src-tauri/.idea/
src-tauri/icons
Empty file modified Cargo.toml
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified frontend/Cargo.toml
100644 → 100755
Empty file.
Empty file modified frontend/css/fonts.css
100644 → 100755
Empty file.
Empty file modified frontend/css/input.css
100644 → 100755
Empty file.
Empty file modified frontend/css/scrollbar.css
100644 → 100755
Empty file.
Empty file modified frontend/css/textarea.css
100644 → 100755
Empty file.
Empty file modified frontend/fonts/comfortaa.woff2
100644 → 100755
Empty file.
Empty file modified frontend/fonts/inconsolata.woff2
100644 → 100755
Empty file.
Empty file modified frontend/img/404.json
100644 → 100755
Empty file.
Empty file modified frontend/index_desktop.html
100644 → 100755
Empty file.
Empty file modified frontend/index_web.html
100644 → 100755
Empty file.
Empty file modified frontend/package.json
100644 → 100755
Empty file.
Empty file modified frontend/src/components/container.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/components/divider.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/components/dual_view.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/components/header.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/components/link_btn.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/components/markdown_input.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/components/markdown_preview.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/components/mod.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/components/modal.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/components/single_view.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/components/theme_card.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/components/tooltip.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/components/welcome_hero.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/contexts/config.rs
100644 → 100755
Empty file.
10 changes: 6 additions & 4 deletions frontend/src/contexts/markdown.rs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -26,12 +28,12 @@ impl Markdown {
}

fn load_from_storage() -> Option<Markdown> {
let load_result: Result<String, StorageError> = LocalStorage::get(DOCS_KEY);
let load_result: Result<String, StorageError> = 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());
Expand All @@ -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(())
Expand Down Expand Up @@ -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(())
Expand Down
Empty file modified frontend/src/contexts/mod.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/contexts/modals.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/errors/mod.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/icons/mod.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/main.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/pages/about.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/pages/background.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/pages/home.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/pages/mod.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/pages/settings.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/pages/welcome.rs
100644 → 100755
Empty file.
Empty file modified frontend/src/strings/strings.ron
100644 → 100755
Empty file.
Empty file modified frontend/tailwind.config.js
100644 → 100755
Empty file.
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified rust-toolchain.toml
100644 → 100755
Empty file.
Empty file modified screenshots/ubi.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified screenshots/ubi_about.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified screenshots/ubi_settings.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/Cargo.toml
100644 → 100755
Empty file.
Empty file modified src-tauri/build.rs
100644 → 100755
Empty file.
Empty file modified src-tauri/icons/128x128.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/icons/[email protected]
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/icons/32x32.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/icons/Square107x107Logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/icons/Square142x142Logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/icons/Square150x150Logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/icons/Square284x284Logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/icons/Square30x30Logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/icons/Square310x310Logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/icons/Square44x44Logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/icons/Square71x71Logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/icons/Square89x89Logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/icons/StoreLogo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/icons/icon.icns
100644 → 100755
Empty file.
Empty file modified src-tauri/icons/icon.ico
100644 → 100755
Empty file.
Empty file modified src-tauri/icons/icon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/icons/icon.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src-tauri/src/commands.rs
100644 → 100755
Empty file.
Empty file modified src-tauri/src/main.rs
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions src-tauri/tauri.conf.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"withGlobalTauri": true
},
"package": {
"productName": "ubiquity",
"version": "0.0.1"
"productName": "Ubiquity",
"version": "0.1.0"
},
"tauri": {
"allowlist": {
Expand Down Expand Up @@ -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
Expand Down
Empty file modified ubi-crates/config/Cargo.toml
100644 → 100755
Empty file.
Empty file modified ubi-crates/config/src/error.rs
100644 → 100755
Empty file.
Empty file modified ubi-crates/config/src/lib.rs
100644 → 100755
Empty file.
Empty file modified ubi-crates/error/Cargo.toml
100644 → 100755
Empty file.
Empty file modified ubi-crates/error/src/lib.rs
100644 → 100755
Empty file.

0 comments on commit 52b6b92

Please sign in to comment.