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