Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
unStone committed Apr 10, 2024
1 parent 31c1064 commit e2ec9a0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src-tauri/Cargo.lock

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

13 changes: 7 additions & 6 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
[package]
name = "ssstonetools"
version = "0.0.0"
name = "ssstone_tools"
version = "0.0.1"
description = "A Tauri App"
authors = ["you"]
edition = "2021"

[lib]
name = "ssstone_tools_lib"
crate-type = ["staticlib", "cdylib", "rlib"]


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
Expand All @@ -19,7 +24,3 @@ tauri-plugin-shell = "2.0.0-beta.3"
[features]
# This feature is used for production builds or when a dev server is not specified, DO NOT REMOVE!!
custom-protocol = ["tauri/custom-protocol"]

[lib]
name = "app_lib"
crate-type = ["staticlib", "cdylib", "rlib", "lib"]
2 changes: 1 addition & 1 deletion src-tauri/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

fn main() {
app_lib::run();
ssstone_tools_lib::run();
}
6 changes: 5 additions & 1 deletion src/components/sider-layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ const SiderLayout = () => {
navigate([...keyPath].reverse().join('/'));
};

const selectedKeys = useMemo(() => location.pathname.split('/').filter(Boolean), [location.pathname]);
const selectedKeys = useMemo(() => {
const keys = location.pathname.split('/').filter(Boolean);
return keys.length ? keys : ['home'];
}, [location.pathname]);

console.log('selectedKeys', selectedKeys);
return (
<Sider
style={{ overflow: 'auto', height: '100vh', position: 'fixed', left: 0, top: 0, bottom: 0, background: '#fff', paddingTop: 20 }}
Expand Down

0 comments on commit e2ec9a0

Please sign in to comment.