Skip to content

Commit 8111888

Browse files
authored
fix: restore desktop drag bar and top spacing (#316)
1 parent 6bbfc67 commit 8111888

4 files changed

Lines changed: 33 additions & 6 deletions

File tree

apps/desktop/src/runtime-page.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ body,
193193
.window-drag-bar {
194194
position: fixed;
195195
top: 0;
196-
left: 112px; /* Leave space for traffic lights + sidebar toggle */
197-
width: 240px;
198-
height: 30px;
196+
left: 100px; /* Leave space for traffic lights + sidebar toggle */
197+
right: 0;
198+
height: 38px;
199199
z-index: 9999;
200200
-webkit-app-region: drag;
201201
}

apps/web/src/pages/home.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ function getChannelStatusMeta(
185185
export function HomePage() {
186186
const { t } = useTranslation();
187187
const { stars } = useGitHubStars();
188+
const isDesktopClient = useMemo(
189+
() =>
190+
typeof navigator !== "undefined" &&
191+
navigator.userAgent.includes("Electron"),
192+
[],
193+
);
188194
const [modalChannel, setModalChannel] = useState<
189195
"feishu" | "slack" | "discord" | null
190196
>(null);
@@ -592,7 +598,10 @@ export function HomePage() {
592598
══════════════════════════════════════════════════════════════════════ */
593599
return (
594600
<div className="h-full overflow-y-auto">
595-
<div className="max-w-4xl mx-auto px-4 sm:px-6 py-6 sm:py-8 space-y-6">
601+
<div
602+
className="max-w-4xl mx-auto px-4 sm:px-6 pb-6 sm:pb-8 space-y-6"
603+
style={{ paddingTop: isDesktopClient ? "2rem" : "1.5rem" }}
604+
>
596605
{/* ═══ TOP: Hero — Bot running (horizontal layout) ═══ */}
597606
<div className="flex items-center gap-4">
598607
<div

apps/web/src/pages/models.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,12 @@ function _CurrentModelSelector({
777777
export function ModelsPage() {
778778
const { t } = useTranslation();
779779
const { stars } = useGitHubStars();
780+
const isDesktopClient = useMemo(
781+
() =>
782+
typeof navigator !== "undefined" &&
783+
navigator.userAgent.includes("Electron"),
784+
[],
785+
);
780786
const [searchParams, setSearchParams] = useSearchParams();
781787
const isSetupMode = searchParams.get("setup") === "1";
782788
const tabParam = searchParams.get("tab");
@@ -959,7 +965,10 @@ export function ModelsPage() {
959965

960966
return (
961967
<div className="h-full overflow-y-auto">
962-
<div className="max-w-4xl mx-auto px-4 sm:px-6 pt-2 pb-6 sm:pb-8">
968+
<div
969+
className="max-w-4xl mx-auto px-4 sm:px-6 pb-6 sm:pb-8"
970+
style={{ paddingTop: isDesktopClient ? "2rem" : "0.5rem" }}
971+
>
963972
<div className="flex items-center justify-between mb-6">
964973
<div>
965974
<h2 className="heading-page">{t("models.pageTitle")}</h2>

apps/web/src/pages/skills.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ function SkillCard({
172172
export function SkillsPage() {
173173
const { t } = useTranslation();
174174
const { stars } = useGitHubStars();
175+
const isDesktopClient = useMemo(
176+
() =>
177+
typeof navigator !== "undefined" &&
178+
navigator.userAgent.includes("Electron"),
179+
[],
180+
);
175181
const { locale } = useLocale();
176182
const { data, isLoading, isError } = useCommunitySkills();
177183
const refreshMutation = useRefreshCatalog();
@@ -413,7 +419,10 @@ export function SkillsPage() {
413419

414420
return (
415421
<div className="h-full overflow-y-auto">
416-
<div className="max-w-4xl mx-auto px-4 sm:px-6 pt-2 pb-6 sm:pb-8">
422+
<div
423+
className="max-w-4xl mx-auto px-4 sm:px-6 pb-6 sm:pb-8"
424+
style={{ paddingTop: isDesktopClient ? "2rem" : "0.5rem" }}
425+
>
417426
{/* Header */}
418427
<div className="flex items-center justify-between mb-10">
419428
<div>

0 commit comments

Comments
 (0)