feat(webui): preserve state in shared widget launches
This commit is contained in:
@@ -57,6 +57,8 @@ export type DashboardWidgetListItem = {
|
||||
leading?: ReactNode;
|
||||
trailing?: ReactNode;
|
||||
to?: string;
|
||||
state?: unknown;
|
||||
onClick?: () => void;
|
||||
};
|
||||
|
||||
export function DashboardWidgetList({
|
||||
@@ -105,7 +107,12 @@ export function DashboardWidgetList({
|
||||
return (
|
||||
<li key={item.id}>
|
||||
{item.to ? (
|
||||
<Link className="dashboard-contribution-row" to={item.to}>
|
||||
<Link
|
||||
className="dashboard-contribution-row"
|
||||
to={item.to}
|
||||
state={item.state}
|
||||
onClick={item.onClick}
|
||||
>
|
||||
{content}
|
||||
</Link>
|
||||
) : (
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { ArrowDown, ArrowUp, LockKeyhole } from "lucide-react";
|
||||
import type { NavigationPreferences, PlatformNavItem } from "../types";
|
||||
import ActionToolbar from "./ActionToolbar";
|
||||
import Button from "./Button";
|
||||
import IconButton from "./IconButton";
|
||||
import ToggleSwitch from "./ToggleSwitch";
|
||||
@@ -66,14 +67,14 @@ export default function NavigationPreferenceEditor({
|
||||
|
||||
return (
|
||||
<div className="navigation-preference-editor" data-navigation-preference-scope={scope}>
|
||||
<div className="navigation-preference-toolbar">
|
||||
<ActionToolbar className="navigation-preference-toolbar" justify="between">
|
||||
<p className="muted small-note">
|
||||
Higher personal settings take precedence over tenant and system order. Locked entries remain visible.
|
||||
</p>
|
||||
<Button onClick={() => onChange(null)} disabled={disabled || value === null}>
|
||||
Use inherited order
|
||||
</Button>
|
||||
</div>
|
||||
</ActionToolbar>
|
||||
<ol className="navigation-preference-list">
|
||||
{orderedIds.map((id, index) => {
|
||||
const item = byId.get(id);
|
||||
|
||||
Reference in New Issue
Block a user