mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	Merge remote-tracking branch 'origin/stable'
This commit is contained in:
		| @@ -1,13 +1,3 @@ | |||||||
| -- delete duplicates https://github.com/zadam/trilium/issues/2534 |  | ||||||
| DELETE FROM entity_changes WHERE isErased = 0 AND id IN ( |  | ||||||
|     SELECT id FROM entity_changes ec |  | ||||||
|     WHERE ( |  | ||||||
|               SELECT COUNT(*) FROM entity_changes |  | ||||||
|               WHERE ec.entityName = entity_changes.entityName |  | ||||||
|                 AND ec.entityId = entity_changes.entityId |  | ||||||
|           ) > 1 |  | ||||||
| ); |  | ||||||
|  |  | ||||||
| CREATE TABLE IF NOT EXISTS "mig_entity_changes" ( | CREATE TABLE IF NOT EXISTS "mig_entity_changes" ( | ||||||
|                                                 `id`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, |                                                 `id`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||||||
|                                                 `entityName`	TEXT NOT NULL, |                                                 `entityName`	TEXT NOT NULL, | ||||||
| @@ -23,6 +13,16 @@ CREATE TABLE IF NOT EXISTS "mig_entity_changes" ( | |||||||
| INSERT INTO mig_entity_changes (id, entityName, entityId, hash, isErased, changeId, sourceId, isSynced, utcDateChanged) | INSERT INTO mig_entity_changes (id, entityName, entityId, hash, isErased, changeId, sourceId, isSynced, utcDateChanged) | ||||||
|     SELECT id, entityName, entityId, hash, isErased, '', sourceId, isSynced, utcDateChanged FROM entity_changes; |     SELECT id, entityName, entityId, hash, isErased, '', sourceId, isSynced, utcDateChanged FROM entity_changes; | ||||||
|  |  | ||||||
|  | -- delete duplicates https://github.com/zadam/trilium/issues/2534 | ||||||
|  | DELETE FROM mig_entity_changes WHERE isErased = 0 AND id IN ( | ||||||
|  |     SELECT id FROM mig_entity_changes ec | ||||||
|  |     WHERE ( | ||||||
|  |               SELECT COUNT(*) FROM mig_entity_changes | ||||||
|  |               WHERE ec.entityName = mig_entity_changes.entityName | ||||||
|  |                 AND ec.entityId = mig_entity_changes.entityId | ||||||
|  |           ) > 1 | ||||||
|  | ); | ||||||
|  |  | ||||||
| DROP TABLE entity_changes; | DROP TABLE entity_changes; | ||||||
|  |  | ||||||
| ALTER TABLE mig_entity_changes RENAME TO entity_changes; | ALTER TABLE mig_entity_changes RENAME TO entity_changes; | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|   "name": "trilium", |   "name": "trilium", | ||||||
|   "productName": "Trilium Notes", |   "productName": "Trilium Notes", | ||||||
|   "description": "Trilium Notes", |   "description": "Trilium Notes", | ||||||
|   "version": "0.49.4", |   "version": "0.49.5", | ||||||
|   "license": "AGPL-3.0-only", |   "license": "AGPL-3.0-only", | ||||||
|   "main": "electron.js", |   "main": "electron.js", | ||||||
|   "bin": { |   "bin": { | ||||||
|   | |||||||
| @@ -13,7 +13,7 @@ const TPL = ` | |||||||
|         } |         } | ||||||
|     </style> |     </style> | ||||||
|      |      | ||||||
|     <span class="share-text"></span> <a class="share-link external"></a>. For help visit <a href="https://github.com/zadam/trilium/wiki/Sharing">wiki</a>. |     <span class="shared-text"></span> <a class="shared-link external"></a>. For help visit <a href="https://github.com/zadam/trilium/wiki/Sharing">wiki</a>. | ||||||
| </div>`; | </div>`; | ||||||
|  |  | ||||||
| export default class SharedInfoWidget extends NoteContextAwareWidget { | export default class SharedInfoWidget extends NoteContextAwareWidget { | ||||||
| @@ -23,8 +23,8 @@ export default class SharedInfoWidget extends NoteContextAwareWidget { | |||||||
|  |  | ||||||
|     doRender() { |     doRender() { | ||||||
|         this.$widget = $(TPL); |         this.$widget = $(TPL); | ||||||
|         this.$shareLink = this.$widget.find(".share-link"); |         this.$sharedLink = this.$widget.find(".shared-link"); | ||||||
|         this.$shareText = this.$widget.find(".share-text"); |         this.$sharedText = this.$widget.find(".shared-text"); | ||||||
|         this.contentSized(); |         this.contentSized(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -36,14 +36,14 @@ export default class SharedInfoWidget extends NoteContextAwareWidget { | |||||||
|  |  | ||||||
|         if (syncServerHost) { |         if (syncServerHost) { | ||||||
|             link = syncServerHost + "/share/" + shareId; |             link = syncServerHost + "/share/" + shareId; | ||||||
|             this.$shareText.text("This note is shared publicly on"); |             this.$sharedText.text("This note is shared publicly on"); | ||||||
|         } |         } | ||||||
|         else { |         else { | ||||||
|             link = location.protocol + '//' + location.host + location.pathname + "share/" + shareId; |             link = location.protocol + '//' + location.host + location.pathname + "share/" + shareId; | ||||||
|             this.$shareText.text("This note is shared locally on"); |             this.$sharedText.text("This note is shared locally on"); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         this.$shareLink.attr("href", link).text(link); |         this.$sharedLink.attr("href", link).text(link); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     entitiesReloadedEvent({loadResults}) { |     entitiesReloadedEvent({loadResults}) { | ||||||
|   | |||||||
| @@ -1 +1 @@ | |||||||
| module.exports = { buildDate:"2022-01-09T22:32:13+01:00", buildRevision: "be59f248e8387c268471946da99979939c8d2c1d" }; | module.exports = { buildDate:"2022-01-14T21:40:37+01:00", buildRevision: "77c6c4617b634226e12ead172482fe1fe92bc360" }; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user