mirror of
https://github.com/heyman/heynote.git
synced 2025-06-20 09:37:50 +02:00
Use different initial content for development/release
#build
This commit is contained in:
parent
895bd4eccc
commit
996d4338ce
@ -63,7 +63,7 @@ async function createWindow() {
|
||||
//nativeTheme.themeSource = "light"
|
||||
|
||||
if (process.env.VITE_DEV_SERVER_URL) { // electron-vite-vue#298
|
||||
win.loadURL(url)
|
||||
win.loadURL(url + '?dev=1')
|
||||
// Open devTool if the app is not packaged
|
||||
//win.webContents.openDevTools()
|
||||
} else {
|
||||
|
@ -2,7 +2,7 @@
|
||||
import HelloWorld from './components/HelloWorld.vue'
|
||||
import StatusBar from './components/StatusBar.vue'
|
||||
import Editor from './components/Editor.vue'
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -20,6 +20,7 @@
|
||||
theme: window.darkMode.initial,
|
||||
initialTheme: window.darkMode.initial,
|
||||
systemTheme: 'system',
|
||||
development: window.location.href.indexOf("dev=1") !== -1,
|
||||
}
|
||||
},
|
||||
|
||||
@ -66,6 +67,7 @@
|
||||
<Editor
|
||||
@cursorChange="onCursorChange"
|
||||
:theme="theme"
|
||||
:development="development"
|
||||
class="editor"
|
||||
/>
|
||||
<StatusBar
|
||||
|
@ -1,11 +1,22 @@
|
||||
<script>
|
||||
import { ref, shallowRef } from 'vue'
|
||||
import { HeynoteEditor } from '../editor/editor.js'
|
||||
import initialData from "../editor/fixture.js"
|
||||
import testContent from "../editor/fixture.js"
|
||||
|
||||
const initialContent = `
|
||||
∞∞∞text-a
|
||||
Welcome to Heynote!
|
||||
|
||||
[⌘ + Enter] Insert new note block
|
||||
[⌘ + A] Select all text in a note block. Press again to select the whole scratchpad
|
||||
[⌘ + ⌥ + Up/Down] Add additional cursor above/below
|
||||
∞∞∞text-a
|
||||
`
|
||||
|
||||
export default {
|
||||
props: [
|
||||
"theme",
|
||||
"development",
|
||||
],
|
||||
mounted() {
|
||||
this.$refs.editor.addEventListener("selectionChange", (e) => {
|
||||
@ -19,8 +30,7 @@
|
||||
|
||||
this.editor = new HeynoteEditor({
|
||||
element: this.$refs.editor,
|
||||
//content: "\n∞∞∞text\n",
|
||||
content: initialData,
|
||||
content: this.development ? testContent : initialContent,
|
||||
theme: this.theme,
|
||||
})
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user