Commit fc169f78 authored by Kantz's avatar Kantz
Browse files

move mode selector

parent 87dae89a
...@@ -793,7 +793,7 @@ export default function ChatPage() { ...@@ -793,7 +793,7 @@ export default function ChatPage() {
return ( return (
<div className="app-shell"> <div className="app-shell">
<header className="app-header"> <header className="app-header app-header-chat">
{showChatsButton ? ( {showChatsButton ? (
<button type="button" className="btn sidebar-toggle" onClick={handleOpenSidebar}> <button type="button" className="btn sidebar-toggle" onClick={handleOpenSidebar}>
{t("chats")} {t("chats")}
...@@ -806,20 +806,20 @@ export default function ChatPage() { ...@@ -806,20 +806,20 @@ export default function ChatPage() {
<div className="brand-subtitle">{t("prototypeWorkspace")}</div> <div className="brand-subtitle">{t("prototypeWorkspace")}</div>
</div> </div>
</div> </div>
<div className="header-meta">
<OrchestratorSelect
value={selectedOrchestrator}
options={availableOrchestrators}
onChange={handleSwitchOrchestrator}
disabled={!isOrchestratorSelectable}
/>
</div>
</header> </header>
{orchestratorError ? <div className="chat-archive-error">{orchestratorError}</div> : null} {orchestratorError ? <div className="chat-archive-error">{orchestratorError}</div> : null}
{deepLinkError ? <div className="chat-archive-error">{deepLinkError}</div> : null} {deepLinkError ? <div className="chat-archive-error">{deepLinkError}</div> : null}
<main className="app-main"> <main className="app-main">
<section className="chat-column"> <section className="chat-column">
<div className="chat-mode-row">
<OrchestratorSelect
value={selectedOrchestrator}
options={availableOrchestrators}
onChange={handleSwitchOrchestrator}
disabled={!isOrchestratorSelectable}
/>
</div>
<ChatWindow <ChatWindow
messages={messages} messages={messages}
draft={draft} draft={draft}
......
...@@ -92,82 +92,84 @@ export default function TaskSelectionPage() { ...@@ -92,82 +92,84 @@ export default function TaskSelectionPage() {
<div className="brand-subtitle">{t("taskSelectionSubtitle")}</div> <div className="brand-subtitle">{t("taskSelectionSubtitle")}</div>
</div> </div>
</div> </div>
<div className="header-meta">
<OrchestratorSelect
value={selectedOrchestrator}
options={availableOrchestrators}
onChange={handleSwitchOrchestrator}
disabled={!isOrchestratorSelectable}
/>
</div>
</header> </header>
{orchestratorError ? <div className="chat-archive-error">{orchestratorError}</div> : null} {orchestratorError ? <div className="chat-archive-error">{orchestratorError}</div> : null}
<main className="task-select-main"> <main className="task-select-main">
<section className="task-select-card"> <div className="task-select-wrap">
<div className="task-select-header"> <div className="task-mode-row">
<h2 className="task-select-title">{t("taskSelectionTitle")}</h2> <OrchestratorSelect
value={selectedOrchestrator}
options={availableOrchestrators}
onChange={handleSwitchOrchestrator}
disabled={!isOrchestratorSelectable}
/>
</div> </div>
<section className="task-select-card">
<div className="task-select-header">
<h2 className="task-select-title">{t("taskSelectionTitle")}</h2>
</div>
<div className="task-select-controls"> <div className="task-select-controls">
<label className="task-select-label" htmlFor="task-file-select"> <label className="task-select-label" htmlFor="task-file-select">
{t("taskFile")} {t("taskFile")}
</label> </label>
<select <select
id="task-file-select" id="task-file-select"
className="task-select" className="task-select"
value={selectedTaskRef?.fileId || ""} value={selectedTaskRef?.fileId || ""}
onChange={(event) => setTaskFile(event.target.value)} onChange={(event) => setTaskFile(event.target.value)}
disabled={!taskFileOptions.length} disabled={!taskFileOptions.length}
> >
{taskFileOptions.length ? ( {taskFileOptions.length ? (
taskFileOptions.map((option) => ( taskFileOptions.map((option) => (
<option key={option.value} value={option.value}> <option key={option.value} value={option.value}>
{option.label} {option.label}
</option> </option>
)) ))
) : ( ) : (
<option value="">{t("noTasksAvailable")}</option> <option value="">{t("noTasksAvailable")}</option>
)} )}
</select> </select>
<label className="task-select-label" htmlFor="task-id-select"> <label className="task-select-label" htmlFor="task-id-select">
{t("taskId")} {t("taskId")}
</label> </label>
<select <select
id="task-id-select" id="task-id-select"
className="task-select" className="task-select"
value={selectedTaskRef?.taskId || ""} value={selectedTaskRef?.taskId || ""}
onChange={(event) => setTaskId(event.target.value)} onChange={(event) => setTaskId(event.target.value)}
disabled={!taskOptions.length} disabled={!taskOptions.length}
> >
{taskOptions.length ? ( {taskOptions.length ? (
taskOptions.map((option) => ( taskOptions.map((option) => (
<option key={option.value} value={option.value}> <option key={option.value} value={option.value}>
{option.label} {option.label}
</option> </option>
)) ))
) : ( ) : (
<option value="">{t("noTasksAvailable")}</option> <option value="">{t("noTasksAvailable")}</option>
)} )}
</select> </select>
</div> </div>
<div className="task-panel-content" ref={taskDisplayRef}> <div className="task-panel-content" ref={taskDisplayRef}>
{selectedTask?.fullText || t("noTaskSelected")} {selectedTask?.fullText || t("noTaskSelected")}
</div> </div>
{tasksError ? <div className="task-panel-error">{tasksError}</div> : null} {tasksError ? <div className="task-panel-error">{tasksError}</div> : null}
<button <button
type="button" type="button"
className="btn primary task-solve-btn" className="btn primary task-solve-btn"
onClick={handleSolveWithTutor} onClick={handleSolveWithTutor}
disabled={!selectedTaskRef} disabled={!selectedTaskRef}
> >
{t("solveWithTutor")} {t("solveWithTutor")}
</button> </button>
</section> </section>
</div>
</main> </main>
</div> </div>
); );
......
...@@ -29,6 +29,10 @@ body { ...@@ -29,6 +29,10 @@ body {
margin-bottom: 24px; margin-bottom: 24px;
} }
.app-header-chat {
justify-content: flex-start;
}
.brand { .brand {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -190,6 +194,14 @@ body { ...@@ -190,6 +194,14 @@ body {
gap: 16px; gap: 16px;
min-height: 0; min-height: 0;
max-height: 85vh; max-height: 85vh;
position: relative;
}
.chat-mode-row {
position: absolute;
top: -52px;
right: 0;
z-index: 2;
} }
.chat-window { .chat-window {
...@@ -700,6 +712,10 @@ body { ...@@ -700,6 +712,10 @@ body {
align-items: flex-start; align-items: flex-start;
} }
.app-header-chat {
justify-content: flex-start;
}
.header-meta { .header-meta {
width: 100%; width: 100%;
} }
...@@ -715,6 +731,10 @@ body { ...@@ -715,6 +731,10 @@ body {
min-height: 360px; min-height: 360px;
} }
.chat-mode-row {
position: static;
}
.composer-row { .composer-row {
width: 100%; width: 100%;
} }
...@@ -803,8 +823,20 @@ body { ...@@ -803,8 +823,20 @@ body {
place-items: center; place-items: center;
} }
.task-select-card { .task-select-wrap {
width: min(820px, 100%); width: min(820px, 100%);
position: relative;
}
.task-mode-row {
position: absolute;
top: -52px;
right: 0;
z-index: 2;
}
.task-select-card {
width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12px; gap: 12px;
...@@ -874,6 +906,11 @@ body { ...@@ -874,6 +906,11 @@ body {
grid-template-columns: 1fr; grid-template-columns: 1fr;
} }
.task-mode-row {
position: static;
margin-bottom: 12px;
}
.task-solve-btn { .task-solve-btn {
width: 100%; width: 100%;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment