selfstore 1.6.9 → 1.7.1
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/dist/advanced.d.ts +2 -2
- package/dist/advanced.js +1 -1
- package/dist/{chunk-L6PT3NKO.js → chunk-4NJYJPT3.js} +3 -3
- package/dist/{chunk-L6PT3NKO.js.map → chunk-4NJYJPT3.js.map} +1 -1
- package/dist/{chunk-JQ22IG2T.js → chunk-PK5BFQLI.js} +12 -4
- package/dist/chunk-PK5BFQLI.js.map +1 -0
- package/dist/flows.js +2 -2
- package/dist/index.js +1 -1
- package/dist/widgets.d.ts +11 -1
- package/dist/widgets.js +31 -12
- package/dist/widgets.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-JQ22IG2T.js.map +0 -1
package/dist/widgets.d.ts
CHANGED
|
@@ -32,7 +32,17 @@ declare abstract class FlowWidget extends HTMLElement {
|
|
|
32
32
|
* document's, which wins over the browser's, so a host that already sets
|
|
33
33
|
* `<html lang>` gets translated copy without writing a single label. */
|
|
34
34
|
private localized;
|
|
35
|
-
|
|
35
|
+
/**
|
|
36
|
+
* The copy for a key, with `{placeholders}` filled in.
|
|
37
|
+
*
|
|
38
|
+
* A status that cannot name WHERE it saved has to be read twice: once for the
|
|
39
|
+
* state, once for the destination on another line. Interpolation lets a pack
|
|
40
|
+
* write one sentence instead - and lets each language put the place where its
|
|
41
|
+
* own grammar wants it, which a fixed "state, then label" layout cannot.
|
|
42
|
+
* A placeholder with no value is left as written rather than blanked, so a
|
|
43
|
+
* missing variable shows up instead of producing a sentence with a hole.
|
|
44
|
+
*/
|
|
45
|
+
protected t(key: string, vars?: Record<string, string | null | undefined>): string;
|
|
36
46
|
/** A heading an empty-string label removes: labels = { 'share.title': '' }
|
|
37
47
|
* hides that heading (the host page already says it) without a fork.
|
|
38
48
|
* Append through put(), which skips the null. */
|
package/dist/widgets.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { connectFlow, shareFlow, joinFlow } from './chunk-
|
|
2
|
-
import { isOpenSupported } from './chunk-
|
|
1
|
+
import { connectFlow, shareFlow, joinFlow } from './chunk-4NJYJPT3.js';
|
|
2
|
+
import { isOpenSupported } from './chunk-PK5BFQLI.js';
|
|
3
3
|
import './chunk-5SII5YHE.js';
|
|
4
4
|
import './chunk-OIAXYI35.js';
|
|
5
5
|
import './chunk-CT2HTWA7.js';
|
|
@@ -373,8 +373,20 @@ var FlowWidget = class extends HTMLElement {
|
|
|
373
373
|
const tag = this.closest("[lang]")?.getAttribute("lang") || document.documentElement.lang || navigator.language || "";
|
|
374
374
|
return this.packs()[tag.slice(0, 2).toLowerCase()] ?? {};
|
|
375
375
|
}
|
|
376
|
-
|
|
377
|
-
|
|
376
|
+
/**
|
|
377
|
+
* The copy for a key, with `{placeholders}` filled in.
|
|
378
|
+
*
|
|
379
|
+
* A status that cannot name WHERE it saved has to be read twice: once for the
|
|
380
|
+
* state, once for the destination on another line. Interpolation lets a pack
|
|
381
|
+
* write one sentence instead - and lets each language put the place where its
|
|
382
|
+
* own grammar wants it, which a fixed "state, then label" layout cannot.
|
|
383
|
+
* A placeholder with no value is left as written rather than blanked, so a
|
|
384
|
+
* missing variable shows up instead of producing a sentence with a hole.
|
|
385
|
+
*/
|
|
386
|
+
t(key, vars) {
|
|
387
|
+
const copy = this.overrides[key] ?? this.localized()[key] ?? this.defaults()[key] ?? key;
|
|
388
|
+
if (!vars) return copy;
|
|
389
|
+
return copy.replace(/\{(\w+)\}/g, (whole, name) => vars[name] ?? whole);
|
|
378
390
|
}
|
|
379
391
|
/** A heading an empty-string label removes: labels = { 'share.title': '' }
|
|
380
392
|
* hides that heading (the host page already says it) without a fork.
|
|
@@ -512,14 +524,14 @@ var FR = {
|
|
|
512
524
|
"connect.cancel": "Annuler",
|
|
513
525
|
"connect.retry": "R\xE9essayer",
|
|
514
526
|
"connect.password.title": "Cette sauvegarde est prot\xE9g\xE9e",
|
|
515
|
-
"connect.password.hint": "Entrez son mot de passe pour l
|
|
527
|
+
"connect.password.hint": "Entrez son mot de passe pour l'ouvrir.",
|
|
516
528
|
"connect.password.placeholder": "Mot de passe",
|
|
517
529
|
"connect.password.wrong": "Mot de passe incorrect. R\xE9essayez.",
|
|
518
530
|
"connect.password.submit": "Ouvrir",
|
|
519
531
|
"connect.password.show": "Afficher le mot de passe",
|
|
520
532
|
"connect.password.hide": "Masquer le mot de passe",
|
|
521
533
|
"connect.password.forgot": "Mot de passe oubli\xE9 ?",
|
|
522
|
-
"connect.password.forgot.warn": "Sans le mot de passe, cette sauvegarde ne peut pas \xEAtre ouverte. Vous pouvez repartir d
|
|
534
|
+
"connect.password.forgot.warn": "Sans le mot de passe, cette sauvegarde ne peut pas \xEAtre ouverte. Vous pouvez repartir d'une sauvegarde vide : l'ancienne sera perdue d\xE9finitivement.",
|
|
523
535
|
"connect.password.forgot.confirm": "Remplacer la sauvegarde",
|
|
524
536
|
"connect.password.forgot.back": "Retour",
|
|
525
537
|
"connect.conflict.title": "Cette destination contient d\xE9j\xE0 une sauvegarde",
|
|
@@ -1824,12 +1836,13 @@ var SelfstoreJoinElement = class extends FlowWidget {
|
|
|
1824
1836
|
// src/widgets/status.ts
|
|
1825
1837
|
var EN4 = {
|
|
1826
1838
|
"status.ephemeral": "Nothing is saved",
|
|
1827
|
-
"status.cacheOnly": "
|
|
1839
|
+
"status.cacheOnly": "Never saved anywhere yet",
|
|
1828
1840
|
"status.saving": "Saving...",
|
|
1829
|
-
"status.saved": "Saved",
|
|
1841
|
+
"status.saved": "Saved to {label}, at every change",
|
|
1830
1842
|
"status.needsAttention": "Reconnect to continue",
|
|
1831
1843
|
"status.locked": "Locked",
|
|
1832
1844
|
"status.pendingDownload": "Changes to download",
|
|
1845
|
+
"status.saved.placeless": "Saved",
|
|
1833
1846
|
"status.action.choose-destination": "Choose a destination",
|
|
1834
1847
|
"status.action.download": "Download",
|
|
1835
1848
|
"status.action.reconnect": "Reconnect",
|
|
@@ -1837,12 +1850,13 @@ var EN4 = {
|
|
|
1837
1850
|
};
|
|
1838
1851
|
var FR4 = {
|
|
1839
1852
|
"status.ephemeral": "Rien n'est enregistr\xE9",
|
|
1840
|
-
"status.cacheOnly": "
|
|
1853
|
+
"status.cacheOnly": "Vos donn\xE9es n'ont jamais \xE9t\xE9 enregistr\xE9es ailleurs",
|
|
1841
1854
|
"status.saving": "Enregistrement...",
|
|
1842
|
-
"status.saved": "
|
|
1855
|
+
"status.saved": "Enregistr\xE9 dans {label}, \xE0 chaque changement",
|
|
1843
1856
|
"status.needsAttention": "Acc\xE8s \xE0 retrouver",
|
|
1844
1857
|
"status.locked": "Sauvegarde verrouill\xE9e",
|
|
1845
1858
|
"status.pendingDownload": "Modifications \xE0 exporter",
|
|
1859
|
+
"status.saved.placeless": "Sauvegarde \xE0 jour",
|
|
1846
1860
|
"status.action.choose-destination": "Choisir une sauvegarde",
|
|
1847
1861
|
"status.action.download": "Exporter",
|
|
1848
1862
|
"status.action.reconnect": "Retrouver l'acc\xE8s",
|
|
@@ -1912,7 +1926,12 @@ var SelfstoreStatusElement = class extends FlowWidget {
|
|
|
1912
1926
|
const host = this.host();
|
|
1913
1927
|
if (!host) return;
|
|
1914
1928
|
const { status, targetKind, label } = host.engine.state;
|
|
1915
|
-
const
|
|
1929
|
+
const sansLieu = (cle) => {
|
|
1930
|
+
const jumelle = `${cle}.placeless`;
|
|
1931
|
+
const copie = this.t(jumelle);
|
|
1932
|
+
return copie === jumelle ? this.t(cle) : copie;
|
|
1933
|
+
};
|
|
1934
|
+
const text = label ? this.t(status.labelKey, { label }) : sansLieu(status.labelKey);
|
|
1916
1935
|
const dot = h("span", {
|
|
1917
1936
|
part: `status-dot sev-${status.severity}`,
|
|
1918
1937
|
"aria-hidden": "true"
|
|
@@ -2053,7 +2072,7 @@ var FR5 = {
|
|
|
2053
2072
|
"backups.shared.leave": "Quitter",
|
|
2054
2073
|
"backups.replica.add": "Seconde sauvegarde",
|
|
2055
2074
|
"backups.replica.title": "Seconde sauvegarde",
|
|
2056
|
-
"backups.replica.intro": "Le m\xEAme fichier chiffr\xE9, \xE9crit aussi \xE0 un second endroit. Si l
|
|
2075
|
+
"backups.replica.intro": "Le m\xEAme fichier chiffr\xE9, \xE9crit aussi \xE0 un second endroit. Si l'un tombe, l'autre reste.",
|
|
2057
2076
|
"backups.replica.dest.drive": "Google Drive",
|
|
2058
2077
|
"backups.replica.dest.file": "Un fichier sur cet appareil",
|
|
2059
2078
|
"backups.replica.dest.webdav": "Un serveur WebDAV",
|