diff --git a/docs/ilse.html b/docs/ilse.html index 5abdd93..ac9e9a6 100644 --- a/docs/ilse.html +++ b/docs/ilse.html @@ -180,7 +180,7 @@

Augmenting Human Cognition

What

-

It's an application for the Vitruvian Brain Framework.

+

It's an application for the Pax Cerabrum .

To Summarize, it's a tool for aiding Human Cognition.

To learn new things better. To remember what we have already leaned. To think and elaborate more deeply on important concepts and ultimately, increase creative output & self realization.

@@ -584,7 +584,7 @@

Documentation

Standard

- +
diff --git a/docs/vitruvian-brain.html b/docs/pax-cerebrum.html similarity index 96% rename from docs/vitruvian-brain.html rename to docs/pax-cerebrum.html index 18c0b69..1a6dde5 100644 --- a/docs/vitruvian-brain.html +++ b/docs/pax-cerebrum.html @@ -3,7 +3,7 @@ - Vitruvian Brain + Pax Cerebrum @@ -248,7 +248,7 @@
-

Vitruvian Brain

+

Pax Cerebrum

Augmenting Human Cognition

@@ -301,7 +301,7 @@

One of the first one to attempt to construct a tool for agmenting cognition was Pietr Wozniack with the creation of Supermemo, in which both Spaced Repetition and then Incremental Reading were implemented in.


-

Vitruvian Brain aims to be an avolution to those concepts first explored by Supermemo, by improving Upon them by: Removing unecessary jargon, simpler UI and universal access with a standard and not a tool itself altought ilse is a concrete implementation itself.

+

Pax Cerebrum aims to be an avolution to those concepts first explored by Supermemo, by improving Upon them by: Removing unecessary jargon, simpler UI and universal access with a standard and not a tool itself altought ilse is a concrete implementation itself.

@@ -359,7 +359,7 @@

Standard

- +
diff --git a/javascript/web/src/App.vue b/javascript/web/src/App.vue index dd0e330..a160a14 100644 --- a/javascript/web/src/App.vue +++ b/javascript/web/src/App.vue @@ -189,6 +189,25 @@ input[type=range]::-webkit-slider-runnable-track { color: #698b99; } +.left-sidebar { + min-height: 80vh; + border-radius: var( --border-radius ); + /*width: 50%;*/ + flex-basis: 70%; + background-color: var( --secondary-background-color ); + padding: var( --padding ); +} + +.right-sidebar { + min-height: 80vh; + border-radius: var( --border-radius ); + /*width: 50%;*/ + flex-basis: 70%; + background-color: var( --secondary-background-color ); + padding: var( --padding ); +} + + /* ![[Ilse]] */ .file-embed { margin-left: 10px; diff --git a/javascript/web/src/assets/images/dice-3.svg b/javascript/web/src/assets/images/dice-3.svg new file mode 100644 index 0000000..f1e01ee --- /dev/null +++ b/javascript/web/src/assets/images/dice-3.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/javascript/web/src/classes/Commands.js b/javascript/web/src/classes/Commands.js index 6d525f2..7130338 100644 --- a/javascript/web/src/classes/Commands.js +++ b/javascript/web/src/classes/Commands.js @@ -562,15 +562,6 @@ class Commands { }, */ - { - id: "toggle-home-page", - fn: async function() { - ilse.is_home_page_on = !ilse.is_home_page_on - }, - description: "Toggle Home Page", - name: "Toggle Home Page", - }, - { id: "toggle-resize-mode", fn: async function() { @@ -647,7 +638,23 @@ class Commands { name: "Import Plugin from URL", }, + { + id: "toggle-left-sidebar", + fn: async function() { + ilse.is_left_sidebar_open = !ilse.is_left_sidebar_open + }, + description: "Toggle Left Sidebar", + name: "Toggle Left Sidebar", + }, + { + id: "toggle-right-sidebar", + fn: async function() { + ilse.is_right_sidebar_open = !ilse.is_right_sidebar_open + }, + description: "Toggle Right Sidebar", + name: "Toggle Right Sidebar", + }, ] this.add_components_commands() diff --git a/javascript/web/src/classes/Ilse.js b/javascript/web/src/classes/Ilse.js index 7788c9d..27a5b74 100644 --- a/javascript/web/src/classes/Ilse.js +++ b/javascript/web/src/classes/Ilse.js @@ -81,6 +81,8 @@ export default class Ilse { this.tried_too_fast = false this.is_vitruvian_expanded = false this.is_home_page_on = false + this.is_left_sidebar_open = false + this.is_right_sidebar_open = false this.style = "" this.platform = process.env.VUE_APP_TARGET.toLowerCase() diff --git a/javascript/web/src/classes/KeyboardShortcut.js b/javascript/web/src/classes/KeyboardShortcut.js index f93ee50..4f39fe0 100644 --- a/javascript/web/src/classes/KeyboardShortcut.js +++ b/javascript/web/src/classes/KeyboardShortcut.js @@ -70,13 +70,16 @@ class KeyboardShortcut { { combo: "ctrl+space i d", command: "toggle-dark-mode" }, { combo: "ctrl+space i z", command: "toggle-zen-mode" }, + { combo: "ctrl+space i l", command: "toggle-left-sidebar" }, { combo: "ctrl+space i e", command: "open-make-extention-modal" }, { combo: "ctrl+space i p i", command: "import-plugin-from-url" }, { combo: "ctrl+space v t", command: "open-note-on-a-table-pan" }, { combo: "ctrl+space v shift+m", command: "open-note-on-a-memex" }, - { combo: "ctrl+h", command: "toggle-home-page" }, + { combo: "ctrl+space tab", command: "toggle-left-sidebar" }, + { combo: "ctrl+space shift+tab", command: "toggle-right-sidebar" }, + // { combo: "shift+/", command: "open-help" }, // ctrl-shift-/ = ctrl-? { combo: "ctrl+space (", command: "void" }, @@ -279,6 +282,7 @@ class KeyboardShortcut { // Mousetrap.bindGlobal( combo, (event, combo ) => { this.Mousetrap.bindGlobal( combo, (event, combo ) => { + event.preventDefault() ilse.commands.run( key.command ) }, 'keydown' ) diff --git a/javascript/web/src/classes/Note.js b/javascript/web/src/classes/Note.js index 13d81f5..01bece1 100644 --- a/javascript/web/src/classes/Note.js +++ b/javascript/web/src/classes/Note.js @@ -24,7 +24,7 @@ export default class note { this.id = this.id.trim() // " 20220124102749" -> "20220124102749" this.id = this.id.substr( 0, 14 ) // 20220124102749: This is the [[Writing]] -> 20220124102749 this.id = this.id.replace(":", "") - if( this.id.length !== 14 ) this.id = `${this.id}0` // BUGFIX + if( this.id.length < 14 ) this.id = `${this.id}0` // BUGFIX this.content = this.$raw this.content = this.content.trim() // " 20220124102749: Example [[Writing]]" -> "20220124102749: Example [[Writing]]" @@ -76,10 +76,12 @@ export default class note { let is_move_right = number > 0 let note + printf( "before -> this.$raw -> ", this.$raw ) if( is_move_right ) { let spaces = ilse.utils.get_depth_spaces( this.depth + number ) note = `${spaces}${this.id}: ${this.content}` + printf( "note -> ", note ) setTimeout( () => { this.focus() }, 100 ) this.constructor( note ) @@ -87,6 +89,7 @@ export default class note { let spaces = ilse.utils.get_depth_spaces( this.depth + number ) note = `${spaces}${this.id}: ${this.content}` + printf( "note -> ", note ) setTimeout( () => { this.focus() }, 100 ) this.constructor( note ) diff --git a/javascript/web/src/classes/Notes.js b/javascript/web/src/classes/Notes.js index 9e05ac2..f3f9797 100644 --- a/javascript/web/src/classes/Notes.js +++ b/javascript/web/src/classes/Notes.js @@ -249,6 +249,9 @@ export default class Notes { query( q = "" ) { + // FEATURE: O(n) + if( q === "" ) return this.list + let has_match = false let result = [] let list = this.list @@ -396,9 +399,7 @@ export default class Notes { get_references( string ) { - printf( "string -> ", string ) let chunks = string.split(" ") - printf( "chunks -> ", chunks ) let has_opening_parenthesis let has_closing_parenthesis let has_both @@ -410,7 +411,6 @@ export default class Notes { has_closing_parenthesis = chunk.indexOf( "))" ) !== -1 has_both = has_opening_parenthesis && has_closing_parenthesis - if( has_both ) printf( "chunk -> ", chunk ) if( has_both ) ref = chunk.replace( " ", "" ).replace( "((", "" ).replace( "))", "" ) } diff --git a/javascript/web/src/classes/Types.js b/javascript/web/src/classes/Types.js index d3f5441..7392e4d 100644 --- a/javascript/web/src/classes/Types.js +++ b/javascript/web/src/classes/Types.js @@ -576,6 +576,42 @@ class componentTypes { } }) + this.add({ + id: "random-note", + name: "RandomNote", + description: "Get a random note, a random note from query or a random note from a file", + img: require("@/assets/images/dice-3.svg"), + type: "vue", + component: require("@/components/RandomNote.vue"), + props: { + is_internal: true, + } + }) + + this.add({ + id: "left-sidebar", + name: "LeftSidebar", + description: "Left Sidebar is the component thatt embeds inside the left sidebar", + img: require("@/assets/images/arrow-narrow-left.svg"), + type: "vue", + component: require("@/components/LeftSidebar.vue"), + props: { + is_internal: true, + } + }) + + this.add({ + id: "right-sidebar", + name: "RightSidebar", + description: "Right Sidebar is the component thatt embeds inside the right sidebar", + img: require("@/assets/images/arrow-narrow-right.svg"), + type: "vue", + component: require("@/components/RightSidebar.vue"), + props: { + is_internal: true, + } + }) + } get( id ) { diff --git a/javascript/web/src/components/Components.vue b/javascript/web/src/components/Components.vue index 13c7ef8..dec3e23 100644 --- a/javascript/web/src/components/Components.vue +++ b/javascript/web/src/components/Components.vue @@ -2,9 +2,14 @@ .components-wrapper .components( style="display: flex; flex-direction: row;" :key="components_key" ) + + Component.left-sidebar( v-show="ilse.is_left_sidebar_open" :component="get_left_sidebar()" :options="{ hide_bullet: true }" :style="get_component_style(get_left_sidebar())" ) + .component( v-show="components.length && component.is_on" v-for="(component, component_index) in components" :key="uniqueKey + component.id" :style="get_component_style(component)" :component="component" ) Component( :component="component" :style="get_component_style_2()" ) + Component.right-sidebar( v-show="ilse.is_right_sidebar_open" :component="get_right_sidebar()" :options="{ hide_bullet: true }" :style="get_component_style(get_right_sidebar())" ) + .no-components( v-if="!components.length" style="flex-direction: column; height: 89vh; overflow: hidden !important; " ) .centered( style="" ) h1.is-size-1 {{ $t('no_components') }} @@ -47,6 +52,19 @@ export default { methods: { + get_left_sidebar() { + let c = { 'id': 'left-sidebar', 'width': 12, 'is_on': true, 'type': 'left-sidebar', 'props': {} } + let component = new ilse.classes.Component( c ) + return component + }, + + get_right_sidebar() { + let c = { 'id': 'right-sidebar', 'width': 12, 'is_on': true, 'type': 'right-sidebar', 'props': {} } + printf( "right -> c- > ", c ) + let component = new ilse.classes.Component( c ) + return component + }, + get_component_style_2() { let style = `` diff --git a/javascript/web/src/components/Draw.vue b/javascript/web/src/components/Draw.vue index 093954a..42db7c7 100644 --- a/javascript/web/src/components/Draw.vue +++ b/javascript/web/src/components/Draw.vue @@ -1,6 +1,6 @@ diff --git a/javascript/web/src/components/Note.vue b/javascript/web/src/components/Note.vue index b530f2a..a37615b 100644 --- a/javascript/web/src/components/Note.vue +++ b/javascript/web/src/components/Note.vue @@ -603,7 +603,8 @@ input:focus{ } .editable { - background: var( --background-color ); + /*background: var( --background-color );*/ + background: transparent; color: var( --text-color ); width: 100%; margin: 0 !important; @@ -631,7 +632,7 @@ input:focus{ text-align: center; cursor: pointer; color: #a3a3a3; - color: var(--text-color); + color: var( --text-color ); /*font-size: 1pc;*/ font-size: 1.5em; cursor: pointer; diff --git a/javascript/web/src/components/RandomNote.vue b/javascript/web/src/components/RandomNote.vue new file mode 100644 index 0000000..316ba9d --- /dev/null +++ b/javascript/web/src/components/RandomNote.vue @@ -0,0 +1,76 @@ + + + diff --git a/javascript/web/src/components/RightSidebar.vue b/javascript/web/src/components/RightSidebar.vue new file mode 100644 index 0000000..7c30592 --- /dev/null +++ b/javascript/web/src/components/RightSidebar.vue @@ -0,0 +1,91 @@ + + + diff --git a/javascript/web/src/components/TopMenu.vue b/javascript/web/src/components/TopMenu.vue index d0222bd..e8a99d6 100644 --- a/javascript/web/src/components/TopMenu.vue +++ b/javascript/web/src/components/TopMenu.vue @@ -1,8 +1,10 @@