mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-05 10:12:46 +00:00
Initial commit
Features so far: - Login is working, both on back-end and GUI-wise - Saving and reusing login tokens is working - The home page is mostly functional - Show details can be received and displayed in a basic manner Following features are taken into account, but have not been fully implemented: - Support for multiple accounts/servers - Securely saving login tokens
This commit is contained in:
commit
53b3eac213
40 changed files with 2375 additions and 0 deletions
43
qml/components/GlassyBackground.qml
Normal file
43
qml/components/GlassyBackground.qml
Normal file
|
@ -0,0 +1,43 @@
|
|||
import QtQuick 2.6
|
||||
import Sailfish.Silica 1.0
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
Rectangle {
|
||||
property alias source: backgroundImage.source
|
||||
property alias sourceSize: backgroundImage.sourceSize
|
||||
property real dimmedOpacity: Theme.opacityFaint
|
||||
readonly property alias status: backgroundImage.status
|
||||
color: Theme.colorScheme == Theme.DarkOnLight ? "#fff" : "#000"
|
||||
z: -1
|
||||
opacity: status == Image.Ready ? 1.0 : 0.0
|
||||
Behavior on opacity { NumberAnimation { duration: 300 } }
|
||||
|
||||
Image {
|
||||
id: backgroundImage
|
||||
cache: true
|
||||
smooth: false
|
||||
asynchronous: true
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
anchors.fill: parent
|
||||
visible: false
|
||||
}
|
||||
|
||||
FastBlur {
|
||||
anchors.fill: backgroundImage
|
||||
source: backgroundImage
|
||||
opacity: dimmedOpacity
|
||||
radius: 100
|
||||
}
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
fillMode: Image.Tile
|
||||
source: "image://theme/graphic-shader-texture"
|
||||
opacity: 0.1
|
||||
visible: parent.visible
|
||||
}
|
||||
|
||||
function clear() {
|
||||
//source = ""
|
||||
}
|
||||
}
|
55
qml/components/LibraryItemDelegate.qml
Normal file
55
qml/components/LibraryItemDelegate.qml
Normal file
|
@ -0,0 +1,55 @@
|
|||
import QtQuick 2.6
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
BackgroundItem {
|
||||
id: root
|
||||
property alias poster: posterImage.source
|
||||
property alias title: titleText.text
|
||||
property bool landscape: false
|
||||
width: Screen.width / 3
|
||||
height: landscape ? width / 4 * 3 : width / 2 * 3
|
||||
|
||||
RemoteImage {
|
||||
id: posterImage
|
||||
anchors {
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
}
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: posterImage
|
||||
color: Theme.rgba(Theme.highlightBackgroundColor, Theme.highlightBackgroundOpacity)
|
||||
visible: root.highlighted
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
}
|
||||
height: titleText.height * 1.5 + Theme.paddingSmall * 2
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: "transparent"; }
|
||||
GradientStop { position: 1.0; color: Theme.highlightDimmerColor }
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
id: titleText
|
||||
anchors {
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
right: parent.right
|
||||
leftMargin: Theme.paddingMedium
|
||||
rightMargin: Theme.paddingMedium
|
||||
bottomMargin: Theme.paddingSmall
|
||||
}
|
||||
truncationMode: TruncationMode.Fade
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
}
|
||||
}
|
76
qml/components/MoreSection.qml
Normal file
76
qml/components/MoreSection.qml
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* File taken from Storeman. See ../3rdparty.xml for licensing information
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property alias text: label.text
|
||||
property alias textAlignment: label.horizontalAlignment
|
||||
property bool busy: false
|
||||
property int depth: 0
|
||||
readonly property color _color: enabled ? highlighted ? Theme.highlightColor : Theme.primaryColor : Theme.secondaryColor
|
||||
default property alias content: container.data
|
||||
|
||||
implicitHeight: backgroundItem.height + container.height
|
||||
width: parent.width
|
||||
|
||||
BackgroundItem {
|
||||
id: backgroundItem
|
||||
width: parent.width
|
||||
height: Theme.itemSizeMedium
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: Theme.rgba(Theme.highlightBackgroundColor, 0.15) }
|
||||
GradientStop { position: 1.0; color: "transparent" }
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
id: label
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: image.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
leftMargin: Theme.horizontalPageMargin + depth * Theme.paddingLarge
|
||||
rightMargin: Theme.paddingMedium
|
||||
}
|
||||
horizontalAlignment: Text.AlignRight
|
||||
truncationMode: TruncationMode.Fade
|
||||
color: _color
|
||||
}
|
||||
|
||||
Image {
|
||||
id: image
|
||||
anchors {
|
||||
right: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
rightMargin: Theme.horizontalPageMargin
|
||||
}
|
||||
visible: root.enabled && !root.busy
|
||||
source: "image://theme/icon-m-right?" + _color
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
id: busyIndicator
|
||||
running: root.busy
|
||||
anchors.centerIn: image
|
||||
size: BusyIndicatorSize.Small
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: container
|
||||
anchors {
|
||||
top: backgroundItem.bottom
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
width: parent.width
|
||||
height: children[0].height
|
||||
}
|
||||
}
|
18
qml/components/PlainLabel.qml
Normal file
18
qml/components/PlainLabel.qml
Normal file
|
@ -0,0 +1,18 @@
|
|||
import QtQuick 2.6
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
/**
|
||||
* A label with the most commonly used settings set
|
||||
*/
|
||||
Label {
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
leftMargin: Theme.horizontalPageMargin
|
||||
rightMargin: Theme.horizontalPageMargin
|
||||
}
|
||||
color: Theme.highlightColor
|
||||
linkColor: Theme.primaryColor
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
29
qml/components/RemoteImage.qml
Normal file
29
qml/components/RemoteImage.qml
Normal file
|
@ -0,0 +1,29 @@
|
|||
import QtQuick 2.6
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
Image {
|
||||
property string fallbackImage
|
||||
property bool usingFallbackImage
|
||||
|
||||
BusyIndicator {
|
||||
anchors.centerIn: parent
|
||||
running: parent.status == Image.Loading
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: fallbackBackground
|
||||
anchors.fill: parent
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: Theme.highlightColor; }
|
||||
GradientStop { position: 1.0; color: Theme.highlightDimmerColor; }
|
||||
}
|
||||
visible: parent.status == Image.Error
|
||||
}
|
||||
|
||||
Image {
|
||||
id: fallbackImageItem
|
||||
anchors.centerIn: parent
|
||||
visible: parent.status == Image.Error
|
||||
source: fallbackImage ? fallbackImage : "image://theme/icon-m-question"
|
||||
}
|
||||
}
|
34
qml/components/UserGridDelegate.qml
Normal file
34
qml/components/UserGridDelegate.qml
Normal file
|
@ -0,0 +1,34 @@
|
|||
import QtQuick 2.6
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
GridItem {
|
||||
id: root
|
||||
property string image
|
||||
property alias name: nameLabel.text
|
||||
RemoteImage {
|
||||
id: userImage
|
||||
anchors.fill: parent
|
||||
source: root.image ? root.image : "image://theme/icon-m-contact?" + ((root.highlighted || root.down) ? Theme.highlightColor : Theme.primaryColor)
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
}
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: "transparent" }
|
||||
GradientStop { position: 1.0; color: Theme.overlayBackgroundColor }
|
||||
}
|
||||
}
|
||||
Label {
|
||||
id: nameLabel
|
||||
anchors {
|
||||
leftMargin: Theme.horizontalPageMargin
|
||||
rightMargin: Theme.horizontalPageMargin
|
||||
right: parent.right
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
bottomMargin: Theme.paddingSmall
|
||||
}
|
||||
text: qsTr("Other account")
|
||||
color: (root.highlighted || root.down) ? Theme.highlightColor : Theme.secondaryColor
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue