fix PageSites table error
This commit is contained in:
parent
d1a3545912
commit
c687bb39ef
5 changed files with 55 additions and 27 deletions
|
|
@ -120,45 +120,73 @@ Item {
|
||||||
UiLogic.onPushButtonSitesImportClicked(fileUrl)
|
UiLogic.onPushButtonSitesImportClicked(fileUrl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TableView {
|
ListView {
|
||||||
id: tb
|
id: tb
|
||||||
x: 20
|
x: 20
|
||||||
y: 200
|
y: 200
|
||||||
width: 341
|
width: 341
|
||||||
height: 371
|
height: 371
|
||||||
rowSpacing: 1
|
spacing: 1
|
||||||
clip: true
|
clip: true
|
||||||
property int currentRow: -1
|
property int currentRow: -1
|
||||||
columnSpacing: 0
|
|
||||||
model: UiLogic.tableViewSitesModel
|
model: UiLogic.tableViewSitesModel
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
implicitWidth: 170
|
implicitWidth: 170 * 2
|
||||||
implicitHeight: 30
|
implicitHeight: 30
|
||||||
|
Item {
|
||||||
|
width: 170
|
||||||
|
height: 30
|
||||||
|
anchors.left: parent.left
|
||||||
|
id: c1
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 1
|
height: 1
|
||||||
color: "lightgray"
|
color: "lightgray"
|
||||||
visible: row !== tb.currentRow
|
visible: index !== tb.currentRow
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: "#63B4FB"
|
color: "#63B4FB"
|
||||||
visible: row === tb.currentRow
|
visible: index === tb.currentRow
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: display
|
text: url_path
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
leftPadding: 10
|
leftPadding: 10
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
anchors.left: c1.right
|
||||||
|
width: 170
|
||||||
|
height: 30
|
||||||
|
Rectangle {
|
||||||
|
anchors.top: parent.top
|
||||||
|
width: parent.width
|
||||||
|
height: 1
|
||||||
|
color: "lightgray"
|
||||||
|
visible: index !== tb.currentRow
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
color: "#63B4FB"
|
||||||
|
visible: index === tb.currentRow
|
||||||
|
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: ip
|
||||||
|
anchors.fill: parent
|
||||||
|
leftPadding: 10
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
tb.currentRow = row
|
tb.currentRow = index
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ Item {
|
||||||
checked: UiLogic.pushButtonConnectChecked
|
checked: UiLogic.pushButtonConnectChecked
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
UiLogic.pushButtonConnectChecked = checked
|
UiLogic.pushButtonConnectChecked = checked
|
||||||
UiLogic.onPushButtonConnectClicked()
|
UiLogic.onPushButtonConnectClicked(checked)
|
||||||
}
|
}
|
||||||
background: Image {
|
background: Image {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ Window {
|
||||||
UiLogic.onCloseWindow()
|
UiLogic.onCloseWindow()
|
||||||
}
|
}
|
||||||
|
|
||||||
// flags: Qt.FramelessWindowHint
|
flags: Qt.FramelessWindowHint
|
||||||
title: "AmneziaVPN"
|
title: "AmneziaVPN"
|
||||||
function getPageComponent(page) {
|
function getPageComponent(page) {
|
||||||
switch (page) {
|
switch (page) {
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ UiLogic::UiLogic(QObject *parent) :
|
||||||
m_pushButtonNewServerConnectEnabled{},
|
m_pushButtonNewServerConnectEnabled{},
|
||||||
m_pushButtonNewServerConnectText{tr("Connect")},
|
m_pushButtonNewServerConnectText{tr("Connect")},
|
||||||
m_dialogConnectErrorText{},
|
m_dialogConnectErrorText{},
|
||||||
m_pageServerSettingsEnabled{false},
|
m_pageServerSettingsEnabled{true},
|
||||||
m_pushButtonServerSettingsClearText{tr("Clear server from Amnezia software")},
|
m_pushButtonServerSettingsClearText{tr("Clear server from Amnezia software")},
|
||||||
m_pageShareAmneziaVisible{true},
|
m_pageShareAmneziaVisible{true},
|
||||||
m_pageShareOpenvpnVisible{true},
|
m_pageShareOpenvpnVisible{true},
|
||||||
|
|
|
||||||
|
|
@ -651,6 +651,9 @@ public:
|
||||||
Q_INVOKABLE void onPushButtonForgetServer();
|
Q_INVOKABLE void onPushButtonForgetServer();
|
||||||
Q_INVOKABLE void onPushButtonServerSettingsClearClientCacheClicked();
|
Q_INVOKABLE void onPushButtonServerSettingsClearClientCacheClicked();
|
||||||
Q_INVOKABLE void onLineEditServerSettingsDescriptionEditingFinished();
|
Q_INVOKABLE void onLineEditServerSettingsDescriptionEditingFinished();
|
||||||
|
Q_INVOKABLE void updateSitesPage();
|
||||||
|
Q_INVOKABLE void updateServersListPage();
|
||||||
|
Q_INVOKABLE void updateProtocolsPage();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void frameWireguardSettingsVisibleChanged();
|
void frameWireguardSettingsVisibleChanged();
|
||||||
|
|
@ -1094,9 +1097,6 @@ private:
|
||||||
void setupSitesPageConnections();
|
void setupSitesPageConnections();
|
||||||
void setupProtocolsPageConnections();
|
void setupProtocolsPageConnections();
|
||||||
|
|
||||||
void updateSitesPage();
|
|
||||||
void updateServersListPage();
|
|
||||||
void updateProtocolsPage();
|
|
||||||
void updateOpenVpnPage(const QJsonObject &openvpnConfig, DockerContainer container, bool haveAuthData);
|
void updateOpenVpnPage(const QJsonObject &openvpnConfig, DockerContainer container, bool haveAuthData);
|
||||||
void updateShadowSocksPage(const QJsonObject &ssConfig, DockerContainer container, bool haveAuthData);
|
void updateShadowSocksPage(const QJsonObject &ssConfig, DockerContainer container, bool haveAuthData);
|
||||||
void updateCloakPage(const QJsonObject &ckConfig, DockerContainer container, bool haveAuthData);
|
void updateCloakPage(const QJsonObject &ckConfig, DockerContainer container, bool haveAuthData);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue