Add computer settings pages and restore workspace pages
This commit is contained in:
@@ -7,7 +7,7 @@ import { Monitor } from "lucide-react";
|
||||
import type { BotWithLastMessage } from "@/src/types";
|
||||
import { BotComputersContext } from "../(data)/bot-computers-context";
|
||||
import BotComputerOption from "./bot-computer-option";
|
||||
import HeaderIconButton from "./header-icon-button";
|
||||
import HeaderIconButton from "@/src/components/general/header-icon-button";
|
||||
|
||||
type Props = {
|
||||
bot: BotWithLastMessage;
|
||||
|
||||
@@ -10,7 +10,7 @@ import type { BotWithLastMessage, HarnessOverview } from "@/src/types";
|
||||
import canManageCrew from "@/src/utils/rbac/can-manage-crew";
|
||||
import isPassThroughUser from "@/src/utils/rbac/is-pass-through-user";
|
||||
import BotHarnessForm from "@/src/pages/admin/settings/(partials)/bot-harness-form";
|
||||
import HeaderIconButton from "./header-icon-button";
|
||||
import HeaderIconButton from "@/src/components/general/header-icon-button";
|
||||
|
||||
type Props = {
|
||||
bot: BotWithLastMessage;
|
||||
|
||||
@@ -11,7 +11,7 @@ import type { BotWithLastMessage } from "@/src/types";
|
||||
import SettingsStatus from "@/src/pages/admin/settings/(partials)/settings-status";
|
||||
import useBotSessions from "../(hooks)/use-bot-sessions";
|
||||
import BotSessionRow from "./bot-session-row";
|
||||
import HeaderIconButton from "./header-icon-button";
|
||||
import HeaderIconButton from "@/src/components/general/header-icon-button";
|
||||
|
||||
type Props = {
|
||||
bot: BotWithLastMessage;
|
||||
|
||||
@@ -14,7 +14,7 @@ import BotModelsModal from "./bot-models-modal";
|
||||
import BotProfileModal from "./bot-profile-modal";
|
||||
import BotSessionsModal from "./bot-sessions-modal";
|
||||
import NewSessionButton from "./new-session-button";
|
||||
import HeaderIconButton from "./header-icon-button";
|
||||
import HeaderIconButton from "@/src/components/general/header-icon-button";
|
||||
import HeaderMetaItem from "./header-meta-item";
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
import Button from "@moduletrace/twui/layout/Button";
|
||||
import type { LucideIcon } from "lucide-react";
|
||||
|
||||
type Props = {
|
||||
icon: LucideIcon;
|
||||
/**
|
||||
* Says what the button does; it has no visible label.
|
||||
*/
|
||||
title: string;
|
||||
disabled?: boolean;
|
||||
loading?: boolean;
|
||||
/**
|
||||
* For a button that acts on its own; a modal's target leaves it out.
|
||||
*/
|
||||
onClick?: () => void;
|
||||
/**
|
||||
* For a button that opens a page.
|
||||
*/
|
||||
href?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* A ghost icon button on the right of the conversation header, usually a
|
||||
* modal's target.
|
||||
*/
|
||||
export default function HeaderIconButton({
|
||||
icon: Icon,
|
||||
title,
|
||||
disabled,
|
||||
loading,
|
||||
onClick,
|
||||
href,
|
||||
}: Props) {
|
||||
return (
|
||||
<Button
|
||||
title={title}
|
||||
aria-label={title}
|
||||
type="button"
|
||||
variant="ghost"
|
||||
color="text"
|
||||
disabled={disabled}
|
||||
loading={loading}
|
||||
onClick={onClick}
|
||||
href={href}
|
||||
className="shrink-0 p-2! text-ink-secondary dark:text-ink-secondary hover:text-ink hover:dark:text-ink hover:bg-sunken hover:dark:bg-sunken rounded-default transition-colors duration-[var(--m-fast)] focus-visible:ring-2 focus-visible:ring-ink"
|
||||
>
|
||||
<Icon size={18} aria-hidden />
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useState } from "react";
|
||||
import { MessageSquarePlus } from "lucide-react";
|
||||
import postSessionApi from "../(functions)/post-session-api";
|
||||
import HeaderIconButton from "./header-icon-button";
|
||||
import HeaderIconButton from "@/src/components/general/header-icon-button";
|
||||
|
||||
type Props = {
|
||||
bot_id: number;
|
||||
|
||||
Reference in New Issue
Block a user