FreeKill/qml/Config.qml
notify a02410c282 Merge Dev (#31)
* splash screen when app is loading

* doRaceRequest

* prepare to add fkparse feature

* player mark operation

* dont call lua in regular room

* dont call lua in lobby

* clean up

* idle_room in Cpp's class Server

* fix many small bugs

* Security enhancement (#27)

* use RSA encryption when sending password

* update fkp's url so other can clone it

* add salt to password

* save password

* fix default config bug

* fix room reuse bug

* disable empty usr name

* how to compile (#28)

* add some doc

* how to compile

* update readme

* Actions (#29)

* judge(not tested)

* logic of chat

* sendlog at most scenario

* adjust ui, add shortcuts

* ui, z axis of cardArea

* create server cli, improve logging

* basic shell using

* use gnu readline instead

* use static QRegularExp

* fix android build

* fix automoc problem

* MD5 check

* md5 check bugfix

* cardEffectEvent (#30)

* cardEffectEvent

* add TODOs

* thinking

Co-authored-by: Ho-spair <62695577+Ho-spair@users.noreply.github.com>
2022-12-18 12:52:52 +08:00

38 lines
904 B
QML

import QtQuick
QtObject {
// Client configuration
property real winWidth
property real winHeight
property var conf: ({})
property string lastLoginServer
property var savedPassword: ({})
// Player property of client
property string serverAddr
property string screenName: ""
property string password: ""
property string cipherText
// Client data
property int roomCapacity: 0
property int roomTimeout: 0
function loadConf() {
conf = JSON.parse(Backend.loadConf());
winWidth = conf.winWidth;
winHeight = conf.winHeight;
lastLoginServer = conf.lastLoginServer;
savedPassword = conf.savedPassword;
}
function saveConf() {
conf.winWidth = realMainWin.width;
conf.winHeight = realMainWin.height;
conf.lastLoginServer = lastLoginServer;
conf.savedPassword = savedPassword;
Backend.saveConf(JSON.stringify(conf, undefined, 2));
}
}