fix build by running yarn format

This commit is contained in:
Maurits Lourens 2021-03-23 20:32:22 +01:00
parent 222aae3543
commit 51a5aea4ce
2 changed files with 97 additions and 92 deletions

View File

@ -1,12 +1,12 @@
<script>
import { createEventDispatcher } from 'svelte'
import { createEventDispatcher } from "svelte"
import Colorpicker from "@budibase/colorpicker"
const dispatch = createEventDispatcher();
const dispatch = createEventDispatcher()
export let value
const WAIT = 150;
const WAIT = 150
function throttle(callback, wait, immediate = false) {
let timeout = null
@ -30,9 +30,13 @@
}
}
const onChange = throttle(e => {
dispatch('change', e.detail)
}, WAIT, true)
const onChange = throttle(
e => {
dispatch("change", e.detail)
},
WAIT,
true
)
</script>
<Colorpicker value={value || '#C4C4C4'} on:change={onChange} />

View File

@ -8,7 +8,7 @@ const initialiseBudibase = require("./utilities/initialiseBudibase")
const { budibaseAppsDir } = require("./utilities/budibaseDir")
const { openNewGitHubIssue, debugInfo } = require("electron-util")
const eventEmitter = require("./events")
const isMac = process.platform === 'darwin';
const isMac = process.platform === "darwin"
const budibaseDir = budibaseAppsDir()
const envFile = join(budibaseDir, ".env")
@ -90,108 +90,109 @@ async function startApp() {
const template = [
// { role: 'appMenu' }
...(isMac ? [{
...(isMac
? [
{
label: app.name,
submenu: [
{ role: 'about' },
{ type: 'separator' },
{ role: 'services' },
{ type: 'separator' },
{ role: 'hide' },
{ role: 'hideothers' },
{ role: 'unhide' },
{ type: 'separator' },
{ role: 'quit' }
{ role: "about" },
{ type: "separator" },
{ role: "services" },
{ type: "separator" },
{ role: "hide" },
{ role: "hideothers" },
{ role: "unhide" },
{ type: "separator" },
{ role: "quit" },
],
},
]
}] : []),
: []),
// { role: 'fileMenu' }
{
label: 'File',
submenu: [
isMac ? { role: 'close' } : { role: 'quit' }
]
label: "File",
submenu: [isMac ? { role: "close" } : { role: "quit" }],
},
// { role: 'editMenu' }
{
label: 'Edit',
label: "Edit",
submenu: [
{ role: 'undo' },
{ role: 'redo' },
{ type: 'separator' },
{ role: 'cut' },
{ role: 'copy' },
{ role: 'paste' },
...(isMac ? [
{ role: 'pasteAndMatchStyle' },
{ role: 'delete' },
{ role: 'selectAll' },
{ type: 'separator' },
{ role: "undo" },
{ role: "redo" },
{ type: "separator" },
{ role: "cut" },
{ role: "copy" },
{ role: "paste" },
...(isMac
? [
{ role: "pasteAndMatchStyle" },
{ role: "delete" },
{ role: "selectAll" },
{ type: "separator" },
{
label: 'Speech',
submenu: [
{ role: 'startSpeaking' },
{ role: 'stopSpeaking' }
]
}
] : [
{ role: 'delete' },
{ type: 'separator' },
{ role: 'selectAll' }
])
label: "Speech",
submenu: [{ role: "startSpeaking" }, { role: "stopSpeaking" }],
},
]
: [{ role: "delete" }, { type: "separator" }, { role: "selectAll" }]),
],
},
// { role: 'viewMenu' }
{
label: 'View',
label: "View",
submenu: [
{ role: 'reload' },
{ role: 'forceReload' },
{ role: 'toggleDevTools' },
{ type: 'separator' },
{ role: 'resetZoom' },
{ role: 'zoomIn' },
{ role: 'zoomOut' },
{ type: 'separator' },
{ role: 'togglefullscreen' }
]
{ role: "reload" },
{ role: "forceReload" },
{ role: "toggleDevTools" },
{ type: "separator" },
{ role: "resetZoom" },
{ role: "zoomIn" },
{ role: "zoomOut" },
{ type: "separator" },
{ role: "togglefullscreen" },
],
},
// { role: 'windowMenu' }
{
label: 'Window',
label: "Window",
submenu: [
{ role: 'minimize' },
{ role: 'zoom' },
...(isMac ? [
{ type: 'separator' },
{ role: 'front' },
{ type: 'separator' },
{ role: 'window' }
] : [
{ role: 'close' }
])
{ role: "minimize" },
{ role: "zoom" },
...(isMac
? [
{ type: "separator" },
{ role: "front" },
{ type: "separator" },
{ role: "window" },
]
: [{ role: "close" }]),
],
},
{
role: 'help',
role: "help",
submenu: [
{
label: 'Learn More',
click: () => shell.openExternal('https://www.budibase.com/')
label: "Learn More",
click: () => shell.openExternal("https://www.budibase.com/"),
},
{
label: 'Documentation',
click: () => shell.openExternal('https://docs.budibase.com/')
label: "Documentation",
click: () => shell.openExternal("https://docs.budibase.com/"),
},
{
label: 'Search issues',
click: () => shell.openExternal('https://github.com/Budibase/budibase/issues')
label: "Search issues",
click: () =>
shell.openExternal("https://github.com/Budibase/budibase/issues"),
},
{
label: 'Community discussions',
click: () => shell.openExternal('https://github.com/Budibase/budibase/discussions')
label: "Community discussions",
click: () =>
shell.openExternal(
"https://github.com/Budibase/budibase/discussions"
),
},
],
},
]
}
]
const menu = Menu.buildFromTemplate(template)