Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
831c2a0
feat: begin implementing a PropertyListModel
f-koehler Dec 6, 2025
bea6da4
feat(cmake): bump C++ standard from 20 to 23
f-koehler Dec 6, 2025
b596919
feat: finish base implementation of PropertyListModel
f-koehler Dec 6, 2025
8ed2e33
feat: implement new Peer object
f-koehler Dec 6, 2025
107dc63
feat: add missing public key field to Peer
f-koehler Dec 10, 2025
501666e
feat: replicate most of tailscale's status objects
f-koehler Dec 10, 2025
14e0ccf
fix: fix some issues with enum/qobject registration
f-koehler Dec 11, 2025
13f1a7d
feat(json): add JSON deserialization for most of Tailscale's status
f-koehler Dec 11, 2025
6818d47
fix: add missing properties to PeerStatus and fix JSON deser
f-koehler Dec 11, 2025
2d2da5f
feat: begin implementing JSON deserialization for Status
f-koehler Dec 11, 2025
e72acd1
fix: add missing tailscaleIps getters to Status
f-koehler Dec 14, 2025
fb73fc7
refactor: move wrapper to new src dir
f-koehler Dec 14, 2025
1b312cf
feat: restore integration of Tailscale wrapper
f-koehler Dec 14, 2025
028e089
feat: reimplement status refresh
f-koehler Dec 14, 2025
42349c5
refactor: cleanup logging categories
f-koehler Dec 14, 2025
0cea2ca
feat: store peers in a model and begin populating it
f-koehler Dec 14, 2025
dc50720
feat: register PeetModel
f-koehler Dec 14, 2025
c9f443d
refactor(PropertyListModel): clean up implementation
f-koehler Dec 14, 2025
4e7d6b7
fix(scripts): add missing dependencies to Fedora script
f-koehler Dec 17, 2025
ef6dfcf
fix(tailscale/wrapper): fix location for generated logging.go
f-koehler Dec 17, 2025
1cb9c0b
feat: add rudimentary version of new peer list
f-koehler Dec 15, 2025
d8a8195
feat(ui): layout main window with collapsible global drawer and setup…
f-koehler Dec 17, 2025
c5bde5d
refactor(ui): add Main.qml to qrc file
f-koehler Dec 17, 2025
7fe2e25
feat(ui): add about page
f-koehler Dec 17, 2025
1169542
feat(ui): add quit and stop buttons to global drawer
f-koehler Dec 17, 2025
8759c3d
feat(ui): implement copying of DNS name/ip address on peer list page
f-koehler Dec 18, 2025
884c336
feat(ui): add exit node page to test QML proxy model
f-koehler Dec 18, 2025
09c3ad6
feat(tailscale): add LoginProfile and NetworkProfile classes
f-koehler Dec 18, 2025
284e8a1
refactor(ui): move pages into subdirectory
f-koehler Dec 19, 2025
61710f1
feat(ui): begin implementation of peer info page
f-koehler Dec 19, 2025
06dedfc
feat(ui): set initial page to PeerList
f-koehler Dec 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ option(KTAILCTL_FLATPAK_BUILD "Build for Flatpak" OFF)
set(QT_MAJOR_VERSION 6)
set(QT6_MIN_VERSION 6.5.0)
set(KF6_MIN_VERSION 6.5.0)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Expand Down Expand Up @@ -76,8 +76,9 @@ find_package(
WindowSystem)
find_package(nlohmann_json REQUIRED)

add_subdirectory(src)
add_subdirectory(tests)
# add_subdirectory(src)
add_subdirectory(src_new)
# add_subdirectory(tests)

install(PROGRAMS org.fkoehler.KTailctl.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES org.fkoehler.KTailctl.metainfo.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
Expand Down
6 changes: 5 additions & 1 deletion scripts/fedora-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ PACKAGES=(
kf6-ki18n-devel
kf6-kirigami2-devel
kf6-knotifications-devel
kf6-kdbusaddons-devel
kf6-kwindowsystem-devel
kf6-breeze-icons-devel
json-devel
)

dnf install -y ${PACKAGES[@]}
dnf install -y "${PACKAGES[@]}"
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ add_executable(
taildrop_sender.cpp
tailscale.cpp
tray_icon.cpp
util.cpp)
util.cpp
property_list_model.hpp
peer.hpp)

ecm_add_qml_module(ktailctl URI org.fkoehler.KTailctl GENERATE_PLUGIN_SOURCE)
ecm_target_qml_sources(
Expand Down
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "app.hpp"
#include "ktailctlconfig.h"
#include "logging.hpp"
#include "peer.hpp"
#include "peer_model.hpp"
#include "preferences.hpp"
#include "speed_statistics.hpp"
Expand Down Expand Up @@ -96,6 +97,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
qmlRegisterType<SpeedStatistics>("org.fkoehler.KTailctl", 1, 0, "SpeedStatistics");
qmlRegisterType<Statistics>("org.fkoehler.KTailctl", 1, 0, "Statistics");
qmlRegisterType<KTailctlConfig>("org.fkoehler.KTailctl", 1, 0, "KTailctlConfig"); // TODO(fk): remove, now handled via CMake
qmlRegisterType<Peer>("org.fkoehler.KTailctl", 1, 0, "Peer");

engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
engine.rootContext()->setContextProperty(QStringLiteral("styleName"), QQuickStyle::name());
Expand Down
File renamed without changes.
23 changes: 0 additions & 23 deletions src/wrapper/logging.cpp

This file was deleted.

12 changes: 12 additions & 0 deletions src_new/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
add_executable(new_ktailctl peer.hpp property_list_model.hpp main.cpp
util.hpp
tailscale/status/login_profile.hpp
tailscale/status/network_profile.hpp)
target_link_libraries(new_ktailctl PRIVATE Qt6::Core Qt6::Quick Qt6::Widgets KF6::CoreAddons KF6::I18n KF6::DBusAddons KF6::GuiAddons)
ecm_add_qml_module(new_ktailctl URI org.fkoehler.KTailctl GENERATE_PLUGIN_SOURCE)
ecm_target_qml_sources(new_ktailctl SOURCES ui/Main.qml)
install(TARGETS new_ktailctl ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})

add_subdirectory(tailscale)
add_subdirectory(ui)
add_subdirectory(icons)
1 change: 1 addition & 0 deletions src_new/icons/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target_sources(new_ktailctl PRIVATE icons.qrc)
5 changes: 5 additions & 0 deletions src_new/icons/icons.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/icons">
<file alias="logo.svg">./logo.svg</file>
</qresource>
</RCC>
File renamed without changes.
80 changes: 80 additions & 0 deletions src_new/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#include "util.hpp"

#include <KAboutData>
#include <KDBusService>
#include <KLocalizedContext>
#include <KLocalizedString>
#include <QApplication>
#include <QIcon>
#include <QtQml>

#include "tailscale/status/client_version.hpp"
#include "tailscale/status/exit_node_status.hpp"
#include "tailscale/status/peer_status.hpp"
#include "tailscale/status/status.hpp"
#include "tailscale/status/tailnet_status.hpp"
#include "tailscale/tailscale.hpp"

int main(int argc, char *argv[])
{
QApplication app(argc, argv);

QApplication::setWindowIcon(QIcon(QStringLiteral(":/icons/logo.svg")));

KLocalizedString::setApplicationDomain(QByteArrayLiteral("org.fkoehler.KTailctl"));
QCoreApplication::setOrganizationDomain(QStringLiteral("fkoehler.org"));
QCoreApplication::setApplicationName(QStringLiteral("KTailctl"));
QCoreApplication::setOrganizationName(QStringLiteral("fkoehler.org"));

KAboutData aboutData(QStringLiteral("ktailctl"),
i18nc("@title", "KTailctl"),
// TODO: version string via CMake
QStringLiteral("1.0"),
i18n("GUI for tailscale on the Linux desktop"),
KAboutLicense::GPL,
i18n("(c) Fabian Koehler 2023"));

aboutData.addAuthor(i18nc("@info:credit", "Fabian Koehler"),
i18nc("@info:credit", "Project Maintainer"),
QStringLiteral("[email protected]"),
QStringLiteral("https://fkoehler.org"));

aboutData.setBugAddress("https://github.com/f-koehler/KTailctl/issues");
aboutData.setDesktopFileName(QStringLiteral("org.fkoehler.KTailctl"));
aboutData.setHomepage(QStringLiteral("https://github.com/f-koehler/KTailctl"));
aboutData.setOrganizationDomain("fkoehler.org");
aboutData.addAuthor(i18nc("@info:credit", "Fabian Köhler"),
i18nc("@info:credit", "Project Maintainer"),
QStringLiteral("[email protected]"),
QStringLiteral("https://fkoehler.org"));
// TODO(fk): about icon
aboutData.setProgramLogo(QIcon(QStringLiteral(":/icons/logo.svg")));
KAboutData::setApplicationData(aboutData);
const KDBusService service(KDBusService::Unique);

QQmlApplicationEngine engine;
qmlRegisterType<ClientVersion>("org.fkoehler.KTailctl", 1, 0, "ClientVersion");
qmlRegisterType<ExitNodeStatus>("org.fkoehler.KTailctl", 1, 0, "ExitNodeStatus");
qmlRegisterType<Location>("org.fkoehler.KTailctl", 1, 0, "Location");
qmlRegisterType<PeerStatus>("org.fkoehler.KTailctl", 1, 0, "PeerStatus");
qmlRegisterType<Status>("org.fkoehler.KTailctl", 1, 0, "STatus");
qmlRegisterType<TailnetStatus>("org.fkoehler.KTailctl", 1, 0, "TailnetStatus");
qmlRegisterType<UserProfile>("org.fkoehler.KTailctl", 1, 0, "UserProfile");
qmlRegisterType<Status::PeerModel>("org.fkoehler.KTailctl", 1, 0, "PeerModel");

TailscaleNew *tailscale = new TailscaleNew();
Util* util = new Util();
qmlRegisterSingletonInstance("org.fkoehler.KTailctl", 1, 0, "Tailscale", tailscale);
qmlRegisterSingletonInstance("org.fkoehler.KTailctl", 1, 0, "Util", util);
qmlRegisterSingletonType("org.fkoehler.KTailctl", 1, 0, "About", [](QQmlEngine *engine, QJSEngine *) -> QJSValue {
return engine->toScriptValue(KAboutData::applicationData());
});

engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
engine.load(QStringLiteral("qrc:/Main.qml"));
if (engine.rootObjects().isEmpty()) {
return -1;
}

return app.exec();
}
Loading
Loading