@onekeyfe/inpage-providers-hub 2.0.0-alpha.4 → 2.0.0-alpha.5
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.
|
@@ -35,8 +35,8 @@ class ShadowModal {
|
|
|
35
35
|
this.render();
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
var _a, _b, _c, _d, _e, _f
|
|
39
|
-
const { title = "Malicious Dapp", description = "The current website may be malicious. Continue visiting could result in loss of assets.", continueMessage = "If you understand the risks and want to proceed, you can", continueLink = "dismiss", addToWhiteListLink = "add to whitelist",
|
|
38
|
+
var _a, _b, _c, _d, _e, _f;
|
|
39
|
+
const { title = "Malicious Dapp", description = "The current website may be malicious. Continue visiting could result in loss of assets.", continueMessage = "If you understand the risks and want to proceed, you can", continueLink = "dismiss", addToWhiteListLink = "add to whitelist", sourceMessage = "Powered by", } = (_b = (_a = this.riskInfo) === null || _a === void 0 ? void 0 : _a.i18n) !== null && _b !== void 0 ? _b : {};
|
|
40
40
|
// 创建样式
|
|
41
41
|
const style = document.createElement("style");
|
|
42
42
|
style.textContent = style_1.styleContent;
|
|
@@ -53,18 +53,12 @@ class ShadowModal {
|
|
|
53
53
|
riskWarning.className = "onekey-inject-risk-warning";
|
|
54
54
|
riskWarning.innerHTML = `<div class="onekey-inject-title onekey-inject-font onekey-inject-headingXl">
|
|
55
55
|
<div class="onekey-inject-error-icon">
|
|
56
|
-
<div class="onekey-inject-error-icon-content"></div>
|
|
57
56
|
</div>
|
|
58
57
|
${title}
|
|
59
58
|
</div>
|
|
60
59
|
<p class="onekey-inject-text-wrap onekey-inject-font onekey-inject-bodyLg">${description}</p>
|
|
61
60
|
<p class="onekey-inject-font onekey-inject-bodyLg onekey-inject-text-subdued">${continueMessage}${" "}<span id="onekey-inject-continue" class="onekey-inject-continue-link">${continueLink}</span>${" or "}<span id="onekey-inject-addToWhiteList" class="onekey-inject-continue-link">${addToWhiteListLink}</span>.</p>
|
|
62
61
|
`;
|
|
63
|
-
const closeButton = document.createElement("button");
|
|
64
|
-
closeButton.className =
|
|
65
|
-
"onekey-inject-close-btn onekey-inject-font onekey-inject-bodyLg-medium";
|
|
66
|
-
closeButton.textContent = btnText;
|
|
67
|
-
closeButton.onclick = () => this.closeTab();
|
|
68
62
|
const footer = document.createElement("div");
|
|
69
63
|
footer.className =
|
|
70
64
|
"onekey-inject-footer onekey-inject-font onekey-inject-bodyLg";
|
|
@@ -75,16 +69,13 @@ class ShadowModal {
|
|
|
75
69
|
</div>`;
|
|
76
70
|
// 组装
|
|
77
71
|
modal.appendChild(riskWarning);
|
|
78
|
-
if (!((_c = this.riskInfo) === null || _c === void 0 ? void 0 : _c.isExtension)) {
|
|
79
|
-
modal.appendChild(closeButton);
|
|
80
|
-
}
|
|
81
72
|
modalContainer.appendChild(modal);
|
|
82
73
|
modalContainer.appendChild(footer);
|
|
83
74
|
overlay.appendChild(modalContainer);
|
|
84
|
-
(
|
|
85
|
-
(
|
|
86
|
-
const continueButton = (
|
|
87
|
-
const addToWhiteListButton = (
|
|
75
|
+
(_c = this.shadowRoot) === null || _c === void 0 ? void 0 : _c.appendChild(style);
|
|
76
|
+
(_d = this.shadowRoot) === null || _d === void 0 ? void 0 : _d.appendChild(overlay);
|
|
77
|
+
const continueButton = (_e = this.shadowRoot) === null || _e === void 0 ? void 0 : _e.getElementById("onekey-inject-continue");
|
|
78
|
+
const addToWhiteListButton = (_f = this.shadowRoot) === null || _f === void 0 ? void 0 : _f.getElementById("onekey-inject-addToWhiteList");
|
|
88
79
|
if (continueButton) {
|
|
89
80
|
console.log("continueButton --> onclick", continueButton);
|
|
90
81
|
continueButton.addEventListener("click", () => this.closeOverlay());
|
|
@@ -35,10 +35,9 @@ exports.styleContent = `
|
|
|
35
35
|
width: 100vw;
|
|
36
36
|
height: 100%;
|
|
37
37
|
padding: 20px;
|
|
38
|
-
background-color: rgba(
|
|
38
|
+
background-color: rgba(0, 0, 0, 0.27);
|
|
39
39
|
display: flex;
|
|
40
|
-
|
|
41
|
-
align-items: center;
|
|
40
|
+
align-items: flex-end;
|
|
42
41
|
flex-direction: column;
|
|
43
42
|
z-index: 100000;
|
|
44
43
|
box-sizing: border-box;
|
|
@@ -49,7 +48,6 @@ exports.styleContent = `
|
|
|
49
48
|
flex-direction: column;
|
|
50
49
|
align-items: flex-start;
|
|
51
50
|
border-radius: 24px;
|
|
52
|
-
border: 3px solid rgba(217, 0, 3, 0.32);
|
|
53
51
|
background: #FFF;
|
|
54
52
|
box-shadow: 0px 12px 24px 0px rgba(0, 0, 0, 0.09);
|
|
55
53
|
}
|
|
@@ -63,27 +61,15 @@ exports.styleContent = `
|
|
|
63
61
|
padding: 20px 20px 0 16px;
|
|
64
62
|
}
|
|
65
63
|
.onekey-inject-error-icon {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
height: 56px;
|
|
71
|
-
padding: 12px;
|
|
72
|
-
margin-right: 12px;
|
|
73
|
-
border-radius: 9999px;
|
|
74
|
-
background: rgba(255, 5, 5, 0.03);
|
|
75
|
-
box-sizing: border-box;
|
|
76
|
-
}
|
|
77
|
-
.onekey-inject-error-icon-content {
|
|
78
|
-
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="33" viewBox="0 0 32 33" fill="none"><path d="M17.3327 12.5254C17.3327 11.789 16.7357 11.1921 15.9993 11.1921C15.263 11.1921 14.666 11.789 14.666 12.5254V16.5177C14.666 17.2541 15.263 17.8511 15.9993 17.8511C16.7357 17.8511 17.3327 17.2541 17.3327 16.5177V12.5254Z" fill="%23BB0007" fill-opacity="0.836"/><path d="M15.9993 18.8332C15.0789 18.8332 14.3327 19.5794 14.3327 20.4998C14.3327 21.4203 15.0789 22.1665 15.9993 22.1665C16.9198 22.1665 17.666 21.4203 17.666 20.4998C17.666 19.5794 16.9198 18.8332 15.9993 18.8332Z" fill="%23BB0007" fill-opacity="0.836"/><path fill-rule="evenodd" clip-rule="evenodd" d="M19.4492 5.14869C17.9081 2.50577 14.0905 2.50578 12.5494 5.14869L3.21393 21.1589C1.66148 23.8213 3.5806 27.1665 6.66382 27.1665H25.3348C28.4181 27.1665 30.3372 23.8213 28.7847 21.1589L19.4492 5.14869ZM14.8531 6.49194C15.3653 5.61358 16.6334 5.61358 17.1456 6.49194L26.4811 22.5022C26.9979 23.3884 26.3583 24.4998 25.3348 24.4998H6.66382C5.64037 24.4998 5.00079 23.3884 5.51758 22.5022L14.8531 6.49194Z" fill="%23BB0007" fill-opacity="0.836"/></svg>');
|
|
79
|
-
width: 32px; /* SVG width */
|
|
80
|
-
height: 33px; /* SVG height */
|
|
64
|
+
background-image: url('data:image/svg+xml;utf8,<svg width="20" height="18" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.9995 7.01917C10.9995 6.46689 10.5518 6.01917 9.9995 6.01917C9.44722 6.01917 8.9995 6.46689 8.9995 7.01917V10.0134C8.9995 10.5657 9.44722 11.0134 9.9995 11.0134C10.5518 11.0134 10.9995 10.5657 10.9995 10.0134V7.01917Z" fill="%23FF858A"/><path d="M9.99951 11.75C9.30916 11.75 8.74951 12.3096 8.74951 13C8.74951 13.6904 9.30916 14.25 9.99951 14.25C10.6899 14.25 11.2495 13.6904 11.2495 13C11.2495 12.3096 10.6899 11.75 9.99951 11.75Z" fill="%23FF858A"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12.5869 1.48664C11.4311 -0.495548 8.56789 -0.495543 7.41208 1.48664L0.410446 13.4943C-0.753887 15.4911 0.685449 18 2.99786 18H17.0011C19.3135 18 20.7529 15.4911 19.5886 13.4943L12.5869 1.48664ZM9.13982 2.49408C9.52394 1.83531 10.4751 1.83531 10.8592 2.49407L17.8608 14.5017C18.2484 15.1664 17.7687 16 17.0011 16H2.99786C2.23028 16 1.75059 15.1665 2.13818 14.5017L9.13982 2.49408Z" fill="%23FF858A"/></svg>');
|
|
65
|
+
width: 20px; /* SVG width */
|
|
66
|
+
height: 18px; /* SVG height */
|
|
67
|
+
margin-right: 12px;
|
|
81
68
|
display: block;
|
|
82
69
|
}
|
|
83
70
|
.onekey-inject-error-icon > img {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
border-radius: 9999px;
|
|
71
|
+
width: 24px;
|
|
72
|
+
height: 24px;
|
|
87
73
|
}
|
|
88
74
|
.onekey-inject-title {
|
|
89
75
|
display: flex;
|
|
@@ -98,7 +84,7 @@ exports.styleContent = `
|
|
|
98
84
|
}
|
|
99
85
|
.onekey-inject-text-subdued {
|
|
100
86
|
margin-top: 8px;
|
|
101
|
-
|
|
87
|
+
margin-bottom: 0px;
|
|
102
88
|
color: rgba(0, 0, 0, 0.61);
|
|
103
89
|
}
|
|
104
90
|
.onekey-inject-continue-link {
|
|
@@ -111,28 +97,6 @@ exports.styleContent = `
|
|
|
111
97
|
.onekey-inject-continue-link:active {
|
|
112
98
|
color: rgba(0, 0, 0, 0.5);
|
|
113
99
|
}
|
|
114
|
-
.onekey-inject-close-btn {
|
|
115
|
-
display: flex;
|
|
116
|
-
height: 38px;
|
|
117
|
-
padding: 6px 14px;
|
|
118
|
-
margin-bottom: 20px;
|
|
119
|
-
justify-content: center;
|
|
120
|
-
align-items: center;
|
|
121
|
-
gap: 8px;
|
|
122
|
-
align-self: stretch;
|
|
123
|
-
border-radius: 8px;
|
|
124
|
-
border: 1px solid rgba(170, 170, 170, 0);
|
|
125
|
-
background: rgba(0, 0, 0, 0.88);
|
|
126
|
-
color: rgba(255, 255, 255, 0.93);
|
|
127
|
-
text-align: center;
|
|
128
|
-
cursor: pointer;
|
|
129
|
-
}
|
|
130
|
-
.onekey-inject-close-btn:hover {
|
|
131
|
-
background: rgba(0, 0, 0, 0.7);
|
|
132
|
-
}
|
|
133
|
-
.onekey-inject-close-btn:active {
|
|
134
|
-
background: rgba(0, 0, 0, 0.5);
|
|
135
|
-
}
|
|
136
100
|
.onekey-inject-footer {
|
|
137
101
|
display: flex;
|
|
138
102
|
padding:16px 20px;
|
|
@@ -181,22 +145,9 @@ exports.styleContent = `
|
|
|
181
145
|
.onekey-inject-footer {
|
|
182
146
|
background: #1B1B1B;
|
|
183
147
|
}
|
|
184
|
-
.onekey-inject-error-icon {
|
|
185
|
-
background: rgba(254, 0, 25, 0.07);
|
|
186
|
-
}
|
|
187
148
|
.onekey-inject-text-subdued {
|
|
188
149
|
color: rgba(255, 255, 255, 0.66);
|
|
189
150
|
}
|
|
190
|
-
.onekey-inject-close-btn {
|
|
191
|
-
border: 1px solid rgba(170, 170, 170, 0.00);
|
|
192
|
-
background: rgba(255, 255, 255, 0.93);
|
|
193
|
-
}
|
|
194
|
-
.onekey-inject-close-btn:hover {
|
|
195
|
-
background: rgba(255, 255, 255, 0.7);
|
|
196
|
-
}
|
|
197
|
-
.onekey-inject-close-btn:active {
|
|
198
|
-
background: rgba(255, 255, 255, 0.5);
|
|
199
|
-
}
|
|
200
151
|
.onekey-inject-continue-link:hover {
|
|
201
152
|
color: rgba(255, 255, 255, 0.7);
|
|
202
153
|
}
|
|
@@ -32,8 +32,8 @@ class ShadowModal {
|
|
|
32
32
|
this.render();
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
|
-
var _a, _b, _c, _d, _e, _f
|
|
36
|
-
const { title = "Malicious Dapp", description = "The current website may be malicious. Continue visiting could result in loss of assets.", continueMessage = "If you understand the risks and want to proceed, you can", continueLink = "dismiss", addToWhiteListLink = "add to whitelist",
|
|
35
|
+
var _a, _b, _c, _d, _e, _f;
|
|
36
|
+
const { title = "Malicious Dapp", description = "The current website may be malicious. Continue visiting could result in loss of assets.", continueMessage = "If you understand the risks and want to proceed, you can", continueLink = "dismiss", addToWhiteListLink = "add to whitelist", sourceMessage = "Powered by", } = (_b = (_a = this.riskInfo) === null || _a === void 0 ? void 0 : _a.i18n) !== null && _b !== void 0 ? _b : {};
|
|
37
37
|
// 创建样式
|
|
38
38
|
const style = document.createElement("style");
|
|
39
39
|
style.textContent = styleContent;
|
|
@@ -50,18 +50,12 @@ class ShadowModal {
|
|
|
50
50
|
riskWarning.className = "onekey-inject-risk-warning";
|
|
51
51
|
riskWarning.innerHTML = `<div class="onekey-inject-title onekey-inject-font onekey-inject-headingXl">
|
|
52
52
|
<div class="onekey-inject-error-icon">
|
|
53
|
-
<div class="onekey-inject-error-icon-content"></div>
|
|
54
53
|
</div>
|
|
55
54
|
${title}
|
|
56
55
|
</div>
|
|
57
56
|
<p class="onekey-inject-text-wrap onekey-inject-font onekey-inject-bodyLg">${description}</p>
|
|
58
57
|
<p class="onekey-inject-font onekey-inject-bodyLg onekey-inject-text-subdued">${continueMessage}${" "}<span id="onekey-inject-continue" class="onekey-inject-continue-link">${continueLink}</span>${" or "}<span id="onekey-inject-addToWhiteList" class="onekey-inject-continue-link">${addToWhiteListLink}</span>.</p>
|
|
59
58
|
`;
|
|
60
|
-
const closeButton = document.createElement("button");
|
|
61
|
-
closeButton.className =
|
|
62
|
-
"onekey-inject-close-btn onekey-inject-font onekey-inject-bodyLg-medium";
|
|
63
|
-
closeButton.textContent = btnText;
|
|
64
|
-
closeButton.onclick = () => this.closeTab();
|
|
65
59
|
const footer = document.createElement("div");
|
|
66
60
|
footer.className =
|
|
67
61
|
"onekey-inject-footer onekey-inject-font onekey-inject-bodyLg";
|
|
@@ -72,16 +66,13 @@ class ShadowModal {
|
|
|
72
66
|
</div>`;
|
|
73
67
|
// 组装
|
|
74
68
|
modal.appendChild(riskWarning);
|
|
75
|
-
if (!((_c = this.riskInfo) === null || _c === void 0 ? void 0 : _c.isExtension)) {
|
|
76
|
-
modal.appendChild(closeButton);
|
|
77
|
-
}
|
|
78
69
|
modalContainer.appendChild(modal);
|
|
79
70
|
modalContainer.appendChild(footer);
|
|
80
71
|
overlay.appendChild(modalContainer);
|
|
81
|
-
(
|
|
82
|
-
(
|
|
83
|
-
const continueButton = (
|
|
84
|
-
const addToWhiteListButton = (
|
|
72
|
+
(_c = this.shadowRoot) === null || _c === void 0 ? void 0 : _c.appendChild(style);
|
|
73
|
+
(_d = this.shadowRoot) === null || _d === void 0 ? void 0 : _d.appendChild(overlay);
|
|
74
|
+
const continueButton = (_e = this.shadowRoot) === null || _e === void 0 ? void 0 : _e.getElementById("onekey-inject-continue");
|
|
75
|
+
const addToWhiteListButton = (_f = this.shadowRoot) === null || _f === void 0 ? void 0 : _f.getElementById("onekey-inject-addToWhiteList");
|
|
85
76
|
if (continueButton) {
|
|
86
77
|
console.log("continueButton --> onclick", continueButton);
|
|
87
78
|
continueButton.addEventListener("click", () => this.closeOverlay());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const styleContent = "\n.onekey-inject-font {\n\tfont-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\n\tfont-style: normal;\n\tletter-spacing: -0.32px;\n\tcolor: rgba(0, 0, 0, 0.88);\n}\n.onekey-inject-headingXl {\n\t/* headingXl */\n\tfont-size: 20px;\n\tfont-weight: 600;\n\tline-height: 28px; /* 140% */\n\tletter-spacing: 0.38px;\n}\n.onekey-inject-bodyLg {\n\t/* bodyLg */\n\tfont-size: 16px;\n\tfont-weight: 400;\n\tline-height: 24px; /* 150% */\n}\n.onekey-inject-bodyLg-medium {\n\t/* bodyLg-medium */\n\tfont-size: 16px;\n\tfont-weight: 500;\n\tline-height: 24px; /* 150% */\n\tcolor: rgba(255, 255, 255, 0.93);\n}\n.onekey-inject-overlay {\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100vw;\n\theight: 100%;\n\tpadding: 20px;\n\tbackground-color: rgba(
|
|
1
|
+
export declare const styleContent = "\n.onekey-inject-font {\n\tfont-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\n\tfont-style: normal;\n\tletter-spacing: -0.32px;\n\tcolor: rgba(0, 0, 0, 0.88);\n}\n.onekey-inject-headingXl {\n\t/* headingXl */\n\tfont-size: 20px;\n\tfont-weight: 600;\n\tline-height: 28px; /* 140% */\n\tletter-spacing: 0.38px;\n}\n.onekey-inject-bodyLg {\n\t/* bodyLg */\n\tfont-size: 16px;\n\tfont-weight: 400;\n\tline-height: 24px; /* 150% */\n}\n.onekey-inject-bodyLg-medium {\n\t/* bodyLg-medium */\n\tfont-size: 16px;\n\tfont-weight: 500;\n\tline-height: 24px; /* 150% */\n\tcolor: rgba(255, 255, 255, 0.93);\n}\n.onekey-inject-overlay {\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100vw;\n\theight: 100%;\n\tpadding: 20px;\n\tbackground-color: rgba(0, 0, 0, 0.27);\n\tdisplay: flex;\n\talign-items: flex-end;\n\tflex-direction: column;\n\tz-index: 100000;\n\tbox-sizing: border-box;\n}\n.onekey-inject-modal-container {\n\tdisplay: flex;\n\tmax-width: 384px;\n\tflex-direction: column;\n\talign-items: flex-start;\n\tborder-radius: 24px;\n\tbackground: #FFF;\n\tbox-shadow: 0px 12px 24px 0px rgba(0, 0, 0, 0.09);\n}\n.onekey-inject-modal {\n\tdisplay: flex;\n\tmax-width: 384px;\n\tflex-direction: column;\n\talign-items: flex-start;\n\tborder-radius: 24px;\n\tbackground: #FFF;\n\tpadding: 20px 20px 0 16px;\n}\n.onekey-inject-error-icon {\n\tbackground-image: url('data:image/svg+xml;utf8,<svg width=\"20\" height=\"18\" viewBox=\"0 0 20 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.9995 7.01917C10.9995 6.46689 10.5518 6.01917 9.9995 6.01917C9.44722 6.01917 8.9995 6.46689 8.9995 7.01917V10.0134C8.9995 10.5657 9.44722 11.0134 9.9995 11.0134C10.5518 11.0134 10.9995 10.5657 10.9995 10.0134V7.01917Z\" fill=\"%23FF858A\"/><path d=\"M9.99951 11.75C9.30916 11.75 8.74951 12.3096 8.74951 13C8.74951 13.6904 9.30916 14.25 9.99951 14.25C10.6899 14.25 11.2495 13.6904 11.2495 13C11.2495 12.3096 10.6899 11.75 9.99951 11.75Z\" fill=\"%23FF858A\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.5869 1.48664C11.4311 -0.495548 8.56789 -0.495543 7.41208 1.48664L0.410446 13.4943C-0.753887 15.4911 0.685449 18 2.99786 18H17.0011C19.3135 18 20.7529 15.4911 19.5886 13.4943L12.5869 1.48664ZM9.13982 2.49408C9.52394 1.83531 10.4751 1.83531 10.8592 2.49407L17.8608 14.5017C18.2484 15.1664 17.7687 16 17.0011 16H2.99786C2.23028 16 1.75059 15.1665 2.13818 14.5017L9.13982 2.49408Z\" fill=\"%23FF858A\"/></svg>');\n width: 20px; /* SVG width */\n height: 18px; /* SVG height */\n margin-right: 12px;\n display: block;\n}\n.onekey-inject-error-icon > img {\n width: 24px;\n height: 24px;\n}\n.onekey-inject-title {\n\tdisplay: flex;\n\talign-items: center;\n}\n.onekey-inject-risk-warning {\n\tmargin-bottom: 20px;\n}\n.onekey-inject-text-wrap {\n\tmargin: 0;\n\tmargin-top: 20px;\n}\n.onekey-inject-text-subdued {\n margin-top: 8px;\n margin-bottom: 0px;\n\tcolor: rgba(0, 0, 0, 0.61);\n}\n.onekey-inject-continue-link {\n\ttext-decoration: underline;\n\tcursor: pointer;\n}\n.onekey-inject-continue-link:hover {\n\tcolor: rgba(0, 0, 0, 0.7);\n}\n.onekey-inject-continue-link:active {\n\tcolor: rgba(0, 0, 0, 0.5);\n}\n.onekey-inject-footer {\n\tdisplay: flex;\n\tpadding:16px 20px;\n\tflex-direction: row;\n\tjustify-content: center;\n\talign-items: center;\n\tgap: 8px;\n\talign-self: stretch;\n\theight: 56px;\n\tbackground: #F9F9F9;\n\tborder-radius: 0 0 24px 24px;\n\tbox-sizing: border-box;\n\tcolor: rgba(0, 0, 0, 0.61);\n}\n.onekey-inject-logo {\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\tcolor: rgba(0, 0, 0, 0.88);\n\tfont-weight: 600;\n}\n.onekey-inject-logo-content {\n\twidth: 20px;\n\theight: 20px;\n\tmargin-right: 6px;\n\tbackground-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='21' viewBox='0 0 21 21' fill='none'%3E%3Cpath d='M10.4987 14.4595C11.3758 14.4595 12.0867 13.7485 12.0867 12.8715C12.0867 11.9945 11.3758 11.2836 10.4987 11.2836C9.62174 11.2836 8.91078 11.9945 8.91078 12.8715C8.91078 13.7485 9.62174 14.4595 10.4987 14.4595Z' fill='black' fill-opacity='0.875'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.4987 19.6668C16.827 19.6668 19.6654 16.8284 19.6654 10.5002C19.6654 4.1719 16.827 1.3335 10.4987 1.3335C4.17044 1.3335 1.33203 4.1719 1.33203 10.5002C1.33203 16.8284 4.17044 19.6668 10.4987 19.6668ZM8.77681 5.22049H11.3269V9.42284H9.74582V6.57329H8.32942L8.77681 5.22049ZM10.4988 15.7798C12.105 15.7798 13.407 14.4778 13.407 12.8715C13.407 11.2653 12.105 9.96325 10.4988 9.96325C8.89255 9.96325 7.59046 11.2653 7.59046 12.8715C7.59046 14.4778 8.89255 15.7798 10.4988 15.7798Z' fill='black' fill-opacity='0.875'/%3E%3C/svg%3E\");\n}\n\n/* Dark Mode */\n@media (prefers-color-scheme: dark) {\n\t.onekey-inject-font {\n\t\tcolor: rgba(255, 255, 255, 0.93);\n\t}\n\t.onekey-inject-bodyLg-medium {\n\t\tcolor: rgba(0, 0, 0, 0.88);\n\t}\n\t.onekey-inject-bodyLg {\n\t\tcolor: rgba(255, 255, 255, 0.93);\n\t}\n\t.onekey-inject-modal-container {\n\t\tbackground: #1B1B1B;\n\t}\n\t.onekey-inject-modal {\n\t\tbackground: #1B1B1B;\n\t}\n\t.onekey-inject-footer {\n\t\tbackground: #1B1B1B;\n\t}\n\t.onekey-inject-text-subdued {\n\t\tcolor: rgba(255, 255, 255, 0.66);\n\t}\n\t.onekey-inject-continue-link:hover {\n\t\tcolor: rgba(255, 255, 255, 0.7);\n\t}\n\t.onekey-inject-continue-link:active {\n\t\tcolor: rgba(255, 255, 255, 0.5);\n\t}\n\t.onekey-inject-footer {\n\t\tcolor: rgba(255, 255, 255, 0.66);\n\t}\n\t.onekey-inject-logo {\n\t\tcolor: rgba(255, 255, 255, 0.93);\n\t}\n\t.onekey-inject-error-icon-content {\n\t\tbackground-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"33\" viewBox=\"0 0 32 33\" fill=\"none\"><path d=\"M17.3327 12.5254C17.3327 11.789 16.7357 11.1921 15.9993 11.1921C15.263 11.1921 14.666 11.789 14.666 12.5254V16.5177C14.666 17.2541 15.263 17.8511 15.9993 17.8511C16.7357 17.8511 17.3327 17.2541 17.3327 16.5177V12.5254Z\" fill=\"%23FF858A\"/><path d=\"M15.9993 18.8332C15.0789 18.8332 14.3327 19.5794 14.3327 20.4998C14.3327 21.4203 15.0789 22.1665 15.9993 22.1665C16.9198 22.1665 17.666 21.4203 17.666 20.4998C17.666 19.5794 16.9198 18.8332 15.9993 18.8332Z\" fill=\"%23FF858A\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M19.4492 5.14869C17.9081 2.50577 14.0905 2.50578 12.5494 5.14869L3.21393 21.1589C1.66148 23.8213 3.5806 27.1665 6.66382 27.1665H25.3348C28.4181 27.1665 30.3372 23.8213 28.7847 21.1589L19.4492 5.14869ZM14.8531 6.49194C15.3653 5.61358 16.6334 5.61358 17.1456 6.49194L26.4811 22.5022C26.9979 23.3884 26.3583 24.4998 25.3348 24.4998H6.66382C5.64037 24.4998 5.00079 23.3884 5.51758 22.5022L14.8531 6.49194Z\" fill=\"%23FF858A\"/></svg>');\n\t}\n\t.onekey-inject-logo-content {\n\t\tbackground-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='21' viewBox='0 0 21 21' fill='none'%3E%3Cpath d='M10.4987 14.4595C11.3758 14.4595 12.0867 13.7485 12.0867 12.8715C12.0867 11.9945 11.3758 11.2836 10.4987 11.2836C9.62174 11.2836 8.91078 11.9945 8.91078 12.8715C8.91078 13.7485 9.62174 14.4595 10.4987 14.4595Z' fill='white' fill-opacity='0.926'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.4987 19.6668C16.827 19.6668 19.6654 16.8284 19.6654 10.5002C19.6654 4.1719 16.827 1.3335 10.4987 1.3335C4.17044 1.3335 1.33203 4.1719 1.33203 10.5002C1.33203 16.8284 4.17044 19.6668 10.4987 19.6668ZM8.77681 5.22049H11.3269V9.42284H9.74582V6.57329H8.32942L8.77681 5.22049ZM10.4988 15.7798C12.105 15.7798 13.407 14.4778 13.407 12.8715C13.407 11.2653 12.105 9.96325 10.4988 9.96325C8.89255 9.96325 7.59046 11.2653 7.59046 12.8715C7.59046 14.4778 8.89255 15.7798 10.4988 15.7798Z' fill='white' fill-opacity='0.926'/%3E%3C/svg%3E\");\n\t}\n}\n";
|
|
@@ -32,10 +32,9 @@ export const styleContent = `
|
|
|
32
32
|
width: 100vw;
|
|
33
33
|
height: 100%;
|
|
34
34
|
padding: 20px;
|
|
35
|
-
background-color: rgba(
|
|
35
|
+
background-color: rgba(0, 0, 0, 0.27);
|
|
36
36
|
display: flex;
|
|
37
|
-
|
|
38
|
-
align-items: center;
|
|
37
|
+
align-items: flex-end;
|
|
39
38
|
flex-direction: column;
|
|
40
39
|
z-index: 100000;
|
|
41
40
|
box-sizing: border-box;
|
|
@@ -46,7 +45,6 @@ export const styleContent = `
|
|
|
46
45
|
flex-direction: column;
|
|
47
46
|
align-items: flex-start;
|
|
48
47
|
border-radius: 24px;
|
|
49
|
-
border: 3px solid rgba(217, 0, 3, 0.32);
|
|
50
48
|
background: #FFF;
|
|
51
49
|
box-shadow: 0px 12px 24px 0px rgba(0, 0, 0, 0.09);
|
|
52
50
|
}
|
|
@@ -60,27 +58,15 @@ export const styleContent = `
|
|
|
60
58
|
padding: 20px 20px 0 16px;
|
|
61
59
|
}
|
|
62
60
|
.onekey-inject-error-icon {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
height: 56px;
|
|
68
|
-
padding: 12px;
|
|
69
|
-
margin-right: 12px;
|
|
70
|
-
border-radius: 9999px;
|
|
71
|
-
background: rgba(255, 5, 5, 0.03);
|
|
72
|
-
box-sizing: border-box;
|
|
73
|
-
}
|
|
74
|
-
.onekey-inject-error-icon-content {
|
|
75
|
-
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="33" viewBox="0 0 32 33" fill="none"><path d="M17.3327 12.5254C17.3327 11.789 16.7357 11.1921 15.9993 11.1921C15.263 11.1921 14.666 11.789 14.666 12.5254V16.5177C14.666 17.2541 15.263 17.8511 15.9993 17.8511C16.7357 17.8511 17.3327 17.2541 17.3327 16.5177V12.5254Z" fill="%23BB0007" fill-opacity="0.836"/><path d="M15.9993 18.8332C15.0789 18.8332 14.3327 19.5794 14.3327 20.4998C14.3327 21.4203 15.0789 22.1665 15.9993 22.1665C16.9198 22.1665 17.666 21.4203 17.666 20.4998C17.666 19.5794 16.9198 18.8332 15.9993 18.8332Z" fill="%23BB0007" fill-opacity="0.836"/><path fill-rule="evenodd" clip-rule="evenodd" d="M19.4492 5.14869C17.9081 2.50577 14.0905 2.50578 12.5494 5.14869L3.21393 21.1589C1.66148 23.8213 3.5806 27.1665 6.66382 27.1665H25.3348C28.4181 27.1665 30.3372 23.8213 28.7847 21.1589L19.4492 5.14869ZM14.8531 6.49194C15.3653 5.61358 16.6334 5.61358 17.1456 6.49194L26.4811 22.5022C26.9979 23.3884 26.3583 24.4998 25.3348 24.4998H6.66382C5.64037 24.4998 5.00079 23.3884 5.51758 22.5022L14.8531 6.49194Z" fill="%23BB0007" fill-opacity="0.836"/></svg>');
|
|
76
|
-
width: 32px; /* SVG width */
|
|
77
|
-
height: 33px; /* SVG height */
|
|
61
|
+
background-image: url('data:image/svg+xml;utf8,<svg width="20" height="18" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.9995 7.01917C10.9995 6.46689 10.5518 6.01917 9.9995 6.01917C9.44722 6.01917 8.9995 6.46689 8.9995 7.01917V10.0134C8.9995 10.5657 9.44722 11.0134 9.9995 11.0134C10.5518 11.0134 10.9995 10.5657 10.9995 10.0134V7.01917Z" fill="%23FF858A"/><path d="M9.99951 11.75C9.30916 11.75 8.74951 12.3096 8.74951 13C8.74951 13.6904 9.30916 14.25 9.99951 14.25C10.6899 14.25 11.2495 13.6904 11.2495 13C11.2495 12.3096 10.6899 11.75 9.99951 11.75Z" fill="%23FF858A"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12.5869 1.48664C11.4311 -0.495548 8.56789 -0.495543 7.41208 1.48664L0.410446 13.4943C-0.753887 15.4911 0.685449 18 2.99786 18H17.0011C19.3135 18 20.7529 15.4911 19.5886 13.4943L12.5869 1.48664ZM9.13982 2.49408C9.52394 1.83531 10.4751 1.83531 10.8592 2.49407L17.8608 14.5017C18.2484 15.1664 17.7687 16 17.0011 16H2.99786C2.23028 16 1.75059 15.1665 2.13818 14.5017L9.13982 2.49408Z" fill="%23FF858A"/></svg>');
|
|
62
|
+
width: 20px; /* SVG width */
|
|
63
|
+
height: 18px; /* SVG height */
|
|
64
|
+
margin-right: 12px;
|
|
78
65
|
display: block;
|
|
79
66
|
}
|
|
80
67
|
.onekey-inject-error-icon > img {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
border-radius: 9999px;
|
|
68
|
+
width: 24px;
|
|
69
|
+
height: 24px;
|
|
84
70
|
}
|
|
85
71
|
.onekey-inject-title {
|
|
86
72
|
display: flex;
|
|
@@ -95,7 +81,7 @@ export const styleContent = `
|
|
|
95
81
|
}
|
|
96
82
|
.onekey-inject-text-subdued {
|
|
97
83
|
margin-top: 8px;
|
|
98
|
-
|
|
84
|
+
margin-bottom: 0px;
|
|
99
85
|
color: rgba(0, 0, 0, 0.61);
|
|
100
86
|
}
|
|
101
87
|
.onekey-inject-continue-link {
|
|
@@ -108,28 +94,6 @@ export const styleContent = `
|
|
|
108
94
|
.onekey-inject-continue-link:active {
|
|
109
95
|
color: rgba(0, 0, 0, 0.5);
|
|
110
96
|
}
|
|
111
|
-
.onekey-inject-close-btn {
|
|
112
|
-
display: flex;
|
|
113
|
-
height: 38px;
|
|
114
|
-
padding: 6px 14px;
|
|
115
|
-
margin-bottom: 20px;
|
|
116
|
-
justify-content: center;
|
|
117
|
-
align-items: center;
|
|
118
|
-
gap: 8px;
|
|
119
|
-
align-self: stretch;
|
|
120
|
-
border-radius: 8px;
|
|
121
|
-
border: 1px solid rgba(170, 170, 170, 0);
|
|
122
|
-
background: rgba(0, 0, 0, 0.88);
|
|
123
|
-
color: rgba(255, 255, 255, 0.93);
|
|
124
|
-
text-align: center;
|
|
125
|
-
cursor: pointer;
|
|
126
|
-
}
|
|
127
|
-
.onekey-inject-close-btn:hover {
|
|
128
|
-
background: rgba(0, 0, 0, 0.7);
|
|
129
|
-
}
|
|
130
|
-
.onekey-inject-close-btn:active {
|
|
131
|
-
background: rgba(0, 0, 0, 0.5);
|
|
132
|
-
}
|
|
133
97
|
.onekey-inject-footer {
|
|
134
98
|
display: flex;
|
|
135
99
|
padding:16px 20px;
|
|
@@ -178,22 +142,9 @@ export const styleContent = `
|
|
|
178
142
|
.onekey-inject-footer {
|
|
179
143
|
background: #1B1B1B;
|
|
180
144
|
}
|
|
181
|
-
.onekey-inject-error-icon {
|
|
182
|
-
background: rgba(254, 0, 25, 0.07);
|
|
183
|
-
}
|
|
184
145
|
.onekey-inject-text-subdued {
|
|
185
146
|
color: rgba(255, 255, 255, 0.66);
|
|
186
147
|
}
|
|
187
|
-
.onekey-inject-close-btn {
|
|
188
|
-
border: 1px solid rgba(170, 170, 170, 0.00);
|
|
189
|
-
background: rgba(255, 255, 255, 0.93);
|
|
190
|
-
}
|
|
191
|
-
.onekey-inject-close-btn:hover {
|
|
192
|
-
background: rgba(255, 255, 255, 0.7);
|
|
193
|
-
}
|
|
194
|
-
.onekey-inject-close-btn:active {
|
|
195
|
-
background: rgba(255, 255, 255, 0.5);
|
|
196
|
-
}
|
|
197
148
|
.onekey-inject-continue-link:hover {
|
|
198
149
|
color: rgba(255, 255, 255, 0.7);
|
|
199
150
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/inpage-providers-hub",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.5",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"cross-inpage-provider"
|
|
6
6
|
],
|
|
@@ -28,24 +28,24 @@
|
|
|
28
28
|
"start": "tsc --watch"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@onekeyfe/cross-inpage-provider-core": "2.0.0-alpha.
|
|
32
|
-
"@onekeyfe/cross-inpage-provider-types": "2.0.0-alpha.
|
|
33
|
-
"@onekeyfe/onekey-aptos-provider": "2.0.0-alpha.
|
|
34
|
-
"@onekeyfe/onekey-btc-provider": "2.0.0-alpha.
|
|
35
|
-
"@onekeyfe/onekey-cardano-provider": "2.0.0-alpha.
|
|
36
|
-
"@onekeyfe/onekey-conflux-provider": "2.0.0-alpha.
|
|
37
|
-
"@onekeyfe/onekey-cosmos-provider": "2.0.0-alpha.
|
|
38
|
-
"@onekeyfe/onekey-eth-provider": "2.0.0-alpha.
|
|
39
|
-
"@onekeyfe/onekey-nostr-provider": "2.0.0-alpha.
|
|
40
|
-
"@onekeyfe/onekey-polkadot-provider": "2.0.0-alpha.
|
|
41
|
-
"@onekeyfe/onekey-private-external-account-provider": "2.0.0-alpha.
|
|
42
|
-
"@onekeyfe/onekey-private-provider": "2.0.0-alpha.
|
|
43
|
-
"@onekeyfe/onekey-solana-provider": "2.0.0-alpha.
|
|
44
|
-
"@onekeyfe/onekey-starcoin-provider": "2.0.0-alpha.
|
|
45
|
-
"@onekeyfe/onekey-sui-provider": "2.0.0-alpha.
|
|
46
|
-
"@onekeyfe/onekey-tron-provider": "2.0.0-alpha.
|
|
47
|
-
"@onekeyfe/onekey-webln-provider": "2.0.0-alpha.
|
|
31
|
+
"@onekeyfe/cross-inpage-provider-core": "2.0.0-alpha.5",
|
|
32
|
+
"@onekeyfe/cross-inpage-provider-types": "2.0.0-alpha.5",
|
|
33
|
+
"@onekeyfe/onekey-aptos-provider": "2.0.0-alpha.5",
|
|
34
|
+
"@onekeyfe/onekey-btc-provider": "2.0.0-alpha.5",
|
|
35
|
+
"@onekeyfe/onekey-cardano-provider": "2.0.0-alpha.5",
|
|
36
|
+
"@onekeyfe/onekey-conflux-provider": "2.0.0-alpha.5",
|
|
37
|
+
"@onekeyfe/onekey-cosmos-provider": "2.0.0-alpha.5",
|
|
38
|
+
"@onekeyfe/onekey-eth-provider": "2.0.0-alpha.5",
|
|
39
|
+
"@onekeyfe/onekey-nostr-provider": "2.0.0-alpha.5",
|
|
40
|
+
"@onekeyfe/onekey-polkadot-provider": "2.0.0-alpha.5",
|
|
41
|
+
"@onekeyfe/onekey-private-external-account-provider": "2.0.0-alpha.5",
|
|
42
|
+
"@onekeyfe/onekey-private-provider": "2.0.0-alpha.5",
|
|
43
|
+
"@onekeyfe/onekey-solana-provider": "2.0.0-alpha.5",
|
|
44
|
+
"@onekeyfe/onekey-starcoin-provider": "2.0.0-alpha.5",
|
|
45
|
+
"@onekeyfe/onekey-sui-provider": "2.0.0-alpha.5",
|
|
46
|
+
"@onekeyfe/onekey-tron-provider": "2.0.0-alpha.5",
|
|
47
|
+
"@onekeyfe/onekey-webln-provider": "2.0.0-alpha.5",
|
|
48
48
|
"web3": "^1.7.3"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "9be2a1ce818cf0a763ee247d83b9b47cf7998fb2"
|
|
51
51
|
}
|