Skip to content

Commit

Permalink
Merge pull request #1552 from undb-xyz/release/v0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nichenqin committed Sep 22, 2023
2 parents a3480c4 + f70256d commit 6a2d471
Show file tree
Hide file tree
Showing 21 changed files with 177 additions and 169 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## v0.9.1

## v0.9.0


Expand Down
2 changes: 1 addition & 1 deletion apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"@nestjs/schematics": "^10.0.2",
"@nestjs/testing": "^10.2.5",
"@swc/cli": "^0.1.62",
"@swc/core": "1.3.85",
"@swc/core": "1.3.87",
"@types/bcrypt": "^5.0.0",
"@types/compression": "^1.7.3",
"@types/cookie-parser": "^1.4.4",
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/lib/authz/fls/FLSModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</script>

<Dialog.Root bind:open={$flsModal.open}>
<Dialog.Content class="!w-1/2 !max-w-none">
<Dialog.Content class="!w-1/2 !max-w-none bg-white dark:bg-gray-800">
<Dialog.Header>
<Dialog.Title>{$t('fls', { ns: 'authz' })}</Dialog.Title>
</Dialog.Header>
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/lib/authz/rls/RLSModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</script>

<Dialog.Root bind:open={$rlsModal.open}>
<Dialog.Content class="!w-1/2 max-w-none max-h-[98%] overflow-y-auto">
<Dialog.Content class="!w-1/2 max-w-none max-h-[98%] overflow-y-auto bg-white dark:bg-gray-800">
<Dialog.Header>
<Dialog.Title>
{$t('rls', { ns: 'authz' })}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
</Button>

<Dialog.Root bind:open>
<Dialog.Content class="h-3/4 block space-y-2">
<Dialog.Content class="h-3/4 block space-y-2 bg-white dark:bg-gray-800">
<Dialog.Header class="mb-5">
<Dialog.Title>{$t('Select Record') ?? undefined}</Dialog.Title>
</Dialog.Header>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{transition}
{transitionConfig}
class={cn(
'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:rounded-lg md:w-full',
'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:rounded-lg md:w-full bg-white dark:bg-gray-800',
className,
)}
{...$$restProps}
Expand All @@ -28,7 +28,7 @@
<DialogPrimitive.Close
class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
>
<i class="ti ti-x h-4 w-4" />
<i class="ti ti-x h-4 w-4 dark:text-white" />
<span class="sr-only">Close</span>
</DialogPrimitive.Close>
</DialogPrimitive.Content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
export { className as class }
</script>

<DialogPrimitive.Title class={cn('text-lg font-semibold leading-none tracking-tight', className)} {...$$restProps}>
<DialogPrimitive.Title
class={cn('text-lg font-semibold leading-none tracking-tight dark:text-white', className)}
{...$$restProps}
>
<slot />
</DialogPrimitive.Title>
4 changes: 2 additions & 2 deletions apps/frontend/src/lib/components/ui/toggle/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Root from './toggle.svelte'
import { tv, type VariantProps } from 'tailwind-variants'
import Root from './toggle.svelte'

export const toggleVariants = tv({
base: 'inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors data-[state=on]:bg-accent data-[state=on]:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ring-offset-background hover:bg-muted hover:text-muted-foreground',
base: 'inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors data-[state=on]:bg-accent data-[state=on]:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ring-offset-background hover:bg-muted hover:text-muted-foreground dark:text-white',
variants: {
variant: {
default: 'bg-transparent',
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/lib/field/CreateField.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
</script>

<Dialog.Root bind:open={$createFieldModal.open}>
<Dialog.Content class="md:!w-1/2 max-w-none md:min-w-[720px]">
<Dialog.Content class="md:!w-1/2 max-w-none md:min-w-[720px] bg-white dark:bg-gray-800">
<Dialog.Header>
<Dialog.Title>{$t('Create New Field') ?? undefined}</Dialog.Title>
</Dialog.Header>
Expand Down
6 changes: 4 additions & 2 deletions apps/frontend/src/lib/record/CreateRecord.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@
</script>

<Dialog.Root bind:open={$createRecordModal.open}>
<Dialog.Content class="!w-3/4 max-w-none h-[calc(100vh-64px)] overflow-y-hidden flex flex-col p-0">
<Dialog.Content
class="!w-3/4 max-w-none h-[calc(100vh-64px)] overflow-y-hidden flex flex-col p-0 bg-white dark:bg-gray-800"
>
<Dialog.Header class="border-b p-6">
<Dialog.Title class="gap-2 items-center flex">
<Dialog.Title class="gap-2 items-center flex dark:text-white">
<span>
{$t('Create New Record')}
</span>
Expand Down
134 changes: 67 additions & 67 deletions apps/frontend/src/lib/record/UpdateRecord.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -104,57 +104,57 @@
}}
>
{#key $record}
<Dialog.Content
class="!w-[95%] lg:!w-3/4 !max-w-none h-[calc(100vh-64px)] overflow-y-hidden p-0 block gap-0"
id="updateRecord"
>
<Dialog.Header class="border-b border-gray-100 h-15 p-6">
<Dialog.Title class="pr-6">
<div class="flex items-center w-full justify-between mr-6">
<div class="flex items-center space-x-4">
<p>{$t('Update Record')}</p>
{#if $record}
<ReadonlyRecordBadge />
{/if}
<!-- <ButtonGroup size="xs">
<form id="updateRecord" class="space-y-5" method="POST" use:enhance>
<Dialog.Content
class="!w-[95%] lg:!w-3/4 !max-w-none h-[calc(100vh-64px)] overflow-y-hidden p-0 block gap-0 bg-white dark:bg-gray-800"
id="updateRecord"
>
<Dialog.Header class="border-b border-gray-100 h-15 p-6">
<Dialog.Title class="pr-6">
<div class="flex items-center w-full justify-between mr-6">
<div class="flex items-center space-x-4">
<p class="dark:text-white">{$t('Update Record')}</p>
{#if $record}
<ReadonlyRecordBadge />
{/if}
<!-- <ButtonGroup size="xs">
<Button size="xs" disabled={!$prevRecord} on:click={() => ($currentRecordId = $prevRecord?.id.value)}>
<i class="ti ti-chevron-left text-gray-500 text-base" />
</Button>
<Button size="xs" disabled={!$nextRecord} on:click={() => ($currentRecordId = $nextRecord?.id.value)}>
<i class="ti ti-chevron-right text-gray-500 text-base" />
</Button>
</ButtonGroup> -->
</div>
</div>

<div class="flex items-center gap-2">
{#if !$isShare}
<button on:click={() => (displayAudits = !displayAudits)}>
<i class="ti ti-history"></i>
</button>
{/if}
<UpdateRecordMenu record={$record} />
<div class="flex items-center gap-2">
{#if !$isShare}
<button on:click={() => (displayAudits = !displayAudits)} class="dark:text-white">
<i class="ti ti-history"></i>
</button>
{/if}
<UpdateRecordMenu record={$record} />
</div>
</div>
</div>
</Dialog.Title>
</Dialog.Header>

<div class="h-[calc(100%-150px)] overflow-hidden">
{#if !$record}
<div
class="absolute top-0 left-0 right-0 bottom-0 bg-white bg-opacity-50 z-50 flex items-center justify-center"
>
<i class="ti ti-rotate animate-spin"></i>
</div>
{/if}

<div class="grid grid-cols-6 h-full">
<div
class={cn(
'p-6 border-r dark:border-r-slate-900 h-full overflow-y-auto',
shouldDisplayAudits ? 'col-span-4' : 'col-span-6',
)}
>
<form id="updateRecord" class="space-y-5" method="POST" use:enhance>
</Dialog.Title>
</Dialog.Header>

<div class="h-[calc(100%-150px)] overflow-hidden">
{#if !$record}
<div
class="absolute top-0 left-0 right-0 bottom-0 bg-white bg-opacity-50 z-50 flex items-center justify-center"
>
<i class="ti ti-rotate animate-spin"></i>
</div>
{/if}

<div class="grid grid-cols-6 h-full">
<div
class={cn(
'p-6 border-r dark:border-r-slate-900 h-full overflow-y-auto',
shouldDisplayAudits ? 'col-span-4' : 'col-span-6',
)}
>
<div class="grid grid-cols-5 gap-x-3 gap-y-4 items-center">
{#each fields as field}
{@const readonlyField = !$canUpdateRecordField(field.id.value)}
Expand Down Expand Up @@ -182,35 +182,35 @@
</div>
{/each}
</div>
</form>
</div>
{#if shouldDisplayAudits}
<div class="col-span-2 px-2 py-6 h-full overflow-y-auto bg-slate-50 dark:bg-slate-700">
<RecordAudits />
</div>
{/if}
</div>
</div>

<Dialog.Footer class="border-t border-gray-100 h-15 p-6">
<div class="w-full flex justify-end gap-2">
<Button variant="secondary" type="button" on:click={() => ($currentRecordId = undefined)}>
{$t('Cancel', { ns: 'common' })}
</Button>
<Button class="gap-2" type="submit" form="updateRecord" disabled={$submitting || $readonlyRecord}>
{#if $delayed}
<i class="ti ti-rotate animate-spin"></i>
{:else}
<i class="ti ti-edit" />
{#if shouldDisplayAudits}
<div class="col-span-2 px-2 py-6 h-full overflow-y-auto bg-slate-50 dark:bg-slate-700">
<RecordAudits />
</div>
{/if}
{$t('Update Record')}</Button
>
</div>
</div>
</Dialog.Footer>

<ConfirmDeleteRecord />
<ConfirmDuplicateRecord />
</Dialog.Content>
<Dialog.Footer class="border-t border-gray-100 h-15 p-6">
<div class="w-full flex justify-end gap-2">
<Button variant="secondary" type="button" on:click={() => ($currentRecordId = undefined)}>
{$t('Cancel', { ns: 'common' })}
</Button>
<Button class="gap-2" type="submit" form="updateRecord" disabled={$submitting || $readonlyRecord}>
{#if $delayed}
<i class="ti ti-rotate animate-spin"></i>
{:else}
<i class="ti ti-edit" />
{/if}
{$t('Update Record')}</Button
>
</div>
</Dialog.Footer>

<ConfirmDeleteRecord />
<ConfirmDuplicateRecord />
</Dialog.Content>
</form>
{/key}
</Dialog.Root>

Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/lib/record/UpdateRecordMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{#if $canCreateRecord || $canDeleteRecord}
<DropdownMenu.Root>
<DropdownMenu.Trigger>
<button>
<button class="dark:text-white">
<i class="ti ti-dots" />
</button>
</DropdownMenu.Trigger>
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/lib/table/FilterMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
class={cn(
'gap-2 whitespace-nowrap border-2 border-transparent',
!!validFilters.length &&
'bg-green-100 hover:bg-green-100 hover:border-green-200 text-green-800 hover:text-green-950',
'bg-green-100 hover:bg-green-100 hover:border-green-200 text-green-800 hover:text-green-950 dark:bg-green-600 dark:text-green-100',
)}
size="sm"
>
Expand Down
3 changes: 2 additions & 1 deletion apps/frontend/src/lib/table/ManageFieldsMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@
variant="ghost"
class={cn(
'gap-2 whitespace-nowrap border-2 border-transparent',
hiddenCount && 'bg-sky-100 hover:bg-sky-100 hover:border-sky-200 text-sky-800 hover:text-sky-950',
hiddenCount &&
'bg-sky-100 hover:bg-sky-100 hover:border-sky-200 text-sky-800 hover:text-sky-950 dark:bg-sky-600 dark:text-sky-100',
)}
size="sm"
>
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/lib/table/SortMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
class={cn(
'gap-2 whitespace-nowrap border-2 border-transparent',
!!validSorts.length &&
'bg-yellow-100 hover:bg-yellow-100 hover:border-yellow-200 text-yellow-800 hover:text-yellow-950',
'bg-yellow-100 hover:bg-yellow-100 hover:border-yellow-200 text-yellow-800 hover:text-yellow-950 dark:bg-yellow-600 dark:text-yellow-100',
)}
size="sm"
>
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/lib/table/TableMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<DropdownMenu.Root>
<DropdownMenu.Trigger>
<button>
<i class="ti ti-dots dark:text-gray-50 hover:bg-gray-100 p-1 text-gray-600"></i>
<i class="ti ti-dots dark:text-gray-50 hover:bg-gray-100 dark:hover:bg-gray-700 p-1 text-gray-600"></i>
</button>
</DropdownMenu.Trigger>
<DropdownMenu.Content class="w-48">
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/lib/table/TableNav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
>
{$table.name.value.slice(0, 1)}
</span>
<p class="text-sm font-medium text-gray-800">
<p class="text-sm font-medium text-gray-800 dark:text-white">
{$table.name.value}
</p>
</div>
Expand All @@ -50,7 +50,7 @@
<Tooltip.Root openDelay={10} positioning={{ placement: 'bottom' }}>
<Tooltip.Trigger>
<button on:click={() => updateTableModal.open()}>
<i class="ti ti-settings text-gray-600 dark:text-gray-200" />
<i class="ti ti-settings text-gray-600 dark:text-gray-200 dark:bg-gray-700" />
</button>
</Tooltip.Trigger>
<Tooltip.Content>
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/lib/view/ViewListItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
type="button"
role="tab"
class={cn(
'group rounded-sm inline-flex w-full justify-between items-center gap-2 text-sm font-medium text-center disabled:cursor-not-allowed px-4 py-2',
'group rounded-sm inline-flex w-full justify-between items-center gap-2 text-sm font-medium text-center disabled:cursor-not-allowed px-4 py-2 transition',
active
? 'text-primary bg-primary/5 dark:text-gray-50 dark:bg-primary active'
: 'hover:bg-gray-50 hover:text-primary hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 text-gray-500 dark:text-gray-300',
: 'hover:bg-gray-50 dark:hover:bg-gray-600 hover:text-primary hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 text-gray-500 dark:text-gray-300',
)}
>
<span class="inline-flex items-center gap-2 truncate">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "undb",
"version": "0.9.0",
"version": "0.9.1",
"devDependencies": {
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/database/sqlite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"devDependencies": {
"@mikro-orm/cli": "^5.8.1",
"@mikro-orm/reflection": "^5.8.1",
"@swc/core": "1.3.85",
"@swc/core": "1.3.87",
"@types/lodash-es": "^4.17.9",
"@types/uuid": "^9.0.4",
"@undb/logger": "^0.0.0",
Expand Down
Loading

0 comments on commit 6a2d471

Please sign in to comment.