feat: added bordercolor option for dynamic section (#2334)

This commit is contained in:
Jack Weller
2025-03-02 20:39:17 +10:00
committed by GitHub
parent 7dfc3646b7
commit 7dfb108a56
20 changed files with 4134 additions and 12 deletions

View File

@@ -0,0 +1 @@
ALTER TABLE `section` ADD `options` text DEFAULT ('{"json": {}}');

File diff suppressed because it is too large Load Diff

View File

@@ -218,6 +218,13 @@
"when": 1740256006328,
"tag": "0030_migrate_item_and_section_for_layouts",
"breakpoints": true
},
{
"idx": 31,
"version": "5",
"when": 1740784837957,
"tag": "0031_add_dynamic_section_options",
"breakpoints": true
}
]
}

View File

@@ -0,0 +1 @@
ALTER TABLE `section` ADD `options` text DEFAULT '{"json": {}}';

File diff suppressed because it is too large Load Diff

View File

@@ -218,6 +218,13 @@
"when": 1740255968549,
"tag": "0030_migrate_item_and_section_for_layouts",
"breakpoints": true
},
{
"idx": 31,
"version": "6",
"when": 1740784849045,
"tag": "0031_add_dynamic_section_options",
"breakpoints": true
}
]
}

View File

@@ -17,6 +17,12 @@ import {
varchar,
} from "drizzle-orm/mysql-core";
import {
backgroundImageAttachments,
backgroundImageRepeats,
backgroundImageSizes,
emptySuperJSON,
} from "@homarr/definitions";
import type {
BackgroundImageAttachment,
BackgroundImageRepeat,
@@ -33,7 +39,6 @@ import type {
SupportedAuthProvider,
WidgetKind,
} from "@homarr/definitions";
import { backgroundImageAttachments, backgroundImageRepeats, backgroundImageSizes } from "@homarr/definitions";
const customBlob = customType<{ data: Buffer }>({
dataType() {
@@ -388,6 +393,7 @@ export const sections = mysqlTable("section", {
xOffset: int(),
yOffset: int(),
name: text(),
options: text().default(emptySuperJSON),
});
export const sectionCollapseStates = mysqlTable(
@@ -414,8 +420,8 @@ export const items = mysqlTable("item", {
.notNull()
.references(() => boards.id, { onDelete: "cascade" }),
kind: text().$type<WidgetKind>().notNull(),
options: text().default('{"json": {}}').notNull(), // empty superjson object
advancedOptions: text().default('{"json": {}}').notNull(), // empty superjson object
options: text().default(emptySuperJSON).notNull(),
advancedOptions: text().default(emptySuperJSON).notNull(),
});
export const apps = mysqlTable("app", {
@@ -461,7 +467,7 @@ export const iconRepositories = mysqlTable("iconRepository", {
export const serverSettings = mysqlTable("serverSetting", {
settingKey: varchar({ length: 64 }).notNull().unique().primaryKey(),
value: text().default('{"json": {}}').notNull(), // empty superjson object
value: text().default(emptySuperJSON).notNull(),
});
export const apiKeyRelations = relations(apiKeys, ({ one }) => ({

View File

@@ -5,7 +5,12 @@ import { relations, sql } from "drizzle-orm";
import type { AnySQLiteColumn } from "drizzle-orm/sqlite-core";
import { blob, index, int, primaryKey, sqliteTable, text } from "drizzle-orm/sqlite-core";
import { backgroundImageAttachments, backgroundImageRepeats, backgroundImageSizes } from "@homarr/definitions";
import {
backgroundImageAttachments,
backgroundImageRepeats,
backgroundImageSizes,
emptySuperJSON,
} from "@homarr/definitions";
import type {
BackgroundImageAttachment,
BackgroundImageRepeat,
@@ -373,6 +378,7 @@ export const sections = sqliteTable("section", {
xOffset: int(),
yOffset: int(),
name: text(),
options: text().default(emptySuperJSON),
});
export const sectionCollapseStates = sqliteTable(
@@ -399,8 +405,8 @@ export const items = sqliteTable("item", {
.notNull()
.references(() => boards.id, { onDelete: "cascade" }),
kind: text().$type<WidgetKind>().notNull(),
options: text().default('{"json": {}}').notNull(), // empty superjson object
advancedOptions: text().default('{"json": {}}').notNull(), // empty superjson object
options: text().default(emptySuperJSON).notNull(),
advancedOptions: text().default(emptySuperJSON).notNull(),
});
export const apps = sqliteTable("app", {
@@ -446,7 +452,7 @@ export const iconRepositories = sqliteTable("iconRepository", {
export const serverSettings = sqliteTable("serverSetting", {
settingKey: text().notNull().unique().primaryKey(),
value: text().default('{"json": {}}').notNull(), // empty superjson object
value: text().default(emptySuperJSON).notNull(),
});
export const apiKeyRelations = relations(apiKeys, ({ one }) => ({