mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 01:37:02 +02:00
Merge branch 'loginOnLaunch' of https://github.com/wayne-chen/hifi into loginOnLaunch
This commit is contained in:
commit
a8adaff6c1
4 changed files with 62 additions and 17 deletions
|
@ -23,6 +23,7 @@ ModalWindow {
|
||||||
objectName: "LoginDialog"
|
objectName: "LoginDialog"
|
||||||
implicitWidth: 520
|
implicitWidth: 520
|
||||||
implicitHeight: 320
|
implicitHeight: 320
|
||||||
|
closeButtonVisible: true
|
||||||
destroyOnCloseButton: true
|
destroyOnCloseButton: true
|
||||||
destroyOnHidden: true
|
destroyOnHidden: true
|
||||||
visible: true
|
visible: true
|
||||||
|
|
|
@ -21,8 +21,6 @@ Item {
|
||||||
height: root.pane.height
|
height: root.pane.height
|
||||||
width: root.pane.width
|
width: root.pane.width
|
||||||
property bool failAfterSignUp: false
|
property bool failAfterSignUp: false
|
||||||
property var locale: Qt.locale()
|
|
||||||
property string dateTimeString
|
|
||||||
|
|
||||||
function login() {
|
function login() {
|
||||||
mainTextContainer.visible = false
|
mainTextContainer.visible = false
|
||||||
|
@ -88,6 +86,23 @@ Item {
|
||||||
height: 48
|
height: 48
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ShortcutText {
|
||||||
|
id: flavorText
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
left: parent.left
|
||||||
|
margins: 0
|
||||||
|
topMargin: hifi.dimensions.contentSpacing.y
|
||||||
|
}
|
||||||
|
|
||||||
|
text: qsTr("Sign in to High Fidelity to make friends, get HFC, and buy interesting things on the Marketplace!")
|
||||||
|
width: parent.width
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
lineHeight: 1
|
||||||
|
lineHeightMode: Text.ProportionalHeight
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
}
|
||||||
|
|
||||||
ShortcutText {
|
ShortcutText {
|
||||||
id: mainTextContainer
|
id: mainTextContainer
|
||||||
anchors {
|
anchors {
|
||||||
|
@ -130,7 +145,8 @@ Item {
|
||||||
y: usernameField.height
|
y: usernameField.height
|
||||||
anchors {
|
anchors {
|
||||||
right: usernameField.right
|
right: usernameField.right
|
||||||
topMargin: -19
|
top: usernameField.bottom
|
||||||
|
topMargin: 4
|
||||||
}
|
}
|
||||||
|
|
||||||
text: "<a href='https://highfidelity.com/users/password/new'>Forgot Username?</a>"
|
text: "<a href='https://highfidelity.com/users/password/new'>Forgot Username?</a>"
|
||||||
|
@ -161,6 +177,8 @@ Item {
|
||||||
z: 10
|
z: 10
|
||||||
anchors {
|
anchors {
|
||||||
right: passwordField.right
|
right: passwordField.right
|
||||||
|
top: passwordField.bottom
|
||||||
|
topMargin: 4
|
||||||
}
|
}
|
||||||
|
|
||||||
text: "<a href='https://highfidelity.com/users/password/new'>Forgot Password?</a>"
|
text: "<a href='https://highfidelity.com/users/password/new'>Forgot Password?</a>"
|
||||||
|
@ -234,6 +252,26 @@ Item {
|
||||||
onHeightChanged: d.resize(); onWidthChanged: d.resize();
|
onHeightChanged: d.resize(); onWidthChanged: d.resize();
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
|
CheckBox {
|
||||||
|
id: autoLogoutCheckbox;
|
||||||
|
checked: Settings.getValue("wallet/autoLogout", true);
|
||||||
|
text: "Keep me signed in"
|
||||||
|
boxSize: 20;
|
||||||
|
labelFontSize: 15;
|
||||||
|
color: hifi.colors.black;
|
||||||
|
onCheckedChanged: {
|
||||||
|
Settings.setValue("wallet/autoLogout", !checked);
|
||||||
|
if (checked) {
|
||||||
|
Settings.setValue("wallet/savedUsername", "");
|
||||||
|
} else {
|
||||||
|
Settings.setValue("wallet/savedUsername", Account.username);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onDestruction: {
|
||||||
|
Settings.setValue("wallet/autoLogout", !checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: linkAccountButton
|
id: linkAccountButton
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
@ -244,12 +282,6 @@ Item {
|
||||||
|
|
||||||
onClicked: linkAccountBody.login()
|
onClicked: linkAccountBody.login()
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
text: qsTr("Cancel")
|
|
||||||
onClicked: root.tryDestroy()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
@ -301,14 +333,6 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
usernameField.forceActiveFocus();
|
usernameField.forceActiveFocus();
|
||||||
|
|
||||||
var data = {
|
|
||||||
"date": new Date().toLocaleString(),
|
|
||||||
};
|
|
||||||
print(new Date().toLocaleString());
|
|
||||||
print(model.sessionId);
|
|
||||||
|
|
||||||
//UserActivityLogger.logAction("login_screen_shown", )
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
|
|
@ -94,5 +94,24 @@ Frame {
|
||||||
color: hifi.colors.lightGray
|
color: hifi.colors.lightGray
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GlyphButton {
|
||||||
|
id: closeButton
|
||||||
|
visible: window.closeButtonVisible
|
||||||
|
width: 30
|
||||||
|
y: -hifi.dimensions.modalDialogTitleHeight
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
right: parent.right
|
||||||
|
topMargin: 10
|
||||||
|
rightMargin: 10
|
||||||
|
}
|
||||||
|
glyph: hifi.glyphs.close
|
||||||
|
size: 23
|
||||||
|
onClicked: {
|
||||||
|
window.destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ ScrollingWindow {
|
||||||
destroyOnHidden: true
|
destroyOnHidden: true
|
||||||
frame: ModalFrame { }
|
frame: ModalFrame { }
|
||||||
|
|
||||||
|
property bool closeButtonVisible: false
|
||||||
property int colorScheme: hifi.colorSchemes.light
|
property int colorScheme: hifi.colorSchemes.light
|
||||||
property bool draggable: false
|
property bool draggable: false
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue