Switch Seed and Clone buttons

This commit is contained in:
dnlklmn
2024-02-14 18:22:50 +00:00
committed by Rūdolfs Ošiņš
parent 51efbc93d7
commit d883a0f3dd
8 changed files with 25 additions and 20 deletions
+2
View File
@@ -29,6 +29,7 @@
--color-border-success: #97ceb0;
--color-fill-secondary: #7070ff;
--color-fill-secondary-hover: #8585ff;
--color-fill-secondary-counter: #7a7aff;
--color-fill-ghost: #ebebff;
--color-fill-ghost-hover: #f5f5ff;
--color-fill-separator: #dbdbff;
@@ -85,6 +86,7 @@
--color-border-success: #2a5a40;
--color-fill-secondary: #7070ff;
--color-fill-secondary-hover: #8585ff;
--color-fill-secondary-counter: #7a7aff;
--color-fill-ghost: #24252d;
--color-fill-ghost-hover: #2e2f38;
--color-fill-separator: #24252d;
+8 -10
View File
@@ -153,7 +153,7 @@
.outline {
background-color: transparent;
color: var(--color-foreground-dim);
color: var(--color-foreground-contrast);
border: 1px solid var(--color-border-hint);
}
.outline[disabled] {
@@ -196,27 +196,25 @@
}
.secondary-toggle-off {
background-color: transparent;
color: var(--color-foreground-contrast);
border: 1px solid var(--color-border-hint);
background-color: var(--color-fill-secondary);
color: var(--color-foreground-match-background);
}
.secondary-toggle-off[disabled] {
background-color: transparent;
color: var(--color-fill-gray);
background-color: var(--color-fill-ghost);
color: var(--color-foreground-disabled);
}
.secondary-toggle-off:not([disabled]):hover {
background-color: transparent;
border: 1px solid var(--color-fill-secondary);
background-color: var(--color-fill-secondary-hover);
}
.secondary-toggle-on {
background-color: var(--color-fill-selected);
color: var(--color-foreground-emphasized);
border: 1px solid var(--color-border-selected);
}
.secondary-toggle-on[disabled] {
background-color: var(--color-fill-selected);
background-color: var(--color-fill-ghost);
color: var(--color-fill-gray);
border: none;
}
.secondary-toggle-on:not([disabled]):hover {
background-color: var(--color-fill-selected);
+1 -1
View File
@@ -35,7 +35,7 @@
</style>
<Popover popoverPositionTop="2.5rem" popoverPositionRight="0">
<Button slot="toggle" let:toggle on:click={toggle} variant="secondary">
<Button slot="toggle" let:toggle on:click={toggle} variant="outline">
Clone
<Icon name="download" />
</Button>
+8 -2
View File
@@ -33,14 +33,19 @@
.counter {
font-weight: var(--font-weight-regular);
border-radius: var(--border-radius-tiny);
background-color: var(--color-fill-ghost);
color: var(--color-foreground-dim);
background-color: var(--color-fill-secondary-counter);
border: 1px solid var(--color-border-secondary-counter);
color: var(--color-foreground-match-background);
padding: 0 0.25rem;
}
.seeding {
background-color: var(--color-fill-counter-emphasized);
color: var(--color-foreground-emphasized);
}
.disabled {
background-color: var(--color-fill-ghost-hover);
color: var(--color-foreground-dim);
}
</style>
<Popover popoverPositionTop="2.5rem" popoverPositionRight="0">
@@ -62,6 +67,7 @@
<span
class="counter"
class:seeding
class:disabled
style:font-weight="var(--font-weight-regular)">
{seedCount}
</span>
-1
View File
@@ -65,7 +65,6 @@
import Embeds from "@app/views/projects/Cob/Embeds.svelte";
import ErrorModal from "@app/modals/ErrorModal.svelte";
import ExtendedTextarea from "@app/components/ExtendedTextarea.svelte";
import IconButton from "@app/components/IconButton.svelte";
import IconSmall from "@app/components/IconSmall.svelte";
import InlineMarkdown from "@app/components/InlineMarkdown.svelte";
import LabelInput from "@app/views/projects/Cob/LabelInput.svelte";
@@ -128,13 +128,13 @@
class="global-hide-on-mobile"
style="margin-left: auto; display: flex; gap: 0.5rem;">
<Share {preferredSeeds} {publicExplorer} {baseUrl} />
<CloneButton {baseUrl} id={project.id} name={project.name} />
<SeedButton
{seeding}
disabled={editSeedingInProgress}
editSeeding={canEditSeeding ? editSeeding : undefined}
seedCount={project.seeding}
projectId={project.id} />
<CloneButton {baseUrl} id={project.id} name={project.name} />
</div>
</div>
<div class="id">
+3 -3
View File
@@ -74,7 +74,7 @@ test("edit issue", async ({ page, authenticatedPeer }) => {
).toBeVisible();
await expect(page.getByPlaceholder("Leave a description")).toBeHidden();
await page.getByRole("button", { name: "edit issue" }).click();
await page.getByRole("button", { name: "Edit" }).click();
await page
.getByPlaceholder("Title")
.fill("This is a modified issue title to be dismissed");
@@ -89,7 +89,7 @@ test("edit issue", async ({ page, authenticatedPeer }) => {
page.getByText("We'll give it a description and edit it."),
).toBeVisible();
await page.getByRole("button", { name: "edit issue" }).click();
await page.getByRole("button", { name: "Edit" }).click();
await page.getByPlaceholder("Title").fill("This is a modified issue title");
await page
.getByPlaceholder("Leave a description")
@@ -180,7 +180,7 @@ test("handling embeds", async ({ page, authenticatedPeer }) => {
page.locator(".badge").filter({ hasText: "radicle-228x228.png" }),
).toBeVisible();
await page.getByRole("button", { name: "edit issue" }).click();
await page.getByRole("button", { name: "Edit" }).click();
await page
.getByPlaceholder("Leave a description")
.fill(
+2 -2
View File
@@ -198,7 +198,7 @@ test("edit patch", async ({ page, authenticatedPeer }) => {
await expect(page.getByPlaceholder("Title")).toBeHidden();
await expect(page.getByPlaceholder("Leave a description")).toBeHidden();
await page.getByRole("button", { name: "edit patch" }).click();
await page.getByRole("button", { name: "Edit", exact: true }).click();
await page
.getByPlaceholder("Title")
.fill("This is a modified patch title to be dismissed");
@@ -209,7 +209,7 @@ test("edit patch", async ({ page, authenticatedPeer }) => {
await expect(titleLocator).toBeVisible();
await expect(descriptionLocator).toBeVisible();
await page.getByRole("button", { name: "edit patch" }).click();
await page.getByRole("button", { name: "Edit", exact: true }).click();
await page.getByPlaceholder("Title").fill("This is a modified patch title");
await page
.getByPlaceholder("Leave a description")