2020-12-02 14:20:56 +01:00
|
|
|
const { BUILTIN_ROLE_IDS } = require("../utilities/security/roles")
|
2020-12-03 18:31:38 +01:00
|
|
|
const { BASE_LAYOUT_PROP_IDS } = require("./layouts")
|
2021-04-01 15:11:58 +02:00
|
|
|
const { LOGO_URL } = require("../constants")
|
2020-11-13 16:35:20 +01:00
|
|
|
|
2020-12-07 16:49:13 +01:00
|
|
|
exports.createHomeScreen = () => ({
|
2020-11-03 17:27:28 +01:00
|
|
|
description: "",
|
|
|
|
url: "",
|
2020-12-05 00:16:07 +01:00
|
|
|
layoutId: BASE_LAYOUT_PROP_IDS.PRIVATE,
|
2020-11-03 17:27:28 +01:00
|
|
|
props: {
|
|
|
|
_id: "d834fea2-1b3e-4320-ab34-f9009f5ecc59",
|
|
|
|
_component: "@budibase/standard-components/container",
|
|
|
|
_styles: {
|
|
|
|
normal: {
|
|
|
|
flex: "1 1 auto",
|
|
|
|
display: "flex",
|
|
|
|
"flex-direction": "column",
|
|
|
|
"justify-content": "flex-start",
|
|
|
|
"align-items": "stretch",
|
|
|
|
},
|
|
|
|
hover: {},
|
|
|
|
active: {},
|
|
|
|
selected: {},
|
|
|
|
},
|
2021-03-02 13:37:54 +01:00
|
|
|
_transition: "fade",
|
2020-11-03 17:27:28 +01:00
|
|
|
type: "div",
|
|
|
|
_children: [
|
|
|
|
{
|
|
|
|
_id: "ef60083f-4a02-4df3-80f3-a0d3d16847e7",
|
|
|
|
_component: "@budibase/standard-components/heading",
|
|
|
|
_styles: {
|
|
|
|
normal: {
|
|
|
|
"text-align": "left",
|
|
|
|
},
|
|
|
|
hover: {},
|
|
|
|
active: {},
|
|
|
|
selected: {},
|
|
|
|
},
|
|
|
|
text: "Welcome to your Budibase App 👋",
|
|
|
|
type: "h2",
|
|
|
|
_instanceName: "Heading",
|
|
|
|
_children: [],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
_instanceName: "Home",
|
|
|
|
},
|
2020-11-13 16:35:20 +01:00
|
|
|
routing: {
|
|
|
|
route: "/",
|
2020-12-02 14:20:56 +01:00
|
|
|
roleId: BUILTIN_ROLE_IDS.BASIC,
|
2020-11-13 16:35:20 +01:00
|
|
|
},
|
2020-11-24 19:11:18 +01:00
|
|
|
name: "home-screen",
|
2020-12-04 15:03:40 +01:00
|
|
|
})
|
2020-11-24 19:11:18 +01:00
|
|
|
|
2020-12-04 15:03:40 +01:00
|
|
|
exports.createLoginScreen = app => ({
|
2020-11-24 19:11:18 +01:00
|
|
|
description: "",
|
|
|
|
url: "",
|
2020-12-05 00:16:07 +01:00
|
|
|
layoutId: BASE_LAYOUT_PROP_IDS.PUBLIC,
|
2020-11-24 19:11:18 +01:00
|
|
|
props: {
|
2020-12-05 13:09:58 +01:00
|
|
|
_instanceName: "LoginScreenContainer",
|
2020-12-02 17:15:14 +01:00
|
|
|
_id: "5beb4c7b-3c8b-49b2-b8b3-d447dc76dda7",
|
|
|
|
_component: "@budibase/standard-components/container",
|
2020-11-24 19:11:18 +01:00
|
|
|
_styles: {
|
2020-12-02 17:15:14 +01:00
|
|
|
normal: {
|
|
|
|
flex: "1 1 auto",
|
|
|
|
display: "flex",
|
|
|
|
"flex-direction": "column",
|
2020-12-04 15:03:40 +01:00
|
|
|
"justify-content": "center",
|
|
|
|
"align-items": "center",
|
2020-12-02 17:15:14 +01:00
|
|
|
},
|
2020-11-24 19:11:18 +01:00
|
|
|
hover: {},
|
|
|
|
active: {},
|
|
|
|
selected: {},
|
|
|
|
},
|
2021-03-02 13:37:54 +01:00
|
|
|
_transition: "fade",
|
2020-11-24 19:11:18 +01:00
|
|
|
type: "div",
|
2020-12-02 17:15:14 +01:00
|
|
|
_children: [
|
|
|
|
{
|
|
|
|
_id: "781e497e-2e7c-11eb-adc1-0242ac120002",
|
|
|
|
_component: "@budibase/standard-components/login",
|
|
|
|
_styles: {
|
2020-12-04 15:03:40 +01:00
|
|
|
normal: {
|
|
|
|
padding: "64px",
|
|
|
|
background: "rgba(255, 255, 255, 0.4)",
|
|
|
|
"border-radius": "0.5rem",
|
|
|
|
"margin-top": "0px",
|
|
|
|
"box-shadow":
|
|
|
|
"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
|
|
|
|
"font-size": "16px",
|
|
|
|
"font-family": "Inter",
|
|
|
|
flex: "0 1 auto",
|
|
|
|
},
|
2020-12-02 17:15:14 +01:00
|
|
|
hover: {},
|
|
|
|
active: {},
|
|
|
|
selected: {},
|
|
|
|
},
|
2021-04-01 15:11:58 +02:00
|
|
|
logo: LOGO_URL,
|
2020-12-04 15:03:40 +01:00
|
|
|
title: `Log in to ${app.name}`,
|
|
|
|
buttonText: "Log In",
|
2020-12-02 17:15:14 +01:00
|
|
|
_children: [],
|
|
|
|
_instanceName: "Login",
|
|
|
|
},
|
|
|
|
],
|
2020-11-24 19:11:18 +01:00
|
|
|
},
|
|
|
|
routing: {
|
|
|
|
route: "/",
|
2020-12-04 15:03:40 +01:00
|
|
|
roleId: BUILTIN_ROLE_IDS.PUBLIC,
|
2020-11-24 19:11:18 +01:00
|
|
|
},
|
|
|
|
name: "login-screen",
|
2020-12-04 15:03:40 +01:00
|
|
|
})
|