@basthon/gui-base 0.41.7 → 0.41.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/main.d.ts CHANGED
@@ -101,7 +101,7 @@ export declare class GUIBase {
101
101
  /**
102
102
  * Load content from local forage.
103
103
  */
104
- loadFromStorage(): Promise<string | null>;
104
+ loadFromStorage(setContent?: boolean): Promise<string | null>;
105
105
  /**
106
106
  * Tag last backup as "approved".
107
107
  */
package/lib/main.js CHANGED
@@ -175,7 +175,7 @@ export class GUIBase {
175
175
  /**
176
176
  * Load content from local forage.
177
177
  */
178
- async loadFromStorage() {
178
+ async loadFromStorage(setContent = true) {
179
179
  var _a;
180
180
  const approved = await this.lastBackupValid();
181
181
  let content = null;
@@ -189,10 +189,10 @@ export class GUIBase {
189
189
  const promise = new PromiseDelegate();
190
190
  this.confirm("Récupération", "Il semble que Basthon ait rencontré un problème à sa dernière utilisation. Que voulez-vous faire ?", "Choisir une sauvegarde", async () => {
191
191
  promise.resolve(await this.selectCheckpoint());
192
- }, "Laisser le document vide", () => { promise.resolve(null); });
192
+ }, "Annuler", () => { promise.resolve(null); });
193
193
  content = await promise.promise;
194
194
  }
195
- if (content != null)
195
+ if (setContent && content != null)
196
196
  this.setContent(content);
197
197
  return content;
198
198
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basthon/gui-base",
3
- "version": "0.41.7",
3
+ "version": "0.41.10",
4
4
  "description": "Basthon - Base GUI",
5
5
  "homepage": "https://basthon.fr",
6
6
  "bugs": {
@@ -25,9 +25,9 @@
25
25
  "clean": "rm -rf lib/"
26
26
  },
27
27
  "dependencies": {
28
- "@basthon/checkpoints": "^0.41.7",
29
- "@basthon/kernel-base": "^0.41.7",
30
- "@basthon/kernel-loader": "^0.41.7",
28
+ "@basthon/checkpoints": "0.41.10",
29
+ "@basthon/kernel-base": "0.41.10",
30
+ "@basthon/kernel-loader": "0.41.10",
31
31
  "js-base64": "^3.7.2",
32
32
  "pako": "^2.0.4",
33
33
  "promise-delegate": "^1.0.1"
@@ -41,5 +41,5 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "1d9ded08f7081824e600a74f7b4fd47fbd254de9"
44
+ "gitHead": "93ac03b3ee46314af393aa2278ecaae601bcad2f"
45
45
  }