diff --git a/.github/workflows/cli.yaml b/.github/workflows/cli.yaml index 3a63571..385cbee 100644 --- a/.github/workflows/cli.yaml +++ b/.github/workflows/cli.yaml @@ -13,7 +13,7 @@ on: env: APP_NAME: "WebSocketReflectorX" - APP_VERSION: "0.2.22" + APP_VERSION: "0.2.23" #------------------------------------------------------------------------------- # Workflow jobs diff --git a/.github/workflows/commit.yaml b/.github/workflows/commit.yaml index 39771f9..0d2c39e 100644 --- a/.github/workflows/commit.yaml +++ b/.github/workflows/commit.yaml @@ -18,7 +18,7 @@ on: env: APP_NAME: "WebSocketReflectorX" - APP_VERSION: "0.2.22" + APP_VERSION: "0.2.23" QT_VERSION: "6.7.1" #------------------------------------------------------------------------------- diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7a7c59e..7edb078 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ on: env: APP_NAME: "WebSocketReflectorX" - APP_VERSION: "0.2.22" + APP_VERSION: "0.2.23" QT_VERSION: "6.7.1" #------------------------------------------------------------------------------- diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f018cf..a6926d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.20) set(VERSION_MAJOR 0) set(VERSION_MINOR 2) -set(VERSION_PATCH 22) +set(VERSION_PATCH 23) execute_process( COMMAND git describe --always --dirty diff --git a/deploy_linux.sh b/deploy_linux.sh index 180d617..551898f 100755 --- a/deploy_linux.sh +++ b/deploy_linux.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash export APP_NAME="WebSocketReflectorX" -export APP_VERSION=0.2.22 +export APP_VERSION=0.2.23 export GIT_VERSION=$(git rev-parse --short HEAD) echo "> $APP_NAME packager (Linux x86_64) [v$APP_VERSION]" diff --git a/deploy_macos.sh b/deploy_macos.sh index 46b6274..1f81657 100755 --- a/deploy_macos.sh +++ b/deploy_macos.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash export APP_NAME="WebSocketReflectorX" -export APP_VERSION=0.2.22 +export APP_VERSION=0.2.23 export GIT_VERSION=$(git rev-parse --short HEAD) echo "> $APP_NAME packager (macOS x86_64) [v$APP_VERSION]" diff --git a/deploy_windows.sh b/deploy_windows.sh index 7c66bfe..2047756 100755 --- a/deploy_windows.sh +++ b/deploy_windows.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash export APP_NAME="WebSocketReflectorX" -export APP_VERSION=0.2.22 +export APP_VERSION=0.2.23 export GIT_VERSION=$(git rev-parse --short HEAD) echo "> $APP_NAME packager (Windows x86_64) [v$APP_VERSION]" diff --git a/desktop/cors.cc b/desktop/cors.cc index 1eb00f8..1fb0313 100644 --- a/desktop/cors.cc +++ b/desktop/cors.cc @@ -75,6 +75,7 @@ int WebsiteList::rowCount(const QModelIndex& parent) const { } QVariant WebsiteList::data(const QModelIndex& index, int role) const { + // qDebug() << "data" << index << role; if (!index.isValid()) { return QVariant(); } @@ -110,7 +111,7 @@ void WebsiteList::fromJson(const QString& json) { auto array = QJsonDocument::fromJson(json.toUtf8()).array(); for (const auto& site : array) { pass(site.toString()); - m_list.append(Website(site.toString(), false)); + m_list.append(Website(site.toString(), true)); } emit sizeChanged(size()); } @@ -160,11 +161,9 @@ void WebsiteList::syncSites() { auto waiting = json["pending"].toArray(); auto fetchedList = QList(); for (const auto& site : allowed) { - // qDebug() << site.toString(); fetchedList.append(Website(site.toString(), true)); } for (const auto& site : waiting) { - // qDebug() << site.toString(); fetchedList.append(Website(site.toString(), false)); } auto oldList = m_list; @@ -180,7 +179,7 @@ void WebsiteList::syncSites() { // add new one for (const auto& site : fetchedList) { if (!oldList.contains(site)) { - beginInsertRows(QModelIndex(), m_list.size(), m_list.size()); + beginInsertRows(QModelIndex(), 0, 0); m_list.append(site); endInsertRows(); } diff --git a/desktop/ui/FramelessWindow.qml b/desktop/ui/FramelessWindow.qml index d671f1e..4e1a1c6 100644 --- a/desktop/ui/FramelessWindow.qml +++ b/desktop/ui/FramelessWindow.qml @@ -22,36 +22,95 @@ Window { } MouseArea { + enabled: root.state === Window.Normal && !ui.isMac acceptedButtons: Qt.NoButton // don't handle actual events - // resize window mouse area - anchors.fill: parent - enabled: !ui.isMac - cursorShape: { - if (root.state !== Window.Maximized) { - const p = Qt.point(mouseX, mouseY); - const b = 10; - // Increase the corner size slightly - if (p.x < b && p.y < b) - return Qt.SizeFDiagCursor; + hoverEnabled: true + cursorShape: Qt.SizeFDiagCursor + anchors.left: parent.left + anchors.top: parent.top + width: 10 + height: 10 + } - if (p.x >= width - b && p.y >= height - b) - return Qt.SizeFDiagCursor; + MouseArea { + enabled: root.state === Window.Normal && !ui.isMac + acceptedButtons: Qt.NoButton // don't handle actual events + hoverEnabled: true + cursorShape: Qt.SizeFDiagCursor + anchors.right: parent.right + anchors.bottom: parent.bottom + width: 10 + height: 10 + } - if (p.x >= width - b && p.y < b) - return Qt.SizeBDiagCursor; + MouseArea { + enabled: root.state === Window.Normal && !ui.isMac + acceptedButtons: Qt.NoButton // don't handle actual events + hoverEnabled: true + cursorShape: Qt.SizeBDiagCursor + anchors.left: parent.left + anchors.bottom: parent.bottom + width: 10 + height: 10 + } + + MouseArea { + enabled: root.state === Window.Normal && !ui.isMac + acceptedButtons: Qt.NoButton // don't handle actual events + hoverEnabled: true + cursorShape: Qt.SizeBDiagCursor + anchors.right: parent.right + anchors.top: parent.top + width: 10 + height: 10 + } - if (p.x < b && p.y >= height - b) - return Qt.SizeBDiagCursor; + MouseArea { + enabled: root.state === Window.Normal && !ui.isMac + acceptedButtons: Qt.NoButton // don't handle actual events + hoverEnabled: true + cursorShape: Qt.SizeHorCursor + anchors.left: parent.left + anchors.top: parent.top + anchors.topMargin: 10 + width: 10 + height: parent.height - 20 + } - if (p.x < b || p.x >= width - b) - return Qt.SizeHorCursor; + MouseArea { + enabled: root.state === Window.Normal && !ui.isMac + acceptedButtons: Qt.NoButton // don't handle actual events + hoverEnabled: true + cursorShape: Qt.SizeHorCursor + anchors.right: parent.right + anchors.top: parent.top + anchors.topMargin: 10 + width: 10 + height: parent.height - 20 + } - if (p.y < b || p.y >= height - b) - return Qt.SizeVerCursor; + MouseArea { + enabled: root.state === Window.Normal && !ui.isMac + acceptedButtons: Qt.NoButton // don't handle actual events + hoverEnabled: true + cursorShape: Qt.SizeVerCursor + anchors.top: parent.top + anchors.left: parent.left + anchors.leftMargin: 10 + width: parent.width - 20 + height: 10 + } - } - } - hoverEnabled: !ui.isMac + MouseArea { + enabled: root.state === Window.Normal && !ui.isMac + acceptedButtons: Qt.NoButton // don't handle actual events + hoverEnabled: true + cursorShape: Qt.SizeVerCursor + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.leftMargin: 10 + width: parent.width - 20 + height: 10 } DragHandler { diff --git a/desktop/ui/WebsitesView.qml b/desktop/ui/WebsitesView.qml index 279e901..4f6a1b5 100644 --- a/desktop/ui/WebsitesView.qml +++ b/desktop/ui/WebsitesView.qml @@ -96,6 +96,8 @@ Item { color: Style.palette.buttonText icon.source: "qrc:/resources/assets/shield.svg" icon.color: passed ? Style.palette.success : Style.palette.warning + icon.height: 16 + icon.width: 16 HoverHandler { id: hoverHandler diff --git a/wsrx/Cargo.toml b/wsrx/Cargo.toml index 9584ec6..efadc59 100644 --- a/wsrx/Cargo.toml +++ b/wsrx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wsrx" -version = "0.2.22" +version = "0.2.23" edition = "2021" authors = ["Reverier-Xu "] description = "Controlled TCP-over-WebSocket forwarding tunnel."