Skip to content

Commit

Permalink
Release build 6.21.0 [ci release]
Browse files Browse the repository at this point in the history
  • Loading branch information
mgurgel authored and github-actions[bot] committed Oct 10, 2024
1 parent dda7483 commit 1d5d057
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 17 deletions.
24 changes: 19 additions & 5 deletions Sources/ContentScopeScripts/dist/pages/special-error/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>SSL Error Page</title>
<title>Error</title>
<meta name="robots" content="noindex,nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script>
Expand Down Expand Up @@ -2554,9 +2554,6 @@
return /* @__PURE__ */ y("h1", null, "Something went wrong");
}

// pages/special-error/app/components/Warning.jsx
var import_classnames3 = __toESM(require_classnames(), 1);

// shared/translations.js
function apply(subject, replacements, textLength = 1) {
if (typeof subject !== "string" || subject.length === 0)
Expand Down Expand Up @@ -2716,6 +2713,9 @@
return q2(SpecialErrorContext).data;
}

// pages/special-error/app/components/Warning.jsx
var import_classnames3 = __toESM(require_classnames(), 1);

// pages/special-error/app/settings.js
var Settings = class _Settings {
/**
Expand Down Expand Up @@ -3019,14 +3019,28 @@
};
return /* @__PURE__ */ y("div", { className: App_default.container }, /* @__PURE__ */ y(Warning, { advancedInfoVisible, advancedButtonHandler }), advancedInfoVisible && /* @__PURE__ */ y(AdvancedInfo, null));
}
function PageTitle() {
const { kind } = useErrorData();
const { t: t3 } = useTypedTranslation();
p2(() => {
switch (kind) {
case "phishing":
document.title = t3("phishingPageHeading");
break;
default:
document.title = t3("sslPageHeading");
}
}, [kind, t3]);
return null;
}
function App() {
const { messaging: messaging2 } = useMessaging();
function didCatch(error) {
const message = error?.message || "unknown";
console.error("ErrorBoundary", message);
messaging2?.reportPageException({ message });
}
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)));
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)));
}
function WillThrow() {
const env = useEnv();
Expand Down
22 changes: 18 additions & 4 deletions Sources/ContentScopeScripts/dist/pages/special-error/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1772,9 +1772,6 @@
return /* @__PURE__ */ y("h1", null, "Something went wrong");
}

// pages/special-error/app/components/Warning.jsx
var import_classnames3 = __toESM(require_classnames(), 1);

// shared/translations.js
function apply(subject, replacements, textLength = 1) {
if (typeof subject !== "string" || subject.length === 0)
Expand Down Expand Up @@ -1934,6 +1931,9 @@
return q2(SpecialErrorContext).data;
}

// pages/special-error/app/components/Warning.jsx
var import_classnames3 = __toESM(require_classnames(), 1);

// pages/special-error/app/settings.js
var Settings = class _Settings {
/**
Expand Down Expand Up @@ -2237,14 +2237,28 @@
};
return /* @__PURE__ */ y("div", { className: App_default.container }, /* @__PURE__ */ y(Warning, { advancedInfoVisible, advancedButtonHandler }), advancedInfoVisible && /* @__PURE__ */ y(AdvancedInfo, null));
}
function PageTitle() {
const { kind } = useErrorData();
const { t: t3 } = useTypedTranslation();
p2(() => {
switch (kind) {
case "phishing":
document.title = t3("phishingPageHeading");
break;
default:
document.title = t3("sslPageHeading");
}
}, [kind, t3]);
return null;
}
function App() {
const { messaging: messaging2 } = useMessaging();
function didCatch(error) {
const message = error?.message || "unknown";
console.error("ErrorBoundary", message);
messaging2?.reportPageException({ message });
}
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)));
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)));
}
function WillThrow() {
const env = useEnv();
Expand Down
2 changes: 1 addition & 1 deletion build/integration/pages/special-error/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>SSL Error Page</title>
<title>Error</title>
<meta name="robots" content="noindex,nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="js/inline.js"></script>
Expand Down
22 changes: 18 additions & 4 deletions build/integration/pages/special-error/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1772,9 +1772,6 @@
return /* @__PURE__ */ y("h1", null, "Something went wrong");
}

// pages/special-error/app/components/Warning.jsx
var import_classnames3 = __toESM(require_classnames(), 1);

// shared/translations.js
function apply(subject, replacements, textLength = 1) {
if (typeof subject !== "string" || subject.length === 0)
Expand Down Expand Up @@ -1934,6 +1931,9 @@
return q2(SpecialErrorContext).data;
}

// pages/special-error/app/components/Warning.jsx
var import_classnames3 = __toESM(require_classnames(), 1);

// pages/special-error/app/settings.js
var Settings = class _Settings {
/**
Expand Down Expand Up @@ -2237,14 +2237,28 @@
};
return /* @__PURE__ */ y("div", { className: App_default.container }, /* @__PURE__ */ y(Warning, { advancedInfoVisible, advancedButtonHandler }), advancedInfoVisible && /* @__PURE__ */ y(AdvancedInfo, null));
}
function PageTitle() {
const { kind } = useErrorData();
const { t: t3 } = useTypedTranslation();
p2(() => {
switch (kind) {
case "phishing":
document.title = t3("phishingPageHeading");
break;
default:
document.title = t3("sslPageHeading");
}
}, [kind, t3]);
return null;
}
function App() {
const { messaging: messaging2 } = useMessaging();
function didCatch(error) {
const message = error?.message || "unknown";
console.error("ErrorBoundary", message);
messaging2?.reportPageException({ message });
}
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)));
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)));
}
function WillThrow() {
const env = useEnv();
Expand Down
2 changes: 1 addition & 1 deletion integration-test/test-pages.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Tests for runtime checks
* Tests for shared pages
*/
import { processConfig } from '../src/utils.js'
import { setup } from './helpers/harness.js'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { h } from "preact";
import { useState } from "preact/hooks";
import { useEffect, useState } from "preact/hooks";
import { useEnv } from "../../../../shared/components/EnvironmentProvider";
import { useMessaging } from "../providers/MessagingProvider";
import { ErrorBoundary } from '../../../../shared/components/ErrorBoundary'
import { ErrorFallback } from "./ErrorFallback";
import { useTypedTranslation } from '../types'
import { useErrorData } from "../providers/SpecialErrorProvider";
import { Warning } from "./Warning";
import { AdvancedInfo } from "./AdvancedInfo";

Expand All @@ -26,6 +28,23 @@ export function SpecialErrorView() {
)
}

function PageTitle() {
const { kind } = useErrorData()
const { t } = useTypedTranslation()

useEffect(() => {
switch(kind) {
case 'phishing':
document.title = t('phishingPageHeading')
break;
default:
document.title = t('sslPageHeading')
}
}, [kind, t])

return null
}

export function App() {
const { messaging } = useMessaging()

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

return (
<main className={styles.main}>
<PageTitle />
<ErrorBoundary didCatch={didCatch} fallback={<ErrorFallback />}>
<SpecialErrorView />
<WillThrow/>
Expand Down
2 changes: 1 addition & 1 deletion packages/special-pages/pages/special-error/src/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>SSL Error Page</title>
<title>Error</title>
<meta name="robots" content="noindex,nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="js/inline.js"></script>
Expand Down

0 comments on commit 1d5d057

Please sign in to comment.