Skip to content

Commit

Permalink
🎉 0.2.23
Browse files Browse the repository at this point in the history
  • Loading branch information
Reverier-Xu committed Aug 30, 2024
1 parent 9ba517f commit 16fa5a6
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

env:
APP_NAME: "WebSocketReflectorX"
APP_VERSION: "0.2.22"
APP_VERSION: "0.2.23"

#-------------------------------------------------------------------------------
# Workflow jobs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

env:
APP_NAME: "WebSocketReflectorX"
APP_VERSION: "0.2.22"
APP_VERSION: "0.2.23"
QT_VERSION: "6.7.1"

#-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

env:
APP_NAME: "WebSocketReflectorX"
APP_VERSION: "0.2.22"
APP_VERSION: "0.2.23"
QT_VERSION: "6.7.1"

#-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deploy_linux.sh
Original file line number Diff line number Diff line change
@@ -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]"
Expand Down
2 changes: 1 addition & 1 deletion deploy_macos.sh
Original file line number Diff line number Diff line change
@@ -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]"
Expand Down
2 changes: 1 addition & 1 deletion deploy_windows.sh
Original file line number Diff line number Diff line change
@@ -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]"
Expand Down
7 changes: 3 additions & 4 deletions desktop/cors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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());
}
Expand Down Expand Up @@ -160,11 +161,9 @@ void WebsiteList::syncSites() {
auto waiting = json["pending"].toArray();
auto fetchedList = QList<Website>();
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;
Expand All @@ -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();
}
Expand Down
105 changes: 82 additions & 23 deletions desktop/ui/FramelessWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions desktop/ui/WebsitesView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion wsrx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wsrx"
version = "0.2.22"
version = "0.2.23"
edition = "2021"
authors = ["Reverier-Xu <reverier.xu@xdsec.club>"]
description = "Controlled TCP-over-WebSocket forwarding tunnel."
Expand Down

0 comments on commit 16fa5a6

Please sign in to comment.