fix: cleaning repo
This commit is contained in:
@ -82,7 +82,7 @@ export default function App() {
|
||||
background: #0d1117; overflow: hidden;
|
||||
}
|
||||
.app-body { display: flex; flex: 1; overflow: hidden; }
|
||||
.app-main { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
|
||||
.app-main { flex: 1; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
|
||||
`}</style>
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -14,7 +14,7 @@ export default function GuideView() {
|
||||
const pct = allQuests.length > 0 ? Math.round((completedCount / allQuests.length) * 100) : 0;
|
||||
|
||||
return (
|
||||
<div style={{ flex: 1, display: "flex", overflow: "hidden" }}>
|
||||
<div style={{ flex: 1, display: "flex", overflow: "hidden", minHeight: 0 }}>
|
||||
{/* Main quest list */}
|
||||
<div style={{ flex: 1, overflowY: "auto", padding: "20px 24px" }}>
|
||||
{/* Guide header */}
|
||||
|
||||
@ -13,7 +13,7 @@ export default function HomeView() {
|
||||
const inProgressGuides = guides.filter(g => g.completed_quests > 0 && g.completed_quests < g.total_quests);
|
||||
|
||||
return (
|
||||
<div style={{ flex: 1, overflowY: "auto", padding: "20px 24px" }}>
|
||||
<div style={{ flex: 1, overflowY: "auto", padding: "20px 24px", minHeight: 0 }}>
|
||||
{/* Header */}
|
||||
<div style={{ marginBottom: "24px" }}>
|
||||
<h1 style={{ fontSize: "18px", fontWeight: 700, color: "#f0c040", marginBottom: "4px" }}>
|
||||
|
||||
@ -30,7 +30,7 @@ export default function Sidebar() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div style={{ flex: 1, overflowY: "auto", padding: "8px 0" }}>
|
||||
<div style={{ flex: 1, overflowY: "auto", padding: "8px 0", scrollbarWidth: "none" }}>
|
||||
{filtered.length === 0 ? (
|
||||
<div style={{ padding: "16px 12px", color: "#4a5568", fontSize: "12px", textAlign: "center" }}>
|
||||
Aucun guide synchronisé
|
||||
|
||||
@ -9,7 +9,7 @@ export default function TitleBar({ onOpenProfiles }: Props) {
|
||||
const { alwaysOnTop, toggleAlwaysOnTop, syncing, syncGuides, view, closeGuide, activeGuideData } = useStore();
|
||||
|
||||
function handleDragMouseDown(e: React.MouseEvent) {
|
||||
if (e.button === 0) {
|
||||
if (e.button === 0 && !alwaysOnTop) {
|
||||
getCurrentWindow().startDragging();
|
||||
}
|
||||
}
|
||||
@ -36,7 +36,7 @@ export default function TitleBar({ onOpenProfiles }: Props) {
|
||||
onMouseDown={handleDragMouseDown}
|
||||
style={{
|
||||
display: "flex", alignItems: "center", gap: "8px", flex: 1,
|
||||
cursor: "grab", userSelect: "none",
|
||||
cursor: alwaysOnTop ? "default" : "grab", userSelect: "none",
|
||||
}}
|
||||
>
|
||||
<img src="/logo_tougli.png" style={{ pointerEvents: "none", width: "24px", height: "24px", objectFit: "contain" }} />
|
||||
|
||||
@ -32,10 +32,30 @@
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html, body, #root {
|
||||
html, body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
overscroll-behavior: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html::-webkit-scrollbar,
|
||||
body::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
html, body {
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
#root {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
overflow: hidden;
|
||||
overscroll-behavior: none;
|
||||
font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
|
||||
}
|
||||
|
||||
|
||||
15
src/main.tsx
15
src/main.tsx
@ -2,6 +2,21 @@ import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import App from "./App";
|
||||
|
||||
// Block all document-level scrolling
|
||||
document.addEventListener("wheel", (e) => {
|
||||
let el = e.target as HTMLElement | null;
|
||||
while (el && el !== document.documentElement) {
|
||||
const { overflowY } = window.getComputedStyle(el);
|
||||
if (overflowY === "scroll" || overflowY === "auto") return;
|
||||
el = el.parentElement;
|
||||
}
|
||||
e.preventDefault();
|
||||
}, { passive: false });
|
||||
|
||||
document.addEventListener("scroll", () => {
|
||||
window.scrollTo(0, 0);
|
||||
}, { passive: true });
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
|
||||
Reference in New Issue
Block a user