mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-15 20:52:01 +03:00
fix(app): list What's new with About in settings (#59471)
This commit is contained in:
committed by
GitHub
Unverified
parent
758cf5adbe
commit
19d87a72e6
@@ -279,6 +279,12 @@ function RootSettings() {
|
||||
|
||||
const addServer = () => void dialog.push(() => <DialogServer mode="add" onSave={selectServer} />)
|
||||
|
||||
const pluginTabs = (group?: "about") =>
|
||||
surface.plugins
|
||||
.pages()
|
||||
.filter((item) => item.value.group === group)
|
||||
.map((item) => ({ value: item.value.id, icon: item.value.icon ?? pageIcons.extensions, label: item.value.title }))
|
||||
|
||||
const groups = createMemo<SettingsNavGroup[]>(() => [
|
||||
{
|
||||
items: serverTabs.map((item) => ({
|
||||
@@ -290,11 +296,7 @@ function RootSettings() {
|
||||
{
|
||||
items: [
|
||||
...rootClientTabs.map((item) => ({ ...item, label: language.t(item.label) })),
|
||||
...surface.plugins.pages().map((item) => ({
|
||||
value: item.value.id,
|
||||
icon: item.value.icon ?? pageIcons.extensions,
|
||||
label: item.value.title,
|
||||
})),
|
||||
...pluginTabs(),
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -310,7 +312,9 @@ function RootSettings() {
|
||||
? [{ items: experimentalTab.map((item) => ({ ...item, label: language.t(item.label) })) }]
|
||||
: []),
|
||||
...(showPlugins ? [{ items: pluginsTab.map((item) => ({ ...item, label: language.t(item.label) })) }] : []),
|
||||
{ items: aboutTab.map((item) => ({ ...item, label: language.t(item.label) })) },
|
||||
{
|
||||
items: [...aboutTab.map((item) => ({ ...item, label: language.t(item.label) })), ...pluginTabs("about")],
|
||||
},
|
||||
])
|
||||
|
||||
const change = (value: string) => {
|
||||
|
||||
@@ -87,6 +87,7 @@ function betaNotes(ctx: SetupContext<typeof definition>) {
|
||||
ctx.add(SettingsPage, {
|
||||
id: "whats-new",
|
||||
icon: "flask",
|
||||
group: "about",
|
||||
get title() {
|
||||
return ctx.t("beta.title")
|
||||
},
|
||||
|
||||
@@ -391,6 +391,11 @@ export interface SettingsPage {
|
||||
* section.
|
||||
*/
|
||||
readonly section?: "general"
|
||||
/**
|
||||
* The nav group of a page. Omit it to list the page after the app's own pages, such as Shortcuts.
|
||||
* - `about`: below About, in its group, for pages about the app itself such as release notes.
|
||||
*/
|
||||
readonly group?: "about"
|
||||
/** Nav label of a page; search shows it as the section of every entry, except rows placed in a host `section`. */
|
||||
readonly title: string
|
||||
/** The page's nav icon. */
|
||||
|
||||
Reference in New Issue
Block a user