feat: add custom css for board and custom classes in advanced options for items (#512)

* feat: add custom css for board and custom classes in advanced options for items

* chore: add mysql migration

* fix: test not working

* fix: format issues

* fix: typecheck issue

* fix: build issue

* chore: add missing translations

* fix: merge issues related to migrations

* fix: format issues

* fix: merge issue with migration

* fix: format issue
This commit is contained in:
Meier Lukas
2024-05-19 23:01:26 +02:00
committed by GitHub
parent f1b1ec59ec
commit 26b1c4a319
35 changed files with 3080 additions and 97 deletions

View File

@@ -0,0 +1 @@
ALTER TABLE `item` ADD `advanced_options` text DEFAULT ('{"json": {}}') NOT NULL;

View File

@@ -1,8 +1,8 @@
{
"version": "5",
"dialect": "mysql",
"id": "e7a373e1-9f36-4910-9f2b-ac6fd5e79145",
"prevId": "ba2dd885-4e7f-4a45-99a0-7b45cbd0a5c2",
"id": "4e382d0d-a432-4953-bd5e-04f3f33e26a4",
"prevId": "fdeaf6eb-cd62-4fa5-9b38-d7f80a60db9f",
"tables": {
"account": {
"name": "account",
@@ -910,6 +910,14 @@
"notNull": true,
"autoincrement": false,
"default": "('{\"json\": {}}')"
},
"advanced_options": {
"name": "advanced_options",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "('{\"json\": {}}')"
}
},
"indexes": {},
@@ -991,40 +999,6 @@
},
"uniqueConstraints": {}
},
"serverSetting": {
"name": "serverSetting",
"columns": {
"key": {
"name": "key",
"type": "varchar(64)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"value": {
"name": "value",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "('{\"json\": {}}')"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"serverSetting_key": {
"name": "serverSetting_key",
"columns": ["key"]
}
},
"uniqueConstraints": {
"serverSetting_key_unique": {
"name": "serverSetting_key_unique",
"columns": ["key"]
}
}
},
"session": {
"name": "session",
"columns": {

File diff suppressed because it is too large Load Diff

View File

@@ -19,8 +19,15 @@
{
"idx": 2,
"version": "5",
"when": 1715980459023,
"tag": "0002_flimsy_deathbird",
"breakpoints": true
},
{
"idx": 3,
"version": "5",
"when": 1716148439439,
"tag": "0002_freezing_black_panther",
"tag": "0003_freezing_black_panther",
"breakpoints": true
}
]

View File

@@ -0,0 +1 @@
ALTER TABLE `item` ADD `advanced_options` text DEFAULT '{"json": {}}' NOT NULL;

View File

@@ -1,8 +1,8 @@
{
"version": "6",
"dialect": "sqlite",
"id": "b72fe407-31bc-4dd0-8c36-dbb8e42ef708",
"prevId": "2ed0ffc3-8612-42e7-bd8e-f5f8f3338a39",
"id": "5ad60251-8450-437d-9081-a456884120d2",
"prevId": "0575873a-9e10-4480-8d7d-c47198622c22",
"tables": {
"account": {
"name": "account",
@@ -877,6 +877,14 @@
"notNull": true,
"autoincrement": false,
"default": "'{\"json\": {}}'"
},
"advanced_options": {
"name": "advanced_options",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'{\"json\": {}}'"
}
},
"indexes": {},
@@ -948,36 +956,6 @@
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"serverSetting": {
"name": "serverSetting",
"columns": {
"key": {
"name": "key",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"value": {
"name": "value",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'{\"json\": {}}'"
}
},
"indexes": {
"serverSetting_key_unique": {
"name": "serverSetting_key_unique",
"columns": ["key"],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"session": {
"name": "session",
"columns": {

File diff suppressed because it is too large Load Diff

View File

@@ -19,8 +19,15 @@
{
"idx": 2,
"version": "6",
"when": 1715973963014,
"tag": "0002_cooing_sumo",
"breakpoints": true
},
{
"idx": 3,
"version": "6",
"when": 1716148434186,
"tag": "0002_adorable_raider",
"tag": "0003_adorable_raider",
"breakpoints": true
}
]

View File

@@ -243,6 +243,7 @@ export const items = mysqlTable("item", {
width: int("width").notNull(),
height: int("height").notNull(),
options: text("options").default('{"json": {}}').notNull(), // empty superjson object
advancedOptions: text("advanced_options").default('{"json": {}}').notNull(), // empty superjson object
});
export const apps = mysqlTable("app", {

View File

@@ -246,6 +246,7 @@ export const items = sqliteTable("item", {
width: int("width").notNull(),
height: int("height").notNull(),
options: text("options").default('{"json": {}}').notNull(), // empty superjson object
advancedOptions: text("advanced_options").default('{"json": {}}').notNull(), // empty superjson object
});
export const apps = sqliteTable("app", {