Readd possibility to add containers as apps to boards (#1276)

This commit is contained in:
Meier Lukas
2023-09-10 14:28:13 +02:00
committed by GitHub
parent f35f6debaf
commit d05c0023cd
13 changed files with 266 additions and 123 deletions

36
src/tools/shared/app.ts Normal file
View File

@@ -0,0 +1,36 @@
import { v4 as uuidv4 } from 'uuid';
import { AppType } from '~/types/app';
export const generateDefaultApp = (wrapperId: string): AppType =>
({
id: uuidv4(),
name: 'Your app',
url: 'https://homarr.dev',
appearance: {
iconUrl: '/imgs/logo/logo.png',
appNameStatus: 'normal',
positionAppName: 'column',
lineClampAppName: 1,
appNameFontSize: 16
},
network: {
enabledStatusChecker: true,
statusCodes: ['200', '301', '302', '304', '307', '308'],
okStatus: [200, 301, 302, 304, 307, 308],
},
behaviour: {
isOpeningNewTab: true,
externalUrl: 'https://homarr.dev',
},
area: {
type: 'wrapper',
properties: {
id: wrapperId,
},
},
shape: {},
integration: {
type: null,
properties: [],
},
}) satisfies AppType;