Skip to content

Commit 1033326

Browse files
committed
Merge branch 'openbit-dev' into koni/dev/issue-208
2 parents 8059c3e + a825acf commit 1033326

File tree

5 files changed

+118
-120
lines changed

5 files changed

+118
-120
lines changed

packages/extension-koni-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"@subwallet/extension-dapp": "^1.1.44-0",
4141
"@subwallet/extension-inject": "^1.1.44-0",
4242
"@subwallet/keyring": "0.1.5-beta.0",
43-
"@subwallet/react-ui": "5.1.2-b74",
43+
"@subwallet/react-ui": "5.1.2-b79",
4444
"@subwallet/ui-keyring": "0.1.5-beta.0",
4545
"@walletconnect/types": "^2.11.0",
4646
"bip39": "^3.1.0",

packages/extension-koni-ui/src/Popup/Home/Nfts/component/NftGalleryWrapper.tsx

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright 2019-2022 @subwallet/extension-koni-ui authors & contributors
22
// SPDX-License-Identifier: Apache-2.0
33

4-
import { DEFAULT_MODEL_VIEWER_PROPS } from '@subwallet/extension-koni-ui/constants';
54
import { Theme, ThemeProps } from '@subwallet/extension-koni-ui/types';
65
import { ActivityIndicator, NftItem as NftItem_ } from '@subwallet/react-ui';
76
import React, { useCallback, useState } from 'react';
@@ -24,7 +23,6 @@ function Component ({ className = '', fallbackImage, handleOnClick, have3dViewer
2423

2524
const [showImage, setShowImage] = useState(true);
2625
const [showVideo, setShowVideo] = useState(false);
27-
const [show3dViewer, setShow3dViewer] = useState(false);
2826

2927
const onClick = useCallback(() => {
3028
handleOnClick && handleOnClick(routingParams);
@@ -37,7 +35,6 @@ function Component ({ className = '', fallbackImage, handleOnClick, have3dViewer
3735

3836
const handleVideoError = useCallback(() => {
3937
setShowVideo(false);
40-
setShow3dViewer(true);
4138
}, []);
4239

4340
const getCollectionImage = useCallback(() => {
@@ -95,39 +92,13 @@ function Component ({ className = '', fallbackImage, handleOnClick, have3dViewer
9592
);
9693
}
9794

98-
if (have3dViewer && show3dViewer) {
99-
return (
100-
<LazyLoadComponent>
101-
{/* @ts-ignore */}
102-
<model-viewer
103-
alt={'model-viewer'}
104-
ar-status={'not-presenting'}
105-
auto-rotate={true}
106-
auto-rotate-delay={100}
107-
bounds={'tight'}
108-
disable-pan={true}
109-
disable-scroll={true}
110-
disable-tap={true}
111-
disable-zoom={true}
112-
environment-image={'neutral'}
113-
interaction-prompt={'none'}
114-
loading={'eager'}
115-
src={getCollectionImage()}
116-
style={{ width: '100%', height: '100%' }}
117-
touch-action={'none'}
118-
{...DEFAULT_MODEL_VIEWER_PROPS}
119-
/>
120-
</LazyLoadComponent>
121-
);
122-
}
123-
12495
return (
12596
<LazyLoadImage
12697
src={extendToken.defaultImagePlaceholder}
12798
visibleByDefault={true}
12899
/>
129100
);
130-
}, [showImage, showVideo, have3dViewer, show3dViewer, extendToken.defaultImagePlaceholder, handleImageError, loadingPlaceholder, getCollectionImage, handleVideoError]);
101+
}, [showImage, showVideo, extendToken.defaultImagePlaceholder, handleImageError, loadingPlaceholder, getCollectionImage, handleVideoError]);
131102

132103
return (
133104
<NftItem_

patches/@subwallet+react-ui+5.1.2-b74.patch

Lines changed: 0 additions & 88 deletions
This file was deleted.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
diff --git a/node_modules/@subwallet/react-ui/es/theme/themes/dark/colors.js b/node_modules/@subwallet/react-ui/es/theme/themes/dark/colors.js
2+
index 1e4a5c2..8e4cf50 100644
3+
--- a/node_modules/@subwallet/react-ui/es/theme/themes/dark/colors.js
4+
+++ b/node_modules/@subwallet/react-ui/es/theme/themes/dark/colors.js
5+
@@ -43,9 +43,9 @@ export const generateNeutralColorPalettes = (bgBaseColor, textBaseColor) => {
6+
colorBgSpotlight: getSolidColor(colorBgBase, 26),
7+
colorBorder: getSolidColor(colorBgBase, 26),
8+
colorBorderSecondary: getSolidColor(colorBgBase, 19),
9+
- colorBgDefault: '#0C0C0C',
10+
- colorBgSecondary: '#1A1A1A',
11+
- colorBgInput: '#252525',
12+
+ colorBgDefault: '#121317',
13+
+ colorBgSecondary: '#1B1D24',
14+
+ colorBgInput: '#2A2E3C',
15+
colorBgBorder: '#212121',
16+
colorBgDivider: 'rgba(33, 33, 33, 0.8)',
17+
colorTextLight1: colorLightBase,
18+
diff --git a/node_modules/@subwallet/react-ui/es/theme/themes/shared/genColorMapToken.js b/node_modules/@subwallet/react-ui/es/theme/themes/shared/genColorMapToken.js
19+
index 54d952c..2653a14 100644
20+
--- a/node_modules/@subwallet/react-ui/es/theme/themes/shared/genColorMapToken.js
21+
+++ b/node_modules/@subwallet/react-ui/es/theme/themes/shared/genColorMapToken.js
22+
@@ -17,10 +17,15 @@ export default function genColorMapToken(seed, _ref) {
23+
const primaryColors = generateColorPalettes(colorPrimaryBase);
24+
primaryColors[6] = colorPrimaryBase;
25+
const secondaryColors = generateColorPalettes(colorSecondaryBase);
26+
+ secondaryColors[6] = colorSecondaryBase;
27+
const successColors = generateColorPalettes(colorSuccessBase);
28+
+ successColors[6] = colorSuccessBase;
29+
const warningColors = generateColorPalettes(colorWarningBase);
30+
+ warningColors[6] = colorWarningBase;
31+
const errorColors = generateColorPalettes(colorErrorBase);
32+
+ errorColors[6] = colorErrorBase;
33+
const infoColors = generateColorPalettes(colorInfoBase);
34+
+ infoColors[6] = colorInfoBase;
35+
const neutralColors = generateNeutralColorPalettes(colorBgBase, colorTextBase);
36+
return Object.assign(Object.assign({}, neutralColors), {
37+
colorPrimaryBg: primaryColors[1],

yarn.lock

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6423,7 +6423,7 @@ __metadata:
64236423
"@subwallet/extension-inject": ^1.1.44-0
64246424
"@subwallet/extension-mocks": ^1.1.44-0
64256425
"@subwallet/keyring": 0.1.5-beta.0
6426-
"@subwallet/react-ui": 5.1.2-b74
6426+
"@subwallet/react-ui": 5.1.2-b79
64276427
"@subwallet/ui-keyring": 0.1.5-beta.0
64286428
"@types/bn.js": ^5.1.1
64296429
"@types/enzyme": ^3.10.12
@@ -6723,6 +6723,84 @@ __metadata:
67236723
languageName: node
67246724
linkType: hard
67256725

6726+
"@subwallet/react-ui@npm:5.1.2-b79":
6727+
version: 5.1.2-b79
6728+
resolution: "@subwallet/react-ui@npm:5.1.2-b79"
6729+
dependencies:
6730+
"@ant-design/colors": ^6.0.0
6731+
"@ant-design/cssinjs": ^1.5.6
6732+
"@ant-design/icons": ^4.8.0
6733+
"@ant-design/react-slick": ~1.0.0
6734+
"@babel/runtime": ^7.23.2
6735+
"@ctrl/tinycolor": ^3.4.0
6736+
"@fortawesome/fontawesome-svg-core": ^6.2.1
6737+
"@fortawesome/free-regular-svg-icons": ^6.2.1
6738+
"@fortawesome/free-solid-svg-icons": ^6.2.1
6739+
"@fortawesome/react-fontawesome": ^0.2.0
6740+
"@polkadot/react-identicon": ^3.6.3
6741+
"@polkadot/util-crypto": ^12.5.1
6742+
"@polkadot/wasm-crypto": ^7.2.2
6743+
"@rc-component/tour": ~1.1.0
6744+
"@zxing/browser": 0.1.1
6745+
"@zxing/library": 0.19.1
6746+
bignumber.js: ^9.1.1
6747+
boring-avatars: ^1.7.0
6748+
classnames: ^2.2.6
6749+
copy-to-clipboard: ^3.2.0
6750+
dayjs: ^1.11.1
6751+
flatlist-react: ^1.5.14
6752+
jsqr: ^1.4.0
6753+
patch-package: ^6.5.1
6754+
phosphor-react: ^1.4.1
6755+
qrcode.react: ^3.1.0
6756+
rc-cascader: ~3.8.0
6757+
rc-checkbox: ~2.3.0
6758+
rc-collapse: ~3.4.2
6759+
rc-dialog: ~9.0.2
6760+
rc-drawer: ~6.1.1
6761+
rc-dropdown: ~4.0.0
6762+
rc-field-form: ~1.27.0
6763+
rc-image: ~5.13.0
6764+
rc-input: ~0.1.4
6765+
rc-input-number: ~7.4.0
6766+
rc-mentions: ~1.13.1
6767+
rc-menu: ~9.8.2
6768+
rc-motion: ^2.6.1
6769+
rc-notification: ~5.0.0
6770+
rc-pagination: ~3.2.0
6771+
rc-picker: ~3.1.1
6772+
rc-progress: ~3.4.1
6773+
rc-rate: ~2.9.0
6774+
rc-resize-observer: ^1.2.0
6775+
rc-segmented: ~2.1.0
6776+
rc-select: ~14.2.0
6777+
rc-slider: ~10.0.0
6778+
rc-steps: ~6.0.0
6779+
rc-switch: ~4.0.0
6780+
rc-table: ~7.29.1
6781+
rc-tabs: ~12.5.1
6782+
rc-textarea: ~0.4.5
6783+
rc-tooltip: ~5.2.0
6784+
rc-tree: ~5.7.0
6785+
rc-tree-select: ~5.6.0
6786+
rc-trigger: ^5.2.10
6787+
rc-upload: ~4.3.0
6788+
rc-util: ^5.27.1
6789+
react-copy-to-clipboard: ^5.1.0
6790+
react-pin-input: 1.3.0
6791+
react-qrcode-logo: ^2.9.0
6792+
react-superellipse: ^0.0.6
6793+
react-toastify: ^9.1.1
6794+
scroll-into-view-if-needed: ^3.0.3
6795+
three: ^0.151.2
6796+
throttle-debounce: ^5.0.0
6797+
peerDependencies:
6798+
react: ">=16.9.0"
6799+
react-dom: ">=16.9.0"
6800+
checksum: ceff0237b3f27641b0f070684ca66267c19c8952e7f40679648a98ee0590036bf764c936afda1e57c07499914d4bc929299d39c15c66e47bab53737c8ae65818
6801+
languageName: node
6802+
linkType: hard
6803+
67266804
"@subwallet/ui-keyring@file:./local-libs/ui-keyring::locator=root-workspace-0b6124%40workspace%3A.":
67276805
version: 0.1.4
67286806
resolution: "@subwallet/ui-keyring@file:./local-libs/ui-keyring#./local-libs/ui-keyring::hash=c7a0de&locator=root-workspace-0b6124%40workspace%3A."

0 commit comments

Comments
 (0)