Revert "feat(breadcrumb): display workspace text"

This reverts commit 441958028d.
This commit is contained in:
Elian Doran
2025-12-15 15:29:53 +02:00
parent 441958028d
commit eb99352fff
3 changed files with 9 additions and 17 deletions

View File

@@ -40,14 +40,6 @@
padding: 0;
}
.btn.root-note {
box-shadow: unset;
background: unset;
padding-inline: 0.5em;
color: inherit;
min-width: unset;
}
.dropdown-item span,
.dropdown-item strong,
.breadcrumb-last-item {

View File

@@ -9,7 +9,6 @@ import FNote from "../../entities/fnote";
import link_context_menu from "../../menus/link_context_menu";
import froca from "../../services/froca";
import ActionButton from "../react/ActionButton";
import Button from "../react/Button";
import Dropdown from "../react/Dropdown";
import { FormListItem } from "../react/FormList";
import { useChildNotes, useNote, useNoteLabel, useNoteProperty } from "../react/hooks";
@@ -63,10 +62,10 @@ function BreadcrumbRoot({ noteContext }: { noteContext: NoteContext | undefined
const title = useNoteProperty(note, "title");
return (note &&
<Button
<ActionButton
className="root-note"
icon={note.getIcon()}
text={note.noteId !== "root" ? (title ?? "") : ""}
text={title ?? ""}
onClick={() => noteContext?.setNote(note.noteId)}
onContextMenu={(e) => {
e.preventDefault();

View File

@@ -1,11 +1,11 @@
import type { ComponentChildren, HTMLAttributes, RefObject } from "preact";
import { memo } from "preact/compat";
import type { ComponentChildren, RefObject } from "preact";
import type { CSSProperties } from "preact/compat";
import { useMemo } from "preact/hooks";
import { memo } from "preact/compat";
import { CommandNames } from "../../components/app_context";
import Icon from "./Icon";
export interface ButtonProps extends Pick<HTMLAttributes<HTMLButtonElement>, "className" | "style" | "onContextMenu"> {
export interface ButtonProps {
name?: string;
/** Reference to the button element. Mostly useful for requesting focus. */
buttonRef?: RefObject<HTMLButtonElement>;
@@ -18,6 +18,7 @@ export interface ButtonProps extends Pick<HTMLAttributes<HTMLButtonElement>, "cl
primary?: boolean;
disabled?: boolean;
size?: "normal" | "small" | "micro";
style?: CSSProperties;
triggerCommand?: CommandNames;
title?: string;
}
@@ -77,7 +78,7 @@ export function ButtonGroup({ children }: { children: ComponentChildren }) {
<div className="btn-group" role="group">
{children}
</div>
);
)
}
export function SplitButton({ text, icon, children, ...restProps }: {
@@ -102,7 +103,7 @@ export function SplitButton({ text, icon, children, ...restProps }: {
{children}
</ul>
</ButtonGroup>
);
)
}
export default Button;