Skip to content

Commit

Permalink
Merge pull request #24 from muzik-apps/undraggable-window-patch
Browse files Browse the repository at this point in the history
Refactor FSMusicPlayer navbar buttons
  • Loading branch information
waveyboym authored Feb 3, 2024
2 parents 3f73265 + d7b740b commit 202bbef
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
35 changes: 25 additions & 10 deletions muzik-offline/src/interface/components/music/FSMusicPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,31 @@ const FSMusicPlayer: FunctionComponent<FSMusicPlayerProps> = (props: FSMusicPlay
</motion.div>}
</div>
<div className="frontward_facing_player">
<div className="navbar_buttons">
{ appFS === false &&
(<motion.div className={"close_full_screen_player_btn" + (appFS === false && " give-margin")} onClick={props.closePlayer} whileTap={{scale: 0.98}}>
<Minimize /><h3>close</h3>
</motion.div> )
}
<motion.div className="toggle_full_screen_player_btn" onClick={appFS === true ? switchtoNONFS : switchtoFS} whileTap={{scale: 0.98}}>
{ appFS === false ? (<><Overlap /><h3>fullscreen</h3></>) : (<><Minimize /><h3>minimize</h3></>) }
</motion.div>
</div>
{local_store.OStype === OSTYPEenum.Windows ?
<div className="navbar_container" data-tauri-drag-region>
<div className="navbar_buttons">
{ appFS === false &&
(<motion.div className={"close_full_screen_player_btn" + (appFS === false && " give-margin")} onClick={props.closePlayer} whileTap={{scale: 0.98}}>
<Minimize /><h3>close</h3>
</motion.div> )
}
<motion.div className="toggle_full_screen_player_btn" onClick={appFS === true ? switchtoNONFS : switchtoFS} whileTap={{scale: 0.98}}>
{ appFS === false ? (<><Overlap /><h3>fullscreen</h3></>) : (<><Minimize /><h3>minimize</h3></>) }
</motion.div>
</div>
</div>
:
<div className="navbar_buttons">
{ appFS === false &&
(<motion.div className={"close_full_screen_player_btn" + (appFS === false && " give-margin")} onClick={props.closePlayer} whileTap={{scale: 0.98}}>
<Minimize /><h3>close</h3>
</motion.div> )
}
<motion.div className="toggle_full_screen_player_btn" onClick={appFS === true ? switchtoNONFS : switchtoFS} whileTap={{scale: 0.98}}>
{ appFS === false ? (<><Overlap /><h3>fullscreen</h3></>) : (<><Minimize /><h3>minimize</h3></>) }
</motion.div>
</div>
}
{props.openPlayer && isDoneOpening &&
<motion.div className="main_visible_content"
animate={props.openPlayer && isDoneOpening ? "open" : "closed"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
margin-top: -110vh;
background: $blur-element;
position: absolute;

.navbar_container{
width: 100%;
}

.navbar_buttons{
margin-top: 10px;
Expand Down

0 comments on commit 202bbef

Please sign in to comment.