QoL improvements
This commit is contained in:
parent
488d32d508
commit
540fdd85ff
3 changed files with 18 additions and 10 deletions
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
|
@ -21,7 +21,7 @@ export default class Tab extends Component<{
|
|||
<TabContext.Consumer>
|
||||
{tabs => (
|
||||
<AnimateHeight
|
||||
className={`absolute w-full lg:w-[525px] m-auto lg:mb-8 lg:rounded-xl ${this.props.position}
|
||||
className={`absolute w-full lg:w-[525px] lg:rounded-xl ${this.props.position}
|
||||
bg-blue-600/75 backdrop-brightness-75 backdrop-contrast-150 backdrop-blur shadow-[12px_12px_0_0] shadow-blue-950/75
|
||||
${tabs.find((t) => t.id === this.props.id)?.priority ?? "z-50"}`}
|
||||
ref={this.div}
|
||||
|
@ -63,16 +63,20 @@ export default class Tab extends Component<{
|
|||
let offsety = 0;
|
||||
|
||||
this.header.current?.addEventListener("pointerdown", (e) => {
|
||||
isDown = true;
|
||||
if (e.button === 0) {
|
||||
isDown = true;
|
||||
|
||||
if (this.div.current) {
|
||||
offsetx = this.div.current.offsetLeft - e.clientX;
|
||||
offsety = this.div.current.offsetTop - e.clientY;
|
||||
if (this.div.current) {
|
||||
offsetx = this.div.current.offsetLeft - e.clientX;
|
||||
offsety = this.div.current.offsetTop - e.clientY;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener("pointerup", () => {
|
||||
isDown = false;
|
||||
document.addEventListener("pointerup", (e) => {
|
||||
if (e.button === 0) {
|
||||
isDown = false;
|
||||
}
|
||||
});
|
||||
|
||||
this.div.current?.addEventListener("pointerdown", () => {
|
||||
|
|
|
@ -14,7 +14,7 @@ export default class Infos extends Component {
|
|||
render() {
|
||||
return <div ref={this.collection} className="z-[110] lg:z-[0] w-[27px] lg:w-[360px] fixed right-0 h-screen outline outline-4 outline-white overflow-y-auto
|
||||
bg-gradient-to-r from-sky-600 to-indigo-600">
|
||||
<div ref={this.dragbar} className="z-[100] h-full w-[25px] fixed right-[7px] lg:right-[335px] cursor-ew-resize"></div>
|
||||
<div draggable="false" ref={this.dragbar} className="z-[100] h-full w-[25px] fixed right-[7px] lg:right-[340px] cursor-ew-resize select-none hover:bg-gradient-to-r from-white/80 to-white/1 active:to-white/20"></div>
|
||||
<div className="z-[90] p-2.5 flex flex-wrap text-white">
|
||||
<Music/>
|
||||
<Coding/>
|
||||
|
@ -31,7 +31,9 @@ export default class Infos extends Component {
|
|||
let dragging = false;
|
||||
|
||||
this.dragbar.current?.addEventListener("mousedown", (e) => {
|
||||
dragging = true;
|
||||
if (e.button === 0) {
|
||||
dragging = true;
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener("mousemove", (e) => {
|
||||
|
@ -42,7 +44,9 @@ export default class Infos extends Component {
|
|||
});
|
||||
|
||||
document.addEventListener("mouseup", (e) => {
|
||||
dragging = false;
|
||||
if (e.button === 0) {
|
||||
dragging = false;
|
||||
}
|
||||
});
|
||||
|
||||
// Mobile support
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue