From ccc7aa49c33dc2247ceee0a51e7816ea5803c404 Mon Sep 17 00:00:00 2001 From: adamelmore <2363879+adamdottv@users.noreply.github.com> Date: Mon, 26 Jan 2026 15:34:59 -0600 Subject: wip: highlights --- .../app/src/components/dialog-release-notes.tsx | 30 +++++++++++++--------- packages/app/src/components/settings-general.tsx | 17 ++++++++++++ 2 files changed, 35 insertions(+), 12 deletions(-) (limited to 'packages/app/src/components') diff --git a/packages/app/src/components/dialog-release-notes.tsx b/packages/app/src/components/dialog-release-notes.tsx index c62cbc188..d3ee7e201 100644 --- a/packages/app/src/components/dialog-release-notes.tsx +++ b/packages/app/src/components/dialog-release-notes.tsx @@ -2,11 +2,11 @@ import { createSignal, createEffect, onMount, onCleanup } from "solid-js" import { Dialog } from "@opencode-ai/ui/dialog" import { Button } from "@opencode-ai/ui/button" import { useDialog } from "@opencode-ai/ui/context/dialog" +import { useSettings } from "@/context/settings" export type Highlight = { title: string description: string - tag?: string media?: { type: "image" | "video" src: string @@ -16,6 +16,7 @@ export type Highlight = { export function DialogReleaseNotes(props: { highlights: Highlight[] }) { const dialog = useDialog() + const settings = useSettings() const [index, setIndex] = createSignal(0) const total = () => props.highlights.length @@ -34,9 +35,20 @@ export function DialogReleaseNotes(props: { highlights: Highlight[] }) { dialog.close() } + function handleDisable() { + settings.general.setReleaseNotes(false) + handleClose() + } + let focusTrap: HTMLDivElement | undefined function handleKeyDown(e: KeyboardEvent) { + if (e.key === "Escape") { + e.preventDefault() + handleClose() + return + } + if (!paged()) return if (e.key === "ArrowLeft" && !isFirst()) { e.preventDefault() @@ -50,8 +62,6 @@ export function DialogReleaseNotes(props: { highlights: Highlight[] }) { onMount(() => { focusTrap?.focus() - - if (!paged()) return document.addEventListener("keydown", handleKeyDown) onCleanup(() => document.removeEventListener("keydown", handleKeyDown)) }) @@ -72,14 +82,6 @@ export function DialogReleaseNotes(props: { highlights: Highlight[] }) {

{feature()?.title ?? ""}

- {feature()?.tag && ( - - {feature()!.tag} - - )}

{feature()?.description ?? ""}

@@ -89,7 +91,7 @@ export function DialogReleaseNotes(props: { highlights: Highlight[] }) { {/* Bottom section - buttons and indicators (fixed position) */}
-
+
{isLast() ? ( )} + +
{paged() && ( diff --git a/packages/app/src/components/settings-general.tsx b/packages/app/src/components/settings-general.tsx index cfb8a998d..e7e5b67f3 100644 --- a/packages/app/src/components/settings-general.tsx +++ b/packages/app/src/components/settings-general.tsx @@ -214,6 +214,23 @@ export const SettingsGeneral: Component = () => {
+ {/* Updates Section */} +
+

{language.t("settings.general.section.updates")}

+ +
+ + settings.general.setReleaseNotes(checked)} + /> + +
+
+ {/* Sound effects Section */}

{language.t("settings.general.section.sounds")}

-- cgit v1.2.3