Skip to content

Commit 7c2ca68

Browse files
[add] Signature Disclaimer alert
1 parent 6e85970 commit 7c2ca68

4 files changed

Lines changed: 20 additions & 2 deletions

File tree

pages/signature.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,30 @@ export default class SignaturePage extends ObservedComponent<RouteProps, typeof
4545
const { t } = this.observedContext,
4646
{ value, iframeLink } = this.props.route.query;
4747

48-
const title = value ? textJoin(t('sign'), value + '') : t('generate_key_pair');
48+
const title = value ? textJoin(t('sign'), value + '') : t('generate_key_pair'),
49+
link = `${iframeLink}?${this.linkData}`;
4950

5051
return (
5152
<Container>
5253
<PageHead title={title} />
5354

5455
<h1 className="my-5 text-truncate">{title}</h1>
5556

57+
<section className="markdown-body bg-white py-4">
58+
<blockquote>{t('signature_disclaimer')}</blockquote>
59+
<pre>
60+
<code>
61+
<a href={link} target="_blank" rel="noopener noreferrer">
62+
{link}
63+
</a>
64+
</code>
65+
</pre>
66+
</section>
67+
5668
<iframe
5769
className="border-0 w-100 vh-100"
5870
sandbox="allow-scripts allow-same-origin allow-forms"
59-
src={`${iframeLink}?${this.linkData}`}
71+
src={link}
6072
/>
6173
</Container>
6274
);

translation/en-US.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ export default {
108108
// Signature page
109109
sign: 'Sign',
110110
generate_key_pair: 'Generate Key Pair',
111+
signature_disclaimer:
112+
'This page is a public service that provides Key Pair & Signature generation based on Web crypto API. Due to the sandbox environment of web browsers, the generated Private Key is only securely stored locally on the user, while the Public Key and Signature will be sent to the following third-party Web page for authentication. Please confirm the security of that website yourself.',
111113

112114
// Wiki
113115
knowledge_base: 'Knowledge Base',

translation/zh-CN.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ export default {
106106
// Signature page
107107
sign: '签名',
108108
generate_key_pair: '生成密钥对',
109+
signature_disclaimer:
110+
'本页为公共服务,基于 Web crypto API 提供生成密钥对和签名功能。由于网页浏览器的沙盒环境,生成的私钥仅安全地保存在用户本地,公钥、签名会传给以下第三方网页用于身份验证,请自行确认该网站的安全性。',
109111

110112
// Wiki
111113
knowledge_base: '知识库',

translation/zh-TW.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ export default {
106106
// Signature page
107107
sign: '簽名',
108108
generate_key_pair: '生成密鑰對',
109+
signature_disclaimer:
110+
'本頁為公共服務,基於 Web crypto API 提供生成密鑰對和簽名功能。由於網頁瀏覽器的沙盒環境,生成的私鑰僅安全地保存在用戶本地,公鑰、簽名會傳給以下第三方網頁用於身份驗證,請自行確認該網站的安全性。',
109111

110112
// Wiki
111113
knowledge_base: '知識庫',

0 commit comments

Comments
 (0)