mirror of
https://github.com/spalencsar/bearwave.git
synced 2026-07-06 14:24:14 +02:00
fix(ui): restore navigation when viewing the About page
Keep a compact header navigation bar visible on the About page so users can return to station browsing. Make the sidebar logo navigate home and add World to the compact header navigation.
This commit is contained in:
@@ -184,7 +184,7 @@ ApplicationWindow {
|
||||
|
||||
Rectangle {
|
||||
id: headerPanel
|
||||
height: currentPage === "about" && !root.compactMode ? 1 : headerContent.implicitHeight + 18
|
||||
height: headerContent.implicitHeight + 18
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
@@ -206,13 +206,12 @@ ApplicationWindow {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 9
|
||||
spacing: 8
|
||||
visible: !(currentPage === "about" && !root.compactMode)
|
||||
|
||||
HeaderNavigation {
|
||||
Layout.fillWidth: true
|
||||
app: root
|
||||
compactMode: root.compactMode
|
||||
visible: root.compactMode
|
||||
visible: root.compactMode || currentPage === "about"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@@ -220,7 +219,7 @@ ApplicationWindow {
|
||||
Layout.preferredHeight: 1
|
||||
color: BearTheme.cardBorder
|
||||
opacity: 0.6
|
||||
visible: root.compactMode
|
||||
visible: root.compactMode || currentPage === "about"
|
||||
}
|
||||
|
||||
SearchToolbar {
|
||||
|
||||
@@ -13,13 +13,66 @@ Item {
|
||||
required property var app
|
||||
required property bool compactMode
|
||||
|
||||
implicitWidth: compactNav.implicitWidth
|
||||
implicitHeight: compactNav.implicitHeight
|
||||
implicitWidth: root.compactMode ? compactNav.implicitWidth : desktopNav.implicitWidth
|
||||
implicitHeight: root.compactMode ? compactNav.implicitHeight : desktopNav.implicitHeight
|
||||
|
||||
RowLayout {
|
||||
id: desktopNav
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
visible: !root.compactMode
|
||||
spacing: 8
|
||||
|
||||
Button {
|
||||
text: qsTr("Top")
|
||||
highlighted: app.currentPage === "top"
|
||||
onClicked: app.navigateToTop()
|
||||
}
|
||||
|
||||
Button {
|
||||
text: qsTr("DE")
|
||||
highlighted: app.currentPage === "german"
|
||||
onClicked: app.navigateToGerman()
|
||||
}
|
||||
|
||||
Button {
|
||||
text: qsTr("NL")
|
||||
highlighted: app.currentPage === "dutch"
|
||||
onClicked: app.navigateToDutch()
|
||||
}
|
||||
|
||||
Button {
|
||||
text: qsTr("World")
|
||||
highlighted: app.currentPage === "world"
|
||||
onClicked: app.navigateToWorld()
|
||||
}
|
||||
|
||||
Button {
|
||||
text: qsTr("Favorites")
|
||||
highlighted: app.currentPage === "favorites"
|
||||
onClicked: app.navigateToFavorites()
|
||||
}
|
||||
|
||||
Button {
|
||||
text: qsTr("History")
|
||||
highlighted: app.currentPage === "history"
|
||||
onClicked: app.navigateToHistory()
|
||||
}
|
||||
|
||||
Item { Layout.fillWidth: true }
|
||||
|
||||
Button {
|
||||
text: qsTr("About")
|
||||
highlighted: app.currentPage === "about"
|
||||
onClicked: app.navigateToAbout()
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: compactNav
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
visible: root.compactMode
|
||||
spacing: 8
|
||||
|
||||
RowLayout {
|
||||
@@ -93,6 +146,12 @@ Item {
|
||||
highlighted: app.currentPage === "history"
|
||||
onClicked: app.navigateToHistory()
|
||||
}
|
||||
|
||||
Button {
|
||||
text: qsTr("World")
|
||||
highlighted: app.currentPage === "world"
|
||||
onClicked: app.navigateToWorld()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,10 +23,18 @@ Rectangle {
|
||||
anchors.margins: 20
|
||||
spacing: 14
|
||||
|
||||
RowLayout {
|
||||
MouseArea {
|
||||
Layout.fillWidth: true
|
||||
spacing: 10
|
||||
Layout.bottomMargin: 8
|
||||
height: brandRow.implicitHeight
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: app.navigateToTop()
|
||||
|
||||
RowLayout {
|
||||
id: brandRow
|
||||
anchors.fill: parent
|
||||
spacing: 10
|
||||
|
||||
Image {
|
||||
Layout.preferredWidth: 34
|
||||
@@ -47,6 +55,7 @@ Rectangle {
|
||||
mipmap: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr("Stations")
|
||||
|
||||
@@ -291,27 +291,38 @@
|
||||
<context>
|
||||
<name>HeaderNavigation</name>
|
||||
<message>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="68"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="27"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="121"/>
|
||||
<source>Top</source>
|
||||
<translation>Top</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="74"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="33"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="127"/>
|
||||
<source>DE</source>
|
||||
<translation>DE</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="80"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="39"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="133"/>
|
||||
<source>NL</source>
|
||||
<translation>NL</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="86"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="45"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="151"/>
|
||||
<source>World</source>
|
||||
<translation>Welt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="51"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="139"/>
|
||||
<source>Favorites</source>
|
||||
<translation>Favoriten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="92"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="57"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="145"/>
|
||||
<source>History</source>
|
||||
<translation>Verlauf</translation>
|
||||
</message>
|
||||
@@ -320,7 +331,8 @@
|
||||
<translation type="obsolete">Manuell +</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="46"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="65"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="99"/>
|
||||
<source>About</source>
|
||||
<translation>Info</translation>
|
||||
</message>
|
||||
@@ -345,7 +357,7 @@
|
||||
<translation>BearWave</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/Main.qml" line="245"/>
|
||||
<location filename="../src/qml/Main.qml" line="244"/>
|
||||
<source>Error: </source>
|
||||
<translation>Fehler: </translation>
|
||||
</message>
|
||||
@@ -553,42 +565,42 @@
|
||||
<context>
|
||||
<name>SidebarNavigation</name>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="52"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="61"/>
|
||||
<source>Stations</source>
|
||||
<translation>Sender</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="64"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="73"/>
|
||||
<source>Top Global</source>
|
||||
<translation>Weltweite Top-Sender</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="71"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="80"/>
|
||||
<source>Germany</source>
|
||||
<translation>Deutschland</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="78"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="87"/>
|
||||
<source>Netherlands</source>
|
||||
<translation>Niederlande</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="93"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="102"/>
|
||||
<source>Library</source>
|
||||
<translation>Mediathek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="106"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="115"/>
|
||||
<source>Favorites</source>
|
||||
<translation>Favoriten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="113"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="122"/>
|
||||
<source>History</source>
|
||||
<translation>Verlauf</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="85"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="94"/>
|
||||
<source>Worldwide</source>
|
||||
<translation>Weltweit</translation>
|
||||
</message>
|
||||
@@ -605,17 +617,17 @@
|
||||
<translation type="vanished">MEDIATHEK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="127"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="136"/>
|
||||
<source>Add Station</source>
|
||||
<translation>Sender hinzufügen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="134"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="143"/>
|
||||
<source>About BearWave</source>
|
||||
<translation>Über BearWave</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="142"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="151"/>
|
||||
<source>Resume</source>
|
||||
<translation>Fortsetzen</translation>
|
||||
</message>
|
||||
|
||||
@@ -299,27 +299,38 @@
|
||||
<context>
|
||||
<name>HeaderNavigation</name>
|
||||
<message>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="68"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="27"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="121"/>
|
||||
<source>Top</source>
|
||||
<translation>Топ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="74"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="33"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="127"/>
|
||||
<source>DE</source>
|
||||
<translation>DE</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="80"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="39"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="133"/>
|
||||
<source>NL</source>
|
||||
<translation>NL</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="86"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="45"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="151"/>
|
||||
<source>World</source>
|
||||
<translation>Мир</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="51"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="139"/>
|
||||
<source>Favorites</source>
|
||||
<translation>Избранные</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="92"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="57"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="145"/>
|
||||
<source>History</source>
|
||||
<translation>История</translation>
|
||||
</message>
|
||||
@@ -328,7 +339,8 @@
|
||||
<translation type="vanished">Вручную +</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="46"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="65"/>
|
||||
<location filename="../src/qml/components/HeaderNavigation.qml" line="99"/>
|
||||
<source>About</source>
|
||||
<translation>О BearWave</translation>
|
||||
</message>
|
||||
@@ -353,7 +365,7 @@
|
||||
<translation>BearWave</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/Main.qml" line="245"/>
|
||||
<location filename="../src/qml/Main.qml" line="244"/>
|
||||
<source>Error: </source>
|
||||
<translation>Ошибка: </translation>
|
||||
</message>
|
||||
@@ -561,42 +573,42 @@
|
||||
<context>
|
||||
<name>SidebarNavigation</name>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="52"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="61"/>
|
||||
<source>Stations</source>
|
||||
<translation>Станции</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="64"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="73"/>
|
||||
<source>Top Global</source>
|
||||
<translation>Всемирный топ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="71"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="80"/>
|
||||
<source>Germany</source>
|
||||
<translation>Германия</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="78"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="87"/>
|
||||
<source>Netherlands</source>
|
||||
<translation>Нидерланды</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="93"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="102"/>
|
||||
<source>Library</source>
|
||||
<translation>Библиотека</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="106"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="115"/>
|
||||
<source>Favorites</source>
|
||||
<translation>Избранные</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="113"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="122"/>
|
||||
<source>History</source>
|
||||
<translation>История</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="85"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="94"/>
|
||||
<source>Worldwide</source>
|
||||
<translation>Весь мир</translation>
|
||||
</message>
|
||||
@@ -605,17 +617,17 @@
|
||||
<translation type="obsolete">Поиск</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="127"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="136"/>
|
||||
<source>Add Station</source>
|
||||
<translation>Добавить станцию</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="134"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="143"/>
|
||||
<source>About BearWave</source>
|
||||
<translation>О BearWave</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="142"/>
|
||||
<location filename="../src/qml/components/SidebarNavigation.qml" line="151"/>
|
||||
<source>Resume</source>
|
||||
<translation>Продолжить</translation>
|
||||
</message>
|
||||
|
||||
Reference in New Issue
Block a user