Files
status-app/ui/app/AppLayouts/Browser/webview/BrowserDialogsContext.qml
T
Andrey Bocharnikov 8950aaf02a feat(browser): mobile webview (#20178)
* fix(browser): fix pr comments

* fix(browser): fix offset between navigation and webview

* fix(browser): split logic into contexts

* dialogs
* favorites
* webview

* fix(browser): crash when webview tries to render and destroy at the same time

* fix(browser): opened dialogs counter

* fix(browser):  load platform-specific webview

* fix(wc): unused wc files

* fix(browser): separate dapps and websocket logic

* fix(browser): fix pr comments

* fix(browser): fix popup tracker

* fix(browser): fix pr

* fix(browser): fix PR

* fix(browser): fix PR
2026-03-17 22:32:58 +04:00

44 lines
1.4 KiB
QML

import QtQuick
import StatusQ.Core.Utils as SQUtils
QtObject {
id: root
required property var networksStore
required property var browserActivityStore
required property var browserWalletStore
required property var openPopupFn
required property Component jsDialogComponent
required property Item dialogParent
function openHistoryMenu(historyMenu) {
historyMenu.open()
}
function openSettingsMenu(settingsMenu) {
settingsMenu.open()
}
function openWalletMenu(browserWalletMenu) {
// Initialize activity filters before opening popup.
const activeChainIds = SQUtils.ModelUtils.modelToFlatArray(
networksStore.activeNetworks, "chainId")
if (activeChainIds.length > 0) {
browserActivityStore.activityController.setFilterChainsJson(
JSON.stringify(activeChainIds), true)
}
const currentAddress = browserWalletStore.dappBrowserAccount.address
browserActivityStore.activityController.setFilterAddressesJson(
JSON.stringify([currentAddress]))
openPopupFn(browserWalletMenu)
}
function openJsDialog(request) {
request.accepted = true
var dialog = jsDialogComponent.createObject(dialogParent, {"request": request})
if (dialog)
dialog.open()
}
}