61 lines
2.4 KiB
HTML
61 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>graflow</title>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
|
<link type="text/css" rel="stylesheet" href="../../eicui/eicui-2.0.css">
|
|
<link type="text/css" rel="stylesheet" href="../buildoz.css">
|
|
<script src="../buildoz.js"></script>
|
|
<script src="../bzGraflow.js"></script>
|
|
<script src="../bzGraflow-editor.js"></script>
|
|
<style>
|
|
@font-face { /*FF does not indirectly load if inside a shawdow-dom */
|
|
font-family: 'glyphs';
|
|
src: url('/assets/styles/fonts/glyphs.eot');
|
|
src: url('/assets/styles/fonts/glyphs.eot') format('embedded-opentype'),
|
|
url('/assets/styles/fonts/glyphs.ttf') format('truetype'),
|
|
url('/assets/styles/fonts/glyphs.woff') format('woff'),
|
|
url('/assets/styles/fonts/glyphs.svg') format('svg');
|
|
font-weight: normal;
|
|
font-style: normal;
|
|
font-display: block;
|
|
}
|
|
body{
|
|
display: grid;
|
|
grid-gap: 5px;
|
|
background:#888;
|
|
font-size: 16px;
|
|
}
|
|
bz-graflow{
|
|
border: 2px solid black;
|
|
}
|
|
bz-graflow.compunet{ grid-column: 1 / -1; width: 100vw; height: 60vh; background:black; }
|
|
</style>
|
|
<script>
|
|
window.addEventListener('load',()=>{
|
|
const editor = document.querySelector('bz-grafloweditor')
|
|
editor.onImportFlow = async (e) => {
|
|
const fileList = ['testFlow1', 'testFlow2', 'testFlow3']
|
|
const result = await BZModalDialog('Select your flow...', `
|
|
Available flows:
|
|
<select name="flow" style="min-width: 10em;justify-self: center;">
|
|
${fileList.map(file => `<option value="${file}">${file}</option>`).join('')}
|
|
</select>
|
|
`)
|
|
console.log('result', result)
|
|
}
|
|
editor.onExportFlow = (e) => {
|
|
console.log('onExportFlow')
|
|
}
|
|
})
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<bz-grafloweditor nodes="./nodesLib/nodesTest1.html" >
|
|
</bz-grafloweditor>
|
|
</body>
|
|
|
|
</html>
|