diff --git a/src/frontend/screens/WebView/index.css b/src/frontend/screens/WebView/index.scss
similarity index 63%
rename from src/frontend/screens/WebView/index.css
rename to src/frontend/screens/WebView/index.scss
index c9c3f2c0bd..65a268fcde 100644
--- a/src/frontend/screens/WebView/index.css
+++ b/src/frontend/screens/WebView/index.scss
@@ -1,7 +1,10 @@
+@import '@hyperplay/ui/utilities/_loading.scss';
+
.WebView {
grid-area: content;
width: var(--content-width);
position: relative;
+ width: 100%;
}
.WebView.collapsed {
@@ -9,8 +12,9 @@
}
.WebView__webview {
- height: calc(100vh - 40px);
- width: var(--content-width);
+ height: 100%;
+ width: 100%;
+ position: absolute;
}
.WebView__webview.collapsed {
@@ -35,3 +39,18 @@
align-self: center;
padding: var(--space-xl);
}
+
+.webviewLoader {
+ @include shinyLoader;
+ height: 100%;
+ width: 100%;
+ position: absolute;
+ z-index: 0;
+}
+
+.webviewContentContainer {
+ height: 100%;
+ width: 100%;
+ position: absolute;
+ z-index: 1;
+}
diff --git a/src/frontend/screens/WebView/index.tsx b/src/frontend/screens/WebView/index.tsx
index 85e0ea1b6b..cf76dda24b 100644
--- a/src/frontend/screens/WebView/index.tsx
+++ b/src/frontend/screens/WebView/index.tsx
@@ -9,12 +9,11 @@ import { useTranslation } from 'react-i18next'
import { useNavigate, useLocation, useParams } from 'react-router-dom'
import { DidNavigateEvent, WebviewTag } from 'electron'
-import { UpdateComponent } from 'frontend/components/UI'
import WebviewControls from 'frontend/components/UI/WebviewControls'
import ContextProvider from 'frontend/state/ContextProvider'
import webviewNavigationStore from 'frontend/store/WebviewNavigationStore'
import { Runner } from 'common/types'
-import './index.css'
+import './index.scss'
import LoginWarning from '../Login/components/LoginWarning'
import authState from 'frontend/state/authState'
import { observer } from 'mobx-react-lite'
@@ -100,6 +99,12 @@ function WebView({
startUrl = queryParam + queryParamAppends
}
+ } else if (pathname.match('/marketplace')) {
+ const searchParams = new URLSearchParams(search)
+ const queryParam = searchParams.get('url')
+ if (queryParam) {
+ startUrl = decodeURIComponent(queryParam)
+ }
}
const isEpicLogin = runner === 'legendary' && startUrl === EPIC_LOGIN_URL
@@ -270,35 +275,37 @@ function WebView({
if (pathname === '/game7Portal') partitionForWebview = 'persist:g7portal'
if (urlIsHpUrl(startUrl)) partitionForWebview = 'persist:hyperplaystore'
- else if (shouldInjectProvider(startUrl))
+ else if (shouldInjectProvider(startUrl) || pathname.match('/marketplace'))
partitionForWebview = 'persist:InPageWindowEthereumExternalWallet'
return (
- {webviewRef.current && (
-
- )}
- {loading.refresh && }
-
- {showLoginWarningFor && (
-
+
+ {webviewRef.current && (
+
+ )}
+
- )}
+ {showLoginWarningFor && (
+
+ )}
+