lint ✨
This commit is contained in:
parent
780547c1d3
commit
e300134186
|
@ -23,9 +23,7 @@
|
||||||
class="automation-block hoverable"
|
class="automation-block hoverable"
|
||||||
on:click={addBlockToAutomation}
|
on:click={addBlockToAutomation}
|
||||||
data-cy={stepId}>
|
data-cy={stepId}>
|
||||||
<div>
|
<div><i class={blockDefinition.icon} /></div>
|
||||||
<i class={blockDefinition.icon} />
|
|
||||||
</div>
|
|
||||||
<div class="automation-text">
|
<div class="automation-text">
|
||||||
<h4>{blockDefinition.name}</h4>
|
<h4>{blockDefinition.name}</h4>
|
||||||
<p>{blockDefinition.description}</p>
|
<p>{blockDefinition.description}</p>
|
||||||
|
|
|
@ -62,10 +62,7 @@
|
||||||
{#if $automationStore.selectedBlock}
|
{#if $automationStore.selectedBlock}
|
||||||
<AutomationBlockSetup bind:block={$automationStore.selectedBlock} />
|
<AutomationBlockSetup bind:block={$automationStore.selectedBlock} />
|
||||||
{:else if $automationStore.selectedAutomation}
|
{:else if $automationStore.selectedAutomation}
|
||||||
<div class="block-label">
|
<div class="block-label">Automation <b>{automation.name}</b></div>
|
||||||
Automation
|
|
||||||
<b>{automation.name}</b>
|
|
||||||
</div>
|
|
||||||
<Button secondary wide on:click={testAutomation}>Test Automation</Button>
|
<Button secondary wide on:click={testAutomation}>Test Automation</Button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -108,7 +108,8 @@
|
||||||
<div
|
<div
|
||||||
class:link={row[header] && row[header].length}
|
class:link={row[header] && row[header].length}
|
||||||
on:click={() => selectRelationship(row, header)}>
|
on:click={() => selectRelationship(row, header)}>
|
||||||
{row[header] ? row[header].length : 0} related row(s)
|
{row[header] ? row[header].length : 0}
|
||||||
|
related row(s)
|
||||||
</div>
|
</div>
|
||||||
{:else if schema[header].type === 'attachment'}
|
{:else if schema[header].type === 'attachment'}
|
||||||
<AttachmentList files={row[header] || []} />
|
<AttachmentList files={row[header] || []} />
|
||||||
|
|
|
@ -49,9 +49,7 @@
|
||||||
<button class:selected={currentPage === 0} on:click={() => selectPage(0)}>
|
<button class:selected={currentPage === 0} on:click={() => selectPage(0)}>
|
||||||
1
|
1
|
||||||
</button>
|
</button>
|
||||||
{#if currentPage > 3}
|
{#if currentPage > 3}<button disabled>...</button>{/if}
|
||||||
<button disabled>...</button>
|
|
||||||
{/if}
|
|
||||||
{#each pagesAroundCurrent as idx}
|
{#each pagesAroundCurrent as idx}
|
||||||
<button
|
<button
|
||||||
class:selected={idx === currentPage}
|
class:selected={idx === currentPage}
|
||||||
|
@ -59,9 +57,7 @@
|
||||||
{idx + 1}
|
{idx + 1}
|
||||||
</button>
|
</button>
|
||||||
{/each}
|
{/each}
|
||||||
{#if currentPage < numPages - 4}
|
{#if currentPage < numPages - 4}<button disabled>...</button>{/if}
|
||||||
<button disabled>...</button>
|
|
||||||
{/if}
|
|
||||||
<button
|
<button
|
||||||
class:selected={currentPage === numPages - 1}
|
class:selected={currentPage === numPages - 1}
|
||||||
on:click={() => selectPage(numPages - 1)}>
|
on:click={() => selectPage(numPages - 1)}>
|
||||||
|
@ -77,8 +73,13 @@
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{#if numPages > 1}
|
{#if numPages > 1}
|
||||||
Showing {ITEMS_PER_PAGE * currentPage + 1} - {ITEMS_PER_PAGE * currentPage + pageItemCount}
|
Showing
|
||||||
of {data.length} rows
|
{ITEMS_PER_PAGE * currentPage + 1}
|
||||||
|
-
|
||||||
|
{ITEMS_PER_PAGE * currentPage + pageItemCount}
|
||||||
|
of
|
||||||
|
{data.length}
|
||||||
|
rows
|
||||||
{:else if numPages === 1}Showing all {data.length} row(s){/if}
|
{:else if numPages === 1}Showing all {data.length} row(s){/if}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -31,9 +31,7 @@
|
||||||
style="background: {themes[notification.type]};"
|
style="background: {themes[notification.type]};"
|
||||||
transition:fly={{ y: -30 }}>
|
transition:fly={{ y: -30 }}>
|
||||||
<div class="content">{notification.message}</div>
|
<div class="content">{notification.message}</div>
|
||||||
{#if notification.icon}
|
{#if notification.icon}<i class={notification.icon} />{/if}
|
||||||
<i class={notification.icon} />
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,9 +5,7 @@
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="img">
|
<div class="img"><img src="https://picsum.photos/60/60" alt="zoom" /></div>
|
||||||
<img src="https://picsum.photos/60/60" alt="zoom" />
|
|
||||||
</div>
|
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="title">Zoom</div>
|
<div class="title">Zoom</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
<Spacer medium />
|
<Spacer medium />
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
<TextButton text medium blue href="/_builder/{_id}">
|
<TextButton text medium blue href="/_builder/{_id}">
|
||||||
Open {name} →
|
Open
|
||||||
|
{name}
|
||||||
|
→
|
||||||
</TextButton>
|
</TextButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,12 +28,11 @@
|
||||||
<Spacer small />
|
<Spacer small />
|
||||||
<Body medium grey>{template.category}</Body>
|
<Body medium grey>{template.category}</Body>
|
||||||
<Body lh small black>{template.description}</Body>
|
<Body lh small black>{template.description}</Body>
|
||||||
<div>
|
<div><img src={template.image} width="100%" /></div>
|
||||||
<img src={template.image} width="100%" />
|
|
||||||
</div>
|
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
<Button secondary on:click={() => onSelect(template)}>
|
<Button secondary on:click={() => onSelect(template)}>
|
||||||
Create {template.name}
|
Create
|
||||||
|
{template.name}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -99,9 +99,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div bind:this={anchor} on:click|stopPropagation={() => {}}>
|
<div bind:this={anchor} on:click|stopPropagation={() => {}}>
|
||||||
<div class="icon" on:click={dropdown.show}>
|
<div class="icon" on:click={dropdown.show}><i class="ri-more-line" /></div>
|
||||||
<i class="ri-more-line" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu
|
<DropdownMenu
|
||||||
bind:this={dropdown}
|
bind:this={dropdown}
|
||||||
|
|
|
@ -18,9 +18,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="handler-option">
|
<div class="handler-option">
|
||||||
{#if parameter.name === 'automation'}
|
{#if parameter.name === 'automation'}<span>{parameter.name}</span>{/if}
|
||||||
<span>{parameter.name}</span>
|
|
||||||
{/if}
|
|
||||||
{#if parameter.name === 'automation'}
|
{#if parameter.name === 'automation'}
|
||||||
<Select on:change bind:value={parameter.value}>
|
<Select on:change bind:value={parameter.value}>
|
||||||
<option value="" />
|
<option value="" />
|
||||||
|
|
|
@ -126,9 +126,7 @@
|
||||||
on:click={() => switchLetter(letter)}>
|
on:click={() => switchLetter(letter)}>
|
||||||
{letter}
|
{letter}
|
||||||
</span>
|
</span>
|
||||||
{#if idx !== alphabet.length - 1}
|
{#if idx !== alphabet.length - 1}<span>-</span>{/if}
|
||||||
<span>-</span>
|
|
||||||
{/if}
|
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
<div class="search-input">
|
<div class="search-input">
|
||||||
|
|
|
@ -3,9 +3,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div data-cy={item.name} class="item-item" on:click>
|
<div data-cy={item.name} class="item-item" on:click>
|
||||||
<div class="item-icon">
|
<div class="item-icon"><i class={item.icon} /></div>
|
||||||
<i class={item.icon} />
|
|
||||||
</div>
|
|
||||||
<div class="item-text">
|
<div class="item-text">
|
||||||
<div class="item-name">{item.name}</div>
|
<div class="item-name">{item.name}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,9 +7,7 @@
|
||||||
|
|
||||||
{#if $backendUiStore.selectedDatabase._id && selectedTable.name}
|
{#if $backendUiStore.selectedDatabase._id && selectedTable.name}
|
||||||
<TableDataTable />
|
<TableDataTable />
|
||||||
{:else}
|
{:else}<i>Create your first table to start building</i>{/if}
|
||||||
<i>Create your first table to start building</i>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
i {
|
i {
|
||||||
|
|
|
@ -23,9 +23,7 @@
|
||||||
|
|
||||||
{#if $backendUiStore.tables.length === 0}
|
{#if $backendUiStore.tables.length === 0}
|
||||||
<i>Create your first table to start building</i>
|
<i>Create your first table to start building</i>
|
||||||
{:else}
|
{:else}<i>Select a table to edit</i>{/if}
|
||||||
<i>Select a table to edit</i>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
i {
|
i {
|
||||||
|
|
|
@ -7,9 +7,7 @@
|
||||||
|
|
||||||
{#if $backendUiStore.selectedDatabase._id && selectedView}
|
{#if $backendUiStore.selectedDatabase._id && selectedView}
|
||||||
<ViewDataTable view={selectedView} />
|
<ViewDataTable view={selectedView} />
|
||||||
{:else}
|
{:else}<i>Create your first table to start building</i>{/if}
|
||||||
<i>Create your first table to start building</i>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
i {
|
i {
|
||||||
|
|
|
@ -14,7 +14,7 @@ const TABLE_VIEW_BEGINS_WITH = `all${SEPARATOR}${DocumentTypes.TABLE}${SEPARATOR
|
||||||
const CALCULATION_TYPES = {
|
const CALCULATION_TYPES = {
|
||||||
SUM: "sum",
|
SUM: "sum",
|
||||||
COUNT: "count",
|
COUNT: "count",
|
||||||
STATS: "stats"
|
STATS: "stats",
|
||||||
}
|
}
|
||||||
|
|
||||||
validateJs.extend(validateJs.validators.datetime, {
|
validateJs.extend(validateJs.validators.datetime, {
|
||||||
|
|
|
@ -23,9 +23,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div use:cssVars={cssVariables} class="container">
|
<div use:cssVars={cssVariables} class="container">
|
||||||
{#if showImage}
|
{#if showImage}<img class="image" src={imageUrl} alt="" />{/if}
|
||||||
<img class="image" src={imageUrl} alt="" />
|
|
||||||
{/if}
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h2 class="heading">{heading}</h2>
|
<h2 class="heading">{heading}</h2>
|
||||||
<h4 class="text">{description}</h4>
|
<h4 class="text">{description}</h4>
|
||||||
|
|
|
@ -26,9 +26,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div use:cssVars={cssVariables} class="container">
|
<div use:cssVars={cssVariables} class="container">
|
||||||
{#if showImage}
|
{#if showImage}<img class="image" src={imageUrl} alt="" />{/if}
|
||||||
<img class="image" src={imageUrl} alt="" />
|
|
||||||
{/if}
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<main>
|
<main>
|
||||||
<h2 class="heading">{heading}</h2>
|
<h2 class="heading">{heading}</h2>
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
export let files
|
export let files
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<AttachmentList {files} on:delete />
|
<AttachmentList {files} on:delete />
|
||||||
|
|
|
@ -12,7 +12,12 @@
|
||||||
|
|
||||||
import AgGrid from "@budibase/svelte-ag-grid"
|
import AgGrid from "@budibase/svelte-ag-grid"
|
||||||
import CreateRowButton from "./CreateRow/Button.svelte"
|
import CreateRowButton from "./CreateRow/Button.svelte"
|
||||||
import { TextButton as DeleteButton, Icon, Modal, ModalContent } from "@budibase/bbui"
|
import {
|
||||||
|
TextButton as DeleteButton,
|
||||||
|
Icon,
|
||||||
|
Modal,
|
||||||
|
ModalContent,
|
||||||
|
} from "@budibase/bbui"
|
||||||
|
|
||||||
export let _bb
|
export let _bb
|
||||||
export let datasource = {}
|
export let datasource = {}
|
||||||
|
@ -25,7 +30,7 @@
|
||||||
let canEdit = editable && datasource && datasource.type !== "view"
|
let canEdit = editable && datasource && datasource.type !== "view"
|
||||||
let canAddDelete = editable && datasource && datasource.type === "table"
|
let canAddDelete = editable && datasource && datasource.type === "table"
|
||||||
|
|
||||||
let modal;
|
let modal
|
||||||
|
|
||||||
let store = _bb.store
|
let store = _bb.store
|
||||||
let dataLoaded = false
|
let dataLoaded = false
|
||||||
|
@ -137,7 +142,9 @@
|
||||||
{#if selectedRows.length > 0}
|
{#if selectedRows.length > 0}
|
||||||
<DeleteButton text small on:click={modal.show()}>
|
<DeleteButton text small on:click={modal.show()}>
|
||||||
<Icon name="addrow" />
|
<Icon name="addrow" />
|
||||||
Delete {selectedRows.length} row(s)
|
Delete
|
||||||
|
{selectedRows.length}
|
||||||
|
row(s)
|
||||||
</DeleteButton>
|
</DeleteButton>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
@ -151,7 +158,10 @@
|
||||||
on:select={({ detail }) => (selectedRows = detail)} />
|
on:select={({ detail }) => (selectedRows = detail)} />
|
||||||
{/if}
|
{/if}
|
||||||
<Modal bind:this={modal}>
|
<Modal bind:this={modal}>
|
||||||
<ModalContent title="Confirm Row Deletion" confirmText="Delete" onConfirm={deleteRows} >
|
<ModalContent
|
||||||
|
title="Confirm Row Deletion"
|
||||||
|
confirmText="Delete"
|
||||||
|
onConfirm={deleteRows}>
|
||||||
<span>Are you sure you want to delete {selectedRows.length} row(s)?</span>
|
<span>Are you sure you want to delete {selectedRows.length} row(s)?</span>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
|
@ -42,9 +42,7 @@
|
||||||
<div class="root">
|
<div class="root">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{#if logo}
|
{#if logo}
|
||||||
<div class="logo-container">
|
<div class="logo-container"><img src={logo} alt="logo" /></div>
|
||||||
<img src={logo} alt="logo" />
|
|
||||||
</div>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if title}
|
{#if title}
|
||||||
|
|
|
@ -30,9 +30,7 @@
|
||||||
{#if logoUrl}
|
{#if logoUrl}
|
||||||
<img class="logo" alt="logo" src={logoUrl} height="48" />
|
<img class="logo" alt="logo" src={logoUrl} height="48" />
|
||||||
{/if}
|
{/if}
|
||||||
{#if title}
|
{#if title}<span>{title}</span>{/if}
|
||||||
<span>{title}</span>
|
|
||||||
{/if}
|
|
||||||
</a>
|
</a>
|
||||||
<div class="nav__controls">
|
<div class="nav__controls">
|
||||||
<div on:click={logOut}>Log out</div>
|
<div on:click={logOut}>Log out</div>
|
||||||
|
|
|
@ -33,6 +33,4 @@
|
||||||
<sub class={className}>{text}</sub>
|
<sub class={className}>{text}</sub>
|
||||||
{:else if isTag('sup')}
|
{:else if isTag('sup')}
|
||||||
<sup class={className}>{text}</sup>
|
<sup class={className}>{text}</sup>
|
||||||
{:else}
|
{:else}<span>{text}</span>{/if}
|
||||||
<span>{text}</span>
|
|
||||||
{/if}
|
|
||||||
|
|
|
@ -28,9 +28,7 @@
|
||||||
<a href={file.url} target="_blank" class="file">
|
<a href={file.url} target="_blank" class="file">
|
||||||
{#if FILE_TYPES.IMAGE.includes(file.extension.toLowerCase())}
|
{#if FILE_TYPES.IMAGE.includes(file.extension.toLowerCase())}
|
||||||
<img {width} {height} src={file.url} alt="preview of {file.name}" />
|
<img {width} {height} src={file.url} alt="preview of {file.name}" />
|
||||||
{:else}
|
{:else}<i class="far fa-file" />{/if}
|
||||||
<i class="far fa-file" />
|
|
||||||
{/if}
|
|
||||||
</a>
|
</a>
|
||||||
<span>{file.name}</span>
|
<span>{file.name}</span>
|
||||||
<div class="button-placement">
|
<div class="button-placement">
|
||||||
|
|
Loading…
Reference in New Issue