Skip to content

Commit 8b4db23

Browse files
committed
Update cmd palette, teamselect, and settings
1 parent 2317434 commit 8b4db23

File tree

9 files changed

+25
-4
lines changed

9 files changed

+25
-4
lines changed

engine/src/routes/site/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ struct File {
3333
#[derive(Debug, Multipart)]
3434
pub struct UploadPayload {
3535
data: Upload,
36+
context: Option<String>,
3637
}
3738

3839
pub struct SiteApi;

web/src/api/auth/store.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ authStore.subscribe((snapshot) => {
4242
console.log('invalidating queries due to auth token change');
4343
updateAuthToken(snapshot.context.token);
4444
queryClient.resetQueries({ queryKey: ['auth'] });
45-
queryClient.setQueriesData({ queryKey: ['auth'] }, {});
45+
// eslint-disable-next-line unicorn/no-null
46+
queryClient.setQueriesData({ queryKey: ['auth'] }, null);
4647
}
4748

4849
last_token = snapshot.context.token;

web/src/components/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ export { Avatar } from './avatar';
22
export { Button } from './button';
33
export { Input } from './input';
44
export * from './modal';
5+
export * from './select';
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { FC } from 'react';
2+
3+
import { Input } from '../input';
4+
5+
export const TeamSelect: FC<{ value?: string }> = ({ value }) => {
6+
return <Input value={value} />;
7+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './TeamSelect';

web/src/gui/command/CommandPalette.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const CommandPaletteInternal: FC<{ requestClose: () => void }> = ({
8989
)}
9090
</ul>
9191
</div>
92-
<Command.List className="max-h-[50vh] overflow-y-auto p-2">
92+
<Command.List className="overflow-y-auto p-2">
9393
<Command.Empty className="text-sm">
9494
No results found.
9595
</Command.Empty>

web/src/gui/command/command.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export const site_commands: CommandEntry[] = [
151151
title: 'Domains',
152152
aliases: ['domains', 'domain'],
153153
slug: 'domains',
154-
navigate_to: '/site/$siteId/domains',
154+
navigate_to: '/site/$siteId/settings/domains',
155155
},
156156
{
157157
icon: FiSettings,

web/src/routes/_authed/site/$siteId/settings/_s.index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { createFileRoute } from '@tanstack/react-router';
22

33
import { useSite } from '@/api';
44
import { Button, Input } from '@/components';
5+
import { TeamSelect } from '@/components/select';
56

67
export const Route = createFileRoute('/_authed/site/$siteId/settings/_s/')({
78
component: RouteComponent,
@@ -25,7 +26,7 @@ function RouteComponent() {
2526
<div>
2627
<div>Team</div>
2728
<div className="flex gap-2">
28-
<Input value={site?.team_id} />
29+
<TeamSelect value={site?.team_id} />
2930
<Button onClick={() => alert('Not implemented')}>
3031
Transfer
3132
</Button>

web/src/styles/index.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ a {
9090
@apply py-2 outline-none;
9191
}
9292

93+
[cmdk-list] {
94+
min-height: 300px;
95+
height: var(--cmdk-list-height);
96+
max-height: 500px;
97+
transition: height 100ms ease;
98+
scroll-padding-block-start: 8px;
99+
scroll-padding-block-end: 8px;
100+
}
101+
93102
[cmdk-list-sizer] {
94103
@apply space-y-2;
95104
}

0 commit comments

Comments
 (0)