diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-03-17 12:47:46 +0100 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-05-04 14:58:39 +0200 |
commit | 74bffa3b21947600a550056d16163f5059d5fa2b (patch) | |
tree | 0b677f50b00349889684668c129f0bca08c773bb /gui/qml | |
parent | c46ec33dc3a187dade408ffd9e6de8ba5a460810 (diff) |
remove map for now
Diffstat (limited to 'gui/qml')
-rw-r--r-- | gui/qml/VpnState.qml | 23 | ||||
-rw-r--r-- | gui/qml/main.qml | 64 |
2 files changed, 0 insertions, 87 deletions
diff --git a/gui/qml/VpnState.qml b/gui/qml/VpnState.qml index ffad207..4906fce 100644 --- a/gui/qml/VpnState.qml +++ b/gui/qml/VpnState.qml @@ -36,16 +36,9 @@ StateGroup { target: mainOffBtn visible: false } - PropertyChanges { - target: gwMarker - color: "red" - } }, State { name: "on" - StateChangeScript { - script: displayGatewayMarker() - } PropertyChanges { target: systray tooltip: toHuman("on") @@ -71,10 +64,6 @@ StateGroup { target: mainOffBtn visible: true } - PropertyChanges { - target: gwMarker - color: "green" - } }, State { name: "starting" @@ -103,10 +92,6 @@ StateGroup { target: mainOffBtn visible: true } - PropertyChanges { - target: gwMarker - color: "orange" - } }, State { name: "stopping" @@ -135,10 +120,6 @@ StateGroup { target: mainOffBtn visible: false } - PropertyChanges { - target: gwMarker - color: "orange" - } }, State { name: "failed" @@ -167,10 +148,6 @@ StateGroup { target: mainOffBtn visible: false } - PropertyChanges { - target: gwMarker - color: "red" - } } ] } diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 03a79cb..502379b 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -6,8 +6,6 @@ import QtQuick.Extras 1.2 import Qt.labs.platform 1.1 as LabsPlatform -import "qrc:/js/maps.js" as Maps - ApplicationWindow { id: app @@ -85,68 +83,6 @@ ApplicationWindow { } } } - - Item { - Layout.topMargin: app.height * 0.40 - Layout.row: 3 - Layout.column: 1 - Layout.columnSpan: 3 - - Image { - id: worldMap - width: app.width - source: "qrc:/assets/svg/world.svg" - fillMode: Image.PreserveAspectFit - smooth: true - } - - Rectangle { - id: gwMarker - x: worldMap.width * 0.5 - y: worldMap.height * 0.5 - width: 10 - height: 10 - radius: 10 - color: "red" - z: worldMap.z + 1 - } - } - } - - function displayGatewayMarker() { - let coords = { - "paris": { - "x": 48, - "y": 2 - }, - "miami": { - "x": 25.7, - "y": -80.2 - }, - "amsterdam": { - "x": 52.4, - "y": 4.9 - }, - "montreal": { - "x": 45.3, - "y": -73.4 - }, - "seattle": { - "x": 47.4, - "y": -122.2 - } - } - let city = ctx.currentGateway.split('-')[0] - let coord = coords[city] - - // TODO the Robinson projection does not seem to fit super-nicely with - // our map, and this offset doesn't work with bigg-ish sizes. But good - // enough for a proof of concept - if we avoid resizing the window. - let xOffset = -1 * 0.10 * worldMap.width - let p = Maps.projectAbsolute(coord.x, coord.y, worldMap.width, - 1, xOffset) - gwMarker.x = p.x - gwMarker.y = p.y } Connections { |