fix: fix some build errors
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { openUrl } from "@tauri-apps/plugin-opener";
|
||||
import { useStore } from "../store";
|
||||
import { SectionItem, QuestItem, CombatType } from "../types";
|
||||
import QuestDetailPanel from "./QuestDetailPanel";
|
||||
@ -55,7 +54,7 @@ export default function GuideView() {
|
||||
|
||||
return (
|
||||
<div style={{ flex: 1, display: "flex", overflow: "hidden", minHeight: 0, position: "relative" }}>
|
||||
<div style={{ flex: 1, overflowY: "auto", padding: "20px 24px" }}>
|
||||
<div className="with-scrollbar" style={{ flex: 1, overflowY: "auto", padding: "20px 24px" }}>
|
||||
|
||||
{/* Header */}
|
||||
<div style={{ marginBottom: "20px" }}>
|
||||
@ -181,7 +180,7 @@ export default function GuideView() {
|
||||
|
||||
{/* List */}
|
||||
{!resourcesCollapsed && (
|
||||
<div style={{ flex: 1, overflowY: "auto", padding: "10px 14px", scrollbarWidth: "none" }}>
|
||||
<div className="with-scrollbar" style={{ flex: 1, overflowY: "auto", padding: "10px 14px" }}>
|
||||
{resources.map((r, i) => {
|
||||
const owned = resourceInventory[r.name] ?? 0;
|
||||
const done = owned >= r.quantity;
|
||||
|
||||
@ -11,7 +11,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", minHeight: 0 }}>
|
||||
<div className="with-scrollbar" style={{ flex: 1, overflowY: "auto", padding: "20px 24px", minHeight: 0 }}>
|
||||
{/* Header */}
|
||||
<div style={{ marginBottom: "20px" }}>
|
||||
<h1 style={{ fontSize: "20px", fontWeight: 700, color: "#f0c040", marginBottom: "2px" }}>
|
||||
|
||||
@ -120,7 +120,7 @@ export default function QuestDetailPanel({ questName, questUrl, profileId, onClo
|
||||
</div>
|
||||
|
||||
{/* Content */}
|
||||
<div style={{ flex: 1, overflowY: "auto", padding: "12px 16px", scrollbarWidth: "none" }}>
|
||||
<div className="with-scrollbar" style={{ flex: 1, overflowY: "auto", padding: "12px 16px" }}>
|
||||
{loading && (
|
||||
<div style={{ display: "flex", alignItems: "center", justifyContent: "center", height: "120px", color: "#4a5568", fontSize: "13px" }}>
|
||||
<span style={{ animation: "spin 1s linear infinite", display: "inline-block", marginRight: "8px" }}>↻</span>
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
import type { ResizeEdge } from "@tauri-apps/api/window";
|
||||
import type { ResizeDirection } from "@tauri-apps/api/window";
|
||||
|
||||
const S = 8; // grab zone size in px
|
||||
|
||||
const handles: { edge: ResizeEdge; style: React.CSSProperties }[] = [
|
||||
const handles: { edge: ResizeDirection; style: React.CSSProperties }[] = [
|
||||
{ edge: "North", style: { top: 0, left: S, right: S, height: S, cursor: "n-resize" } },
|
||||
{ edge: "South", style: { bottom: 0, left: S, right: S, height: S, cursor: "s-resize" } },
|
||||
{ edge: "West", style: { top: S, left: 0, bottom: S, width: S, cursor: "w-resize" } },
|
||||
|
||||
@ -15,7 +15,6 @@ export default function Sidebar() {
|
||||
const { guides, openGuide, activeGuideGid, view, sidebarCollapsed, setSidebarCollapsed } = useStore();
|
||||
const [search, setSearch] = useState("");
|
||||
const collapsed = sidebarCollapsed;
|
||||
const setCollapsed = setSidebarCollapsed;
|
||||
const windowWidth = useWindowWidth();
|
||||
const isOverlay = collapsed || windowWidth < 500;
|
||||
|
||||
@ -41,8 +40,7 @@ export default function Sidebar() {
|
||||
}}>
|
||||
{/* Toggle button */}
|
||||
<button
|
||||
onClick={() => setCollapsed(c => !c)}
|
||||
title={collapsed ? "Ouvrir le menu" : "Réduire le menu"}
|
||||
onClick={() => setSidebarCollapsed(!sidebarCollapsed)} title={collapsed ? "Ouvrir le menu" : "Réduire le menu"}
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "36px",
|
||||
|
||||
Reference in New Issue
Block a user