pleasenobugs 0.3.0 → 0.4.0
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/README.md +29 -8
- package/dist/chunks/client-CkFi6gmV.js +358 -0
- package/dist/chunks/demo-DLTn5oUs.js +232 -0
- package/dist/chunks/{index--SJW3aE-.js → index-B1dIQO6N.js} +911 -865
- package/dist/client.js +7 -326
- package/dist/index.js +6 -6
- package/dist/pleasenobugs.iife.js +2 -2
- package/dist/types/client.d.ts +13 -3
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/demo.d.ts.map +1 -1
- package/dist/types/element.d.ts +2 -1
- package/dist/types/element.d.ts.map +1 -1
- package/dist/types/i18n.d.ts +11 -6
- package/dist/types/i18n.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/readonly.d.ts +3 -2
- package/dist/types/readonly.d.ts.map +1 -1
- package/dist/types/signer.d.ts +7 -0
- package/dist/types/signer.d.ts.map +1 -1
- package/dist/types/ui/App.d.ts.map +1 -1
- package/dist/types/ui/Compose.d.ts +8 -4
- package/dist/types/ui/Compose.d.ts.map +1 -1
- package/dist/types/ui/Face.d.ts +17 -0
- package/dist/types/ui/Face.d.ts.map +1 -0
- package/dist/types/ui/PostCard.d.ts +4 -2
- package/dist/types/ui/PostCard.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/chunks/demo-CL3oK-zC.js +0 -212
package/dist/types/client.d.ts
CHANGED
|
@@ -30,11 +30,19 @@ export interface ClientOptions {
|
|
|
30
30
|
/** The origin written into the signed message. Defaults to this page's. */
|
|
31
31
|
origin?: string;
|
|
32
32
|
/**
|
|
33
|
-
* Where the proof is remembered
|
|
34
|
-
*
|
|
35
|
-
*
|
|
33
|
+
* Where the proof is remembered. Inside Nimiq Pay, `localStorage`: the
|
|
34
|
+
* phone and the wallet are the user's own, so they sign once a month.
|
|
35
|
+
* Anywhere else, `sessionStorage`: a browser may be shared, so signing in
|
|
36
|
+
* lasts until the tab closes. `null` keeps it in memory only.
|
|
36
37
|
*/
|
|
37
38
|
storage?: Pick<Storage, 'getItem' | 'setItem' | 'removeItem'> | null;
|
|
39
|
+
/**
|
|
40
|
+
* Which address the wallet is on right now, without a prompt. A stored proof
|
|
41
|
+
* for another address is dropped, so a user who switched accounts is not
|
|
42
|
+
* spoken for by the old one. Defaults to Nimiq Pay's current account inside
|
|
43
|
+
* it, with its own signer.
|
|
44
|
+
*/
|
|
45
|
+
account?: () => Promise<string | null>;
|
|
38
46
|
/** For tests and unusual runtimes. */
|
|
39
47
|
fetch?: typeof fetch;
|
|
40
48
|
}
|
|
@@ -121,6 +129,8 @@ export declare function createClient(options: ClientOptions): {
|
|
|
121
129
|
* `<img>` to load by itself.
|
|
122
130
|
*/
|
|
123
131
|
shotUrl: (id: string) => string;
|
|
132
|
+
/** Where the server draws an identicon, by the code a post carries in `face`. */
|
|
133
|
+
faceUrl: (code: string) => string;
|
|
124
134
|
vote: (id: string, up: boolean) => Promise<Result<{
|
|
125
135
|
ok: true;
|
|
126
136
|
votes: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,SAAS,EAEd,KAAK,EAAE,EACP,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,MAAM,EACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,SAAS,EAEd,KAAK,EAAE,EACP,KAAK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;YAEa,IAAI;;IAEpB;;;;OAIG;cACO,MAAM,WAAW;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;YACvC,IAAI;iBAAW,OAAO;;IACtC;;;;OAIG;sBACe,MAAM,aAAa,MAAM,UAAU;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE;YACxE,IAAI;iBAAW,OAAO;;IAItC,mEAAmE;gBACvD,MAAM,aAAa,MAAM;YACrB,IAAI;;IAEpB,+EAA+E;;iBAC7C,MAAM,EAAE;;IAC1C;;;;OAIG;oBACa;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE;YAC9F,IAAI;gBAAU,MAAM;;IACpC,sEAAsE;uBACnD,MAAM;YACT,IAAI;;EAEvB;AAED,MAAM,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
package/dist/types/demo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../src/demo.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../src/demo.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,WAAW,EAEhB,KAAK,QAAQ,EACb,KAAK,UAAU,EAEhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,MAAM,EAAU,MAAM,aAAa,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,KAAa,EAAE,OAAO,EAAE,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;CAAO,GAAG,MAAM,CAyPrH;AAiBD,2FAA2F;AAC3F,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,CAAC;IACjC,gFAAgF;IAChF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4CAA4C;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC"}
|
package/dist/types/element.d.ts
CHANGED
|
@@ -23,7 +23,8 @@ export declare const TAG = "please-no-bugs";
|
|
|
23
23
|
* `lang` (the language of your `strings`, for dates; English by default), `app-name`, `name` (a display name to suggest), `kinds` (which
|
|
24
24
|
* of `bug,idea,review` to offer), `screenshots` (`owners` to keep them off
|
|
25
25
|
* the board, for the app's owners only; `off` to leave them out), `names`
|
|
26
|
-
* (`off` leaves out "
|
|
26
|
+
* (`off` leaves out the name and the "Post anonymously" switch, so every post
|
|
27
|
+
* is anonymous),
|
|
27
28
|
* `readonly` (the board to scroll through and nothing else: see
|
|
28
29
|
* `readonly.ts`), `demo` (sample posts in the page's memory, no server: see
|
|
29
30
|
* `demo.ts`; `demo="owner"` is the owner's side of it) and, with `demo` only, `screen` (`button`, `tiles`, `board`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../src/element.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEhG,OAAO,EAAc,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAO,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAI5C,eAAO,MAAM,GAAG,mBAAmB,CAAC;AAEpC
|
|
1
|
+
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../src/element.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEhG,OAAO,EAAc,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAO,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAI5C,eAAO,MAAM,GAAG,mBAAmB,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;;IAClD,MAAM,CAAC,kBAAkB,WAevB;IAgBF,2EAA2E;IAC3E,IAAI,MAAM,IAGI,MAAM,GAAG,SAAS,CAD/B;IACD,IAAI,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,EAI/B;IAED;;;;OAIG;IACH,IAAI,QAAQ,IAGI,QAAQ,GAAG,IAAI,GAAG,SAAS,CAD1C;IACD,IAAI,QAAQ,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,EAK1C;IAED,0EAA0E;IAC1E,IAAI,OAAO,IAGI,WAAW,GAAG,SAAS,CADrC;IACD,IAAI,OAAO,CAAC,CAAC,EAAE,WAAW,GAAG,SAAS,EAGrC;IAED,sFAAsF;IACtF,IAAI,KAAK,IAGI,MAAM,EAAE,GAAG,SAAS,CADhC;IACD,IAAI,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,EAGhC;IAED,4GAA4G;IAC5G,IAAI,OAAO,IAGI,OAAO,GAAG,SAAS,CADjC;IACD,IAAI,OAAO,CAAC,CAAC,EAAE,OAAO,GAAG,SAAS,EAGjC;IAED;;;OAGG;IACH,IAAI,OAAO,IAGI,UAAU,EAAE,GAAG,SAAS,CADtC;IACD,IAAI,OAAO,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,SAAS,EAKtC;IAED,iBAAiB;IAYjB,oBAAoB;IAIpB,wBAAwB,CAAC,IAAI,EAAE,MAAM;IAKrC,2DAA2D;IAC3D,KAAK;CA4FN;AAID,oFAAoF;AACpF,KAAK,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;AAE9B;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAU/D;AAkOD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,EAAE,GAAG,SAAS,CAMlE;AAED,0EAA0E;AAC1E,wBAAgB,MAAM,SAIrB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,mBAAmB,CAAC;KACvC;CACF"}
|
package/dist/types/i18n.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Every word the widget says, in English.
|
|
3
3
|
*
|
|
4
|
-
* Taken from
|
|
5
|
-
* a feedback board has that the rest of an
|
|
6
|
-
* this is public, and being honest about
|
|
7
|
-
*
|
|
4
|
+
* Taken from the board of the app PleaseNoBugs grew out of, where the copy
|
|
5
|
+
* was written for the same two jobs a feedback board has that the rest of an
|
|
6
|
+
* app does not: saying out loud that this is public, and being honest about
|
|
7
|
+
* what "anonymous" does and does not mean. That app's name became `{app}`,
|
|
8
|
+
* the project's own name.
|
|
8
9
|
*
|
|
9
10
|
* The widget ships in English only. A developer can override any string, or
|
|
10
11
|
* put the whole board in their app's language, through the element's
|
|
@@ -51,6 +52,9 @@ declare const COPY: {
|
|
|
51
52
|
'board.retry': string;
|
|
52
53
|
'board.page': string;
|
|
53
54
|
'board.signIn': string;
|
|
55
|
+
'board.signInTitle': string;
|
|
56
|
+
'board.signInNote': string;
|
|
57
|
+
'board.signInButton': string;
|
|
54
58
|
'board.needWallet': string;
|
|
55
59
|
'board.chooseTitle': string;
|
|
56
60
|
'board.tileBug': string;
|
|
@@ -68,8 +72,9 @@ declare const COPY: {
|
|
|
68
72
|
'board.placeholderReview': string;
|
|
69
73
|
'board.yourRating': string;
|
|
70
74
|
'board.public': string;
|
|
71
|
-
'board.
|
|
75
|
+
'board.postAnon': string;
|
|
72
76
|
'board.namePlaceholder': string;
|
|
77
|
+
'board.namedNote': string;
|
|
73
78
|
'board.anonNote': string;
|
|
74
79
|
'board.shotAdd': string;
|
|
75
80
|
'board.shotRemove': string;
|
|
@@ -227,7 +232,7 @@ export type Translate = (key: CopyKey, vars?: Record<string, string | number>) =
|
|
|
227
232
|
* @example
|
|
228
233
|
* const t = translator({ 'board.title': 'Ideeënbus', 'board.reply': '{app} zegt' });
|
|
229
234
|
* t('board.title') // → 'Ideeënbus'
|
|
230
|
-
* t('board.reply', { app: '
|
|
235
|
+
* t('board.reply', { app: 'My app' }) // → 'My app zegt'
|
|
231
236
|
*/
|
|
232
237
|
export declare function translator(strings?: Strings): Translate;
|
|
233
238
|
export {};
|
package/dist/types/i18n.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0QwB,CAAC;AAEnC,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,IAAI,CAAC;AACxC,MAAM,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AACvD,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAC;AAEzF;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,OAAY,GAAG,SAAS,CAM3D"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface OpenOptions {
|
|
|
26
26
|
screenshots?: boolean | 'owners';
|
|
27
27
|
/** The board to read and nothing else: no writing or voting, every post anonymous, no screenshots. */
|
|
28
28
|
readonly?: boolean;
|
|
29
|
-
/** `false` leaves out "
|
|
29
|
+
/** `false` leaves out the name and the "Post anonymously" switch, so every post is anonymous. */
|
|
30
30
|
names?: boolean;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.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onymous, no
|
|
3
|
+
* A board as `readonly` shows it: everybody anonymous (no name, no identicon),
|
|
4
|
+
* no screenshots, and
|
|
4
5
|
* nobody signed in.
|
|
5
6
|
*
|
|
6
7
|
* A read-only board is shown somewhere other than the app it belongs to (the
|
|
7
8
|
* website, one day, showing other apps' boards). Its authors chose to show a
|
|
8
9
|
* name, or a screenshot, on that app's board, not on a page they may never
|
|
9
|
-
* have heard of, so
|
|
10
|
+
* have heard of, so they stay behind. Done here rather than in the cards, so
|
|
10
11
|
* nothing further down can show what was never handed to it.
|
|
11
12
|
*
|
|
12
13
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readonly.d.ts","sourceRoot":"","sources":["../../src/readonly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEjE
|
|
1
|
+
{"version":3,"file":"readonly.d.ts","sourceRoot":"","sources":["../../src/readonly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEjE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAarD"}
|
package/dist/types/signer.d.ts
CHANGED
|
@@ -76,5 +76,12 @@ export declare function insideNimiqPay(): boolean;
|
|
|
76
76
|
* phone to do one hash; the server derives it anyway and refuses a mismatch.
|
|
77
77
|
*/
|
|
78
78
|
export declare function nimiqPaySigner(timeout?: number): Signer;
|
|
79
|
+
/**
|
|
80
|
+
* The address Nimiq Pay is on right now, or null outside it (or with no
|
|
81
|
+
* account). No prompt: listing accounts is not signing. Used to notice a user
|
|
82
|
+
* who switched accounts in Nimiq Pay, so the board stops speaking for the old
|
|
83
|
+
* one.
|
|
84
|
+
*/
|
|
85
|
+
export declare function nimiqPayAccount(): Promise<string | null>;
|
|
79
86
|
export {};
|
|
80
87
|
//# sourceMappingURL=signer.d.ts.map
|
|
@@ -1 +1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AAO,CAAC;IAChB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,QAAQ,CAAA;KAAE,KAAK,IAAI,CAAC;CAC3D;AAED,MAAM,MAAM,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAS3F;;;;;;;;;;GAUG;AACH,wBAAgB,GAAG,CAAC,EAClB,MAAM,EACN,CAAC,EACD,MAAM,EACN,OAAO,EACP,WAAW,EACX,OAAO,EACP,KAAK,EACL,KAAK,EAAE,OAAO,EACd,WAAqB,EACrB,QAAgB,EAChB,KAAY,EACZ,OAAO,EACP,QAAQ,EACR,KAAK,EAAE,KAAe,EACtB,MAAM,GACP,EAAE,QAAQ,gCAq4BV"}
|
|
@@ -42,8 +42,8 @@ export interface Draft {
|
|
|
42
42
|
* noticing. Sending stays off until the box is ticked or the picture
|
|
43
43
|
* removed, so nobody posts one by tapping past the warning.
|
|
44
44
|
*
|
|
45
|
-
* **One column that scrolls, with the button at the end of it.**
|
|
46
|
-
* a footer and then spent a page of notes on what a phone keyboard does to a
|
|
45
|
+
* **One column that scrolls, with the button at the end of it.** The app this
|
|
46
|
+
* grew out of pinned a footer and then spent a page of notes on what a phone keyboard does to a
|
|
47
47
|
* pinned footer. A widget lives in apps whose keyboards it has never met, so it
|
|
48
48
|
* takes the arrangement that has nothing to get wrong.
|
|
49
49
|
*
|
|
@@ -52,7 +52,7 @@ export interface Draft {
|
|
|
52
52
|
* this screen standing with the words in it and says why on the line under the
|
|
53
53
|
* button.
|
|
54
54
|
*/
|
|
55
|
-
export declare function Compose({ t, kind, posts, likeThis, left, perDay, textMax, name: knownName, appName, screenshots, names, onMeToo, onSend, }: {
|
|
55
|
+
export declare function Compose({ t, kind, posts, likeThis, left, perDay, textMax, name: knownName, face, faceUrl, appName, screenshots, names, onMeToo, onSend, }: {
|
|
56
56
|
t: Translate;
|
|
57
57
|
kind: PostKind;
|
|
58
58
|
posts: Post[];
|
|
@@ -63,10 +63,14 @@ export declare function Compose({ t, kind, posts, likeThis, left, perDay, textMa
|
|
|
63
63
|
textMax: number;
|
|
64
64
|
/** The name the server has for this wallet, or the app's suggestion. */
|
|
65
65
|
name: string;
|
|
66
|
+
/** This wallet's identicon code, once signed in; a stand-in until then. */
|
|
67
|
+
face?: string;
|
|
68
|
+
/** Where the server draws an identicon. */
|
|
69
|
+
faceUrl?: (code: string) => string;
|
|
66
70
|
appName: string;
|
|
67
71
|
/** Whether a bug or an idea may carry a screenshot, and who sees it. */
|
|
68
72
|
screenshots: Screenshots;
|
|
69
|
-
/** Whether the writer may show a name; without it every post is anonymous. */
|
|
73
|
+
/** Whether the writer may show a name and identicon; without it every post is anonymous. */
|
|
70
74
|
names?: boolean;
|
|
71
75
|
/** Seconding a lookalike instead of writing it: votes for it and leaves this screen. */
|
|
72
76
|
onMeToo: (id: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Compose.d.ts","sourceRoot":"","sources":["../../../src/ui/Compose.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,IAAI,EACT,KAAK,QAAQ,EAEb,KAAK,QAAQ,EACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Compose.d.ts","sourceRoot":"","sources":["../../../src/ui/Compose.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,IAAI,EACT,KAAK,QAAQ,EAEb,KAAK,QAAQ,EACd,MAAM,oBAAoB,CAAC;AAC5B,OA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;IACd,2CAA2C;IAC3C,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,WAAW,EAAE,WAAW,CAAC;IACzB,4FAA4F;IAC5F,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wFAAwF;IACxF,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B;;;;OAIG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC;QAAE,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;CAC3G,gCAqPA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A wallet's identicon, from the code a post carries in `face`.
|
|
3
|
+
*
|
|
4
|
+
* The picture comes from the board's own server (`/v1/identicons/:code.svg`),
|
|
5
|
+
* which draws it once and lets the browser keep it: Nimiq's drawings weigh
|
|
6
|
+
* more than this whole widget. Until it arrives, and where there is no server
|
|
7
|
+
* to ask (the demo), a hexagon in the identicon's own background colour
|
|
8
|
+
* stands in, so the space never jumps and the colour already matches.
|
|
9
|
+
*
|
|
10
|
+
* Decorative: the name beside it says who, so it is hidden from screen readers.
|
|
11
|
+
*/
|
|
12
|
+
export declare function Face({ code, src, size }: {
|
|
13
|
+
code?: string;
|
|
14
|
+
src?: string;
|
|
15
|
+
size?: number;
|
|
16
|
+
}): import("preact").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=Face.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Face.d.ts","sourceRoot":"","sources":["../../../src/ui/Face.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAS,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,gCAyB5F"}
|
|
@@ -74,7 +74,7 @@ export declare function VoteButton({ votes, voted, onVote, t, label, }: {
|
|
|
74
74
|
* load.
|
|
75
75
|
*
|
|
76
76
|
* The card is a target only for an owner, whose tap opens the page that
|
|
77
|
-
* answers it.
|
|
77
|
+
* answers it. The app this grew out of hid the bin behind a swipe; here it is a visible button,
|
|
78
78
|
* because a gesture nobody can discover is a feature nobody has, and a widget
|
|
79
79
|
* in somebody else's app cannot teach its own gestures.
|
|
80
80
|
*
|
|
@@ -88,7 +88,7 @@ export declare function VoteButton({ votes, voted, onVote, t, label, }: {
|
|
|
88
88
|
* the card stays the size of a card, and the count opens it on a page of its
|
|
89
89
|
* own (see `Talk`). Only a search that found its words there quotes a line.
|
|
90
90
|
*/
|
|
91
|
-
export declare function PostCard({ post, t, locale, onVote, onDelete, onManage, onTalk, shotUrl, onShot, fresh, query, found, bare, }: {
|
|
91
|
+
export declare function PostCard({ post, t, locale, onVote, onDelete, onManage, onTalk, shotUrl, onShot, faceUrl, fresh, query, found, bare, }: {
|
|
92
92
|
post: Post;
|
|
93
93
|
/** What the board calls the app. Unused since the card stopped quoting it; kept so callers need not change. */
|
|
94
94
|
appName?: string;
|
|
@@ -114,6 +114,8 @@ export declare function PostCard({ post, t, locale, onVote, onDelete, onManage,
|
|
|
114
114
|
shotUrl?: string;
|
|
115
115
|
/** Opens the screenshot whole. */
|
|
116
116
|
onShot?: () => void;
|
|
117
|
+
/** Where its author's identicon is drawn, when the post shows one. */
|
|
118
|
+
faceUrl?: string;
|
|
117
119
|
}): import("preact").JSX.Element;
|
|
118
120
|
/** A text with what was searched for marked in it. */
|
|
119
121
|
export declare function Marked({ text, query }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostCard.d.ts","sourceRoot":"","sources":["../../../src/ui/PostCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,QAAQ,EAEd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"PostCard.d.ts","sourceRoot":"","sources":["../../../src/ui/PostCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,QAAQ,EAEd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAKrD;;8DAE8D;AAC9D,eAAO,MAAM,IAAI,EAAE,MAAM,CACvB,QAAQ,EACR;IAAE,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAuB/G,CAAC;AAEF;;;GAGG;AACH,wBAAgB,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAS,EAAE,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,SAAS,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,gCAmBpF;AAcD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,OAAO,CAK7D;AAED,qEAAqE;AACrE,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAExF;AAED,wBAAgB,KAAK,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;IACb,MAAM,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,oEAAoE;IACpE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kFAAkF;IAClF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,yEAAyE;IACzE,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/B,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,gCAgIA;AAED,sDAAsD;AACtD,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,gCAOtE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pleasenobugs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A feedback board for Nimiq mini apps: bugs and ideas, straight from your users. One tag, or a headless client.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"screenshots": "node demo/screenshots.mjs"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@pleasenobugs/core": "0.
|
|
52
|
+
"@pleasenobugs/core": "0.4.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@nimiq/core": "^2.7.1",
|
|
56
|
-
"@pleasenobugs/server": "0.
|
|
56
|
+
"@pleasenobugs/server": "0.4.0",
|
|
57
57
|
"express": "^4.21.2",
|
|
58
58
|
"preact": "^10.24.3",
|
|
59
59
|
"puppeteer-core": "^23.11.1",
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import { D as y, c as E, l as D, a as A, i as T, b } from "./index--SJW3aE-.js";
|
|
2
|
-
function N({ owner: u = !1, samples: h } = {}) {
|
|
3
|
-
const x = Date.now();
|
|
4
|
-
let l = (h ?? U).map((t, e) => ({
|
|
5
|
-
id: `demo-${e}`,
|
|
6
|
-
kind: t.kind,
|
|
7
|
-
text: t.text,
|
|
8
|
-
at: x - (t.ago ?? _),
|
|
9
|
-
status: t.status ?? "open",
|
|
10
|
-
votes: t.votes ?? 1,
|
|
11
|
-
voted: !1,
|
|
12
|
-
// A visitor's own; an owner is never the author of a sample.
|
|
13
|
-
mine: !u && !!t.mine,
|
|
14
|
-
...t.who ? { who: t.who } : {},
|
|
15
|
-
...t.rating ? { rating: t.rating } : {},
|
|
16
|
-
...P(e, t, x - (t.ago ?? _)),
|
|
17
|
-
...t.fix ? { fix: { version: t.fix, link: O } } : {},
|
|
18
|
-
// What the app sent along, which only owners see.
|
|
19
|
-
...u && t.context ? { context: { ...t.context } } : {}
|
|
20
|
-
})), p = (h ? [] : $).map((t, e) => ({
|
|
21
|
-
id: `demo-update-${e}`,
|
|
22
|
-
title: t.title,
|
|
23
|
-
text: t.text,
|
|
24
|
-
version: t.version,
|
|
25
|
-
link: O,
|
|
26
|
-
at: x - t.ago,
|
|
27
|
-
posts: t.posts.map((o) => `demo-${o}`)
|
|
28
|
-
})), f, m = y.perDay;
|
|
29
|
-
const k = /* @__PURE__ */ new Map(), a = (t) => S({ ok: !0, data: t }), r = (t, e) => S({ ok: !1, status: t, error: e }), c = (t) => l.find((e) => e.id === t), w = (t, e) => {
|
|
30
|
-
e.length ? t.thread = e : delete t.thread;
|
|
31
|
-
const o = b(e);
|
|
32
|
-
o ? t.reply = o : delete t.reply;
|
|
33
|
-
}, g = (t) => u ? "app" : t.mine ? "author" : null;
|
|
34
|
-
return {
|
|
35
|
-
project: "demo",
|
|
36
|
-
canSign: !0,
|
|
37
|
-
address: () => M,
|
|
38
|
-
signIn: () => a(M),
|
|
39
|
-
signOut() {
|
|
40
|
-
},
|
|
41
|
-
// At once, without the wait: the tiles are there while the panel grows,
|
|
42
|
-
// instead of a spinner they replace halfway.
|
|
43
|
-
board: () => Promise.resolve({
|
|
44
|
-
ok: !0,
|
|
45
|
-
data: {
|
|
46
|
-
project: { id: "demo", name: "Demo app", rules: { ...y, kinds: [...y.kinds] } },
|
|
47
|
-
posts: l.map((t) => ({ ...t })),
|
|
48
|
-
me: { owner: u, left: m, ...f ? { name: f } : {} },
|
|
49
|
-
updates: p.length
|
|
50
|
-
}
|
|
51
|
-
}),
|
|
52
|
-
me: () => a({ owner: u, left: m, ...f ? { name: f } : {} }),
|
|
53
|
-
answers: () => a({ answers: [] }),
|
|
54
|
-
post(t) {
|
|
55
|
-
return m <= 0 ? r(429, "too_many") : t.kind === "review" && l.some((e) => e.mine && e.kind === "review") ? r(409, "reviewed") : (m -= 1, l = [
|
|
56
|
-
{
|
|
57
|
-
id: t.id,
|
|
58
|
-
kind: t.kind,
|
|
59
|
-
text: t.text,
|
|
60
|
-
at: Date.now(),
|
|
61
|
-
status: "open",
|
|
62
|
-
votes: 1,
|
|
63
|
-
voted: !0,
|
|
64
|
-
mine: !0,
|
|
65
|
-
...!t.anon && f ? { who: f } : {},
|
|
66
|
-
...t.kind === "review" ? { rating: t.rating } : {},
|
|
67
|
-
...t.shot?.board ? { shot: !0 } : {}
|
|
68
|
-
},
|
|
69
|
-
...l
|
|
70
|
-
], t.shot?.board && k.set(t.id, `data:${t.shot.type};base64,${t.shot.data}`), a({ ok: !0, left: m }));
|
|
71
|
-
},
|
|
72
|
-
// The visitor's own screenshots on the board; nothing else exists here.
|
|
73
|
-
shot: async (t) => {
|
|
74
|
-
const e = k.get(t);
|
|
75
|
-
return e ? a(await (await fetch(e)).blob()) : r(404, "not_found");
|
|
76
|
-
},
|
|
77
|
-
shotUrl: (t) => k.get(t) ?? "",
|
|
78
|
-
vote(t, e) {
|
|
79
|
-
const o = c(t);
|
|
80
|
-
return o ? (o.voted !== e && (o.votes += e ? 1 : -1), o.voted = e, a({ ok: !0, votes: o.votes, voted: o.voted })) : r(404, "not_found");
|
|
81
|
-
},
|
|
82
|
-
remove(t) {
|
|
83
|
-
const e = c(t);
|
|
84
|
-
return e ? (l = l.filter((o) => o !== e), k.delete(t), a({ ok: !0 })) : r(404, "not_found");
|
|
85
|
-
},
|
|
86
|
-
setName(t) {
|
|
87
|
-
f = t.trim() || void 0;
|
|
88
|
-
for (const e of l) e.mine && e.who !== void 0 && (e.who = f);
|
|
89
|
-
return a({ ok: !0, ...f ? { name: f } : {} });
|
|
90
|
-
},
|
|
91
|
-
// As the server: one change for all of it, and a fix only on a done
|
|
92
|
-
// bug or idea, gone as soon as it stands anywhere else.
|
|
93
|
-
manage(t, e) {
|
|
94
|
-
if (!u) return r(403, "not_owner");
|
|
95
|
-
const o = c(t);
|
|
96
|
-
if (!o) return r(404, "not_found");
|
|
97
|
-
if (e.status && o.kind !== "review" && (o.status = e.status), e.reply !== void 0) {
|
|
98
|
-
const n = e.reply.trim(), i = o.thread ?? [], s = D(i);
|
|
99
|
-
n !== (b(i)?.text ?? "") && (s?.from === "app" ? w(
|
|
100
|
-
o,
|
|
101
|
-
n ? i.map((d) => d === s ? { ...d, text: n, edited: Date.now() } : d) : i.filter((d) => d !== s)
|
|
102
|
-
) : n && w(o, [...i, { id: `reply-${Date.now()}`, from: "app", text: n, at: Date.now() }]));
|
|
103
|
-
}
|
|
104
|
-
if (e.hidden !== void 0 && (e.hidden ? o.hidden = !0 : delete o.hidden), e.approved && delete o.pending, o.status !== "done" || o.kind === "review") delete o.fix;
|
|
105
|
-
else if (e.fix !== void 0) {
|
|
106
|
-
const n = e.fix && E(e.fix);
|
|
107
|
-
if (e.fix && !n) return r(400, "bad_request");
|
|
108
|
-
n && (n.version || n.link) ? o.fix = n : delete o.fix;
|
|
109
|
-
}
|
|
110
|
-
return a({ ok: !0 });
|
|
111
|
-
},
|
|
112
|
-
// The conversation, by the server's rules (see `authorMayAnswer`).
|
|
113
|
-
say(t, e) {
|
|
114
|
-
const o = c(t);
|
|
115
|
-
if (!o) return r(404, "not_found");
|
|
116
|
-
const n = g(o), i = e.text.trim();
|
|
117
|
-
if (!i || i.length > y.replyMax) return r(400, "bad_request");
|
|
118
|
-
if (!n) return r(403, "not_yours");
|
|
119
|
-
if (n === "author" && !A(o))
|
|
120
|
-
return r(409, o.kind === "review" || T(o.status) ? "closed" : "not_your_turn");
|
|
121
|
-
if (n === "app" && o.kind === "review" && o.thread?.some((d) => d.from === "app")) return r(409, "not_your_turn");
|
|
122
|
-
const s = { id: e.id, from: n, text: i, at: Date.now() };
|
|
123
|
-
return w(o, [...o.thread ?? [], s]), a({ ok: !0, message: s });
|
|
124
|
-
},
|
|
125
|
-
editMessage(t, e, o) {
|
|
126
|
-
const n = c(t), i = n?.thread?.find((d) => d.id === e);
|
|
127
|
-
if (!n || !i) return r(404, "not_found");
|
|
128
|
-
let s = { ...i };
|
|
129
|
-
if (o.hidden !== void 0) {
|
|
130
|
-
if (!u) return r(403, "not_owner");
|
|
131
|
-
if (i.from !== "author") return r(400, "bad_request");
|
|
132
|
-
o.hidden ? s.hidden = !0 : delete s.hidden;
|
|
133
|
-
}
|
|
134
|
-
if (o.text !== void 0) {
|
|
135
|
-
const d = o.text.trim();
|
|
136
|
-
if (!d || d.length > y.replyMax) return r(400, "bad_request");
|
|
137
|
-
if (g(n) !== i.from) return r(403, "not_yours");
|
|
138
|
-
if (D(n.thread)?.id !== i.id) return r(409, "not_your_turn");
|
|
139
|
-
d !== i.text && (s = { ...s, text: d, edited: Date.now() });
|
|
140
|
-
}
|
|
141
|
-
return w(n, (n.thread ?? []).map((d) => d === i ? s : d)), a({ ok: !0, message: s });
|
|
142
|
-
},
|
|
143
|
-
unsay(t, e) {
|
|
144
|
-
const o = c(t), n = o?.thread?.find((i) => i.id === e);
|
|
145
|
-
return !o || !n ? r(404, "not_found") : g(o) !== n.from ? r(403, "not_yours") : D(o.thread)?.id !== n.id ? r(409, "not_your_turn") : (w(o, (o.thread ?? []).filter((i) => i !== n)), a({ ok: !0 }));
|
|
146
|
-
},
|
|
147
|
-
// Only those whose posts are still here, like the server; at once, like
|
|
148
|
-
// the board, so the page is there to read rather than a spinner first.
|
|
149
|
-
updates: () => Promise.resolve({
|
|
150
|
-
ok: !0,
|
|
151
|
-
data: { updates: p.map((t) => ({ ...t, posts: t.posts.filter((e) => !!c(e)) })) }
|
|
152
|
-
}),
|
|
153
|
-
// The bugs and ideas it names go to done, with its version and link.
|
|
154
|
-
postUpdate(t) {
|
|
155
|
-
if (!u) return r(403, "not_owner");
|
|
156
|
-
const e = E({ version: t.version ?? "", link: t.link });
|
|
157
|
-
if (!t.title.trim() || !e?.link) return r(400, "bad_request");
|
|
158
|
-
const o = (t.posts ?? []).filter((i) => {
|
|
159
|
-
const s = c(i);
|
|
160
|
-
return s && s.kind !== "review";
|
|
161
|
-
});
|
|
162
|
-
for (const i of o) {
|
|
163
|
-
const s = c(i);
|
|
164
|
-
s.status = "done", s.fix = e;
|
|
165
|
-
}
|
|
166
|
-
const n = {
|
|
167
|
-
id: t.id,
|
|
168
|
-
title: t.title.trim(),
|
|
169
|
-
...t.text?.trim() ? { text: t.text.trim() } : {},
|
|
170
|
-
...e.version ? { version: e.version } : {},
|
|
171
|
-
link: e.link,
|
|
172
|
-
at: Date.now(),
|
|
173
|
-
posts: o
|
|
174
|
-
};
|
|
175
|
-
return p = [n, ...p], a({ ok: !0, update: n });
|
|
176
|
-
},
|
|
177
|
-
removeUpdate(t) {
|
|
178
|
-
return u ? p.some((e) => e.id === t) ? (p = p.filter((e) => e.id !== t), a({ ok: !0 })) : r(404, "not_found") : r(403, "not_owner");
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
const M = "NQ00 DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO", O = "https://github.com/lennylenders/PleaseNoBugs/releases";
|
|
183
|
-
function S(u) {
|
|
184
|
-
return new Promise((h) => setTimeout(() => h(u), 250));
|
|
185
|
-
}
|
|
186
|
-
const _ = 36e5, v = 24 * _;
|
|
187
|
-
function P(u, h, x) {
|
|
188
|
-
const l = h.thread ?? (h.reply ? [["app", h.reply]] : []);
|
|
189
|
-
if (!l.length) return {};
|
|
190
|
-
const p = l.map(([m, k], a) => ({
|
|
191
|
-
id: `demo-${u}-m${a}`,
|
|
192
|
-
from: m,
|
|
193
|
-
text: k,
|
|
194
|
-
at: x + (a + 1) * 5 * 6e4
|
|
195
|
-
})), f = b(p);
|
|
196
|
-
return { thread: p, ...f ? { reply: f } : {} };
|
|
197
|
-
}
|
|
198
|
-
const $ = [
|
|
199
|
-
{ title: "Switching accounts works again", text: "The send button stayed grey after you switched accounts. It now follows the account you picked.", version: "1.4.2", ago: 2 * v, posts: [1] },
|
|
200
|
-
{ title: "Opens faster", text: "About twice as fast on older phones.", version: "1.4.0", ago: 21 * v, posts: [] }
|
|
201
|
-
], U = [
|
|
202
|
-
{ kind: "idea", text: "A dark mode that follows my phone", votes: 24, ago: 6 * v, status: "planned", who: "Mira", reply: "On its way in the next release." },
|
|
203
|
-
{ kind: "bug", text: "The send button does nothing after I switch accounts", votes: 17, ago: 2 * v, status: "done", fix: "1.4.2", reply: "Thanks for the steps, that made it easy to find." },
|
|
204
|
-
{ kind: "review", text: "Fast, simple and it never asks me twice. Love it.", votes: 9, ago: 3 * v, rating: 5, who: "Joost" },
|
|
205
|
-
{ kind: "idea", text: "Let me pin my favourite contacts to the top", votes: 12, ago: 4 * _, mine: !0, thread: [["app", "Good one! Pinned at the top of the list, or on a Favourites tab of their own?"]] },
|
|
206
|
-
{ kind: "review", text: "Does what it says. The history screen could be clearer.", votes: 4, ago: 9 * v, rating: 4 },
|
|
207
|
-
{ kind: "bug", text: "Amounts over 1,000 overlap the currency on small phones", votes: 6, ago: 20 * _, who: "Sam", context: { version: "1.4.2", screen: "Send" }, thread: [["app", "Thanks! Which phone is it, and which currency?"], ["author", "An iPhone SE, in euros."]] },
|
|
208
|
-
{ kind: "idea", text: "Export my history as a CSV file", votes: 3, ago: 12 * v, status: "declined", reply: "Not for now: it would mean storing more than we want to." }
|
|
209
|
-
];
|
|
210
|
-
export {
|
|
211
|
-
N as createDemoClient
|
|
212
|
-
};
|