Skip to content

Commit 1d5d057

Browse files
mgurgelgithub-actions[bot]
authored andcommitted
Release build 6.21.0 [ci release]
1 parent dda7483 commit 1d5d057

File tree

7 files changed

+79
-17
lines changed

7 files changed

+79
-17
lines changed

Sources/ContentScopeScripts/dist/pages/special-error/index.html

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<title>SSL Error Page</title>
4+
<title>Error</title>
55
<meta name="robots" content="noindex,nofollow">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<script>
@@ -2554,9 +2554,6 @@
25542554
return /* @__PURE__ */ y("h1", null, "Something went wrong");
25552555
}
25562556

2557-
// pages/special-error/app/components/Warning.jsx
2558-
var import_classnames3 = __toESM(require_classnames(), 1);
2559-
25602557
// shared/translations.js
25612558
function apply(subject, replacements, textLength = 1) {
25622559
if (typeof subject !== "string" || subject.length === 0)
@@ -2716,6 +2713,9 @@
27162713
return q2(SpecialErrorContext).data;
27172714
}
27182715

2716+
// pages/special-error/app/components/Warning.jsx
2717+
var import_classnames3 = __toESM(require_classnames(), 1);
2718+
27192719
// pages/special-error/app/settings.js
27202720
var Settings = class _Settings {
27212721
/**
@@ -3019,14 +3019,28 @@
30193019
};
30203020
return /* @__PURE__ */ y("div", { className: App_default.container }, /* @__PURE__ */ y(Warning, { advancedInfoVisible, advancedButtonHandler }), advancedInfoVisible && /* @__PURE__ */ y(AdvancedInfo, null));
30213021
}
3022+
function PageTitle() {
3023+
const { kind } = useErrorData();
3024+
const { t: t3 } = useTypedTranslation();
3025+
p2(() => {
3026+
switch (kind) {
3027+
case "phishing":
3028+
document.title = t3("phishingPageHeading");
3029+
break;
3030+
default:
3031+
document.title = t3("sslPageHeading");
3032+
}
3033+
}, [kind, t3]);
3034+
return null;
3035+
}
30223036
function App() {
30233037
const { messaging: messaging2 } = useMessaging();
30243038
function didCatch(error) {
30253039
const message = error?.message || "unknown";
30263040
console.error("ErrorBoundary", message);
30273041
messaging2?.reportPageException({ message });
30283042
}
3029-
return /* @__PURE__ */ y("main", { className: App_default.main }, /* @__PURE__ */ y(ErrorBoundary, { didCatch, fallback: /* @__PURE__ */ y(ErrorFallback, null) }, /* @__PURE__ */ y(SpecialErrorView, null), /* @__PURE__ */ y(WillThrow, null)));
3043+
return /* @__PURE__ */ y("main", { className: App_default.main }, /* @__PURE__ */ y(PageTitle, null), /* @__PURE__ */ y(ErrorBoundary, { didCatch, fallback: /* @__PURE__ */ y(ErrorFallback, null) }, /* @__PURE__ */ y(SpecialErrorView, null), /* @__PURE__ */ y(WillThrow, null)));
30303044
}
30313045
function WillThrow() {
30323046
const env = useEnv();

Sources/ContentScopeScripts/dist/pages/special-error/js/index.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,9 +1772,6 @@
17721772
return /* @__PURE__ */ y("h1", null, "Something went wrong");
17731773
}
17741774

1775-
// pages/special-error/app/components/Warning.jsx
1776-
var import_classnames3 = __toESM(require_classnames(), 1);
1777-
17781775
// shared/translations.js
17791776
function apply(subject, replacements, textLength = 1) {
17801777
if (typeof subject !== "string" || subject.length === 0)
@@ -1934,6 +1931,9 @@
19341931
return q2(SpecialErrorContext).data;
19351932
}
19361933

1934+
// pages/special-error/app/components/Warning.jsx
1935+
var import_classnames3 = __toESM(require_classnames(), 1);
1936+
19371937
// pages/special-error/app/settings.js
19381938
var Settings = class _Settings {
19391939
/**
@@ -2237,14 +2237,28 @@
22372237
};
22382238
return /* @__PURE__ */ y("div", { className: App_default.container }, /* @__PURE__ */ y(Warning, { advancedInfoVisible, advancedButtonHandler }), advancedInfoVisible && /* @__PURE__ */ y(AdvancedInfo, null));
22392239
}
2240+
function PageTitle() {
2241+
const { kind } = useErrorData();
2242+
const { t: t3 } = useTypedTranslation();
2243+
p2(() => {
2244+
switch (kind) {
2245+
case "phishing":
2246+
document.title = t3("phishingPageHeading");
2247+
break;
2248+
default:
2249+
document.title = t3("sslPageHeading");
2250+
}
2251+
}, [kind, t3]);
2252+
return null;
2253+
}
22402254
function App() {
22412255
const { messaging: messaging2 } = useMessaging();
22422256
function didCatch(error) {
22432257
const message = error?.message || "unknown";
22442258
console.error("ErrorBoundary", message);
22452259
messaging2?.reportPageException({ message });
22462260
}
2247-
return /* @__PURE__ */ y("main", { className: App_default.main }, /* @__PURE__ */ y(ErrorBoundary, { didCatch, fallback: /* @__PURE__ */ y(ErrorFallback, null) }, /* @__PURE__ */ y(SpecialErrorView, null), /* @__PURE__ */ y(WillThrow, null)));
2261+
return /* @__PURE__ */ y("main", { className: App_default.main }, /* @__PURE__ */ y(PageTitle, null), /* @__PURE__ */ y(ErrorBoundary, { didCatch, fallback: /* @__PURE__ */ y(ErrorFallback, null) }, /* @__PURE__ */ y(SpecialErrorView, null), /* @__PURE__ */ y(WillThrow, null)));
22482262
}
22492263
function WillThrow() {
22502264
const env = useEnv();

build/integration/pages/special-error/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<title>SSL Error Page</title>
4+
<title>Error</title>
55
<meta name="robots" content="noindex,nofollow">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<script src="js/inline.js"></script>

build/integration/pages/special-error/js/index.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,9 +1772,6 @@
17721772
return /* @__PURE__ */ y("h1", null, "Something went wrong");
17731773
}
17741774

1775-
// pages/special-error/app/components/Warning.jsx
1776-
var import_classnames3 = __toESM(require_classnames(), 1);
1777-
17781775
// shared/translations.js
17791776
function apply(subject, replacements, textLength = 1) {
17801777
if (typeof subject !== "string" || subject.length === 0)
@@ -1934,6 +1931,9 @@
19341931
return q2(SpecialErrorContext).data;
19351932
}
19361933

1934+
// pages/special-error/app/components/Warning.jsx
1935+
var import_classnames3 = __toESM(require_classnames(), 1);
1936+
19371937
// pages/special-error/app/settings.js
19381938
var Settings = class _Settings {
19391939
/**
@@ -2237,14 +2237,28 @@
22372237
};
22382238
return /* @__PURE__ */ y("div", { className: App_default.container }, /* @__PURE__ */ y(Warning, { advancedInfoVisible, advancedButtonHandler }), advancedInfoVisible && /* @__PURE__ */ y(AdvancedInfo, null));
22392239
}
2240+
function PageTitle() {
2241+
const { kind } = useErrorData();
2242+
const { t: t3 } = useTypedTranslation();
2243+
p2(() => {
2244+
switch (kind) {
2245+
case "phishing":
2246+
document.title = t3("phishingPageHeading");
2247+
break;
2248+
default:
2249+
document.title = t3("sslPageHeading");
2250+
}
2251+
}, [kind, t3]);
2252+
return null;
2253+
}
22402254
function App() {
22412255
const { messaging: messaging2 } = useMessaging();
22422256
function didCatch(error) {
22432257
const message = error?.message || "unknown";
22442258
console.error("ErrorBoundary", message);
22452259
messaging2?.reportPageException({ message });
22462260
}
2247-
return /* @__PURE__ */ y("main", { className: App_default.main }, /* @__PURE__ */ y(ErrorBoundary, { didCatch, fallback: /* @__PURE__ */ y(ErrorFallback, null) }, /* @__PURE__ */ y(SpecialErrorView, null), /* @__PURE__ */ y(WillThrow, null)));
2261+
return /* @__PURE__ */ y("main", { className: App_default.main }, /* @__PURE__ */ y(PageTitle, null), /* @__PURE__ */ y(ErrorBoundary, { didCatch, fallback: /* @__PURE__ */ y(ErrorFallback, null) }, /* @__PURE__ */ y(SpecialErrorView, null), /* @__PURE__ */ y(WillThrow, null)));
22482262
}
22492263
function WillThrow() {
22502264
const env = useEnv();

integration-test/test-pages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Tests for runtime checks
2+
* Tests for shared pages
33
*/
44
import { processConfig } from '../src/utils.js'
55
import { setup } from './helpers/harness.js'

packages/special-pages/pages/special-error/app/components/App.jsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { h } from "preact";
2-
import { useState } from "preact/hooks";
2+
import { useEffect, useState } from "preact/hooks";
33
import { useEnv } from "../../../../shared/components/EnvironmentProvider";
44
import { useMessaging } from "../providers/MessagingProvider";
55
import { ErrorBoundary } from '../../../../shared/components/ErrorBoundary'
66
import { ErrorFallback } from "./ErrorFallback";
7+
import { useTypedTranslation } from '../types'
8+
import { useErrorData } from "../providers/SpecialErrorProvider";
79
import { Warning } from "./Warning";
810
import { AdvancedInfo } from "./AdvancedInfo";
911

@@ -26,6 +28,23 @@ export function SpecialErrorView() {
2628
)
2729
}
2830

31+
function PageTitle() {
32+
const { kind } = useErrorData()
33+
const { t } = useTypedTranslation()
34+
35+
useEffect(() => {
36+
switch(kind) {
37+
case 'phishing':
38+
document.title = t('phishingPageHeading')
39+
break;
40+
default:
41+
document.title = t('sslPageHeading')
42+
}
43+
}, [kind, t])
44+
45+
return null
46+
}
47+
2948
export function App() {
3049
const { messaging } = useMessaging()
3150

@@ -40,6 +59,7 @@ export function App() {
4059

4160
return (
4261
<main className={styles.main}>
62+
<PageTitle />
4363
<ErrorBoundary didCatch={didCatch} fallback={<ErrorFallback />}>
4464
<SpecialErrorView />
4565
<WillThrow/>

packages/special-pages/pages/special-error/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<title>SSL Error Page</title>
4+
<title>Error</title>
55
<meta name="robots" content="noindex,nofollow">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<script src="js/inline.js"></script>

0 commit comments

Comments
 (0)