mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-10 11:24:59 +01:00
wip: zen settings
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
[data-page="workspace-[id]"] {
|
[data-page="workspace-[id]"] {
|
||||||
max-width: 64rem;
|
max-width: 64rem;
|
||||||
padding: var(--space-10) var(--space-4);
|
padding: var(--space-2) var(--space-4);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[data-page="workspace-[id]"] {
|
[data-page="workspace-[id]"] {
|
||||||
max-width: 64rem;
|
max-width: 64rem;
|
||||||
padding: var(--space-10) var(--space-4);
|
padding: var(--space-2) var(--space-4);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[data-page="workspace-[id]"] {
|
[data-page="workspace-[id]"] {
|
||||||
max-width: 64rem;
|
max-width: 64rem;
|
||||||
padding: var(--space-10) var(--space-4);
|
padding: var(--space-2) var(--space-4);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[data-page="workspace-[id]"] {
|
[data-page="workspace-[id]"] {
|
||||||
max-width: 64rem;
|
max-width: 64rem;
|
||||||
padding: var(--space-10) var(--space-4);
|
padding: var(--space-2) var(--space-4);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -1,63 +1,61 @@
|
|||||||
.root {
|
.root {
|
||||||
[data-slot="section-content"] {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: var(--space-4);
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-slot="setting"] {
|
[data-slot="setting"] {
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: var(--space-4);
|
|
||||||
padding: var(--space-4);
|
|
||||||
border: 1px solid var(--color-border);
|
|
||||||
border-radius: var(--border-radius-sm);
|
|
||||||
|
|
||||||
@media (max-width: 30rem) {
|
|
||||||
flex-direction: column;
|
|
||||||
gap: var(--space-3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-slot="setting-info"] {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-1);
|
gap: var(--space-3);
|
||||||
|
|
||||||
h3 {
|
p {
|
||||||
font-size: var(--font-size-md);
|
font-size: var(--font-size-sm);
|
||||||
font-weight: 500;
|
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--color-text);
|
color: var(--color-text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-slot="value-with-action"] {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: var(--space-3);
|
||||||
|
|
||||||
|
@media (max-width: 30rem) {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: var(--space-2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="current-value"] {
|
[data-slot="current-value"] {
|
||||||
font-size: var(--font-size-sm);
|
font-size: var(--font-size-sm);
|
||||||
color: var(--color-text-muted);
|
color: var(--color-text);
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
>button {
|
||||||
|
align-self: flex-start;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="create-form"] {
|
[data-slot="create-form"] {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-3);
|
gap: var(--space-2);
|
||||||
min-width: 15rem;
|
|
||||||
width: fit-content;
|
|
||||||
|
|
||||||
@media (max-width: 30rem) {
|
|
||||||
width: 100%;
|
|
||||||
min-width: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-slot="input-container"] {
|
[data-slot="input-container"] {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: row;
|
||||||
gap: var(--space-1);
|
align-items: center;
|
||||||
|
gap: var(--space-2);
|
||||||
|
|
||||||
|
@media (max-width: 30rem) {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
white-space: nowrap;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
@@ -68,11 +66,13 @@
|
|||||||
background-color: var(--color-bg);
|
background-color: var(--color-bg);
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
font-size: var(--font-size-sm);
|
font-size: var(--font-size-sm);
|
||||||
font-family: var(--font-mono);
|
line-height: 1.5;
|
||||||
|
min-width: 0;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--color-accent);
|
border-color: var(--color-accent);
|
||||||
|
box-shadow: 0 0 0 3px var(--color-accent-alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
&::placeholder {
|
&::placeholder {
|
||||||
@@ -80,16 +80,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="form-actions"] {
|
>button[type="reset"] {
|
||||||
display: flex;
|
align-self: flex-start;
|
||||||
gap: var(--space-2);
|
|
||||||
justify-content: flex-end;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="form-error"] {
|
[data-slot="form-error"] {
|
||||||
color: var(--color-danger);
|
color: var(--color-danger);
|
||||||
font-size: var(--font-size-sm);
|
font-size: var(--font-size-sm);
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
|
margin-top: calc(var(--space-1) * -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -79,10 +79,7 @@ export function SettingsSection() {
|
|||||||
</div>
|
</div>
|
||||||
<div data-slot="section-content">
|
<div data-slot="section-content">
|
||||||
<div data-slot="setting">
|
<div data-slot="setting">
|
||||||
<div data-slot="setting-info">
|
<p>Workspace Name</p>
|
||||||
<h3>Workspace Name</h3>
|
|
||||||
<p data-slot="current-value">{workspaceInfo()?.name}</p>
|
|
||||||
</div>
|
|
||||||
<Show
|
<Show
|
||||||
when={!store.show}
|
when={!store.show}
|
||||||
fallback={
|
fallback={
|
||||||
@@ -97,25 +94,26 @@ export function SettingsSection() {
|
|||||||
placeholder="Workspace name"
|
placeholder="Workspace name"
|
||||||
value={workspaceInfo()?.name ?? "Default"}
|
value={workspaceInfo()?.name ?? "Default"}
|
||||||
/>
|
/>
|
||||||
<Show when={submission.result && submission.result.error}>
|
<input type="hidden" name="workspaceID" value={params.id} />
|
||||||
{(err) => <div data-slot="form-error">{err()}</div>}
|
<button type="submit" data-color="primary" disabled={submission.pending}>
|
||||||
</Show>
|
{submission.pending ? "Updating..." : "Save"}
|
||||||
</div>
|
</button>
|
||||||
<input type="hidden" name="workspaceID" value={params.id} />
|
|
||||||
<div data-slot="form-actions">
|
|
||||||
<button type="reset" data-color="ghost" onClick={() => hide()}>
|
<button type="reset" data-color="ghost" onClick={() => hide()}>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" data-color="primary" disabled={submission.pending}>
|
|
||||||
{submission.pending ? "Updating..." : "Update"}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
<Show when={submission.result && submission.result.error}>
|
||||||
|
{(err) => <div data-slot="form-error">{err()}</div>}
|
||||||
|
</Show>
|
||||||
</form>
|
</form>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<button data-color="primary" onClick={() => show()}>
|
<div data-slot="value-with-action">
|
||||||
Edit Name
|
<p data-slot="current-value">{workspaceInfo()?.name}</p>
|
||||||
</button>
|
<button data-color="primary" onClick={() => show()}>
|
||||||
|
Edit
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user