Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: impove floating icon UI #271

Merged
merged 6 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-core",
"version": "2.2.2",
"version": "2.2.3",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -29,9 +29,9 @@
"build-version-info": "node ./scripts/buildVersionInfo.js"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-errors": "2.2.2",
"@onekeyfe/cross-inpage-provider-events": "2.2.2",
"@onekeyfe/cross-inpage-provider-types": "2.2.2",
"@onekeyfe/cross-inpage-provider-errors": "2.2.3",
"@onekeyfe/cross-inpage-provider-events": "2.2.3",
"@onekeyfe/cross-inpage-provider-types": "2.2.3",
"events": "^3.3.0",
"lodash-es": "^4.17.21",
"ms": "^2.1.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/desktop/desktop-bridge-injected/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/desktop-bridge-injected",
"version": "2.2.2",
"version": "2.2.3",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -34,7 +34,7 @@
"electron": "^17.2.0"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "2.2.2",
"@onekeyfe/cross-inpage-provider-types": "2.2.2"
"@onekeyfe/cross-inpage-provider-core": "2.2.3",
"@onekeyfe/cross-inpage-provider-types": "2.2.3"
}
}
2 changes: 1 addition & 1 deletion packages/empty/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-empty",
"version": "2.2.2",
"version": "2.2.3",
"keywords": [
"cross-inpage-provider"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/errors/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-errors",
"version": "2.2.2",
"version": "2.2.3",
"keywords": [
"cross-inpage-provider"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/events/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-events",
"version": "2.2.2",
"version": "2.2.3",
"keywords": [
"cross-inpage-provider"
],
Expand Down
24 changes: 12 additions & 12 deletions packages/example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-example",
"version": "2.2.2",
"version": "2.2.3",
"private": true,
"scripts": {
"postinstall": "patch-package",
Expand Down Expand Up @@ -28,17 +28,17 @@
"@metamask/onboarding": "^1.0.1",
"@mizuwallet-sdk/core": "^1.4.0",
"@mysten/dapp-kit": "0.13.2",
"@onekeyfe/cross-inpage-provider-core": "2.2.2",
"@onekeyfe/cross-inpage-provider-types": "2.2.2",
"@onekeyfe/onekey-aptos-provider": "2.2.2",
"@onekeyfe/onekey-cardano-provider": "2.2.2",
"@onekeyfe/onekey-conflux-provider": "2.2.2",
"@onekeyfe/onekey-cosmos-provider": "2.2.2",
"@onekeyfe/onekey-near-provider": "2.2.2",
"@onekeyfe/onekey-solana-provider": "2.2.2",
"@onekeyfe/onekey-sui-provider": "2.2.2",
"@onekeyfe/onekey-tron-provider": "2.2.2",
"@onekeyfe/onekey-webln-provider": "2.2.2",
"@onekeyfe/cross-inpage-provider-core": "2.2.3",
"@onekeyfe/cross-inpage-provider-types": "2.2.3",
"@onekeyfe/onekey-aptos-provider": "2.2.3",
"@onekeyfe/onekey-cardano-provider": "2.2.3",
"@onekeyfe/onekey-conflux-provider": "2.2.3",
"@onekeyfe/onekey-cosmos-provider": "2.2.3",
"@onekeyfe/onekey-near-provider": "2.2.3",
"@onekeyfe/onekey-solana-provider": "2.2.3",
"@onekeyfe/onekey-sui-provider": "2.2.3",
"@onekeyfe/onekey-tron-provider": "2.2.3",
"@onekeyfe/onekey-webln-provider": "2.2.3",
"@polkadot/api": "^9.11.3",
"@polkadot/extension-dapp": "^0.47.5",
"@radix-ui/react-checkbox": "^1.1.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/extension/extension-bridge-hosted/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/extension-bridge-hosted",
"version": "2.2.2",
"version": "2.2.3",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -28,8 +28,8 @@
"start": "tsc --watch"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "2.2.2",
"@onekeyfe/cross-inpage-provider-types": "2.2.2",
"@onekeyfe/cross-inpage-provider-core": "2.2.3",
"@onekeyfe/cross-inpage-provider-types": "2.2.3",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/extension/extension-bridge-injected/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/extension-bridge-injected",
"version": "2.2.2",
"version": "2.2.3",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -28,7 +28,7 @@
"start": "tsc --watch"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "2.2.2",
"@onekeyfe/cross-inpage-provider-types": "2.2.2"
"@onekeyfe/cross-inpage-provider-core": "2.2.3",
"@onekeyfe/cross-inpage-provider-types": "2.2.3"
}
}
14 changes: 7 additions & 7 deletions packages/injected/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-injected",
"version": "2.2.2",
"version": "2.2.3",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -42,12 +42,12 @@
"electron": "*"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "2.2.2",
"@onekeyfe/cross-inpage-provider-types": "2.2.2",
"@onekeyfe/desktop-bridge-injected": "2.2.2",
"@onekeyfe/extension-bridge-injected": "2.2.2",
"@onekeyfe/inpage-providers-hub": "2.2.2",
"@onekeyfe/native-bridge-injected": "2.2.2",
"@onekeyfe/cross-inpage-provider-core": "2.2.3",
"@onekeyfe/cross-inpage-provider-types": "2.2.3",
"@onekeyfe/desktop-bridge-injected": "2.2.3",
"@onekeyfe/extension-bridge-injected": "2.2.3",
"@onekeyfe/inpage-providers-hub": "2.2.3",
"@onekeyfe/native-bridge-injected": "2.2.3",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/native/native-bridge-injected/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/native-bridge-injected",
"version": "2.2.2",
"version": "2.2.3",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -28,7 +28,7 @@
"start": "tsc --watch"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "2.2.2",
"@onekeyfe/cross-inpage-provider-types": "2.2.2"
"@onekeyfe/cross-inpage-provider-core": "2.2.3",
"@onekeyfe/cross-inpage-provider-types": "2.2.3"
}
}
42 changes: 21 additions & 21 deletions packages/providers/inpage-providers-hub/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/inpage-providers-hub",
"version": "2.2.2",
"version": "2.2.3",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -30,26 +30,26 @@
"start": "tsc --watch"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "2.2.2",
"@onekeyfe/cross-inpage-provider-types": "2.2.2",
"@onekeyfe/onekey-algo-provider": "2.2.2",
"@onekeyfe/onekey-alph-provider": "2.2.2",
"@onekeyfe/onekey-aptos-provider": "2.2.2",
"@onekeyfe/onekey-bfc-provider": "2.2.2",
"@onekeyfe/onekey-btc-provider": "2.2.2",
"@onekeyfe/onekey-cardano-provider": "2.2.2",
"@onekeyfe/onekey-conflux-provider": "2.2.2",
"@onekeyfe/onekey-cosmos-provider": "2.2.2",
"@onekeyfe/onekey-eth-provider": "2.2.2",
"@onekeyfe/onekey-nostr-provider": "2.2.2",
"@onekeyfe/onekey-polkadot-provider": "2.2.2",
"@onekeyfe/onekey-private-provider": "2.2.2",
"@onekeyfe/onekey-scdo-provider": "2.2.2",
"@onekeyfe/onekey-solana-provider": "2.2.2",
"@onekeyfe/onekey-sui-provider": "2.2.2",
"@onekeyfe/onekey-ton-provider": "2.2.2",
"@onekeyfe/onekey-tron-provider": "2.2.2",
"@onekeyfe/onekey-webln-provider": "2.2.2",
"@onekeyfe/cross-inpage-provider-core": "2.2.3",
"@onekeyfe/cross-inpage-provider-types": "2.2.3",
"@onekeyfe/onekey-algo-provider": "2.2.3",
"@onekeyfe/onekey-alph-provider": "2.2.3",
"@onekeyfe/onekey-aptos-provider": "2.2.3",
"@onekeyfe/onekey-bfc-provider": "2.2.3",
"@onekeyfe/onekey-btc-provider": "2.2.3",
"@onekeyfe/onekey-cardano-provider": "2.2.3",
"@onekeyfe/onekey-conflux-provider": "2.2.3",
"@onekeyfe/onekey-cosmos-provider": "2.2.3",
"@onekeyfe/onekey-eth-provider": "2.2.3",
"@onekeyfe/onekey-nostr-provider": "2.2.3",
"@onekeyfe/onekey-polkadot-provider": "2.2.3",
"@onekeyfe/onekey-private-provider": "2.2.3",
"@onekeyfe/onekey-scdo-provider": "2.2.3",
"@onekeyfe/onekey-solana-provider": "2.2.3",
"@onekeyfe/onekey-sui-provider": "2.2.3",
"@onekeyfe/onekey-ton-provider": "2.2.3",
"@onekeyfe/onekey-tron-provider": "2.2.3",
"@onekeyfe/onekey-webln-provider": "2.2.3",
"preact": "^10.25.1",
"web3": "^1.7.3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,18 @@ function CloseDialog({ onClose }: { onClose: () => void }) {
/>
</svg>

<div>{i18n.disable}</div>
</div>

<div
style={{
color: 'rgba(0, 0, 0, 0.61)',
fontSize: '12px',
lineHeight: '16px',
paddingTop: '8px',
borderTop: '1px solid rgba(0, 0, 0, 0.05)',
}}
>
{i18n.canBeReEnabledInSettings}
<div>
<div>{i18n.disable}</div>
<div
style={{
color: 'rgba(0, 0, 0, 0.61)',
fontSize: '12px',
lineHeight: '16px',
}}
>
{i18n.canBeReEnabledInSettings}
</div>
</div>
</div>
</div>
);
Expand Down Expand Up @@ -419,11 +418,9 @@ function SecurityRiskDetectionRow({ securityInfo }: { securityInfo: IHostSecurit
function SecurityInfo({
securityInfo,
onClose,
showCloseDialog,
}: {
securityInfo: IHostSecurity;
onClose: () => void;
showCloseDialog: () => void;
}) {
const viewRef = useRef<HTMLDivElement | null>(null);
useOutsideClick(viewRef, onClose);
Expand Down Expand Up @@ -473,29 +470,40 @@ function SecurityInfo({
}}
/>
) : (
<svg
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
style={{
width: '24px',
height: '24px',
<div
style={{
transform: 'translate(4px, 3px)',
height: '24px',
width: '24px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}}
>
<path
d="M6.6234 6.17768C6.6234 4.79769 7.73338 3.66333 9.1234 3.66333C10.5134 3.66333 11.6234 4.79769 11.6234 6.17768C11.6234 7.30559 10.8798 7.89399 10.4435 8.19056C10.3054 8.28442 10.2138 8.36716 10.1499 8.45311C10.092 8.53086 10.0368 8.63774 10.0107 8.81185C9.92866 9.35801 9.41941 9.73426 8.87325 9.65224C8.3271 9.57021 7.95084 9.06096 8.03287 8.5148C8.19122 7.4605 8.81104 6.8819 9.31912 6.53656C9.47624 6.42975 9.54878 6.36136 9.58594 6.31084C9.60107 6.29027 9.60813 6.27529 9.61242 6.26261C9.61657 6.25036 9.6234 6.22488 9.6234 6.17768C9.6234 5.88426 9.39093 5.66333 9.1234 5.66333C8.85586 5.66333 8.6234 5.88426 8.6234 6.17768C8.6234 6.72996 8.17568 7.17768 7.6234 7.17768C7.07111 7.17768 6.6234 6.72996 6.6234 6.17768Z"
fill="#3C3C3C"
/>
<path
d="M7.74976 11.5C7.74976 12.1904 8.3094 12.75 8.99976 12.75C9.69011 12.75 10.2498 12.1904 10.2498 11.5C10.2498 10.8096 9.69011 10.25 8.99976 10.25C8.3094 10.25 7.74976 10.8096 7.74976 11.5Z"
fill="#3C3C3C"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M3.00195 2.00272e-05L15.0019 0C16.6588 -2.7418e-06 18.002 1.34314 18.002 3V13.0358C18.002 14.6926 16.6588 16.0357 15.002 16.0358L12.3757 16.0358L8.99393 18.8375L5.65157 16.0358H3.00195C1.3451 16.0358 0.00195312 14.6926 0.00195312 13.0358V3.00002C0.00195312 1.34317 1.34509 2.2769e-05 3.00195 2.00272e-05ZM15.002 2L3.00195 2.00002C2.44967 2.00002 2.00195 2.44774 2.00195 3.00002V13.0358C2.00195 13.5881 2.44967 14.0358 3.00195 14.0358H5.65157C6.12143 14.0358 6.57629 14.2012 6.93638 14.503L9.00143 16.2341L11.0997 14.4957C11.4585 14.1984 11.9098 14.0358 12.3757 14.0358L15.002 14.0358C15.5542 14.0358 16.002 13.588 16.002 13.0358V3C16.002 2.44772 15.5542 2 15.002 2Z"
fill="#3C3C3C"
/>
</svg>
<svg
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
style={{
width: '24px',
height: '24px',
}}
>
<path
d="M6.6234 6.17768C6.6234 4.79769 7.73338 3.66333 9.1234 3.66333C10.5134 3.66333 11.6234 4.79769 11.6234 6.17768C11.6234 7.30559 10.8798 7.89399 10.4435 8.19056C10.3054 8.28442 10.2138 8.36716 10.1499 8.45311C10.092 8.53086 10.0368 8.63774 10.0107 8.81185C9.92866 9.35801 9.41941 9.73426 8.87325 9.65224C8.3271 9.57021 7.95084 9.06096 8.03287 8.5148C8.19122 7.4605 8.81104 6.8819 9.31912 6.53656C9.47624 6.42975 9.54878 6.36136 9.58594 6.31084C9.60107 6.29027 9.60813 6.27529 9.61242 6.26261C9.61657 6.25036 9.6234 6.22488 9.6234 6.17768C9.6234 5.88426 9.39093 5.66333 9.1234 5.66333C8.85586 5.66333 8.6234 5.88426 8.6234 6.17768C8.6234 6.72996 8.17568 7.17768 7.6234 7.17768C7.07111 7.17768 6.6234 6.72996 6.6234 6.17768Z"
fill="#3C3C3C"
/>
<path
d="M7.74976 11.5C7.74976 12.1904 8.3094 12.75 8.99976 12.75C9.69011 12.75 10.2498 12.1904 10.2498 11.5C10.2498 10.8096 9.69011 10.25 8.99976 10.25C8.3094 10.25 7.74976 10.8096 7.74976 11.5Z"
fill="#3C3C3C"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M3.00195 2.00272e-05L15.0019 0C16.6588 -2.7418e-06 18.002 1.34314 18.002 3V13.0358C18.002 14.6926 16.6588 16.0357 15.002 16.0358L12.3757 16.0358L8.99393 18.8375L5.65157 16.0358H3.00195C1.3451 16.0358 0.00195312 14.6926 0.00195312 13.0358V3.00002C0.00195312 1.34317 1.34509 2.2769e-05 3.00195 2.00272e-05ZM15.002 2L3.00195 2.00002C2.44967 2.00002 2.00195 2.44774 2.00195 3.00002V13.0358C2.00195 13.5881 2.44967 14.0358 3.00195 14.0358H5.65157C6.12143 14.0358 6.57629 14.2012 6.93638 14.503L9.00143 16.2341L11.0997 14.4957C11.4585 14.1984 11.9098 14.0358 12.3757 14.0358L15.002 14.0358C15.5542 14.0358 16.002 13.588 16.002 13.0358V3C16.002 2.44772 15.5542 2 15.002 2Z"
fill="#3C3C3C"
/>
</svg>
</div>
)}
<span
style={{
Expand All @@ -514,12 +522,7 @@ function SecurityInfo({
height: '24',
cursor: 'pointer',
}}
onClick={() => {
onClose();
setTimeout(() => {
showCloseDialog();
}, 200);
}}
onClick={onClose}
>
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path
Expand Down Expand Up @@ -594,7 +597,7 @@ function SecurityInfo({
lineHeight: '16px',
}}
>
Powered by
{i18n.maliciousDappWarningSourceMessage}
</span>
<Logo
style={{
Expand Down Expand Up @@ -656,7 +659,7 @@ function App() {
style={{
position: 'fixed',
zIndex: 999_999,
top: '75%',
bottom: '25%',
right: '0px',
width: '256px',
background: '#fff',
Expand All @@ -674,7 +677,6 @@ function App() {
{showSecurityInfo && securityInfo ? (
<SecurityInfo
securityInfo={securityInfo}
showCloseDialog={handleShowCloseDialog}
onClose={() => {
setIsExpanded(false);
setIsShowSecurityInfo(false);
Expand Down
Loading
Loading