moment/src/gui/Base/HFlickableColumnPage.qml
miruka d7907db547 Ask for server URL before showing sign in box
Contact the server's .well-known API before anything to get
available login flows instead of blindly assuming it will be
m.login.password, and to get the server's real URL instead of
requiring users to remember that e.g. it's "chat.privacytools.io"
and not just "privacytools.io" despite user IDs making it look like so.

The server field will also now remember the last accepted URL.
2020-07-24 02:36:24 -04:00

59 lines
1.5 KiB
QML

// SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.12
import QtQuick.Controls 2.12
import "../ShortcutBundles"
HPage {
id: page
default property alias columnData: column.data
property alias column: column
property alias flickable: flickable
property alias flickShortcuts: flickShortcuts
property bool enableFlickShortcuts:
SwipeView ? SwipeView.isCurrentItem : true
implicitWidth: theme.controls.box.defaultWidth
implicitHeight: contentHeight + implicitHeaderHeight + implicitFooterHeight
contentHeight:
flickable.contentHeight + flickable.topMargin + flickable.bottomMargin
padding: 0
HFlickable {
id: flickable
anchors.fill: parent
contentWidth: parent.width
contentHeight: column.implicitHeight
clip: true
topMargin: theme.spacing
bottomMargin: topMargin
leftMargin: topMargin
rightMargin: topMargin
FlickShortcuts {
id: flickShortcuts
active: ! mainUI.debugConsole.visible && enableFlickShortcuts
flickable: flickable
}
HColumnLayout {
id: column
width:
flickable.width - flickable.leftMargin - flickable.rightMargin
spacing: theme.spacing * 1.5
}
}
HKineticScrollingDisabler {
flickable: flickable
width: enabled ? flickable.width : 0
height: enabled ? flickable.height : 0
}
}