@ciromaciel/dashboard-kit 1.0.2 → 1.0.4
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 +1 -1
- package/package.json +3 -3
- package/src/components/SupportModal.jsx +4 -4
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ consumer already knows how to produce. One less moving part to break.
|
|
|
68
68
|
|
|
69
69
|
## Links
|
|
70
70
|
|
|
71
|
-
- [
|
|
71
|
+
- [Website](https://ciromaciel.click)
|
|
72
72
|
- [Package on npm](https://www.npmjs.com/package/@ciromaciel/dashboard-kit)
|
|
73
73
|
|
|
74
74
|
MIT © [Ciro Cesar Maciel](https://ciromaciel.click)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ciromaciel/dashboard-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "The components every dashboard shares: table, empty state, loading state, destructive confirm and wordmark.",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"homepage": "https://
|
|
41
|
+
"homepage": "https://ciromaciel.click",
|
|
42
42
|
"bugs": {
|
|
43
|
-
"url": "https://
|
|
43
|
+
"url": "https://ciromaciel.click"
|
|
44
44
|
},
|
|
45
45
|
"author": "Ciro Cesar Maciel <maciel.ciro@icloud.com> (https://ciromaciel.click)"
|
|
46
46
|
}
|
|
@@ -29,7 +29,7 @@ import { ZenLabel } from './ZenLabel'
|
|
|
29
29
|
* name ITS resources (a project, a domain, a monitor). Everything else is the
|
|
30
30
|
* same in all four.
|
|
31
31
|
*
|
|
32
|
-
* @param {string} productName Names the mail subject: "Suporte ·
|
|
32
|
+
* @param {string} productName Names the mail subject: "Suporte · Infrastructure <name>".
|
|
33
33
|
* @param {string} apiUrl The root that gets measured. `GET /` must be public.
|
|
34
34
|
* @param {string[]} contextRows Lines appended to the mail body, already formatted.
|
|
35
35
|
*/
|
|
@@ -149,7 +149,7 @@ export function SupportModal({
|
|
|
149
149
|
|
|
150
150
|
/*
|
|
151
151
|
* A warning, not an exception — same posture as `Wordmark`, and for the same
|
|
152
|
-
* reason. Without `productName` the mail subject reads "Suporte ·
|
|
152
|
+
* reason. Without `productName` the mail subject reads "Suporte · Infrastructure
|
|
153
153
|
* undefined"; without `apiUrl` the status line measures nothing and the body
|
|
154
154
|
* reports "não verificado". Neither breaks the build, and neither shows up
|
|
155
155
|
* until someone reads the e-mail that arrived.
|
|
@@ -158,7 +158,7 @@ export function SupportModal({
|
|
|
158
158
|
* green and ships the broken subject.
|
|
159
159
|
*/
|
|
160
160
|
if (typeof console !== 'undefined') {
|
|
161
|
-
if (!productName) console.warn('[dashboard-kit] <SupportModal> without `productName`: the mail subject reads "Suporte ·
|
|
161
|
+
if (!productName) console.warn('[dashboard-kit] <SupportModal> without `productName`: the mail subject reads "Suporte · Infrastructure undefined". Pass `productName`.')
|
|
162
162
|
if (!apiUrl) console.warn('[dashboard-kit] <SupportModal> without `apiUrl`: nothing is measured and the e-mail reports "não verificado".')
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -174,7 +174,7 @@ export function SupportModal({
|
|
|
174
174
|
*/
|
|
175
175
|
const body = ['Descreva o que aconteceu:', '', '', '---', ...contextRows, `API: ${host}`, `Estado da API: ${apiState}`, `Navegador: ${navigator.userAgent}`].join('\n')
|
|
176
176
|
|
|
177
|
-
const mailSubject = subject ?? `Suporte ·
|
|
177
|
+
const mailSubject = subject ?? `Suporte · Infrastructure ${productName}`
|
|
178
178
|
const mailto = `mailto:${supportEmail}?subject=${encodeURIComponent(mailSubject)}&body=${encodeURIComponent(body)}`
|
|
179
179
|
|
|
180
180
|
return (
|