Skip to content

Commit b7b2702

Browse files
committed
normalized names + minor fixed
1 parent c20b582 commit b7b2702

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+757
-561
lines changed

javascript/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ilse-langnar-notebook",
33
"productName": "Ilse Langnar's Notebook",
4-
"version": "1.2.0",
4+
"version": "1.3.0",
55
"private": true,
66
"author": "ilse",
77
"scripts": {

javascript/web/src/App.vue

Lines changed: 59 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
<template lang="pug">
22
#app( v-cloak )
3-
#setup( v-show="!ilse.target_directories.length || !ilse.has_loaded " v-html="ilse.components.setup" )
43

5-
.ilse( v-show="ilse.target_directories.length && ilse.has_loaded" :data-theme="get_data_theme" )
4+
#setup( v-if="!ilse.target_directories.length" v-html="ilse.components.setup" )
65

6+
.ilse( v-if="ilse.target_directories.length" :data-theme="get_data_theme" )
77
.html-render( v-for="( item, index ) in ilse.htmls.list" :key="index" )
88
.div( v-html="item.html" :id="item.id" )
99

1010
// template( x-data="{ list: window.ilse.tabs.list }" x-for="tab in list" x-init=" list = window.ilse.tabs.list" )
1111
// p( x-text="tab" )
1212
// .htmll( x-html="tab" style="overflow: auto;" )
1313
14-
.app( v-show="ilse.has_loaded" :key="ilse.keys.app" )
15-
14+
// .app( v-show="ilse.has_loaded" :key="ilse.keys.app" )
1615
.wrapper( v-for="( tab, tab_index ) in ilse.tabs.list" :key="tab_index" )
1716
.htmll( v-if="ilse.tabs.selected === tab_index" v-html="tab" style="overflow: auto; " )
1817
18+
.app( v-show="ilse.has_loaded" :key="ilse.keys.app" )
19+
.loop( v-for="( tab, tab_index ) in ilse.tabs.list" :key="tab_index" )
20+
.htmll( v-if="tab.is_active" v-html="tab.html" style="overflow: auto; " )
21+
1922
</template>
2023
<script>
2124
// eslint-disable-next-line
@@ -147,13 +150,64 @@ export default {
147150
}
148151
149152
/*
153+
:root, .ilse[data-theme='light'] {
154+
155+
--background-color: #EFEFEF;
156+
--secondary-background-color: #CED8E0;
157+
--terciary-background-color: #CED8E0;
158+
159+
--text-color: #717171;
160+
--secondary-text-color: #3c3b3b;
161+
--terciary-text-color: #8D9EAC;
162+
163+
--border: 1px solid #4a4a4a;
164+
--border-radius: 6px;
165+
166+
--padding: 4px;
167+
168+
--font-family: Mary, Helvetica, Georgia, Times New Roman, serif, -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
169+
--font-size: 1em;
170+
171+
--link-color: #5ec7b8;
172+
--secondary-link-color: #70a7a8;
173+
}
174+
175+
.ilse[data-theme="dark"] {
176+
177+
--background-color: #131313ff;
178+
--secondary-background-color: #DCEAF8;
179+
--terciary-background-color: #5a6269;
180+
181+
--text-color: #F8F8F8;
182+
--secondary-text-color: #000;
183+
--terciary-text-color: #8D9EAC;
184+
185+
--border: 2px solid #777;
186+
--border-radius: 6px;
187+
188+
--padding: 4px;
189+
190+
--font-family: Mary, Helvetica, Georgia, Times New Roman, serif, -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
191+
--font-size: 1em;
192+
193+
--box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
194+
195+
--link-color: #5ec7b8;
196+
--secondary-link-color: #99c6c2;
197+
}
198+
*/
199+
200+
201+
.no-outline:focus {
202+
outline: none;
203+
}
204+
150205
@font-face {
151206
font-family: Mary;
152207
font-style: normal;
153208
font-weight: lighter;
154209
src: url("assets/mary.ttf");
155210
}
156-
*/
157211
158212
::selection {
159213
color: var( --background-color );

javascript/web/src/assets/tailwind.js

Lines changed: 0 additions & 63 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Loading

javascript/web/src/background.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -330,16 +330,17 @@ async function createWindow() {
330330
})
331331
*/
332332

333-
if (process.env.WEBPACK_DEV_SERVER_URL) {
334-
// Load the url of the dev server if in development mode
335-
printf( "!!!!" )
336-
await win.loadURL(process.env.WEBPACK_DEV_SERVER_URL)
337-
if (!process.env.IS_TEST) win.webContents.openDevTools()
338-
} else {
339-
createProtocol('app')
340-
// Load the index.html when not in development
341-
win.loadURL('app://./index.html')
342-
}
333+
if (process.env.WEBPACK_DEV_SERVER_URL) {
334+
// Load the url of the dev server if in development mode
335+
printf( "!!!!" )
336+
await win.loadURL(process.env.WEBPACK_DEV_SERVER_URL)
337+
if (!process.env.IS_TEST) win.webContents.openDevTools()
338+
} else {
339+
createProtocol('app')
340+
// Load the index.html when not in development
341+
win.loadURL('app://./index.html')
342+
}
343+
343344
}
344345

345346
/*

javascript/web/src/classes/Commands.js

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,7 @@ class Commands {
176176
{
177177
id: "open-command-pallet-modal",
178178
fn: function() {
179-
// ilse.htmls.add( "command-pallet", ilse.components["command-pallet"] )
180-
// ilse.htmls.modal( ilse.components["command-pallet"] )
181-
ilse.htmls.modal( ilse.htmls.render('command-pallet', { search: '' }) )
179+
ilse.htmls.modal( ilse.htmls.render('command_pallet', { search: '' }) )
182180
},
183181
undo: args => {
184182
ilse.htmls.list.shift()
@@ -207,9 +205,21 @@ class Commands {
207205
document.body.style.cursor = "crosshair";
208206
ilse.cursor = async function on_click( event ) {
209207

208+
// BUGFIX:
209+
event.preventDefault()
210+
210211
let dom = event.target
211212
let id = get_parent_with_attr( dom, "data-component-id" )
212-
if( id ) ilse.htmls.modal( ilse.components[id] )
213+
214+
let string = ilse.components[id]
215+
216+
let html = `
217+
<div class="no-outline" contentEditable x-text="ilse.components['${id}']" > </div>
218+
<div x-html="ilse.components['${id}']" > </div>
219+
`
220+
// let html = div.outerHTML
221+
printf( ">>> html -> ", html )
222+
if( id ) ilse.htmls.modal( html, { overflow: "auto" })
213223

214224
document.body.style.cursor = "auto"
215225
document.body.removeEventListener( "click", ilse.cursor )
@@ -265,14 +275,36 @@ class Commands {
265275
props: {},
266276
},
267277

278+
{
279+
id: "open-directory-manager-tab",
280+
fn: function() {
281+
window.ilse.tabs.add_with_component('directory_manager', { title: 'Brains', autoselect: true })
282+
},
283+
description: "Open Directory Manager Tab",
284+
name: "Open Directory Manager Tab",
285+
props: {},
286+
},
287+
288+
{
289+
id: "open-study-tab",
290+
fn: function() {
291+
window.ilse.tabs.add_with_component('study', { title: 'Study', autoselect: true })
292+
},
293+
description: "Will Open a new study tab",
294+
name: "Open Study Tab",
295+
props: {},
296+
},
297+
268298
{
269299
id: "go-to-next-tab",
270300
fn: function() {
271301

272-
let copy = ilse.selected
273-
if( ilse.tabs.list[--copy] ) {
274-
ilse.select = copy
275-
}
302+
ilse.tabs.select_next_tab()
303+
304+
// let copy = ilse.selected
305+
// if( ilse.tabs.list[--copy] ) {
306+
// ilse.select = copy
307+
// }
276308

277309
/*
278310
let tabs = ilse.tabs
@@ -340,6 +372,7 @@ class Commands {
340372
id: "save",
341373
icon: "save.svg",
342374
fn: function() {
375+
ilse.notes.save()
343376
ilse.save()
344377
},
345378
undo: args =>{}, // TODO
@@ -443,7 +476,17 @@ class Commands {
443476
},
444477

445478
{
446-
id: "open-search-modal",
479+
id: "open-files-search-modal",
480+
icon: "lupe.svg",
481+
fn: async function() {
482+
},
483+
description: "Open Files Search Modal",
484+
name: "Open Files Search Modal",
485+
props: {},
486+
},
487+
488+
{
489+
id: "open-notes-search-modal",
447490
icon: "lupe.svg",
448491
fn: async function() {
449492
// ilse.is_search_on = !ilse.is_search_on

javascript/web/src/classes/Dialog.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import printf from "@/functions/printf.js"
77
import Messager from "@/classes/Messager.js"
88

99
// HTML
10-
import info from "@/html/dialog-info.html"
11-
import input from "@/html/dialog-input.html"
12-
import confirm from "@/html/dialog-confirm.html"
10+
import info from "@/html/dialog_info.html"
11+
import input from "@/html/dialog_input.html"
12+
import confirm from "@/html/dialog_confirm.html"
1313

1414
export default class Dialog {
1515

@@ -76,10 +76,13 @@ export default class Dialog {
7676

7777
async input( title = "Title", description = "Description" ) {
7878

79+
printf( "before -> ", input )
7980
let html = input
8081
.replace( "$title", title )
8182
.replace( "$description", description )
8283

84+
printf( "after -> ", html )
85+
8386
let id = "dialog-input-" + Math.random()
8487
ilse.htmls.add( id, html )
8588

javascript/web/src/classes/FSFilesystem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default class FSFilesystem {
1818

1919
constructor( dir ) {
2020

21-
target_directory = dir // target_directory = dir + "/"
21+
target_directory = dir
2222

2323
this.file = {
2424

javascript/web/src/classes/Ilse.js

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,25 @@ import printf from "@/functions/printf.js"
4747
import SVG_TABLE from "@/constants/SVG_TABLE.js"
4848

4949
// html
50-
import component_not_found from "@/html/component-not-found.html"
50+
import component_not_found from "@/html/component_not_found.html"
5151
import template from "@/html/template.html"
52-
import top_menu from "@/html/top-menu.html"
53-
import dialog_info from "@/html/dialog-info.html"
52+
import top_menu from "@/html/top_menu.html"
5453
import help from "@/html/help.html"
54+
import setup from "@/html/setup.html"
5555
import search from "@/html/search.html"
5656
import marketplace from "@/html/marketplace.html"
5757
import configuration from "@/html/configuration.html"
58-
import command_pallet from "@/html/command-pallet.html"
58+
import command_pallet from "@/html/command_pallet.html"
5959
import references from "@/html/references.html"
60-
import ghost_note from "@/html/ghost-note.html"
6160
import outline from "@/html/outline.html"
62-
import daily_notes from "@/html/daily-notes.html"
63-
import status_line from "@/html/status-line.html"
64-
import new_tab from "@/html/new-tab.html"
61+
import daily_notes from "@/html/daily_notes.html"
62+
import status_line from "@/html/status_line.html"
63+
import new_tab from "@/html/new_tab.html"
6564
import filesystem from "@/html/filesystem.html"
65+
import file from "@/html/file.html"
66+
import study from "@/html/study.html"
67+
import web from "@/html/web.html"
68+
import directory_manager from "@/html/directory_manager.html"
6669

6770
// Frame
6871
const JSFrame = require("@/assets/jsframe.min.js")
@@ -101,19 +104,23 @@ export default class Ilse {
101104

102105
this.components = {
103106
"top-menu": top_menu,
104-
"dialog-info": dialog_info,
107+
"setup": setup,
105108
"help": help,
106109
"search": search,
107110
"marketplace": marketplace,
108111
"configuration": configuration,
109112
"command-pallet": command_pallet,
110113
"references": references,
111-
"ghost-note": ghost_note,
112114
"outline": outline,
113115
"daily-notes": daily_notes,
114116
"status-line": status_line,
115117
"new-tab": new_tab,
116118
"filesystem": filesystem,
119+
"file": file,
120+
"study": study,
121+
"web": web,
122+
"directory-manager": directory_manager,
123+
"hello-world": `<p> Hello, World </p>`,
117124
}
118125

119126
this.tabs = new Tabs()
@@ -177,13 +184,23 @@ export default class Ilse {
177184
let list = window.localStorage.getItem( "target-directories" )
178185

179186
let bugfix_is_string = typeof list === "string"
180-
if( bugfix_is_string ) list = JSON.parse( list )
187+
if( bugfix_is_string ) {
188+
189+
try {
190+
list = JSON.parse( list )
191+
} catch( e ) {
192+
list = []
193+
}
194+
195+
}
181196

182197
let bugfix_list_has_items = list && list.length
198+
printf( "bugfix_list_has_items -> ", bugfix_list_has_items )
199+
printf( "list -> ", list )
200+
printf( "this.target_directories -> ", this.target_directories )
183201
if( bugfix_list_has_items ) this.target_directories = list
184202

185-
// if( this.platform === "quine" ) this.target_directories = [ "/" ] // quine
186-
if( this.platform === "quine" ) {
203+
if( this.platform === "quine" ) { // Autoselects "/"
187204

188205
let quine_dir = window.location.pathname
189206

javascript/web/src/classes/KeyboardShortcut.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,13 @@ class KeyboardShortcut {
177177
{ combo: "ctrl+space r r", command: "open-random-note", category: "Random" },
178178

179179
// s
180-
{ combo: "ctrl+space s s", command: "open-search-modal", category: "Search" },
181-
{ combo: "ctrl+space s g", command: "open-glyph-search", category: "Search" },
182-
{ combo: "ctrl+space s w w", command: "open-website-on-window", category: "Search" },
183-
{ combo: "ctrl+space s w e", command: "open-external-website-on-window", category: "Search" },
184-
{ combo: "ctrl+space s h", command: "open-html-on-window", category: "Search" },
185-
{ combo: "ctrl+space s v", command: "open-vim", category: "Search"},
180+
{ combo: "ctrl+space s s", command: "open-notes-search-modal", category: "Search", prevent_default: true },
181+
{ combo: "ctrl+space s shift+s", command: "open-files-search-modal", category: "Search", prevent_default: true },
182+
{ combo: "ctrl+space s g", command: "open-glyph-search", category: "Search" },
183+
{ combo: "ctrl+space s w w", command: "open-website-on-window", category: "Search" },
184+
{ combo: "ctrl+space s w e", command: "open-external-website-on-window", category: "Search" },
185+
{ combo: "ctrl+space s h", command: "open-html-on-window", category: "Search" },
186+
{ combo: "ctrl+space s v", command: "open-vim", category: "Search"},
186187

187188
// t
188189

0 commit comments

Comments
 (0)