fix lint issues

This commit is contained in:
Maurits Lourens 2021-07-28 10:19:10 +02:00
parent a17077b25a
commit 5efc80b859
4 changed files with 11 additions and 8 deletions

View File

@ -160,5 +160,4 @@ Cypress.Commands.add("createScreen", (screenName, route) => {
cy.get("input").eq(1).type(route) cy.get("input").eq(1).type(route)
cy.get(".spectrum-Button--cta").click() cy.get(".spectrum-Button--cta").click()
}) })
}) })

View File

@ -84,7 +84,7 @@
if (!event.detail.startsWith("/")) { if (!event.detail.startsWith("/")) {
route = "/" + event.detail route = "/" + event.detail
} }
route = route.replaceAll(' ', '_') route = route.replaceAll(" ", "_")
} }
</script> </script>

View File

@ -22,8 +22,7 @@
let bindingDrawer let bindingDrawer
let anchor let anchor
let valid let valid
let dispatch = createEventDispatcher(); let dispatch = createEventDispatcher()
$: bindableProperties = getBindableProperties( $: bindableProperties = getBindableProperties(
$currentAsset, $currentAsset,
@ -55,9 +54,9 @@
} }
if (typeof innerVal === "string") { if (typeof innerVal === "string") {
dispatch('change', replaceBindings(innerVal)) dispatch("change", replaceBindings(innerVal))
} else { } else {
dispatch('change', innerVal) dispatch("change", innerVal)
} }
} }

View File

@ -11,7 +11,7 @@
export let componentInstance export let componentInstance
function setAssetProps(name, value, parser) { function setAssetProps(name, value, parser) {
if (parser && typeof parser === 'function') { if (parser && typeof parser === "function") {
value = parser(value) value = parser(value)
} }
@ -32,7 +32,12 @@
const screenSettings = [ const screenSettings = [
// { key: "description", label: "Description", control: Input }, // { key: "description", label: "Description", control: Input },
{ key: "routing.route", label: "Route", control: Input, parser: (val) => val.replaceAll(' ', '_') }, {
key: "routing.route",
label: "Route",
control: Input,
parser: val => val.replaceAll(" ", "_"),
},
{ key: "routing.roleId", label: "Access", control: RoleSelect }, { key: "routing.roleId", label: "Access", control: RoleSelect },
{ key: "layoutId", label: "Layout", control: LayoutSelect }, { key: "layoutId", label: "Layout", control: LayoutSelect },
] ]