Update template auto screens

This commit is contained in:
Andrew Kingston 2020-10-16 15:15:00 +01:00
parent 7a544a8079
commit 6694d33cfb
3 changed files with 109 additions and 55 deletions

View File

@ -197,7 +197,7 @@ const createScreen = table => ({
"margin-left": "16px", "margin-left": "16px",
}, },
hover: { hover: {
background: "#9e9e9e", background: "#4285f4",
}, },
active: {}, active: {},
selected: {}, selected: {},

View File

@ -204,7 +204,7 @@ const createScreen = (table, heading) => ({
}, },
hover: { hover: {
background: "transparent", background: "transparent",
color: "#000000", color: "#4285f4",
}, },
active: {}, active: {},
selected: {}, selected: {},
@ -246,7 +246,7 @@ const createScreen = (table, heading) => ({
"font-size": "14px", "font-size": "14px",
}, },
hover: { hover: {
background: "#9e9e9e", background: "#4285f4",
}, },
active: {}, active: {},
selected: {}, selected: {},

View File

@ -12,7 +12,7 @@ export const ROW_LIST_TEMPLATE = "ROW_LIST_TEMPLATE"
const createScreen = table => ({ const createScreen = table => ({
props: { props: {
_id: "", _id: "c7365379815e4457dbe703a886c2da43b",
_component: "@budibase/standard-components/container", _component: "@budibase/standard-components/container",
_styles: { _styles: {
normal: {}, normal: {},
@ -23,14 +23,23 @@ const createScreen = table => ({
type: "div", type: "div",
_children: [ _children: [
{ {
_id: "", _id: "cf51241fc063d4d87be032dd509fe0244",
_component: "@budibase/standard-components/container", _component: "@budibase/standard-components/container",
_styles: { _styles: {
normal: { normal: {
display: "flex", background: "white",
"flex-direction": "row", "border-radius": "0.5rem",
"justify-content": "space-between", "box-shadow": "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
"align-items": "center", margin: "auto",
"margin-top": "20px",
"border-width": "2px",
"border-color": "rgba(0, 0, 0, 0.1)",
"border-style": "None",
"padding-top": "48px",
"padding-bottom": "48px",
"padding-right": "48px",
"padding-left": "48px",
"margin-bottom": "20px",
}, },
hover: {}, hover: {},
active: {}, active: {},
@ -40,69 +49,114 @@ const createScreen = table => ({
className: "", className: "",
onLoad: [], onLoad: [],
type: "div", type: "div",
_instanceName: "Header", _instanceId: "inst_app_8fb_631af42f9dc94da2b5c48dc6c5124610",
_instanceName: "Container",
_children: [ _children: [
{ {
_id: "", _id: "c73294c301fd145aabe9bbbbd96a150ac",
_component: "@budibase/standard-components/heading", _component: "@budibase/standard-components/container",
_styles: { _styles: {
normal: {}, normal: {
display: "flex",
"flex-direction": "row",
"justify-content": "space-between",
"align-items": "center",
"margin-bottom": "32px",
},
hover: {}, hover: {},
active: {}, active: {},
selected: {}, selected: {},
}, },
_code: "", _code: "",
className: "", className: "",
text: `${table.name} List`, onLoad: [],
type: "h1", type: "div",
_instanceName: "Heading 1", _instanceId: "inst_app_8fb_631af42f9dc94da2b5c48dc6c5124610",
_children: [], _instanceName: "Title Container",
}, _children: [
{
_id: "",
_component: "@budibase/standard-components/button",
_styles: {
normal: {},
hover: {},
active: {},
selected: {},
},
_code: "",
text: "Create New",
className: "",
disabled: false,
onClick: [
{ {
parameters: { _id: "c2b77901df95a4d1ca7204c58300bc94b",
url: `/${table.name}/new`, _component: "@budibase/standard-components/heading",
_styles: {
normal: {
margin: "0px",
flex: "1 1 auto",
"text-transform": "capitalize",
},
hover: {},
active: {},
selected: {},
}, },
"##eventHandlerType": "Navigate To", _code: "",
className: "",
text: table.name,
type: "h3",
_instanceName: "Title",
_children: [],
},
{
_id: "c12a82d77baf24ca9922ea0af7cd4f723",
_component: "@budibase/standard-components/button",
_styles: {
normal: {
background: "#000000",
"border-width": "0",
"border-style": "None",
color: "#fff",
"font-family": "Inter",
"font-weight": "500",
"font-size": "14px",
},
hover: {
background: "#4285f4",
},
active: {},
selected: {},
},
_code: "",
text: "Create New",
className: "",
disabled: false,
onClick: [
{
parameters: {
url: `/${table.name.toLowerCase()}/new`,
},
"##eventHandlerType": "Navigate To",
},
],
_instanceName: "New Button",
_children: [],
}, },
], ],
_instanceName: "Create New Button", },
{
_id: "ca686a2ed89c943e6bafb63fa66a3ead3",
_component: "@budibase/standard-components/datagrid",
_styles: {
normal: {},
hover: {},
active: {},
selected: {},
},
_code: "",
datasource: {
label: table.name,
name: `all_${table._id}`,
tableId: table._id,
type: "table",
},
editable: false,
theme: "alpine",
height: "540",
pagination: true,
_instanceId: "inst_app_8fb_631af42f9dc94da2b5c48dc6c5124610",
_instanceName: "Grid",
_children: [], _children: [],
detailUrl: `${table.name.toLowerCase()}/:id`,
}, },
], ],
}, },
{
_id: "",
_component: "@budibase/standard-components/datagrid",
_styles: {
normal: {},
hover: {},
active: {},
selected: {},
},
_code: "",
datasource: {
label: "Deals",
name: `all_${table._id}`,
tableId: table._id,
type: "table",
},
_instanceName: `${table.name} Table`,
_children: [],
},
], ],
_instanceName: `${table.name} - List`, _instanceName: `${table.name} - List`,
_code: "", _code: "",