Skip to content

Commit c58ea22

Browse files
authored
Merge pull request #2114 from undb-io/release/v1.0.0-110
Release version v1.0.0-110
2 parents 0943287 + 233004d commit c58ea22

File tree

85 files changed

+634
-146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+634
-146
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3+
## v1.0.0-110
4+
35
## v1.0.0-109
46

57

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM node:22 as builder
22

3+
ARG CDN_URL
4+
ENV PUBLIC_CDN_URL=$CDN_URL
5+
36
WORKDIR /usr/src/app
47

58
RUN npm i -g bun

apps/backend/src/modules/web/web.tsx

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,38 @@ import Elysia from "elysia"
66
@singleton()
77
export class Web {
88
route() {
9-
const index = Bun.file("dist/index.html")
9+
const cdnUrl = process.env.PUBLIC_CDN_URL
10+
const getAsset = async (path: string) => {
11+
if (cdnUrl) {
12+
const response = await fetch(`${cdnUrl}${path}`)
13+
return response.text()
14+
}
15+
return Bun.file(`dist${path}`).text()
16+
}
17+
18+
const getIndex = () => getAsset("/index.html")
19+
1020
return new Elysia()
1121
.use(staticPlugin({ prefix: "/", assets: "dist" }))
1222
.use(staticPlugin({ prefix: "/assets", assets: "assets" }))
13-
.get("/", () => index)
14-
.get("/t/*", () => index)
15-
.get("/dashboards/*", () => index)
16-
.get("/s/*", () => index)
17-
.get("/bases/*", () => index)
18-
.get("/account/*", () => index)
19-
.get("/settings", () => index)
20-
.get("/login", () => index)
21-
.get("/signup", (ctx) => {
23+
.get("/", () => getIndex())
24+
.get("/t/*", () => getIndex())
25+
.get("/dashboards/*", () => getIndex())
26+
.get("/s/*", () => getIndex())
27+
.get("/bases/*", () => getIndex())
28+
.get("/account/*", () => getIndex())
29+
.get("/settings", () => getIndex())
30+
.get("/login", () => getIndex())
31+
.get("/signup", async (ctx) => {
2232
if (env.UNDB_DISABLE_REGISTRATION) {
2333
ctx.redirect("/login", 302)
2434
return
2535
}
26-
return index
36+
return getIndex()
2737
})
28-
.get("/verify-email", () => index)
29-
.get("/reset-password/*", () => index)
30-
.get("/create-from-share/*", () => index)
31-
.get("/templates/*", () => index)
38+
.get("/verify-email", () => getIndex())
39+
.get("/reset-password/*", () => getIndex())
40+
.get("/create-from-share/*", () => getIndex())
41+
.get("/templates/*", () => getIndex())
3242
}
3343
}

apps/frontend/schema.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ enum FieldType {
6060
date
6161
duration
6262
email
63+
formula
6364
id
6465
json
6566
longText

apps/frontend/src/lib/components/blocks/aggregate/config/aggregate-config.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
mutationFn: trpc.table.view.widget.update.mutate,
4848
async onSuccess(data, variables, context) {
4949
if (table) {
50-
await invalidate(`table:${table.id.value}`)
50+
await invalidate(`undb:table:${table.id.value}`)
5151
await tick()
5252
await client.invalidateQueries({ queryKey: ["aggregate", table.id.value, widget.id] })
5353
}

apps/frontend/src/lib/components/blocks/base/base-detail.svelte

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,35 +39,39 @@
3939
{#if $hasPermission("table:create")}
4040
<button
4141
type="button"
42-
class="flex h-32 w-80 flex-col justify-between rounded-lg border bg-gray-100 px-4 py-7 text-left transition-all hover:bg-gray-200/50 hover:shadow-lg"
42+
class="flex h-32 w-80 flex-col justify-between rounded-lg border bg-neutral-50 px-4 py-7 text-left transition-all hover:bg-neutral-100/70 hover:shadow-md"
4343
on:click={() => {
4444
baseId.set(base.id)
4545
openModal(CREATE_TABLE_MODAL)
4646
}}
4747
>
48-
<PlusCircleIcon class="text-muted-foreground" />
48+
<PlusCircleIcon class="text-blue-600" />
4949

5050
Create New Table
5151
</button>
5252
<button
5353
type="button"
54-
class="flex h-32 w-80 flex-col justify-between rounded-lg border bg-gray-100 px-4 py-7 text-left transition-all hover:bg-gray-200/50 hover:shadow-lg"
54+
class="flex h-32 w-80 flex-col justify-between rounded-lg border bg-neutral-50 px-4 py-7 text-left transition-all hover:bg-neutral-100/70 hover:shadow-md"
5555
on:click={() => {
5656
baseId.set(base.id)
5757
openModal(IMPORT_TABLE_MODAL)
5858
}}
5959
>
60-
<ImportIcon class="text-muted-foreground" />
60+
<ImportIcon class="text-orange-600" />
6161

6262
Import Table
6363
</button>
6464
{/if}
6565
{#if $hasPermission("dashboard:create")}
6666
<button
6767
type="button"
68-
class="flex h-32 w-80 flex-col justify-between rounded-lg border bg-gray-100 px-4 py-7 text-left transition-all hover:bg-gray-200/50 hover:shadow-lg"
68+
class="flex h-32 w-80 flex-col justify-between rounded-lg border bg-neutral-50 px-4 py-7 text-left transition-all hover:bg-neutral-100/70 hover:shadow-md"
69+
on:click={() => {
70+
baseId.set(base.id)
71+
openModal(CREATE_DASHBOARD_MODAL)
72+
}}
6973
>
70-
<LayoutDashboardIcon class="text-muted-foreground" />
74+
<LayoutDashboardIcon class="text-green-600" />
7175

7276
Create New Dashboard
7377
</button>
@@ -76,14 +80,14 @@
7680

7781
<section class="flex flex-1 flex-col overflow-hidden pt-3">
7882
{#if base.dashboards.length > 0}
79-
<h3 class="mt-2 text-2xl font-semibold tracking-tight">Dashboards</h3>
83+
<h3 class="mt-2 text-xl font-semibold tracking-tight">Dashboards</h3>
8084

8185
<div class="mt-4 flex flex-wrap gap-2 overflow-y-auto">
8286
{#each base.dashboards as dashboard}
8387
{#if dashboard}
8488
<a
8589
href={`/dashboards/${dashboard.id}`}
86-
class="text-card-foreground h-[100px] w-[300px] overflow-hidden rounded-md border px-4 py-2"
90+
class="text-card-foreground h-[100px] w-[300px] overflow-hidden rounded-md border px-4 py-2 transition-all hover:shadow-md"
8791
>
8892
<span class="inline-flex items-center font-semibold">
8993
<GaugeIcon class="mr-2 h-4 w-4" />
@@ -98,7 +102,7 @@
98102
</div>
99103
{/if}
100104

101-
<h3 class="mt-2 text-2xl font-semibold tracking-tight">Tables</h3>
105+
<h3 class="mt-2 text-xl font-semibold tracking-tight">Tables</h3>
102106

103107
<Table.Root class="flex w-full flex-1 flex-col overflow-y-auto">
104108
<Table.Header class="flex w-full">

apps/frontend/src/lib/components/blocks/create-field/create-field.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
async onSuccess() {
3232
toast.success("Create field success")
3333
reset()
34-
await invalidate(`table:${$table.id.value}`)
34+
await invalidate(`undb:table:${$table.id.value}`)
3535
await client.invalidateQueries({ queryKey: ["records", $table.id.value] })
3636
onSuccess()
3737
},

apps/frontend/src/lib/components/blocks/field-control/field-control.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import CheckboxControl from "./checkbox-control.svelte"
1515
import UrlControl from "./url-control.svelte"
1616
import RollupField from "../field-value/rollup-field.svelte"
17+
import FormulaField from "../field-value/formula-field.svelte"
1718
import LongTextControl from "./long-text-control.svelte"
1819
import CurrencyControl from "./currency-control.svelte"
1920
import ButtonControl from "./button-control.svelte"
@@ -55,6 +56,7 @@
5556
date: DateControl,
5657
json: JsonControl,
5758
checkbox: CheckboxControl,
59+
formula: FormulaField,
5860
user: UserControl,
5961
duration: DurationControl,
6062
percentage: PercentageControl,

apps/frontend/src/lib/components/blocks/field-control/reference-control.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
let selected = writable<string[]>(value)
1616
1717
onMount(() => {
18-
selected.set(value)
18+
selected?.set(value)
1919
})
2020
$: $selected, (value = $selected)
2121
@@ -39,7 +39,7 @@
3939
>
4040
{#if hasValueReactive}
4141
<Button size="xs" variant="link" class="px-0" builders={[builder]}>
42-
{$selected.length} Linked Records
42+
{$selected?.length} Linked Records
4343
</Button>
4444
{:else}
4545
<Button size="xs" variant="link" type="button" class="text-muted-foreground px-0" builders={[builder]}>

apps/frontend/src/lib/components/blocks/field-icon/field-icon.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
MousePointerClickIcon,
2929
TimerIcon,
3030
PercentIcon,
31+
SquareFunctionIcon,
3132
} from "lucide-svelte"
3233
3334
export let type: FieldType
@@ -58,6 +59,7 @@
5859
button: MousePointerClickIcon,
5960
duration: TimerIcon,
6061
percentage: PercentIcon,
62+
formula: SquareFunctionIcon,
6163
}
6264
</script>
6365

0 commit comments

Comments
 (0)