selfstore 1.8.12 → 1.8.13
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/widgets.d.ts +0 -4
- package/dist/widgets.js +23 -37
- package/dist/widgets.js.map +1 -1
- package/package.json +1 -1
package/dist/widgets.d.ts
CHANGED
|
@@ -656,10 +656,6 @@ declare class SelfstoreDestinationElement extends FlowWidget {
|
|
|
656
656
|
/** Stop saving to this destination. The local data stays, and so does the
|
|
657
657
|
* backup already written: this detaches, it never deletes. */
|
|
658
658
|
private detach;
|
|
659
|
-
/** The connect journey, in place. Built like the gate builds it, so the
|
|
660
|
-
* destinations, the password step and the cancel path are the library's
|
|
661
|
-
* tested ones rather than a second implementation. */
|
|
662
|
-
private connectView;
|
|
663
659
|
protected view(into: HTMLElement): void;
|
|
664
660
|
}
|
|
665
661
|
|
package/dist/widgets.js
CHANGED
|
@@ -3717,7 +3717,7 @@ var EN8 = {
|
|
|
3717
3717
|
"destination.exported": "The copy is written.",
|
|
3718
3718
|
"destination.exportCancelled": "Nothing was written.",
|
|
3719
3719
|
"destination.restore": "Restore a copy",
|
|
3720
|
-
"destination.change": "Change
|
|
3720
|
+
"destination.change": "Change backup",
|
|
3721
3721
|
"destination.detach": "Stop saving here",
|
|
3722
3722
|
"destination.detached": "Stopped. Your data stays on this device.",
|
|
3723
3723
|
"destination.back": "Back",
|
|
@@ -3760,7 +3760,6 @@ var SelfstoreDestinationElement = class extends FlowWidget {
|
|
|
3760
3760
|
#targets = null;
|
|
3761
3761
|
#account = null;
|
|
3762
3762
|
#confirm = null;
|
|
3763
|
-
#changing = false;
|
|
3764
3763
|
#busy = false;
|
|
3765
3764
|
#message = null;
|
|
3766
3765
|
defaults() {
|
|
@@ -3850,37 +3849,9 @@ var SelfstoreDestinationElement = class extends FlowWidget {
|
|
|
3850
3849
|
return this.t("destination.detached");
|
|
3851
3850
|
});
|
|
3852
3851
|
}
|
|
3853
|
-
/** The connect journey, in place. Built like the gate builds it, so the
|
|
3854
|
-
* destinations, the password step and the cancel path are the library's
|
|
3855
|
-
* tested ones rather than a second implementation. */
|
|
3856
|
-
connectView(into) {
|
|
3857
|
-
const el = document.createElement(
|
|
3858
|
-
siblingTag(this.localName, "destination", "connect")
|
|
3859
|
-
);
|
|
3860
|
-
el.store = this.store;
|
|
3861
|
-
el.targets = this.#targets;
|
|
3862
|
-
el.icons = this.icons;
|
|
3863
|
-
el.labels = this.labels;
|
|
3864
|
-
const done = () => {
|
|
3865
|
-
this.#changing = false;
|
|
3866
|
-
this.rerender();
|
|
3867
|
-
};
|
|
3868
|
-
el.addEventListener("selfstore-connected", done);
|
|
3869
|
-
el.addEventListener("selfstore-cancelled", done);
|
|
3870
|
-
put(
|
|
3871
|
-
into,
|
|
3872
|
-
h(
|
|
3873
|
-
"button",
|
|
3874
|
-
{ part: "link destination-back", type: "button", onclick: done },
|
|
3875
|
-
this.t("destination.back")
|
|
3876
|
-
),
|
|
3877
|
-
el
|
|
3878
|
-
);
|
|
3879
|
-
}
|
|
3880
3852
|
view(into) {
|
|
3881
3853
|
const host = this.hostOf();
|
|
3882
3854
|
if (!host) return;
|
|
3883
|
-
if (this.#changing && this.#targets) return this.connectView(into);
|
|
3884
3855
|
const { targetKind, label, encrypted } = host.engine.state;
|
|
3885
3856
|
const kind = this.t(`destination.kind.${targetKind}`);
|
|
3886
3857
|
const title = kind === `destination.kind.${targetKind}` ? label ?? targetKind : kind;
|
|
@@ -3941,10 +3912,12 @@ var SelfstoreDestinationElement = class extends FlowWidget {
|
|
|
3941
3912
|
"destination-restore",
|
|
3942
3913
|
() => this.emit("selfstore-destination-action", { action: "restore" })
|
|
3943
3914
|
),
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3915
|
+
// Changing backup lets the destination go and stops there: the
|
|
3916
|
+
// first-run screen the app already mounts is what asks where to go
|
|
3917
|
+
// next. A second connect journey inside this panel gave the same
|
|
3918
|
+
// decision two mechanics depending on which control was pressed, and
|
|
3919
|
+
// only one of them could be reached from anywhere in the app.
|
|
3920
|
+
this.#targets ? act("destination.change", "destination-change", () => void this.detach(label)) : null,
|
|
3948
3921
|
act("destination.detach", "destination-detach", () => void this.detach(label))
|
|
3949
3922
|
),
|
|
3950
3923
|
this.#message ? h("div", { part: "sub destination-message", role: "status" }, this.#message) : null
|
|
@@ -4193,14 +4166,27 @@ var ACCOUNT_STYLES = `
|
|
|
4193
4166
|
text-overflow: ellipsis;
|
|
4194
4167
|
white-space: nowrap;
|
|
4195
4168
|
}
|
|
4169
|
+
/* A menu item is a plain line of text, not a link: underlined blue links in a
|
|
4170
|
+
menu read as four different destinations to weigh, which is exactly the
|
|
4171
|
+
feeling this menu exists to remove. */
|
|
4196
4172
|
[part~='account-item'] {
|
|
4197
4173
|
text-align: start;
|
|
4198
|
-
padding: 0.
|
|
4174
|
+
padding: 0.5rem 0.55rem;
|
|
4175
|
+
border: none;
|
|
4176
|
+
background: none;
|
|
4199
4177
|
border-radius: calc(var(--_radius) * 0.75);
|
|
4178
|
+
font: inherit;
|
|
4179
|
+
font-size: 0.8125rem;
|
|
4200
4180
|
text-decoration: none;
|
|
4201
4181
|
color: inherit;
|
|
4182
|
+
cursor: pointer;
|
|
4183
|
+
white-space: nowrap;
|
|
4202
4184
|
}
|
|
4203
4185
|
[part~='account-item']:hover { background: color-mix(in srgb, currentColor 7%, transparent); }
|
|
4186
|
+
/* Letting a destination go is the one gesture here that takes something away:
|
|
4187
|
+
it wears the colour every other screen uses for that, and nothing else does. */
|
|
4188
|
+
[part~='account-change'] { color: var(--_danger); }
|
|
4189
|
+
[part~='account-change']:hover { background: color-mix(in srgb, var(--_danger) 10%, transparent); }
|
|
4204
4190
|
[part~='account-sep'] { height: 1px; background: var(--_border); margin: 0.2rem 0.3rem; }
|
|
4205
4191
|
`;
|
|
4206
4192
|
var TICK_MS = 3e4;
|
|
@@ -4385,7 +4371,7 @@ var SelfstoreAccountElement = class extends FlowWidget {
|
|
|
4385
4371
|
h(
|
|
4386
4372
|
"button",
|
|
4387
4373
|
{
|
|
4388
|
-
part: "
|
|
4374
|
+
part: "account-item",
|
|
4389
4375
|
type: "button",
|
|
4390
4376
|
role: "menuitem",
|
|
4391
4377
|
onclick: () => this.settings()
|
|
@@ -4395,7 +4381,7 @@ var SelfstoreAccountElement = class extends FlowWidget {
|
|
|
4395
4381
|
h(
|
|
4396
4382
|
"button",
|
|
4397
4383
|
{
|
|
4398
|
-
part: "
|
|
4384
|
+
part: "account-item account-change",
|
|
4399
4385
|
type: "button",
|
|
4400
4386
|
role: "menuitem",
|
|
4401
4387
|
onclick: () => void this.change()
|