Add New Patch button

This commit is contained in:
Rūdolfs Ošiņš
2025-05-07 18:58:55 +02:00
parent e427af7ed2
commit f32772ebf1
5 changed files with 100 additions and 21 deletions
+12 -14
View File
@@ -126,20 +126,18 @@
{/snippet}
</TextInput>
{/if}
<div class="txt-regular txt-semibold">
<Button
styleHeight="2.5rem"
variant="secondary"
onclick={() => {
void router.push({
resource: "repo.createIssue",
status,
rid: repo.rid,
});
}}>
<Icon name="add" />New
</Button>
</div>
<Button
styleHeight="2.5rem"
variant="secondary"
onclick={() => {
void router.push({
resource: "repo.createIssue",
status,
rid: repo.rid,
});
}}>
<Icon name="add" />New
</Button>
</div>
</div>
+4 -2
View File
@@ -33,11 +33,13 @@
import CopyableId from "@app/components/CopyableId.svelte";
import DropdownList from "@app/components/DropdownList.svelte";
import DropdownListItem from "@app/components/DropdownListItem.svelte";
import EditableTitle from "@app/components/EditableTitle.svelte";
import Icon from "@app/components/Icon.svelte";
import LabelInput from "@app/components/LabelInput.svelte";
import Layout from "./Layout.svelte";
import Link from "@app/components/Link.svelte";
import NakedButton from "@app/components/NakedButton.svelte";
import NewPatchButton from "@app/components/NewPatchButton.svelte";
import OutlineButton from "@app/components/OutlineButton.svelte";
import PatchStateButton from "@app/components/PatchStateButton.svelte";
import PatchTeaser from "@app/components/PatchTeaser.svelte";
@@ -50,7 +52,6 @@
import Sidebar from "@app/components/Sidebar.svelte";
import Tab from "@app/components/Tab.svelte";
import TextInput from "@app/components/TextInput.svelte";
import EditableTitle from "@app/components/EditableTitle.svelte";
interface Props {
repo: RepoInfo;
@@ -389,7 +390,7 @@
Patches
</Link>
</div>
<div style:margin-left="auto">
<div class="global-flex" style:margin-left="auto">
<NakedButton
styleHeight="2.5rem"
keyShortcuts="ctrl+f"
@@ -405,6 +406,7 @@
}}>
<Icon name="filter" />
</NakedButton>
<NewPatchButton rid={repo.rid} outline />
</div>
</div>
{#if showFilters}
+7 -4
View File
@@ -16,6 +16,7 @@
import CopyableId from "@app/components/CopyableId.svelte";
import Icon from "@app/components/Icon.svelte";
import Layout from "./Layout.svelte";
import NewPatchButton from "@app/components/NewPatchButton.svelte";
import PatchTeaser from "@app/components/PatchTeaser.svelte";
import PatchesSecondColumn from "@app/components/PatchesSecondColumn.svelte";
import TextInput from "@app/components/TextInput.svelte";
@@ -112,6 +113,7 @@
align-items: center;
min-height: 2.5rem;
margin-bottom: 1rem;
gap: 0.75rem;
}
</style>
@@ -132,8 +134,8 @@
<div class="header">
Patches
{#if items.length > 0}
<div class="global-flex" style:margin-left="auto">
<div class="global-flex" style:margin-left="auto">
{#if items.length > 0}
<TextInput
onFocus={async () => {
try {
@@ -171,8 +173,9 @@
</div>
{/snippet}
</TextInput>
</div>
{/if}
{/if}
<NewPatchButton rid={repo.rid} />
</div>
</div>
<div class="list">