This commit is contained in:
73
stage.yaml
73
stage.yaml
@@ -1,10 +1,16 @@
|
||||
id: stage
|
||||
type: PageSiderMenu
|
||||
type: PageHeaderMenu
|
||||
properties:
|
||||
title: Stage
|
||||
|
||||
areas:
|
||||
content:
|
||||
blocks:
|
||||
- id: content
|
||||
type: Card
|
||||
layout:
|
||||
size: 800 # Set the size of the card so it does not fill the full screen
|
||||
contentGutter: 16 # Make a 16px gap between all blocks in this card
|
||||
blocks:
|
||||
- id: title
|
||||
type: Title
|
||||
@@ -12,49 +18,30 @@ areas:
|
||||
grow: 1
|
||||
properties:
|
||||
content: Stage
|
||||
- id: new_brand_button # Create a Button block to add a new brand.
|
||||
- id: foo
|
||||
required: true
|
||||
type: TextInput
|
||||
properties:
|
||||
title: Foo
|
||||
placeholder: Bar
|
||||
- id: reset_button
|
||||
type: Button
|
||||
layout:
|
||||
grow: 0 # Because the grow of the button is 0, it will not expand but remain in the same row as the title block.
|
||||
grow: 1
|
||||
properties:
|
||||
title: New Brand # Button text.
|
||||
icon: PlusOutlined # Ant Design icon on the button.
|
||||
events:
|
||||
onClick: # All the actions to complete when the button is clicked.
|
||||
- id: link_to_new_brand # Link to the page where we will add a new brand.
|
||||
type: Link
|
||||
params:
|
||||
pageId: new-brand # The page id of the new brand page.
|
||||
# A List block to render the following brands.
|
||||
# The list block will render a content area all items in the "brands_list" array in state.
|
||||
# The "brands_list" array is populated by the "set_brands" onEnter action.
|
||||
- id: brands_list
|
||||
type: List
|
||||
blocks:
|
||||
- id: brands_list.$.container # Wrap all the blocks for a brands item in a box.
|
||||
type: Box
|
||||
style:
|
||||
background: '#fff' # Give the box a white background and some spacing.
|
||||
margin: 10
|
||||
padding: 10
|
||||
blocks:
|
||||
- id: brands_list.$.name # Show the item name as a title in the list.
|
||||
type: Title
|
||||
properties:
|
||||
content:
|
||||
_state: brands_list.$.name
|
||||
level: 3
|
||||
- id: brands_list.$.description # Show the item description as a paragraph in the list.
|
||||
type: Paragraph
|
||||
properties:
|
||||
content:
|
||||
_state: brands_list.$.description
|
||||
events:
|
||||
title: Reset
|
||||
icon: ClearOutlined
|
||||
block: true
|
||||
type: default
|
||||
actions:
|
||||
onClick:
|
||||
- id: link_to_edit_brand # Link to the page where we will edit the clicked brand.
|
||||
type: Link
|
||||
params:
|
||||
pageId: edit-brand # The page id of the edit brand page.
|
||||
urlQuery:
|
||||
brand_id:
|
||||
_state: brands_list.$._id # Set the brand_id in the url query on the edit-brand page to the _id field of the clicked list item.
|
||||
- id: reset
|
||||
type: reset()
|
||||
- id: start_download
|
||||
type: Button
|
||||
layout:
|
||||
grow: 3
|
||||
properties:
|
||||
title: Download
|
||||
icon: CloudDownloadOutlined
|
||||
block: true
|
||||
|
Reference in New Issue
Block a user