Merge pull request #13 from Budibase/UI-changes-to-actions/triggers/accesslevels

UI changes to actions/triggers/userAccess
This commit is contained in:
Michael Shanks 2019-09-20 03:23:42 +00:00 committed by GitHub
commit 6cffd5fd56
7 changed files with 90 additions and 44 deletions

View File

@ -100,16 +100,19 @@ const getPermissionsString = perms => {
<style> <style>
.root { .root {
padding:10px; height: 100%;
position: relative;
padding: 1.5rem;
} }
.edit-button { .actions-header {
cursor:pointer; flex: 0 1 auto;
color: var(--white);
} }
tr:hover .edit-button { .node-view {
color: var(--secondary75); overflow-y: auto;
flex: 1 1 auto;
} }

View File

@ -81,8 +81,8 @@ const cancel = () => {
<div class=" uk-form-stacked" style="margin-bottom: 20px"> <div class=" uk-form-stacked" style="margin-bottom: 20px">
<label class="uk-form-label">Default Options</label> <label class="uk-form-label">Default Options</label>
<div class="uk-grid-small" uk-grid> <div class="uk-grid-small" uk-grid>
<input class="uk-input uk-width-1-4" placeholder="key" bind:value={optKey} > <input class="uk-input uk-width-1-4 uk-margin-right" placeholder="key" bind:value={optKey} >
<input class="uk-input uk-width-1-4" placeholder="value" bind:value={optValue} > <input class="uk-input uk-width-1-4 uk-margin-right" placeholder="value" bind:value={optValue} >
<Button color="primary-outline uk-width-1-4" on:click={addNewOption}>Add</Button> <Button color="primary-outline uk-width-1-4" on:click={addNewOption}>Add</Button>
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
@ -93,7 +93,7 @@ const cancel = () => {
</div> </div>
<ButtonGroup> <ButtonGroup>
<Button color="primary" grouped on:click={save}>Save</Button> <Button color="secondary" grouped on:click={save}>Save</Button>
<Button color="tertiary" grouped on:click={cancel}>Cancel</Button> <Button color="tertiary" grouped on:click={cancel}>Cancel</Button>
</ButtonGroup> </ButtonGroup>
@ -104,7 +104,12 @@ const cancel = () => {
<style> <style>
.root { .root {
padding: 10px; padding: 2rem;
border-radius: 2rem;
}
.uk-grid-small {
padding: 1rem;
} }
.option-container { .option-container {

View File

@ -45,13 +45,13 @@ let actionEditingFinished = (action) => {
</script> </script>
<h3>Actions</h3> <h3 class="title">Actions</h3>
{#if actionsArray} {#if actionsArray}
<table class="fields-table uk-table uk-table-small"> <table class="fields-table uk-table uk-table-small uk-table-striped">
<thead> <thead>
<tr> <tr>
<th>Description</th> <th >Description</th>
<th>Behaviour Source</th> <th>Behaviour Source</th>
<th>Behaviour Name</th> <th>Behaviour Name</th>
<th>Default Options</th> <th>Default Options</th>
@ -61,10 +61,10 @@ let actionEditingFinished = (action) => {
<tbody> <tbody>
{#each actionsArray as action} {#each actionsArray as action}
<tr> <tr>
<td >{action.name}</td> <td class="table-content">{action.name}</td>
<td >{action.behaviourSource}</td> <td class="table-content">{action.behaviourSource}</td>
<td >{action.behaviourName}</td> <td class="table-content">{action.behaviourName}</td>
<td >{@html getDefaultOptionsHtml(action.initialOptions)}</td> <td class="table-content">{@html getDefaultOptionsHtml(action.initialOptions)}</td>
<td class="edit-button"> <td class="edit-button">
<span on:click={() => onActionEdit(action)}>{@html getIcon("edit")}</span> <span on:click={() => onActionEdit(action)}>{@html getIcon("edit")}</span>
<span on:click={() => onActionDelete(action)}>{@html getIcon("trash")}</span> <span on:click={() => onActionDelete(action)}>{@html getIcon("trash")}</span>
@ -92,12 +92,21 @@ let actionEditingFinished = (action) => {
.edit-button { .edit-button {
cursor:pointer; cursor:pointer;
color: var(--white); color: var(--secondary25);
} }
tr:hover .edit-button { tr:hover .edit-button {
color: var(--secondary75); color: var(--secondary75);
} }
.title {
margin: 3rem 0rem 0rem 0rem;
font-weight: 700;
}
.table-content {
font-weight: 500;
font-size: .9rem;
}
</style> </style>

View File

@ -85,31 +85,45 @@ let onTriggerDelete = (trigger) => {
</script> </script>
<div class="root"> <div class="root">
<div class="actions-header">
<ButtonGroup> <ButtonGroup>
<Button color="primary"
grouped
on:click={newAction}>Create New Action</Button>
<Button color="secondary" <Button color="secondary"
grouped
on:click={newAction}>Create New Action</Button>
<Button color="tertiary"
grouped grouped
on:click={newTrigger}>Create New Trigger</Button> on:click={newTrigger}>Create New Trigger</Button>
</ButtonGroup> </ButtonGroup>
</div>
<Actions {editingActionIsNew} {editingAction} <div class="node-view">
<Actions {editingActionIsNew} {editingAction}
{onActionEdit} {onActionDelete} {onActionSave} {onActionEdit} {onActionDelete} {onActionSave}
{onActionCancel} /> {onActionCancel} />
<Triggers {editingTriggerIsNew} {editingTrigger} <Triggers {editingTriggerIsNew} {editingTrigger}
{onTriggerEdit} {onTriggerDelete} {onTriggerSave} {onTriggerEdit} {onTriggerDelete} {onTriggerSave}
{onTriggerCancel} /> {onTriggerCancel} />
</div>
</div> </div>
<style> <style>
.root { .root {
padding: 10px; height: 100%;
position: relative;
padding: 1.5rem;
} }
.actions-header {
flex: 0 1 auto;
}
.node-view {
overflow-y: auto;
flex: 1 1 auto;
}
</style> </style>

View File

@ -27,10 +27,10 @@ let triggerEditingFinished = (trigger) => {
</script> </script>
<h3>Triggers</h3> <h3 class="title">Triggers</h3>
{#if $store.triggers} {#if $store.triggers}
<table class="fields-table uk-table uk-table-small"> <table class="fields-table uk-table uk-table-small uk-table-striped">
<thead> <thead>
<tr> <tr>
<th>Event</th> <th>Event</th>
@ -43,10 +43,10 @@ let triggerEditingFinished = (trigger) => {
<tbody> <tbody>
{#each $store.triggers as trigger} {#each $store.triggers as trigger}
<tr> <tr>
<td >{trigger.eventName}</td> <td class="table-content">{trigger.eventName}</td>
<td >{trigger.actionName}</td> <td class="table-content">{trigger.actionName}</td>
<td >{trigger.condition}</td> <td class="table-content">{trigger.condition}</td>
<td >{trigger.optionsCreator}</td> <td class="table-content">{trigger.optionsCreator}</td>
<td class="edit-button"> <td class="edit-button">
<span on:click={() => onTriggerEdit(trigger)}>{@html getIcon("edit")}</span> <span on:click={() => onTriggerEdit(trigger)}>{@html getIcon("edit")}</span>
<span on:click={() => onTriggerDelete(trigger)}>{@html getIcon("trash")}</span> <span on:click={() => onTriggerDelete(trigger)}>{@html getIcon("trash")}</span>
@ -74,7 +74,17 @@ let triggerEditingFinished = (trigger) => {
.edit-button { .edit-button {
cursor:pointer; cursor:pointer;
color: var(--white); color: var(--secondary25);
}
.title {
margin: 3rem 0rem 0rem 0rem;
font-weight: 700;
}
.table-content {
font-weight: 500;
font-size: .9rem;
} }
tr:hover .edit-button { tr:hover .edit-button {

View File

@ -34,4 +34,8 @@ $: {
<style> <style>
.uk-modal-dialog {
border-radius: .3rem;
}
</style> </style>

View File

@ -185,12 +185,12 @@ let getTypeOptions = typeOptions =>
} }
.settings-title { .settings-title {
font-weight: 600; font-weight: 700;
} }
.title { .title {
margin: 3rem 0rem 0rem 0rem; margin: 3rem 0rem 0rem 0rem;
font-weight: 600; font-weight: 700;
} }
.recordkey { .recordkey {
@ -210,10 +210,11 @@ let getTypeOptions = typeOptions =>
.edit-button { .edit-button {
cursor:pointer; cursor:pointer;
color: var(--white); color: var(--secondary25);
} }
.edit-button:hover { .edit-button:hover {
cursor:pointer;
color: var(--secondary75); color: var(--secondary75);
} }