feat: reintroduce the dapp browser
This commit is contained in:
parent
08f8035b31
commit
e985e99f36
43
Makefile
43
Makefile
|
@ -272,34 +272,41 @@ $(DMG_TOOL):
|
|||
echo -e "\e[92mInstalling:\e[39m create-dmg"
|
||||
npm i
|
||||
|
||||
MACOS_BUNDLE := tmp/macos/dist/Status.app
|
||||
MACOS_OUTER_BUNDLE := tmp/macos/dist/Status.app
|
||||
MACOS_INNER_BUNDLE := $(MACOS_OUTER_BUNDLE)/Contents/Frameworks/QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app
|
||||
|
||||
STATUS_CLIENT_DMG ?= pkg/Status.dmg
|
||||
|
||||
$(STATUS_CLIENT_DMG): nim_status_client $(DMG_TOOL)
|
||||
rm -rf tmp/macos pkg/*.dmg
|
||||
mkdir -p $(MACOS_BUNDLE)/Contents/MacOS
|
||||
mkdir -p $(MACOS_BUNDLE)/Contents/Resources
|
||||
cp Info.plist $(MACOS_BUNDLE)/Contents/
|
||||
cp bin/nim_status_client $(MACOS_BUNDLE)/Contents/MacOS/
|
||||
cp nim_status_client.sh $(MACOS_BUNDLE)/Contents/MacOS/
|
||||
chmod +x $(MACOS_BUNDLE)/Contents/MacOS/nim_status_client.sh
|
||||
cp status-icon.icns $(MACOS_BUNDLE)/Contents/Resources/
|
||||
cp status.svg $(MACOS_BUNDLE)/Contents/
|
||||
cp -R resources.rcc $(MACOS_BUNDLE)/Contents/
|
||||
mkdir -p $(MACOS_BUNDLE)/Contents/i18n
|
||||
cp ui/i18n/* $(MACOS_BUNDLE)/Contents/i18n
|
||||
mkdir -p $(MACOS_OUTER_BUNDLE)/Contents/MacOS
|
||||
mkdir -p $(MACOS_OUTER_BUNDLE)/Contents/Resources
|
||||
cp Info.plist $(MACOS_OUTER_BUNDLE)/Contents/
|
||||
cp bin/nim_status_client $(MACOS_OUTER_BUNDLE)/Contents/MacOS/
|
||||
cp nim_status_client.sh $(MACOS_OUTER_BUNDLE)/Contents/MacOS/
|
||||
chmod +x $(MACOS_OUTER_BUNDLE)/Contents/MacOS/nim_status_client.sh
|
||||
cp status-icon.icns $(MACOS_OUTER_BUNDLE)/Contents/Resources/
|
||||
cp status.svg $(MACOS_OUTER_BUNDLE)/Contents/
|
||||
cp -R resources.rcc $(MACOS_OUTER_BUNDLE)/Contents/
|
||||
mkdir -p $(MACOS_OUTER_BUNDLE)/Contents/i18n
|
||||
cp ui/i18n/* $(MACOS_OUTER_BUNDLE)/Contents/i18n
|
||||
|
||||
echo -e $(BUILD_MSG) "app"
|
||||
macdeployqt \
|
||||
$(MACOS_BUNDLE) \
|
||||
-executable=$(MACOS_BUNDLE)/Contents/MacOS/nim_status_client \
|
||||
$(MACOS_OUTER_BUNDLE) \
|
||||
-executable=$(MACOS_OUTER_BUNDLE)/Contents/MacOS/nim_status_client \
|
||||
-qmldir=ui
|
||||
cp Info.runner.plist $(MACOS_BUNDLE)/Contents/Info.plist
|
||||
cp Info.runner.plist $(MACOS_OUTER_BUNDLE)/Contents/Info.plist
|
||||
macdeployqt \
|
||||
$(MACOS_INNER_BUNDLE) \
|
||||
-executable=$(MACOS_INNER_BUNDLE)/Contents/MacOS/QtWebEngineProcess
|
||||
|
||||
# if MACOS_CODESIGN_IDENT is not set then the .app bundle is not signed
|
||||
# if MACOS_CODESIGN_IDENT is not set then the outer and inner .app
|
||||
# bundles are not signed
|
||||
ifdef MACOS_CODESIGN_IDENT
|
||||
scripts/sign-macos-pkg.sh $(MACOS_BUNDLE) $(MACOS_CODESIGN_IDENT)
|
||||
scripts/sign-macos-pkg.sh $(MACOS_OUTER_BUNDLE) $(MACOS_CODESIGN_IDENT)
|
||||
scripts/sign-macos-pkg.sh $(MACOS_INNER_BUNDLE) $(MACOS_CODESIGN_IDENT) \
|
||||
--entitlements QtWebEngineProcess.plist
|
||||
endif
|
||||
echo -e $(BUILD_MSG) "dmg"
|
||||
mkdir -p pkg
|
||||
|
@ -308,7 +315,7 @@ endif
|
|||
# DMG icon based on app icon, but should otherwise work without it
|
||||
npx create-dmg \
|
||||
--identity="NOBODY" \
|
||||
$(MACOS_BUNDLE) \
|
||||
$(MACOS_OUTER_BUNDLE) \
|
||||
pkg || true
|
||||
# We ignore failure above create-dmg can't skip signing.
|
||||
# To work around that a dummy identity - 'NOBODY' - is specified.
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick.Layouts 1.13
|
||||
import QtWebView 1.14
|
||||
|
||||
Item {
|
||||
id: browserView
|
||||
x: 0
|
||||
y: 0
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
WebView {
|
||||
id: browserContainer
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 0
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 0
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 0
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 0
|
||||
url: "https://dap.ps/"
|
||||
}
|
||||
}
|
||||
|
||||
/*##^##
|
||||
Designer {
|
||||
D{i:0;autoSize:true;height:480;width:640}
|
||||
}
|
||||
##^##*/
|
|
@ -48,11 +48,33 @@ Item {
|
|||
}
|
||||
|
||||
RowLayout {
|
||||
id: nodeTabSettings
|
||||
id: browserTabSettings
|
||||
anchors.top: walletTabSettings.bottom
|
||||
anchors.topMargin: 20
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 24
|
||||
StyledText {
|
||||
//% "Browser Tab"
|
||||
text: qsTrId("browser-tab")
|
||||
}
|
||||
StatusSwitch {
|
||||
checked: appSettings.browserEnabled
|
||||
onCheckedChanged: function(value) {
|
||||
appSettings.browserEnabled = this.checked
|
||||
}
|
||||
}
|
||||
StyledText {
|
||||
//% "experimental (web3 not supported yet)"
|
||||
text: qsTrId("experimental-(web3-not-supported-yet)")
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: nodeTabSettings
|
||||
anchors.top: browserTabSettings.bottom
|
||||
anchors.topMargin: 20
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 24
|
||||
StyledText {
|
||||
//% "Node Management Tab"
|
||||
text: qsTrId("node-management-tab")
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
BrowserLayout 1.0 Browser/BrowserLayout.qml
|
||||
ChatLayout 1.0 Chat/ChatLayout.qml
|
||||
NodeLayout 1.0 Node/NodeLayout.qml
|
||||
ProfileLayout 1.0 Profile/ProfileLayout.qml
|
||||
|
|
|
@ -106,6 +106,33 @@ RowLayout {
|
|||
}
|
||||
}
|
||||
|
||||
TabButton {
|
||||
id: browserBtn
|
||||
enabled: isExperimental === "1" || appSettings.browserEnabled
|
||||
visible: this.enabled
|
||||
width: 40
|
||||
height: this.enabled ? 40 : 0
|
||||
text: ""
|
||||
anchors.topMargin: this.enabled ? 50 : 0
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: walletBtn.top
|
||||
background: Rectangle {
|
||||
color: Style.current.secondaryBackground
|
||||
opacity: parent.checked ? 1 : 0
|
||||
radius: 50
|
||||
}
|
||||
|
||||
SVGImage {
|
||||
id: image2
|
||||
height: 24
|
||||
width: 24
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: parent.checked ? "img/compassActive.svg" : "img/compass.svg"
|
||||
}
|
||||
}
|
||||
|
||||
TabButton {
|
||||
id: profileBtn
|
||||
width: 40
|
||||
|
@ -113,7 +140,7 @@ RowLayout {
|
|||
text: ""
|
||||
anchors.topMargin: 50
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: walletBtn.top
|
||||
anchors.top: browserBtn.top
|
||||
background: Rectangle {
|
||||
color: Style.current.secondaryBackground
|
||||
opacity: parent.checked ? 1 : 0
|
||||
|
@ -211,6 +238,13 @@ RowLayout {
|
|||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
BrowserLayout {
|
||||
id: browserLayoutContainer
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
ProfileLayout {
|
||||
id: profileLayoutContainer
|
||||
Layout.fillWidth: true
|
||||
|
|
|
@ -73,6 +73,7 @@ ApplicationWindow {
|
|||
property var walletSplitView
|
||||
property var profileSplitView
|
||||
property bool walletEnabled: false
|
||||
property bool browserEnabled: false
|
||||
property bool displayChatImages: false
|
||||
property bool compactMode
|
||||
property string locale: "en"
|
||||
|
@ -195,7 +196,7 @@ ApplicationWindow {
|
|||
id: onboardingDoneState
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DSM.State {
|
||||
id: appState
|
||||
onEntered: loader.sourceComponent = app
|
||||
|
|
|
@ -19,6 +19,7 @@ SOURCES = *.qml \
|
|||
onboarding/*.qml \
|
||||
onboarding/Login/*.qml \
|
||||
app/AppLayouts/*.qml \
|
||||
app/AppLayouts/Browser/*.qml \
|
||||
app/AppLayouts/Chat/*.qml \
|
||||
app/AppLayouts/Chat/ChatColumn/*.qml \
|
||||
app/AppLayouts/Chat/ChatColumn/ChatComponents/*.qml \
|
||||
|
@ -198,6 +199,7 @@ DISTFILES += \
|
|||
fonts/InterStatus/InterStatus-Thin.otf \
|
||||
fonts/InterStatus/InterStatus-ThinItalic.otf \
|
||||
Theme.qml \
|
||||
app/AppLayouts/Browser/BrowserLayout.qml \
|
||||
app/AppLayouts/Chat/ChatColumn.qml \
|
||||
app/AppLayouts/Chat/ChatColumn/samples/MessagesData.qml \
|
||||
app/AppLayouts/Chat/ChatColumn/samples/StickerData.qml \
|
||||
|
|
|
@ -39,8 +39,15 @@ RowLayout {
|
|||
//% "Secure crypto wallet"
|
||||
title: qsTrId("intro-title2")
|
||||
//% "Send and receive digital assets anywhere in the\nworld--no bank account required"
|
||||
description: qsTrId("send-and-receive-digital-assets-anywhere-in-the-nworld--no-bank-account-required")
|
||||
isLast: true
|
||||
description: qsTrId("send-and-receive-digital-assets-anywhere-in-the-nworld--no-bank-account-required")
|
||||
}
|
||||
Slide {
|
||||
image: "img/browser@2x.jpg"
|
||||
//% "Decentralized apps"
|
||||
title: qsTrId("intro-title3")
|
||||
//% "Explore games, exchanges and social networks\nwhere you alone own your data"
|
||||
description: qsTrId("explore-games--exchanges-and-social-networks-nwhere-you-alone-own-your-data")
|
||||
isLast: true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue