Skip to content

Commit

Permalink
minor changes for ux
Browse files Browse the repository at this point in the history
  • Loading branch information
Jemoka committed Sep 10, 2024
1 parent b0635c5 commit 640dc7d
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

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

3 changes: 1 addition & 2 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ use state::*;

#[tokio::main]
async fn main() -> Result<()> {
// TODO initial with actual stored state
let state = GlobalState::new();
let calendar_listen_handle = state.calendar_listen();

// rock'n'roll
// rock'n'roll
tauri::Builder::default()
.manage(state)
.invoke_handler(tauri::generate_handler![
Expand Down
7 changes: 6 additions & 1 deletion src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,14 @@
}

.bottom-nav-button {
padding: 5px 0;
margin: 5px 0;
cursor: pointer;
}

.bottom-nav-button.ds {
border-bottom: 2px solid var(--background-decoration);
}

.bottom-nav-button.active {
color: var(--foreground-decoration);
}
Expand All @@ -100,3 +104,4 @@
#logout:hover {
color: var(--foreground-decoration);
}

5 changes: 4 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ function RoutableMain() {
const ready = useSelector((state) => {
return state.ui.ready;
});
const captures = useSelector((state) => {
return state.capture.scratchpads;
});
const dispatch = useDispatch();

// generate the initial snapshot
Expand All @@ -75,7 +78,7 @@ function RoutableMain() {
</div>
</Link>
<Link to={"/capture"} data-tooltip-id="rootp" data-tooltip-content={strings.TOOLTIPS.CAPTURE}>
<div className={"bottom-nav-button"+(loc.pathname == "/capture" ? " active" : "")}>
<div className={"bottom-nav-button"+(loc.pathname == "/capture" ? " active" : "")+(captures.filter(x => x.trim() != "").length > 0 ? " ds" : "")}>
<i className="fa-solid fa-inbox"></i>
</div>
</Link>
Expand Down
3 changes: 2 additions & 1 deletion src/views/Action.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
}

.action-datelabel.ds .action-left {
border-bottom: 0.1px solid var(--due-soon-softer);
border-bottom: 2px solid var(--background-decoration);
margin-right: 2px;
padding-bottom: 0.5px;
}

Expand Down
13 changes: 11 additions & 2 deletions src/views/Browser.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export default function Browser() {
const length = useSelector((state) =>
state.browse.searches.length
);
const searches = useSelector((state) =>
state.browse.searches
);

const captureID = useSelector((state) =>
state.browse.current
);
Expand Down Expand Up @@ -180,9 +184,14 @@ export default function Browser() {
</div>
<ul className="captureid-wrapper">
{
[...Array(length).keys()].map((x) => {
[...Array(length).keys()].map((x, i) => {
return (
<li key={x} className={"captureid-dot " + (
<li data-tooltip-id="rootp" onClick={() => {
if (!currentQuery.query_text && captureID == length-1) {
dispatch(pop());
}
dispatch(view(i));
}} data-tooltip-content={searches[i].query_text} data-tooltip-place="left" key={x} className={"cursor-pointer captureid-dot " + (
x == captureID ? "active" : ""
)}></li>
);
Expand Down

0 comments on commit 640dc7d

Please sign in to comment.