2023-11-27 18:48:37 +03:00
|
|
|
<script setup lang="ts">
|
2024-01-18 16:45:18 +03:00
|
|
|
import { computed, onMounted } from 'vue'
|
2023-12-15 13:29:15 +03:00
|
|
|
import { getMainFile, setMainFile } from '../mock/engine'
|
2023-11-27 18:48:37 +03:00
|
|
|
import App from '../src/App.vue'
|
2024-01-18 16:45:18 +03:00
|
|
|
import { useGraphStore } from '../src/stores/graph'
|
2023-11-27 18:48:37 +03:00
|
|
|
import MockProjectStoreWrapper from '../stories/MockProjectStoreWrapper.vue'
|
|
|
|
|
|
|
|
const mainFile = computed({
|
|
|
|
get() {
|
|
|
|
return getMainFile()
|
|
|
|
},
|
|
|
|
set(value) {
|
|
|
|
setMainFile(value)
|
|
|
|
},
|
|
|
|
})
|
2024-01-18 16:45:18 +03:00
|
|
|
|
|
|
|
const graphStore = useGraphStore()
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
const window_ = window as any
|
|
|
|
window_.mockExpressionUpdate = graphStore.mockExpressionUpdate
|
2024-03-14 15:27:15 +03:00
|
|
|
// Mock FileBrowserApi that is usually provided by Electron.
|
|
|
|
window_.fileBrowserApi = {
|
|
|
|
openFileBrowser: async () => {
|
|
|
|
return ['/path/to/some/mock/file']
|
|
|
|
},
|
|
|
|
}
|
2024-01-18 16:45:18 +03:00
|
|
|
})
|
2023-11-27 18:48:37 +03:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2023-12-08 21:45:42 +03:00
|
|
|
<MockProjectStoreWrapper v-model="mainFile">
|
2023-12-21 18:04:30 +03:00
|
|
|
<App :config="{}" :accessToken="''" :metadata="{}" :unrecognizedOptions="[]" />
|
2023-12-08 21:45:42 +03:00
|
|
|
</MockProjectStoreWrapper>
|
2023-11-27 18:48:37 +03:00
|
|
|
</template>
|
|
|
|
|
2024-03-06 18:34:07 +03:00
|
|
|
<style>
|
|
|
|
:deep(.viewport) {
|
2023-11-27 18:48:37 +03:00
|
|
|
color: var(--color-text);
|
2023-12-08 21:45:42 +03:00
|
|
|
font-family: var(--font-code);
|
2023-11-27 18:48:37 +03:00
|
|
|
font-size: 11.5px;
|
|
|
|
font-weight: 500;
|
|
|
|
line-height: 20px;
|
|
|
|
text-rendering: optimizeLegibility;
|
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
|
height: 100vh;
|
|
|
|
}
|
|
|
|
</style>
|