Skip to content

Commit

Permalink
Settings page updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Hacksore committed Nov 10, 2023
1 parent 07d90e1 commit 0147906
Show file tree
Hide file tree
Showing 15 changed files with 256 additions and 97 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@tanstack/react-router": "0.0.1-beta.204",
"@tauri-apps/api": "^1.5.0",
"@uidotdev/usehooks": "^2.4.1",
"class-variance-authority": "^0.7.0",
"events": "^3.3.0",
"immer": "^10.0.3",
"lucide-react": "^0.292.0",
Expand Down
14 changes: 14 additions & 0 deletions pnpm-lock.yaml

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

100 changes: 88 additions & 12 deletions src-tauri/Cargo.lock

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

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ edition = "2021"
tauri-build = { version = "1.5", features = [] }

[dependencies]
tauri = { version = "1.5", features = [ "path-all", "fs-read-file", "fs-exists", "fs-write-file", "system-tray", "window-set-size", "window-set-always-on-top", "window-start-dragging", "macos-private-api", "devtools", "http-all"] }
tauri = { version = "1.5", features = [ "shell-open", "path-all", "fs-read-file", "fs-exists", "fs-write-file", "system-tray", "window-set-size", "window-set-always-on-top", "window-start-dragging", "macos-private-api", "devtools", "http-all"] }
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1", features = ["full"] } # Required for asynchronous operations
tauri-plugin-websocket = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
Expand Down
3 changes: 2 additions & 1 deletion src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ extern crate objc;

use tauri::{
generate_handler, CustomMenuItem, Manager, RunEvent, State, SystemTray, SystemTrayEvent,
SystemTrayMenu, Window,
SystemTrayMenu, Window, ActivationPolicy,
};

#[cfg(target_os = "macos")]
Expand Down Expand Up @@ -86,6 +86,7 @@ fn main() {

#[cfg(target_os = "macos")]
window.set_transparent_titlebar(true, true);
app.set_activation_policy(ActivationPolicy::Accessory);

// Open dev tools only when in dev mode
#[cfg(debug_assertions)]
Expand Down
17 changes: 14 additions & 3 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,23 @@
},
"allowlist": {
"all": false,
"shell": {
"open": ".*"
},
"fs": {
"scope": ["$APPDATA/*"],
"scope": [
"$APPDATA/*"
],
"readFile": true,
"writeFile": true,
"exists": true
},
"http": {
"all": true,
"request": true,
"scope": ["https://streamkit.discord.com/overlay/token"]
"scope": [
"https://streamkit.discord.com/overlay/token"
]
},
"path": {
"all": true
Expand All @@ -41,7 +48,11 @@
"active": true,
"targets": "all",
"identifier": "com.hacksore.overlayed",
"icon": ["icons/icon.icns", "icons/icon.ico", "icons/icon.png"]
"icon": [
"icons/icon.icns",
"icons/icon.ico",
"icons/icon.png"
]
},
"security": {
"csp": null
Expand Down
5 changes: 3 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useSocket } from "./rpc/manager";
import { Routes, Route } from "react-router-dom";
import { Routes, Route, useLocation } from "react-router-dom";
import { Main } from "./views/main";
import { Channel } from "./views/channel";

Expand All @@ -14,9 +14,10 @@ function App() {

const { clickthrough } = useClickthrough();
const { mouseInViewport } = useBorder();
const location = useLocation();

const border =
!clickthrough && mouseInViewport
!clickthrough && mouseInViewport && location.pathname === "/channel"
? "hover:border-blue-500"
: "border-transparent";

Expand Down
Loading

0 comments on commit 0147906

Please sign in to comment.