Commit e882e3f7 authored by Camilo higuita's avatar Camilo higuita

push updates

parent 7dc22316
......@@ -14,7 +14,6 @@ import "widgets/SettingsView"
import "widgets/SearchView"
import "view_models"
import "view_models/BabeDialog"
import "view_models/BabeTable"
import "services/local"
......@@ -48,6 +47,8 @@ Maui.ApplicationWindow
property alias mainPlaylist: mainPlaylist
property alias selectionBar: selectionBar
about.appIcon: "qrc:/assets/vvave.svg"
about.appDescription: qsTr("VVAVE will handle your whole music collection by retreaving semantic information from the web. Just relax, enjoy and discover your new music ")
/***************************************************/
/******************** PLAYBACK ********************/
/*************************************************/
......@@ -165,10 +166,9 @@ Maui.ApplicationWindow
id: babeNotify
}
BabeMessage
Maui.Dialog
{
id: missingDialog
width: parent.width * (isMobile ? 0.9 : 0.4)
title: "Missing file"
onAccepted: {
bae.removeTrack(currentTrack.url)
......
......@@ -29,10 +29,7 @@
<file>widgets/SettingsView/SettingsView.qml</file>
<file>widgets/MyBeatView/LogginForm.qml</file>
<file>view_models/BabeMenu/BabeMenu.qml</file>
<file>view_models/BabeDialog/BabeMessage.qml</file>
<file>view_models/BabeDialog/BabeDialog.qml</file>
<file>widgets/SettingsView/SourcesDialog.qml</file>
<file>view_models/BabePopup.qml</file>
<file>assets/banner.png</file>
<file>assets/banner.svg</file>
<file>view_models/BabeTable/PlaylistDialog.qml</file>
......@@ -76,5 +73,6 @@
<file>assets/Astronaut.png</file>
<file>assets/MusicCloud.png</file>
<file>widgets/FoldersView.qml</file>
<file>assets/vvave.svg</file>
</qresource>
</RCC>
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import "../../view_models/BabeDialog"
import "../../utils/Help.js" as H
import org.kde.mauikit 1.0 as Maui
BabeDialog
Maui.Dialog
{
id: linkingDialogRoot
standardButtons: Dialog.Save | Dialog.Cancel
margins: contentMargins
maxHeight: unit *400
onAccepted:
{
......@@ -28,24 +25,15 @@ BabeDialog
ScrollView
{
anchors.fill: parent
anchors.centerIn: parent
clip: true
contentWidth: parent.width
contentWidth: linkingDialogRoot.width
contentHeight: contentLayout.implicitHeight
ColumnLayout
{
id: contentLayout
anchors.centerIn: parent
width: linkingDialogRoot.width*0.8
height: linkingDialogRoot.height*0.9
Item
{
Layout.fillWidth: true
Layout.fillHeight: true
}
width: linkingDialogRoot.width
Label
{
......@@ -57,13 +45,6 @@ BabeDialog
Layout.fillWidth: true
}
Item
{
Layout.fillWidth: true
Layout.fillHeight: true
}
Label
{
text: qsTr("IP Address")
......@@ -74,7 +55,7 @@ BabeDialog
Layout.fillWidth: true
}
TextField
Maui.TextField
{
id: ipField
Layout.fillWidth: true
......@@ -119,16 +100,7 @@ BabeDialog
Layout.fillWidth: true
}
Item
{
Layout.fillWidth: true
Layout.fillHeight: true
}
}
}
}
}
......@@ -92,7 +92,7 @@ Page
"qrc:/services/web/YoutubePlayer.qml"
}
BabePopup
Maui.Popup
{
id: configPopup
parent: parent
......
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.1
Dialog
{
width: columnWidth * 0.9
height: parent.height*0.5
x: (parent.width - width) / 2
y: (parent.height - height) / 2
parent: ApplicationWindow.overlay
modal: true
margins: 0
padding: space.tiny
Material.accent: babeColor
Material.background: backgroundColor
Material.primary: backgroundColor
Material.foreground: textColor
}
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
BabeDialog
{
id: babeMessageRoot
width: columnWidth * 0.9
height: parent.height*0.5
property string message
property string messageBody
standardButtons: Dialog.Yes | Dialog.No
ColumnLayout
{
anchors.fill: parent
width: parent.width
height: parent.height
Label
{
Layout.margins: contentMargins
text: message ? message : ""
width: babeMessageRoot.width
elide: Text.ElideRight
color: textColor
}
TextArea
{
Layout.margins: contentMargins
Layout.maximumWidth: parent.width
text: messageBody ? messageBody : ""
width: parent.width
wrapMode: TextEdit.WrapAnywhere
readOnly: true
color: textColor
}
}
}
import QtQuick 2.9
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.1
import org.kde.kirigami 2.2 as Kirigami
Popup
{
property int maxWidth : unit * 200
property int maxHeight : maxWidth
parent: ApplicationWindow.overlay
width: parent === ApplicationWindow.overlay ? (root.pageStack.wideMode ? parent.width * 0.4 :
(isMobile ? parent.width * 0.8 :
parent.width * 0.7)) :
parent.width * 0.7 > maxWidth ? maxWidth :
parent.width * 0.7
height: parent === ApplicationWindow.overlay ? (root.pageStack.wideMode ? parent.height * 0.5 :
(isMobile ? parent.height * 0.8 :
parent.height * 0.7)) :
parent.height * 0.7 > maxHeight ? maxHeight :
parent.height * 0.7
x: parent.width / 2 - width / 2
y: parent.height / 2 - height / 2
z: 999
modal: true
focus: true
clip: true
margins: 0
padding: space.small
enter: Transition
{
NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; duration: 150 }
}
exit: Transition
{
NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 150 }
}
Material.accent: babeColor
Material.background: backgroundColor
Material.primary: backgroundColor
Material.foreground: textColor
}
......@@ -4,21 +4,19 @@ import org.kde.kirigami 2.2 as Kirigami
import org.kde.mauikit 1.0 as Maui
import QtQuick.Layouts 1.3
import "../../view_models/BabeDialog"
import "../../view_models"
import "../../utils/Player.js" as Player
import "../../db/Queries.js" as Q
BabeDialog
Maui.Dialog
{
title: "Add "+ tracks.length +" tracks to..."
standardButtons: Dialog.Save | Dialog.Cancel
property var tracks : []
maxHeight: 400 * unit
ColumnLayout
{
spacing: space.small
anchors.fill: parent
BabeList
......@@ -55,12 +53,10 @@ BabeDialog
RowLayout
{
Layout.fillWidth: true
Layout.margins: space.small
TextField
Maui.TextField
{
Layout.fillWidth: true
width: parent.width
id: newPlaylistField
color: textColor
placeholderText: qsTr("New playlist")
......@@ -77,7 +73,6 @@ BabeDialog
iconName: "checkbox"
iconColor: textColor
onClicked: addPlaylist()
}
}
......
......@@ -3,10 +3,11 @@ import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import QtQuick.Controls.Material 2.1
import org.kde.mauikit 1.0 as Maui
import "../../view_models"
BabePopup
Maui.Popup
{
id: loginPopup
padding: contentMargins*3
......
......@@ -5,11 +5,14 @@ import org.kde.mauikit 1.0 as Maui
import "../../view_models"
import "../../db/Queries.js" as Q
BabePopup
Maui.Popup
{
id: searchSuggestionsRoot
property alias model : suggestionsList.model
maxHeight: isMobile ? parent.height * 0.4 : unit * 300
maxHeight: unit * 700
heightHint: 0.5
verticalAlignment: Qt.AlignBottom
BabeList
{
......
......@@ -9,8 +9,11 @@ import QtGraphicalEffects 1.0
import "../../view_models/BabeTable"
import "../../db/Queries.js" as Q
Page
BabeTable
{
id: searchTable
property alias searchInput : searchInput
property alias searchTable : searchTable
property var searchRes : []
......@@ -18,6 +21,78 @@ Page
property bool autoSuggestions : bae.loadSetting("AUTOSUGGESTIONS", "BABE", false) === "true" ? true : false
Layout.fillHeight: true
Layout.fillWidth: true
trackNumberVisible: false
headBarVisible: true
headBarExit: true
headBarExitIcon: "edit-clear"
holder.emoji: "qrc:/assets/BugSearch.png"
holder.isMask: false
holder.title : "No search results!"
holder.body: "Try with another query"
holder.emojiSize: iconSizes.huge
coverArtVisible: true
trackDuration: true
trackRating: true
onExit: clearSearch()
footBar.middleContent: Maui.TextField
{
id: searchInput
placeholderText: qsTr("Search...")
width: footBar.middleLayout.width * 0.9
onAccepted: runSearch(searchInput.text)
// onActiveFocusChanged: if(activeFocus && autoSuggestions) suggestionsPopup.open()
onTextEdited: if(autoSuggestions) suggestionsPopup.updateSuggestions()
}
footBar.leftContent: Maui.ToolButton
{
visible: true
iconName: "view-filter"
iconColor: autoSuggestions ? babeColor : textColor
onClicked:
{
autoSuggestions = !autoSuggestions
bae.saveSetting("AUTOSUGGESTIONS", autoSuggestions, "BABE")
if(!autoSuggestions)
suggestionsPopup.close()
}
}
footBar.rightContent: Maui.ToolButton
{
iconName: "edit-clear"
onClicked: searchInput.clear()
}
SearchSuggestions
{
id: suggestionsPopup
// focus: false
parent: parent
// modal: false
// closePolicy: Popup.CloseOnPressOutsideParent
}
Rectangle
{
visible: suggestionsPopup.visible
width: parent.width
height: parent.height-searchBox.height
color: darkDarkColor
z: 999
opacity: 0.5
}
function runSearch(searchTxt)
{
if(searchTxt)
......@@ -55,109 +130,5 @@ Page
searchTable.model.append(tracks[i])
}
SearchSuggestions
{
id: suggestionsPopup
focus: false
parent: searchBox
width: parent.width*0.9
height: 200
modal: false
closePolicy: Popup.CloseOnPressOutsideParent
y: -(height+contentMargins*2)
}
Rectangle
{
visible: suggestionsPopup.visible
width: parent.width
height: parent.height-searchBox.height
color: darkDarkColor
z: 999
opacity: 0.5
}
ColumnLayout
{
anchors.fill: parent
width: parent.width
height: parent.height
Layout.margins: 0
spacing: 0
BabeTable
{
id: searchTable
Layout.fillHeight: true
Layout.fillWidth: true
trackNumberVisible: false
headBarVisible: true
headBarExit: true
headBarExitIcon: "edit-clear"
holder.emoji: "qrc:/assets/BugSearch.png"
holder.isMask: false
holder.title : "No search results!"
holder.body: "Try with another query"
holder.emojiSize: iconSizes.huge
coverArtVisible: true
trackDuration: true
trackRating: true
onExit: clearSearch()
}
ToolBar
{
id: searchBox
Layout.fillWidth: true
position: ToolBar.Footer
RowLayout
{
anchors.fill: parent
Maui.ToolButton
{
visible: true
iconName: "view-filter"
iconColor: autoSuggestions ? babeColor : textColor
onClicked:
{
autoSuggestions = !autoSuggestions
bae.saveSetting("AUTOSUGGESTIONS", autoSuggestions, "BABE")
if(!autoSuggestions)
suggestionsPopup.close()
}
}
TextInput
{
id: searchInput
color: textColor
Layout.fillWidth: true
Layout.fillHeight: true
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
selectByMouse: !isMobile
selectionColor: highlightColor
selectedTextColor: highlightedTextColor
focus: true
text: ""
wrapMode: TextEdit.Wrap
//activeFocusOnPress: true
onAccepted: runSearch(searchInput.text)
// onActiveFocusChanged: if(activeFocus && autoSuggestions) suggestionsPopup.open()
onTextEdited: if(autoSuggestions) suggestionsPopup.updateSuggestions()
}
Maui.ToolButton
{
iconName: "edit-clear"
onClicked: searchInput.clear()
}
}
}
}
}
......@@ -6,7 +6,7 @@ import org.kde.kirigami 2.2 as Kirigami
import org.kde.mauikit 1.0 as Maui
import "../../view_models"
BabePopup
Maui.Popup
{
id: babeConsoleRoot
......
......@@ -3,19 +3,20 @@ import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import org.kde.mauikit 1.0 as Maui
import "../../view_models"
import "../../view_models/BabeDialog"
BabePopup
Maui.Popup
{
property string pathToRemove : ""
maxWidth: unit * 600
maxHeight: unit * 500
function scanDir(folderUrl)
{
bae.scanDir(folderUrl)
}
BabeMessage
Maui.Dialog
{
id: confirmationDialog
onAccepted:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment