mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 10:10:30 +08:00
Redesign app with new UI kit
Redesign the entire app with a new UI kit. Typography, colors, icons, avatars, and border radii have all been updated for a more polished, consistent appearance that matches our other products like radicle-explorer. - Replace blockies-based avatars with a new DID-based avatar system - Move Settings and Create Issue into fullscreen modals - Change the default theme to follow the system theme - Remove window decorations on macOS for a cleaner, more native feel - Update the app icon - Fix popovers and tooltips Navigation: - Rewrite app navigation and layouts - Add a sidebar that gives you access to all your repos - Change the startup screen to open directly to the notification inbox - Add a getting started guide shown to new users on first launch Settings: - Add a setting to disable the notification badge - Add a code font setting Bug fixes: - Fix reactions and edits incorrectly targeting the root comment instead of the intended reply - Restrict issue/patch state, labels and assignees to delegates only
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
import { patchStatusBackgroundColor, patchStatusColor } from "@app/lib/utils";
|
||||
|
||||
import Border from "@app/components/Border.svelte";
|
||||
import Button from "@app/components/Button.svelte";
|
||||
import DropdownList from "@app/components/DropdownList.svelte";
|
||||
import DropdownListItem from "@app/components/DropdownListItem.svelte";
|
||||
import Icon from "@app/components/Icon.svelte";
|
||||
@@ -15,67 +15,63 @@
|
||||
interface Props {
|
||||
selectedState: State;
|
||||
onSelect: (newState: State) => void;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
const { selectedState, onSelect }: Props = $props();
|
||||
const { selectedState, onSelect, disabled = false }: Props = $props();
|
||||
|
||||
let popoverExpanded: boolean = $state(false);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
button {
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
background: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: var(--font-size-small);
|
||||
background-color: none;
|
||||
}
|
||||
button:disabled {
|
||||
cursor: inherit;
|
||||
}
|
||||
|
||||
.badge {
|
||||
gap: 0.375rem;
|
||||
padding-right: 0.625rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
<Popover
|
||||
popoverPadding="0"
|
||||
popoverPositionTop="2rem"
|
||||
popoverPositionLeft="0"
|
||||
placement="bottom-start"
|
||||
bind:expanded={popoverExpanded}>
|
||||
{#snippet toggle(onclick)}
|
||||
<button
|
||||
disabled={selectedState.status === "merged"}
|
||||
<Button
|
||||
variant="outline"
|
||||
disabled={selectedState.status === "merged" || disabled}
|
||||
{onclick}
|
||||
active={popoverExpanded}
|
||||
title={selectedState.status === "merged"
|
||||
? "The state of merged patches can not be changed"
|
||||
: "Click to change patch state"}>
|
||||
: disabled
|
||||
? "You must be a delegate to change the patch state"
|
||||
: undefined}>
|
||||
<span
|
||||
class="global-counter badge"
|
||||
style:color={patchStatusColor[selectedState.status]}
|
||||
style:background-color={patchStatusBackgroundColor[
|
||||
selectedState.status
|
||||
]}>
|
||||
class="global-chip"
|
||||
style:padding="0"
|
||||
style:margin-left="-0.25rem"
|
||||
style:color={selectedState.status === "merged" || disabled
|
||||
? undefined
|
||||
: patchStatusColor[selectedState.status]}
|
||||
style:background-color={selectedState.status === "merged" || disabled
|
||||
? undefined
|
||||
: patchStatusBackgroundColor[selectedState.status]}>
|
||||
<Icon
|
||||
name={selectedState.status === "open"
|
||||
? "patch"
|
||||
: `patch-${selectedState.status}`} />
|
||||
{capitalize(selectedState.status)}
|
||||
{#if selectedState.status !== "merged"}
|
||||
<Icon name={popoverExpanded ? "chevron-up" : "chevron-down"} />
|
||||
{/if}
|
||||
</span>
|
||||
</button>
|
||||
<span
|
||||
style:color={selectedState.status === "merged" || disabled
|
||||
? undefined
|
||||
: "var(--color-text-secondary)"}>
|
||||
{capitalize(selectedState.status)}
|
||||
</span>
|
||||
{#if selectedState.status !== "merged"}
|
||||
<Icon name={popoverExpanded ? "chevron-up" : "chevron-down"} />
|
||||
{/if}
|
||||
</Button>
|
||||
{/snippet}
|
||||
{#snippet popover()}
|
||||
<Border variant="ghost">
|
||||
<div
|
||||
style:border="1px solid var(--color-border-subtle)"
|
||||
style:border-radius="var(--border-radius-sm)"
|
||||
style:display="flex"
|
||||
style:gap="0.5rem"
|
||||
style:align-items="center"
|
||||
style:background-color="var(--color-surface-canvas)">
|
||||
<DropdownList
|
||||
items={[
|
||||
{ status: "open" },
|
||||
@@ -85,22 +81,28 @@
|
||||
{#snippet item(state)}
|
||||
<DropdownListItem
|
||||
selected={selectedState.status === state.status}
|
||||
styleGap="0.5rem"
|
||||
onclick={() => {
|
||||
onSelect(state);
|
||||
closeFocused();
|
||||
}}>
|
||||
<span
|
||||
class="global-flex"
|
||||
style:color={patchStatusColor[state.status]}>
|
||||
class="global-chip"
|
||||
style:padding="0"
|
||||
style:margin-left="-0.5rem"
|
||||
style:color={patchStatusColor[state.status]}
|
||||
style:background-color={patchStatusBackgroundColor[state.status]}>
|
||||
<Icon
|
||||
name={state.status === "open"
|
||||
? "patch"
|
||||
: `patch-${state.status}`} />
|
||||
</span>
|
||||
<span style:color="var(--color-text-secondary)">
|
||||
{capitalize(state.status)}
|
||||
</span>
|
||||
</DropdownListItem>
|
||||
{/snippet}
|
||||
</DropdownList>
|
||||
</Border>
|
||||
</div>
|
||||
{/snippet}
|
||||
</Popover>
|
||||
|
||||
Reference in New Issue
Block a user