Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit initial files #681

Merged
merged 3 commits into from
Jul 7, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions browser/main/lib/ConfigManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const DEFAULT_CONFIG = {
defaultNote: 'ALWAYS_ASK' // 'ALWAYS_ASK', 'SNIPPET_NOTE', 'MARKDOWN_NOTE'
},
editor: {
theme: 'default',
theme: 'base16-light',
keyMap: 'sublime',
fontSize: '14',
fontFamily: 'Monaco, Consolas',
Expand All @@ -35,7 +35,7 @@ export const DEFAULT_CONFIG = {
preview: {
fontSize: '14',
fontFamily: 'Lato',
codeBlockTheme: 'elegant',
codeBlockTheme: 'dracula',
lineNumber: true
}
}
Expand Down
32 changes: 16 additions & 16 deletions browser/main/modals/InitModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class InitModal extends React.Component {
} else {
return dataApi
.createFolder(data.storage.key, {
color: '#6AA5E9',
color: '#1278BD',
name: 'Default'
})
.then((_data) => {
Expand All @@ -122,19 +122,6 @@ class InitModal extends React.Component {
notes: data.notes
})

let defaultMarkdownNote = dataApi
.createNote(data.storage.key, {
type: 'MARKDOWN_NOTE',
folder: data.storage.folders[0].key,
title: 'Welcome to Boostnote :)',
content: '# Welcome to Boostnote :)\nThis is a markdown note.\n\nClick to edit this note.'
})
.then((note) => {
store.dispatch({
type: 'UPDATE_NOTE',
note: note
})
})
let defaultSnippetNote = dataApi
.createNote(data.storage.key, {
type: 'SNIPPET_NOTE',
Expand All @@ -145,12 +132,12 @@ class InitModal extends React.Component {
{
name: 'example.html',
mode: 'html',
content: '<html>\n<body>\n<h1 id=\'hello\'>Hello World</h1>\n</body>\n</html>'
content: '<html>\n<body>\n<h1 id=\'hello\'>Enjoy Boostnote!</h1>\n</body>\n</html>'
},
{
name: 'example.js',
mode: 'javascript',
content: 'var html = document.getElementById(\'hello\').innerHTML\n\nconsole.log(html)'
content: 'var boostnote = document.getElementById(\'enjoy\').innerHTML\n\nconsole.log(boostnote)'
}
]
})
Expand All @@ -160,6 +147,19 @@ class InitModal extends React.Component {
note: note
})
})
let defaultMarkdownNote = dataApi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any reasons what you moved the variable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it changes order of the first two contents (markdown and snippet).

Before
screen shot 0029-07-07 at 6 37 08 pm

After
screen shot 0029-07-07 at 6 36 59 pm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood

.createNote(data.storage.key, {
type: 'MARKDOWN_NOTE',
folder: data.storage.folders[0].key,
title: 'Welcome to Boostnote!',
content: '# Welcome to Boostnote! \n### _Click to edit this note._\n\n---\n\nBoostnote is an *open source* note-taking app. \nRepository is published on [GitHub](https://github.com/BoostIO/Boostnote), and tweeting everyday on [@Boostnoteapp](https://twitter.com/boostnoteapp)!\n\n## Features \n- [x] No Internet and Registration Required. \n- [ ] Quick search and copy the content of note. `macOS: Cmd + Alt + S / windows: Super + Alt + S` \n- [ ] Markdown & Snippet note. \n- [ ] Available for `vim` and `emacs` mode. \n- [ ] Choose your favorite theme on UI, Editor and Code Block! \n--- \n\n- Copy Codeblock on Makrdown Preview.\n```javascript\nvar boostnote = document.getElementById(\'enjoy\').innerHTML\n\nconsole.log(boostnote)\n```'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

windows: Super + Alt + S

Ctrl?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix💯

})
.then((note) => {
store.dispatch({
type: 'UPDATE_NOTE',
note: note
})
})

return Promise.resolve(defaultSnippetNote)
.then(defaultMarkdownNote)
Expand Down