Merge pull request #1235 from Budibase/cleanup/remove-unused-code

Removes unused code across the builder
This commit is contained in:
Kevin Åberg Kultalahti 2021-03-02 08:57:59 +01:00 committed by GitHub
commit a077cf6cec
29 changed files with 4 additions and 163 deletions

View File

@ -2,10 +2,6 @@
import AutomationList from "./AutomationList.svelte"
import CreateAutomationModal from "./CreateAutomationModal.svelte"
import { Modal } from "@budibase/bbui"
import { automationStore, backendUiStore } from "builderStore"
import { notifier } from "builderStore/store/notifications"
let selectedTab = "AUTOMATIONS"
let modal
</script>
@ -40,12 +36,4 @@
cursor: pointer;
color: var(--blue);
}
span:not(.selected) {
color: var(--grey-5);
}
span:not(.selected):hover {
color: var(--ink);
}
</style>

View File

@ -8,13 +8,6 @@
$: valid = !!name
$: instanceId = $backendUiStore.selectedDatabase._id
$: appId = $store.appId
function sleep(ms) {
return new Promise(resolve => {
setTimeout(resolve, ms)
})
}
async function createAutomation() {
await automationStore.actions.create({

View File

@ -60,29 +60,4 @@
div.icon i {
font-size: 16px;
}
ul {
list-style: none;
margin: 0;
padding: var(--spacing-s) 0;
}
li {
display: flex;
font-family: var(--font-sans);
font-size: var(--font-size-xs);
color: var(--ink);
padding: var(--spacing-s) var(--spacing-m);
margin: auto 0;
align-items: center;
cursor: pointer;
}
li:hover {
background-color: var(--grey-2);
}
li:active {
color: var(--blue);
}
</style>

View File

@ -92,9 +92,6 @@
text-align: center;
color: var(--blue);
}
h5 {
margin: 0;
}
code {
padding: 1px 4px 1px 4px;
font-size: 14px;

View File

@ -246,10 +246,6 @@
color: var(--ink);
}
tbody tr:hover {
background: var(--grey-1);
}
:global(.ag-filter) {
background: var(--background);
padding: var(--spacing-s);

View File

@ -28,10 +28,6 @@
title="Confirm Deletion" />
<style>
.ri-delete-bin-line:hover {
cursor: pointer;
}
div {
display: flex;
justify-content: center;

View File

@ -1,5 +1,5 @@
<script>
import { Button, Input, Select } from "@budibase/bbui"
import { Button, Select } from "@budibase/bbui"
import { backendUiStore } from "builderStore"
import { notifier } from "builderStore/store/notifications"
import analytics from "analytics"

View File

@ -1,5 +1,5 @@
<script>
import { Button, Input, Select } from "@budibase/bbui"
import { Button, Input } from "@budibase/bbui"
import { goto } from "@sveltech/routify"
import { backendUiStore } from "builderStore"
import { notifier } from "builderStore/store/notifications"

View File

@ -1,5 +1,4 @@
<script>
import api from "builderStore/api"
import { Button, Select } from "@budibase/bbui"
import download from "downloadjs"

View File

@ -1,5 +1,5 @@
<script>
import { Button, Input, Select } from "@budibase/bbui"
import { Button, Select } from "@budibase/bbui"
import { backendUiStore } from "builderStore"
import { notifier } from "builderStore/store/notifications"
import { FIELDS } from "constants/backend"

View File

@ -1,8 +1,5 @@
<script>
import { onMount } from "svelte"
import { backendUiStore } from "builderStore"
import { Roles } from "constants/backend"
import api from "builderStore/api"
import { notifier } from "builderStore/store/notifications"
import { Button, Label, Input, Select, Spacer } from "@budibase/bbui"

View File

@ -2,17 +2,11 @@
import { onMount } from "svelte"
import { goto } from "@sveltech/routify"
import { backendUiStore } from "builderStore"
import { TableNames } from "constants"
import CreateDatasourceModal from "./modals/CreateDatasourceModal.svelte"
import EditDatasourcePopover from "./popovers/EditDatasourcePopover.svelte"
import EditQueryPopover from "./popovers/EditQueryPopover.svelte"
import { Modal, Switcher } from "@budibase/bbui"
import NavItem from "components/common/NavItem.svelte"
import ICONS from "./icons"
$: selectedView =
$backendUiStore.selectedView && $backendUiStore.selectedView.name
function selectDatasource(datasource) {
backendUiStore.actions.datasources.select(datasource._id)
$goto(`./datasource/${datasource._id}`)

View File

@ -1,9 +1,6 @@
<script>
import { onMount } from "svelte"
import { backendUiStore } from "builderStore"
import api from "builderStore/api"
import { Input, Label, TextArea, Spacer } from "@budibase/bbui"
import KeyValueBuilder from "components/integration/KeyValueBuilder.svelte"
import ICONS from "../icons"
export let integration = {}

View File

@ -6,13 +6,10 @@
import TableIntegrationMenu from "../TableIntegrationMenu/index.svelte"
import analytics from "analytics"
let modal
let error = ""
let name
let source
let integration
let datasource
function checkValid(evt) {
const datasourceName = evt.target.value

View File

@ -16,8 +16,6 @@
let templateScreens
let willBeDeleted
$: fields = Object.keys(table.schema)
function showEditor() {
editing = true
}

View File

@ -2,7 +2,6 @@
import { get } from "svelte/store"
import { store, currentAsset } from "builderStore"
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
import { last } from "lodash/fp"
import { findComponentParent } from "builderStore/storeUtils"
import { DropdownMenu } from "@budibase/bbui"
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
@ -17,16 +16,10 @@
$: noChildrenAllowed = !component || !definition?.hasChildren
$: noPaste = !$store.componentToPaste
const lastPartOfName = c => (c ? last(c._component.split("/")) : "")
const hideDropdown = () => {
dropdown.hide()
}
const selectComponent = component => {
store.actions.components.select(component)
}
const moveUpComponent = () => {
const asset = get(currentAsset)
const parent = findComponentParent(asset.props, component._id)

View File

@ -31,7 +31,6 @@
const templateChanged = newTemplateIndex => {
if (newTemplateIndex === undefined) return
const template = templates[newTemplateIndex]
draftScreen = templates[newTemplateIndex].create()
if (draftScreen.props._instanceName) {
name = draftScreen.props._instanceName

View File

@ -176,17 +176,6 @@
padding: var(--spacing-l);
}
a {
flex: 1;
color: var(--grey-5);
font-size: var(--font-size-s);
text-decoration: none;
}
a:hover {
color: var(--blue);
}
i:hover {
color: var(--red);
cursor: pointer;

View File

@ -1,7 +1,6 @@
<script context="module">
import iconData from "./icons.js"
const categories = Object.keys(iconData)
const icons = Object.keys(iconData).reduce(
(acc, cat) => [...acc, ...Object.keys(iconData[cat])],
[]

View File

@ -3,8 +3,6 @@
import { backendUiStore } from "builderStore"
export let value
let roles = []
</script>
<Select bind:value extraThin secondary on:change>

View File

@ -3,7 +3,6 @@
import { Label, Spacer } from "@budibase/bbui"
import { onMount, createEventDispatcher } from "svelte"
import { themeStore } from "builderStore"
import { handlebarsCompletions } from "constants/completions"
const dispatch = createEventDispatcher()
@ -21,13 +20,6 @@
export let editorHeight = 500
// export let parameters = []
let completions = handlebarsCompletions()
// $: completions = parameters.map(param => ({
// text: `{{ ${param.name} }}`,
// displayText: param.name,
// }))
let width
let height

View File

@ -7,9 +7,6 @@
export let schema
export let editable
let draftField = {}
$: fieldKeys = Object.keys(fields)
$: schemaKeys = Object.keys(schema.fields)
function updateCustomFields({ detail }) {

View File

@ -43,12 +43,7 @@
.topnavitemright:hover i {
color: var(--ink);
}
h5 {
margin: 0;
font-weight: 500;
}
.content {
padding: var(--spacing-xl);
}

View File

@ -61,11 +61,4 @@
.card-footer {
margin-top: var(--spacing-m);
}
h3 {
font-size: var(--font-size-l);
font-weight: 600;
color: var(--ink);
text-transform: capitalize;
}
</style>

View File

@ -130,11 +130,6 @@
border-bottom: 1px solid var(--grey-2);
}
.content > div {
height: 100%;
width: 100%;
}
.toprightnav {
display: flex;
flex-direction: row;

View File

@ -1,11 +1,8 @@
<script>
import { params } from "@sveltech/routify"
import { backendUiStore } from "builderStore"
import { Switcher } from "@budibase/bbui"
import QueryInterface from "components/integration/QueryViewer.svelte"
let query
async function fetchQueryConfig() {
try {
const response = await api.get(`/api/integrations/${datasource.source}`)

View File

@ -135,11 +135,6 @@
margin: 0 auto;
}
h5 {
margin: 0 !important;
font-size: var(--font-size-l);
}
.query-header {
display: flex;
flex-direction: row;

View File

@ -202,31 +202,4 @@
gap: var(--spacing-l);
padding: var(--spacing-l) var(--spacing-xl);
}
.binding-drawer-container {
height: 50vh;
position: absolute;
bottom: 0;
width: 100%;
background: var(--background);
padding: var(--spacing-xl);
}
.nav-group-header > div:nth-child(1) {
padding: 0rem 0.5rem 0rem 0rem;
vertical-align: bottom;
grid-column-start: icon;
margin-right: 5px;
}
.nav-group-header > div:nth-child(3) {
vertical-align: bottom;
grid-column-start: button;
cursor: pointer;
color: var(--blue);
}
.nav-group-header > div:nth-child(3):hover {
color: var(--blue);
}
</style>

View File

@ -8,7 +8,6 @@
import TemplateList from "components/start/TemplateList.svelte"
import analytics from "analytics"
let promise = getApps()
let hasKey
let template
let modal