mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	bug fixes
This commit is contained in:
		
							parent
							
								
									445902d081
								
							
						
					
					
						commit
						ef996f3919
					
				@ -110,7 +110,7 @@ export default class DesktopMainWindowLayout {
 | 
				
			|||||||
            .id('root-widget')
 | 
					            .id('root-widget')
 | 
				
			||||||
            .css('height', '100vh')
 | 
					            .css('height', '100vh')
 | 
				
			||||||
            .child(new FlexContainer('row').overflowing()
 | 
					            .child(new FlexContainer('row').overflowing()
 | 
				
			||||||
                .css('height', '35px')
 | 
					                .css('height', '36px')
 | 
				
			||||||
                .child(new GlobalMenuWidget())
 | 
					                .child(new GlobalMenuWidget())
 | 
				
			||||||
                .child(new TabRowWidget())
 | 
					                .child(new TabRowWidget())
 | 
				
			||||||
                .child(new TitleBarButtonsWidget()))
 | 
					                .child(new TitleBarButtonsWidget()))
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
function reloadApp() {
 | 
					function reloadApp() {
 | 
				
			||||||
    //window.location.reload(true);
 | 
					    window.location.reload(true);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function parseDate(str) {
 | 
					function parseDate(str) {
 | 
				
			||||||
 | 
				
			|||||||
@ -133,9 +133,14 @@ async function checkOutstandingSyncs() {
 | 
				
			|||||||
    const { stats, initialized } = await $.get('api/sync/stats');
 | 
					    const { stats, initialized } = await $.get('api/sync/stats');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (initialized) {
 | 
					    if (initialized) {
 | 
				
			||||||
        const remote = utils.dynamicRequire('electron').remote;
 | 
					        if (utils.isElectron()) {
 | 
				
			||||||
        remote.app.relaunch();
 | 
					            const remote = utils.dynamicRequire('electron').remote;
 | 
				
			||||||
        remote.app.exit(0);
 | 
					            remote.app.relaunch();
 | 
				
			||||||
 | 
					            remote.app.exit(0);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else {
 | 
				
			||||||
 | 
					            utils.reloadApp();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else {
 | 
					    else {
 | 
				
			||||||
        const totalOutstandingSyncs = stats.outstandingPushes + stats.outstandingPulls;
 | 
					        const totalOutstandingSyncs = stats.outstandingPushes + stats.outstandingPulls;
 | 
				
			||||||
@ -155,4 +160,4 @@ function hideAlert() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
ko.applyBindings(new SetupModel(), document.getElementById('setup-dialog'));
 | 
					ko.applyBindings(new SetupModel(), document.getElementById('setup-dialog'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$("#setup-dialog").show();
 | 
					$("#setup-dialog").show();
 | 
				
			||||||
 | 
				
			|||||||
@ -7,12 +7,18 @@ const TPL = `
 | 
				
			|||||||
    <style>
 | 
					    <style>
 | 
				
			||||||
    .global-menu-wrapper {
 | 
					    .global-menu-wrapper {
 | 
				
			||||||
        height: 35px;
 | 
					        height: 35px;
 | 
				
			||||||
 | 
					        box-sizing: border-box;
 | 
				
			||||||
        border-bottom: 1px solid var(--main-border-color);
 | 
					        border-bottom: 1px solid var(--main-border-color);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    .global-menu {
 | 
				
			||||||
 | 
					        height: 34px;
 | 
				
			||||||
 | 
					        box-sizing: border-box;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    .global-menu button {
 | 
					    .global-menu button {
 | 
				
			||||||
        margin-right: 10px;
 | 
					        margin-right: 10px;
 | 
				
			||||||
        height: 33px;
 | 
					        height: 34px;
 | 
				
			||||||
        border: none;
 | 
					        border: none;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
				
			|||||||
@ -44,23 +44,25 @@ const TAB_ROW_TPL = `
 | 
				
			|||||||
    .note-tab-row {
 | 
					    .note-tab-row {
 | 
				
			||||||
        box-sizing: border-box;
 | 
					        box-sizing: border-box;
 | 
				
			||||||
        position: relative;
 | 
					        position: relative;
 | 
				
			||||||
        height: 34px;
 | 
					        height: 36px;
 | 
				
			||||||
        min-height: 34px;
 | 
					 | 
				
			||||||
        width: 100%;
 | 
					        width: 100%;
 | 
				
			||||||
        background: var(--main-background-color);
 | 
					        background: var(--main-background-color);
 | 
				
			||||||
        border-radius: 5px 5px 0 0;
 | 
					 | 
				
			||||||
        overflow: hidden;
 | 
					        overflow: hidden;
 | 
				
			||||||
        margin-top: 2px;
 | 
					        margin-top: 2px;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    .note-tab-row * {
 | 
					    .note-tab-row * {
 | 
				
			||||||
        box-sizing: inherit;
 | 
					        box-sizing: inherit;
 | 
				
			||||||
        font: inherit;
 | 
					        font: inherit;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    .note-tab-row .note-tab-row-container {
 | 
					    .note-tab-row .note-tab-row-container {
 | 
				
			||||||
 | 
					        box-sizing: border-box;
 | 
				
			||||||
        position: relative;
 | 
					        position: relative;
 | 
				
			||||||
        width: 100%;
 | 
					        width: 100%;
 | 
				
			||||||
        height: 100%;
 | 
					        height: 100%;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    .note-tab-row .note-tab {
 | 
					    .note-tab-row .note-tab {
 | 
				
			||||||
        position: absolute;
 | 
					        position: absolute;
 | 
				
			||||||
        left: 0;
 | 
					        left: 0;
 | 
				
			||||||
@ -84,6 +86,7 @@ const TAB_ROW_TPL = `
 | 
				
			|||||||
        font-size: 24px;
 | 
					        font-size: 24px;
 | 
				
			||||||
        cursor: pointer;
 | 
					        cursor: pointer;
 | 
				
			||||||
        border-bottom: 1px solid var(--main-border-color);
 | 
					        border-bottom: 1px solid var(--main-border-color);
 | 
				
			||||||
 | 
					        box-sizing: border-box;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    .note-new-tab:hover {
 | 
					    .note-new-tab:hover {
 | 
				
			||||||
@ -92,14 +95,14 @@ const TAB_ROW_TPL = `
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    .tab-row-filler {
 | 
					    .tab-row-filler {
 | 
				
			||||||
 | 
					        box-sizing: border-box;
 | 
				
			||||||
        -webkit-app-region: drag;
 | 
					        -webkit-app-region: drag;
 | 
				
			||||||
        position: absolute;
 | 
					        position: absolute;
 | 
				
			||||||
        left: 0;
 | 
					        left: 0;
 | 
				
			||||||
        height: 33px;
 | 
					        height: 36px;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    .tab-row-filler .tab-row-border {
 | 
					    .tab-row-filler .tab-row-border {
 | 
				
			||||||
        position: relative;
 | 
					 | 
				
			||||||
        background: linear-gradient(to right, var(--main-border-color), transparent);
 | 
					        background: linear-gradient(to right, var(--main-border-color), transparent);
 | 
				
			||||||
        height: 1px;
 | 
					        height: 1px;
 | 
				
			||||||
        margin-top: 32px;
 | 
					        margin-top: 32px;
 | 
				
			||||||
 | 
				
			|||||||
@ -41,10 +41,14 @@ function getStats() {
 | 
				
			|||||||
        return {};
 | 
					        return {};
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return {
 | 
					    const stats = {
 | 
				
			||||||
        initialized: optionService.getOption('initialized') === 'true',
 | 
					        initialized: optionService.getOption('initialized') === 'true',
 | 
				
			||||||
        stats: syncService.stats
 | 
					        stats: syncService.stats
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    log.info(`Returning sync stats: ${JSON.stringify(stats)}`);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return stats;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function checkSync() {
 | 
					function checkSync() {
 | 
				
			||||||
@ -118,7 +122,7 @@ function forceNoteSync(req) {
 | 
				
			|||||||
function getChanged(req) {
 | 
					function getChanged(req) {
 | 
				
			||||||
    const startTime = Date.now();
 | 
					    const startTime = Date.now();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const lastEntityChangeId = parseInt(req.query.lastEntityChangedId);
 | 
					    const lastEntityChangeId = parseInt(req.query.lastEntityChangeId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const entityChanges = sql.getRows("SELECT * FROM entity_changes WHERE isSynced = 1 AND id > ? LIMIT 1000", [lastEntityChangeId]);
 | 
					    const entityChanges = sql.getRows("SELECT * FROM entity_changes WHERE isSynced = 1 AND id > ? LIMIT 1000", [lastEntityChangeId]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -355,8 +355,8 @@ function getLastSyncedPush() {
 | 
				
			|||||||
    return parseInt(optionService.getOption('lastSyncedPush'));
 | 
					    return parseInt(optionService.getOption('lastSyncedPush'));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function setLastSyncedPush(lastSyncedPush) {
 | 
					function setLastSyncedPush(entityChangeId) {
 | 
				
			||||||
    optionService.setOption('lastSyncedPush', lastSyncedPush);
 | 
					    optionService.setOption('lastSyncedPush', entityChangeId);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function updatePushStats() {
 | 
					function updatePushStats() {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user