mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
ref
This commit is contained in:
parent
47b803920b
commit
f64b343d8d
6
libraries/codemirror/addon/lint/eslint.js
vendored
6
libraries/codemirror/addon/lint/eslint.js
vendored
@ -46,10 +46,11 @@
|
|||||||
const errors = new eslint().verify(text, {
|
const errors = new eslint().verify(text, {
|
||||||
root: true,
|
root: true,
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaVersion: 2017
|
ecmaVersion: 2019
|
||||||
},
|
},
|
||||||
extends: ['eslint:recommended', 'airbnb-base'],
|
extends: ['eslint:recommended', 'airbnb-base'],
|
||||||
env: {
|
env: {
|
||||||
|
'browser': true,
|
||||||
'node': true
|
'node': true
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
@ -62,6 +63,9 @@
|
|||||||
'no-unused-vars': ['warn', { vars: 'local', args: 'after-used' }],
|
'no-unused-vars': ['warn', { vars: 'local', args: 'after-used' }],
|
||||||
'no-nested-ternary': 'off',
|
'no-nested-ternary': 'off',
|
||||||
'no-underscore-dangle': ['error', {'allow': ['_super', '_lookupFactory']}]
|
'no-underscore-dangle': ['error', {'allow': ['_super', '_lookupFactory']}]
|
||||||
|
},
|
||||||
|
globals: {
|
||||||
|
"api": "readonly"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ import RelationMapTypeWidget from "./widgets/type_widgets/relation_map.js";
|
|||||||
import ProtectedSessionTypeWidget from "./widgets/type_widgets/protected_session.js";
|
import ProtectedSessionTypeWidget from "./widgets/type_widgets/protected_session.js";
|
||||||
import BookTypeWidget from "./widgets/type_widgets/book.js";
|
import BookTypeWidget from "./widgets/type_widgets/book.js";
|
||||||
import contextMenu from "./services/context_menu.js";
|
import contextMenu from "./services/context_menu.js";
|
||||||
|
import DesktopLayout from "./widgets/desktop_layout.js";
|
||||||
|
|
||||||
if (utils.isElectron()) {
|
if (utils.isElectron()) {
|
||||||
require('electron').ipcRenderer.on('globalShortcut', async function(event, actionName) {
|
require('electron').ipcRenderer.on('globalShortcut', async function(event, actionName) {
|
||||||
@ -79,6 +80,7 @@ $('[data-toggle="tooltip"]').tooltip({
|
|||||||
|
|
||||||
macInit.init();
|
macInit.init();
|
||||||
|
|
||||||
|
appContext.setLayout(new DesktopLayout());
|
||||||
appContext.start();
|
appContext.start();
|
||||||
|
|
||||||
noteTooltipService.setupGlobalTooltip();
|
noteTooltipService.setupGlobalTooltip();
|
||||||
|
@ -6,18 +6,14 @@ import Entrypoints from "./entrypoints.js";
|
|||||||
import options from "./options.js";
|
import options from "./options.js";
|
||||||
import utils from "./utils.js";
|
import utils from "./utils.js";
|
||||||
import ZoomService from "./zoom.js";
|
import ZoomService from "./zoom.js";
|
||||||
import Layout from "../widgets/layout.js";
|
|
||||||
import TabManager from "./tab_manager.js";
|
import TabManager from "./tab_manager.js";
|
||||||
import treeService from "./tree.js";
|
import treeService from "./tree.js";
|
||||||
import Component from "../widgets/component.js";
|
import Component from "../widgets/component.js";
|
||||||
import keyboardActionsService from "./keyboard_actions.js";
|
import keyboardActionsService from "./keyboard_actions.js";
|
||||||
|
|
||||||
class AppContext extends Component {
|
class AppContext extends Component {
|
||||||
constructor(layout) {
|
setLayout(layout) {
|
||||||
super(null);
|
|
||||||
|
|
||||||
this.layout = layout;
|
this.layout = layout;
|
||||||
this.executors = [];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async start() {
|
async start() {
|
||||||
@ -96,9 +92,7 @@ class AppContext extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const layout = new Layout();
|
const appContext = new AppContext();
|
||||||
|
|
||||||
const appContext = new AppContext(layout);
|
|
||||||
|
|
||||||
// we should save all outstanding changes before the page/app is closed
|
// we should save all outstanding changes before the page/app is closed
|
||||||
$(window).on('beforeunload', () => {
|
$(window).on('beforeunload', () => {
|
||||||
|
@ -26,7 +26,7 @@ import SimilarNotesWidget from "./similar_notes.js";
|
|||||||
import WhatLinksHereWidget from "./what_links_here.js";
|
import WhatLinksHereWidget from "./what_links_here.js";
|
||||||
import SidePaneToggles from "./side_pane_toggles.js";
|
import SidePaneToggles from "./side_pane_toggles.js";
|
||||||
|
|
||||||
export default class Layout {
|
export default class DesktopLayout {
|
||||||
getRootWidget(appContext) {
|
getRootWidget(appContext) {
|
||||||
return new FlexContainer('column')
|
return new FlexContainer('column')
|
||||||
.setParent(appContext)
|
.setParent(appContext)
|
Loading…
x
Reference in New Issue
Block a user