@basthon/gui-base 0.40.3 → 0.40.7
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 +4 -0
- package/lib/main.js +12 -2
- package/package.json +5 -5
package/lib/main.d.ts
CHANGED
|
@@ -42,6 +42,10 @@ export declare class GUIBase {
|
|
|
42
42
|
* Check if GUI is loaded.
|
|
43
43
|
*/
|
|
44
44
|
loaded(): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Wait for par load (document.body available).
|
|
47
|
+
*/
|
|
48
|
+
pageLoad(): Promise<void>;
|
|
45
49
|
/**
|
|
46
50
|
* Set the checkpoints manager
|
|
47
51
|
* (typically use with GUIOptions.noCheckpointsInit set to true).
|
package/lib/main.js
CHANGED
|
@@ -38,6 +38,10 @@ export class GUIBase {
|
|
|
38
38
|
* Check if GUI is loaded.
|
|
39
39
|
*/
|
|
40
40
|
async loaded() { await this._loaded.promise; }
|
|
41
|
+
/**
|
|
42
|
+
* Wait for par load (document.body available).
|
|
43
|
+
*/
|
|
44
|
+
async pageLoad() { await this._loader.pageLoad(); }
|
|
41
45
|
/**
|
|
42
46
|
* Set the checkpoints manager
|
|
43
47
|
* (typically use with GUIOptions.noCheckpointsInit set to true).
|
|
@@ -220,7 +224,13 @@ export class GUIBase {
|
|
|
220
224
|
}));
|
|
221
225
|
if (choices == null)
|
|
222
226
|
return null;
|
|
223
|
-
|
|
227
|
+
if (choices.length === 0) {
|
|
228
|
+
this.info("Aucune sauvegarde à restaurer", "Il n'y a aucune sauvegarde à restaurer !");
|
|
229
|
+
promise.resolve(null);
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
this.select("Choisissez une sauvegarde", "De quelle sauvegarde souhaitez-vous reprendre ?", choices, "Annuler", () => { promise.resolve(null); });
|
|
233
|
+
}
|
|
224
234
|
return await promise.promise;
|
|
225
235
|
}
|
|
226
236
|
/**
|
|
@@ -405,7 +415,7 @@ export class GUIBase {
|
|
|
405
415
|
const message = `
|
|
406
416
|
Un lien permanant vers le contenu actuel a été créé.
|
|
407
417
|
<br>
|
|
408
|
-
<i class="
|
|
418
|
+
<i class="fa fa-exclamation-circle"></i> Attention, partager un document trop long peut ne pas fonctionner avec certains navigateurs.`;
|
|
409
419
|
this.confirm("Partager ce document", message, "Copier dans le presse-papier", () => GUIBase.copyToClipboard(url), "Tester le lien", () => GUIBase.openURL(url));
|
|
410
420
|
}
|
|
411
421
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basthon/gui-base",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.7",
|
|
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.40.
|
|
29
|
-
"@basthon/kernel-base": "^0.40.
|
|
30
|
-
"@basthon/kernel-loader": "^0.40.
|
|
28
|
+
"@basthon/checkpoints": "^0.40.7",
|
|
29
|
+
"@basthon/kernel-base": "^0.40.7",
|
|
30
|
+
"@basthon/kernel-loader": "^0.40.7",
|
|
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": "
|
|
44
|
+
"gitHead": "d079f384f89109d31db5f90ce418ec9f6594294e"
|
|
45
45
|
}
|