Skip to content

Commit

Permalink
More updates to titlePage #26
Browse files Browse the repository at this point in the history
  • Loading branch information
prayag17 committed Apr 9, 2023
1 parent b8dc382 commit fd8c643
Show file tree
Hide file tree
Showing 13 changed files with 704 additions and 194 deletions.
2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tauri-build = { version = "1.2.1", features = [] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.2.2", features = [] }
tauri = { version = "1.2.2", features = ["process-exit", "process-relaunch"] }
tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }

[features]
Expand Down
8 changes: 7 additions & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
},
"tauri": {
"allowlist": {
"all": false
"all": false,
"process": {
"all": false,
"exit": true,
"relaunch": true,
"relaunchDangerousAllowSymlinkMacos": false
}
},
"bundle": {
"active": true,
Expand Down
10 changes: 9 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import {
} from "./routes/login/root";
import LibraryView from "./routes/library/root.jsx";
import ItemMovie from "./routes/item/Movie/root.jsx";
import ItemSeries from "./routes/item/Series/root.jsx";

import { SideMenu } from "./components/menu/sidemenu.jsx";
import { AppBar } from "./components/appBar/appBar.jsx";
Expand Down Expand Up @@ -246,11 +247,14 @@ function App() {
};

const handleRelaunch = async () => {
await relaunch();
let result = await relaunch();
console.log(result);
};

const handleRemoveServer = async () => {
await delServer();
let result = await relaunch();
console.log(result);
};
const location = useLocation();

Expand Down Expand Up @@ -354,6 +358,10 @@ function App() {
path="/item/Movie/:id"
element={<ItemMovie />}
/>
<Route
path="/item/Series/:id"
element={<ItemSeries />}
/>

{/* Logical Routes */}

Expand Down
11 changes: 7 additions & 4 deletions src/components/menu/sidemenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { MdiLogoutVariant } from "../icons/mdiLogoutVariant";
import { MediaCollectionTypeIconCollection } from "../../components/utils/iconsCollection.jsx";

import { useSelector, useDispatch } from "react-redux";
import { hideSidemenu } from "../../utils/slice/sidemenu";
import { hideSidemenu, setBackdrop } from "../../utils/slice/sidemenu";

import { MdiHomeVariantOutline } from "../icons/mdiHomeVariantOutline";

Expand Down Expand Up @@ -62,6 +62,7 @@ export const SideMenu = ({}) => {
const [display, setDisplay] = useState(false);

const visible = useSelector((state) => state.sidebar.visible);
const backdrop = useSelector((state) => state.sidebar.backdrop);
const navigate = useNavigate();
const user = useQuery({
queryKey: ["user"],
Expand Down Expand Up @@ -97,14 +98,12 @@ export const SideMenu = ({}) => {
};

useEffect(() => {
// console.log(());
if (
getCurrentPathWithoutParam() != "/login" &&
getCurrentPathWithoutParam != "/setup/server"
getCurrentPathWithoutParam() != "/setup/server"
) {
setDisplay(true);
}
console.log(location);
}, [location]);

if (!display) {
Expand All @@ -131,6 +130,10 @@ export const SideMenu = ({}) => {
width: visible
? `calc(${theme.spacing(7)} + 10px)`
: 0,
background: backdrop
? theme.palette.background.paper
: "transparent",
borderLeft: "1px solid white",
}}
>
<DrawerHeader
Expand Down
2 changes: 1 addition & 1 deletion src/routes/home/home.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
}
&-icon {
position: absolute;
font-size: 10em !important;
font-size: 15em !important;
left: 70%;
top: 50%;
transform: translate(-50%, -50%);
Expand Down
7 changes: 4 additions & 3 deletions src/routes/item/Movie/Movie.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
position: fixed;
top: 0;
left: 0;
width: 100%;
width: inherit;
height: 100%;
z-index: -2;
opacity: 0.1;
Expand All @@ -18,13 +18,14 @@
position: relative;
&-backdrop {
position: absolute;
width: 100%;
width: 100vw;
height: 150%;
top: -88px;
width: 100vw;
right: 0;
left: -24px;
z-index: -1;
filter: brightness(0.3);
filter: brightness(0.5);
mask-image: linear-gradient(0deg, transparent, black);
-webkit-mask-image: linear-gradient(0deg, transparent, black);
}
Expand Down
Loading

0 comments on commit fd8c643

Please sign in to comment.