43 lines
1.2 KiB
JavaScript
43 lines
1.2 KiB
JavaScript
/*
|
|
|
|
I'm imagining a notes app
|
|
|
|
It is styled like an actual notepad, with a dogear in the bottom right. Clicking on the left side of the dog ear goes to the most recent day, clicking right goes through previous days.
|
|
|
|
At the top right is a little hamburger button and a pound symbol button.
|
|
- The hamburger lists all days in an empty note
|
|
- The pound symbol lists all tags in an empty note
|
|
|
|
Middle clicking on a date lists all days in an empty note
|
|
Middle clicking on a tag lists all tags in an empty note
|
|
|
|
An empty note is a note that is not saved
|
|
The current note is stored in window.location.hash
|
|
|
|
Other than opening to the current day on launch, the application actually has no conceptualization of dates or time. It merely alphabetically sorts the files available in the working directory
|
|
|
|
*/
|
|
|
|
/*
|
|
Handles are a public, constant object that merely needs to be passable into device methods to represent a file
|
|
|
|
device.Open must return a File
|
|
*/
|
|
|
|
const modules = [
|
|
'date',
|
|
'editor',
|
|
'fs',
|
|
'list',
|
|
'note',
|
|
'tags',
|
|
'view'
|
|
]
|
|
|
|
;(async () => {
|
|
for(let module of modules) {
|
|
window[module] = await import(`/src/${module}.js`)
|
|
}
|
|
window.device = await import('device').then(m => m.default)
|
|
window.cm = await import('/lib/codemirror.js').then(m => m.default)
|
|
})() |