Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F25703645
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
34 KB
Subscribers
None
View Options
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index a667ec2..3fc61a8 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -1,363 +1,367 @@
# SPDX-FileCopyrightText: 2023 g10 code GmbH
# SPDX-Contributor: Carl Schwan <carl.schwan@gnupg.com>
# SPDX-License-Identifier: BSD-2-Clause
add_definitions(-DDATAROUTDIR="${KDE_INSTALL_FULL_DATAROOTDIR}")
add_subdirectory(rootcagenerator)
add_library(gpgol-client-static STATIC)
target_sources(gpgol-client-static PRIVATE
emailviewer.cpp
emailviewer.h
websocketclient.cpp
websocketclient.h
messagedispatcher.cpp
messagedispatcher.h
graphmessagedispatcher.cpp
graphmessagedispatcher.h
firsttimedialog.cpp
firsttimedialog.h
# Identity
identity/addressvalidationjob.cpp
identity/addressvalidationjob.h
identity/identitymanager.cpp
identity/identitymanager.h
identity/identitydialog.cpp
identity/identitydialog.h
identity/identity.cpp
identity/identity.h
identity/signature.h
identity/signature.cpp
identity/signatureconfigurator.cpp
identity/signatureconfigurator.h
identity/signaturerichtexteditor.cpp
identity/signaturerichtexteditor_p.h
# Draft
draft/draft.cpp
draft/draft.h
draft/draftmanager.cpp
draft/draftmanager.h
# EWS integration
ews/ewsattachment.cpp
ews/ewsattachment.h
ews/ewsattendee.cpp
ews/ewsattendee.h
ews/ewsclient_debug.cpp
ews/ewsclient_debug.h
ews/ewsid.cpp
ews/ewsid.h
ews/ewsitem.cpp
ews/ewsitem.h
ews/ewsitemshape.cpp
ews/ewsitemshape.h
ews/ewsitembase.cpp
ews/ewsitembase.h
ews/ewsitembase_p.h
ews/ewsmailbox.cpp
ews/ewsmailbox.h
ews/ewsmessagedispatcher.cpp
ews/ewsmessagedispatcher.h
ews/ewsoccurrence.cpp
ews/ewsoccurrence.h
ews/ewspropertyfield.cpp
ews/ewspropertyfield.h
ews/ewsrecurrence.cpp
ews/ewsrecurrence.h
ews/ewsserverversion.cpp
ews/ewsserverversion.h
ews/ewstypes.cpp
ews/ewstypes.h
ews/ewsxml.cpp
ews/ewsxml.h
ews/ewscreateitemrequest.cpp
ews/ewscreateitemrequest.h
ews/ewsgetfolderrequest.cpp
ews/ewsgetfolderrequest.h
ews/ewsupdateitemrequest.cpp
ews/ewsupdateitemrequest.h
ews/ewsrequest.cpp
ews/ewsrequest.h
ews/ewsjob.cpp
ews/ewsjob.h
ews/ewsclient.cpp
ews/ewsclient.h
ews/ewsfinditemrequest.cpp
ews/ewsfinditemrequest.h
ews/ewsgetitemrequest.cpp
ews/ewsgetitemrequest.h
ews/ewsgetfolderrequest.cpp
ews/ewsgetfolderrequest.h
ews/ewsfolder.cpp
ews/ewsfolder.h
ews/ewscreatefolderrequest.cpp
ews/ewscreatefolderrequest.h
ews/ewseffectiverights.h
ews/ewseffectiverights.cpp
ews/ewsfoldershape.cpp
ews/ewsfoldershape.h
reencrypt/reencryptjob.cpp
reencrypt/reencryptjob.h
reencrypt/choosekeydialog.cpp
reencrypt/choosekeydialog.h
# Editor
editor/addresseelineedit.cpp
editor/addresseelineedit.h
editor/addresseelineeditmanager.cpp
editor/addresseelineeditmanager.h
editor/bodytexteditor.cpp
editor/bodytexteditor.h
editor/composerviewbase.cpp
editor/composerviewbase.h
editor/composerwindow.cpp
editor/composerwindow.h
editor/composerwindowfactory.cpp
editor/composerwindowfactory.h
editor/cryptostateindicatorwidget.cpp
editor/cryptostateindicatorwidget.h
editor/kmcomposerglobalaction.cpp
editor/kmcomposerglobalaction.h
editor/nearexpirywarning.cpp
editor/nearexpirywarning.h
editor/mailtemplates.cpp
editor/mailtemplates.h
editor/recipient.cpp
editor/recipient.h
editor/recipientline.cpp
editor/recipientline.h
editor/recipientseditor.cpp
editor/recipientseditor.h
editor/util.h
editor/util.cpp
editor/kmailcompletion.cpp
editor/kmailcompletion.h
editor/composersignatures.cpp
editor/composersignatures.h
editor/nodehelper.cpp
editor/nodehelper.h
editor/signaturecontroller.cpp
editor/signaturecontroller.h
editor/spellcheckerconfigdialog.cpp
editor/spellcheckerconfigdialog.h
# Editor job
editor/job/abstractencryptjob.h
editor/job/autocryptheadersjob.h
editor/job/contentjobbase.h
editor/job/contentjobbase_p.h
editor/job/composerjob.cpp
editor/job/composerjob.h
editor/job/encryptjob.h
editor/job/inserttextfilejob.h
editor/job/itipjob.h
editor/job/jobbase.h
editor/job/jobbase_p.h
editor/job/maintextjob.h
editor/job/multipartjob.h
editor/job/protectedheadersjob.h
editor/job/signencryptjob.h
editor/job/signjob.h
editor/job/singlepartjob.h
editor/job/skeletonmessagejob.h
editor/job/transparentjob.h
editor/job/autocryptheadersjob.cpp
editor/job/contentjobbase.cpp
editor/job/encryptjob.cpp
editor/job/inserttextfilejob.cpp
editor/job/itipjob.cpp
editor/job/jobbase.cpp
editor/job/maintextjob.cpp
editor/job/multipartjob.cpp
editor/job/protectedheadersjob.cpp
editor/job/saveasfilejob.cpp
editor/job/saveasfilejob.h
editor/job/signencryptjob.cpp
editor/job/signjob.cpp
editor/job/singlepartjob.cpp
editor/job/skeletonmessagejob.cpp
editor/job/transparentjob.cpp
## Editor Part
editor/part/globalpart.h
editor/part/infopart.h
editor/part/itippart.h
editor/part/messagepart.h
editor/part/textpart.h
editor/part/globalpart.cpp
editor/part/infopart.cpp
editor/part/itippart.cpp
editor/part/messagepart.cpp
editor/part/textpart.cpp
## Attachment
editor/attachment/attachmentjob.cpp
editor/attachment/attachmentjob.h
editor/attachment/attachmentclipboardjob.cpp
editor/attachment/attachmentclipboardjob.h
editor/attachment/attachmentcompressjob.cpp
editor/attachment/attachmentcompressjob.h
editor/attachment/attachmentcontroller.cpp
editor/attachment/attachmentcontroller.h
editor/attachment/attachmentcontrollerbase.cpp
editor/attachment/attachmentcontrollerbase.h
editor/attachment/attachmentfromfolderjob.cpp
editor/attachment/attachmentfromfolderjob.h
editor/attachment/attachmentfrommimecontentjob.cpp
editor/attachment/attachmentfrommimecontentjob.h
editor/attachment/attachmentfromurlbasejob.cpp
editor/attachment/attachmentfromurlbasejob.h
editor/attachment/attachmentfromurljob.cpp
editor/attachment/attachmentfromurljob.h
editor/attachment/attachmentfromurlutils.cpp
editor/attachment/attachmentfromurlutils.h
editor/attachment/attachmentfrompublickeyjob.cpp
editor/attachment/attachmentfrompublickeyjob.h
editor/attachment/attachmentloadjob.cpp
editor/attachment/attachmentloadjob.h
editor/attachment/attachmentmodel.cpp
editor/attachment/attachmentmodel.h
editor/attachment/attachmentpart.cpp
editor/attachment/attachmentpart.h
editor/attachment/attachmentpropertiesdialog.cpp
editor/attachment/attachmentpropertiesdialog.h
editor/attachment/attachmentupdatejob.cpp
editor/attachment/attachmentupdatejob.h
editor/attachment/attachmentview.cpp
editor/attachment/attachmentview.h
# Multiplyingline
multiplyingline/multiplyingline.cpp
multiplyingline/multiplyingline.h
multiplyingline/multiplyinglineeditor.cpp
multiplyingline/multiplyinglineeditor.h
multiplyingline/multiplyinglineview_p.cpp
multiplyingline/multiplyinglineview_p.h
# Utils
utils/kuniqueservice.h
utils/kuniqueservice.cpp
utils/systemtrayicon.h
utils/systemtrayicon.cpp
)
if (WIN32)
add_definitions(-DHAVE_QDBUS=false)
target_sources(gpgol-client-static PRIVATE utils/kuniqueservice_win.cpp)
else()
add_definitions(-DHAVE_QDBUS=true)
target_sources(gpgol-client-static PRIVATE utils/kuniqueservice_dbus.cpp)
endif()
ki18n_wrap_ui(gpgol-client-static
editor/attachment/ui/attachmentpropertiesdialog.ui
editor/attachment/ui/attachmentpropertiesdialog_readonly.ui
)
ecm_qt_declare_logging_category(gpgol-client-static_SRCS
HEADER gpgol_client_debug.h
IDENTIFIER GPGOL_CLIENT_LOG
CATEGORY_NAME org.gpgol.client
DESCRIPTION "General client log"
EXPORT GPGOL
)
ecm_qt_declare_logging_category(gpgol-client-static_SRCS
HEADER websocket_debug.h
IDENTIFIER WEBSOCKET_LOG
CATEGORY_NAME org.gpgol.client.websocket
DESCRIPTION "Websocket connection in the client"
EXPORT GPGOL
)
ecm_qt_declare_logging_category(gpgol-client-static_SRCS
HEADER ewsresource_debug.h
IDENTIFIER EWSRES_LOG
CATEGORY_NAME org.gpgol.ews
DESCRIPTION "Ews mail client"
EXPORT GPGOL
)
ecm_qt_declare_logging_category(gpgol-client-static_SRCS
HEADER ewscli_debug.h
IDENTIFIER EWSCLI_LOG
CATEGORY_NAME org.gpgol.ews.client
DESCRIPTION "ews client (gpgol-client)"
EXPORT GPGOL
)
ecm_qt_declare_logging_category(gpgol-client-static_SRCS
HEADER editor_debug.h
IDENTIFIER EDITOR_LOG
CATEGORY_NAME org.gpgol.editor
DESCRIPTION "mail composer"
EXPORT GPGOL
)
set(WARN_TOOMANY_RECIPIENTS_DEFAULT true)
set(ALLOW_SEMICOLON_AS_ADDRESS_SEPARATOR_DEFAULT true)
configure_file(editor/settings/messagecomposer.kcfg.in ${CMAKE_CURRENT_BINARY_DIR}/messagecomposer.kcfg)
kconfig_add_kcfg_files(gpgol-client-static editor/settings/messagecomposersettings.kcfgc config.kcfgc)
install(FILES composerui.rc DESTINATION ${KDE_INSTALL_KXMLGUIDIR}/gpgol-client)
target_sources(gpgol-client-static PUBLIC ${gpgol-client-static_SRCS})
ki18n_wrap_ui(gpgol-client-static firsttimedialog.ui)
target_link_libraries(gpgol-client-static PUBLIC
common
rootcagenerator
LibGpgError::LibGpgError
Qt6::HttpServer
Qt6::Widgets
Qt6::PrintSupport
Qt6::WebSockets
KF6::I18n
KF6::JobWidgets
KF6::CalendarCore
KF6::ConfigCore
KF6::ConfigGui
KF6::Contacts
KF6::Completion
KF6::CoreAddons
KF6::ColorScheme
KF6::Codecs
KF6::GuiAddons
KF6::SonnetUi
KF6::SonnetCore
KF6::WidgetsAddons
KF6::XmlGui
KF6::Archive
KF6::KIOWidgets
KPim6::MimeTreeParserCore
KPim6::MimeTreeParserWidgets
KPim6::Libkleo
${_gpgol_dbusaddons_libs}
)
set(GPGOLWEB_ICON_DIR "${CMAKE_CURRENT_SOURCE_DIR}/icons")
file(GLOB ICONS_PNGS "${GPGOLWEB_ICON_DIR}/*.png")
file(GLOB ICONS_SVGS "${GPGOLWEB_ICON_DIR}/*.svg")
ecm_add_app_icon(_gpgol-client_SRCS ICONS ${ICONS_PNGS} ${ICONS_SVGS})
add_executable(gpgol-client main.cpp ${_gpgol-client_SRCS})
+qt_add_resources(gpgol-client "manifest"
+ PREFIX "/gpgol-client"
+ FILES manifest.xml.in
+)
target_link_libraries(gpgol-client PRIVATE gpgol-client-static)
if (BUILD_TESTING)
add_subdirectory(autotests)
endif()
install(TARGETS gpgol-client ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES com.gnupg.gpgolweb.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES com.gnupg.gpgolweb.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps)
diff --git a/client/firsttimedialog.cpp b/client/firsttimedialog.cpp
index 0177c54..4b59d73 100644
--- a/client/firsttimedialog.cpp
+++ b/client/firsttimedialog.cpp
@@ -1,203 +1,233 @@
// SPDX-FileCopyrightText: 2024 g10 code Gmbh
// SPDX-Contributor: Carl Schwan <carl.schwan@gnupg.com>
// SPDX-License-Identifier: GPL-2.0-or-later
#include "firsttimedialog.h"
#include "config.h"
#include "gpgolweb_version.h"
#include "rootcagenerator/controller.h"
#include "ui_firsttimedialog.h"
#include "websocketclient.h"
#include <QCheckBox>
#include <QClipboard>
#include <QCloseEvent>
#include <QDesktopServices>
+#include <QFile>
+#include <QSaveFile>
+#include <QStandardPaths>
#include <QStatusBar>
#include <QTemporaryDir>
#include <QToolBar>
#include <KTitleWidget>
using namespace Qt::StringLiterals;
FirstTimeDialog::FirstTimeDialog(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::FirstTimeDialog)
, m_controller(new Controller(this))
{
ui->setupUi(this);
ui->welcomePage->setProperty("title", i18nc("@title", "Welcome to GpgOL/Web"));
ui->configurationPage->setProperty("title", i18nc("@title", "Welcome to GpgOL/Web"));
ui->configPage->setProperty("title", i18nc("@title", "Install Outlook Add-In"));
ui->installationPage->setProperty("title", i18nc("@title", "Setting Up the Local Server"));
SystemTrayIcon systemTrayIcon(QIcon::fromTheme(u"com.gnupg.gpgolweb"_s));
systemTrayIcon.setMainWindow(this);
systemTrayIcon.show();
m_backAction = new QAction(QIcon::fromTheme(u"draw-arrow-back-symbolic"_s), i18nc("@action:intoolbar", "Go back"));
connect(m_backAction, &QAction::triggered, this, [this]() {
if (m_controller->certificateAlreadyGenerated() || !Config::self()->isLocalServer()) {
ui->stack->setCurrentIndex(ui->stack->currentIndex() > 1 ? ConfigurationPage : WelcomePage);
} else {
ui->stack->setCurrentIndex(ConfigurationPage);
}
});
auto toolbar = new QToolBar(this);
toolbar->setMovable(false);
toolbar->addAction(m_backAction);
auto titleWidget = new KTitleWidget(this);
toolbar->addWidget(titleWidget);
addToolBar(Qt::TopToolBarArea, toolbar);
m_backAction->setVisible(false);
titleWidget->setText(ui->stack->currentWidget()->property("title").toString());
connect(ui->stack, &QStackedWidget::currentChanged, this, [titleWidget, this]() {
m_backAction->setVisible(ui->stack->currentIndex() > 0);
titleWidget->setText(ui->stack->currentWidget()->property("title").toString());
});
// center vertically
ui->mainLayout->insertStretch(0);
ui->mainLayout->addStretch();
ui->mainLayoutManifest->insertStretch(0);
ui->mainLayoutManifest->addStretch();
QPixmap logo = QIcon::fromTheme(u"com.gnupg.gpgolweb"_s).pixmap(64, 64);
ui->logo->setPixmap(logo);
ui->titleWelcome->setText(i18nc("@info", "GpgOL/Web %1", QString::fromLocal8Bit(GPGOLWEB_VERSION_STRING)));
auto statusBar = new QStatusBar(this);
auto showOnStartup = new QCheckBox(i18nc("@option:check", "Show on startup"));
showOnStartup->setChecked(Config::self()->showLauncher());
connect(showOnStartup, &QCheckBox::toggled, this, [](bool checked) {
Config::self()->setShowLauncher(checked);
Config::self()->save();
});
statusBar->addPermanentWidget(showOnStartup, 1);
m_status = new QLabel;
statusBar->addPermanentWidget(m_status);
auto version = new QLabel(i18nc("@info", "Version: %1", QString::fromLocal8Bit(GPGOLWEB_VERSION_STRING)));
statusBar->addPermanentWidget(version);
setStatusBar(statusBar);
connect(ui->setupButton, &QPushButton::clicked, this, &FirstTimeDialog::slotSetup);
connect(ui->configureButton, &QPushButton::clicked, this, [this]() {
ui->stack->setCurrentIndex(ConfigurationPage);
});
ui->manifestPath->setText(QLatin1StringView(DATAROUTDIR) + u"/gpgol/manifest.xml"_s);
connect(ui->openOutlookButton, &QPushButton::clicked, this, []() {
QDesktopServices::openUrl(QUrl(u"https://outlook.office.com/mail/jsmvvmdeeplink/?path=/options/manageapps&bO=4"_s));
});
connect(ui->manifestPathCopy, &QPushButton::clicked, this, [this]() {
QGuiApplication::clipboard()->setText(ui->manifestPath->text());
});
ui->remoteLabel->setEnabled(!Config::self()->isLocalServer());
ui->remoteServer->setEnabled(!Config::self()->isLocalServer());
ui->remoteServer->setText(Config::self()->remoteAddress().toString());
connect(ui->remoteOption, &QRadioButton::toggled, this, [this](bool checked) {
Config::self()->setIsLocalServer(!checked);
Config::self()->save();
ui->remoteLabel->setEnabled(!Config::self()->isLocalServer());
ui->remoteServer->setEnabled(!Config::self()->isLocalServer());
});
connect(ui->remoteServer, &QLineEdit::textChanged, this, [this]() {
Config::self()->setRemoteAddress(QUrl::fromUserInput(ui->remoteServer->text()));
Config::self()->save();
});
if (m_controller->certificateAlreadyGenerated() || !Config::self()->isLocalServer()) {
ui->stack->setCurrentIndex(WelcomePage);
if (m_controller->certificateAlreadyGenerated() && Config::self()->isLocalServer()) {
startLocalServer();
}
startWebsocketClient();
} else {
ui->stack->setCurrentIndex(ConfigurationPage);
}
}
FirstTimeDialog::~FirstTimeDialog() = default;
void FirstTimeDialog::slotStateChanged(const QString &stateDisplay)
{
m_status->setText(stateDisplay);
}
void FirstTimeDialog::closeEvent(QCloseEvent *e)
{
e->ignore();
hide();
}
void FirstTimeDialog::slotSetup()
{
if (ui->localOption->isChecked()) {
if (!m_controller->certificateAlreadyGenerated()) {
ui->stack->setCurrentIndex(InstallationPage);
const auto gnupghome = qgetenv("GNUPGHOME");
QTemporaryDir tempDir;
tempDir.setAutoRemove(false);
qputenv("GNUPGHOME", tempDir.path().toUtf8());
connect(m_controller, &Controller::finished, this, [gnupghome, this](KJob *) {
qputenv("GNUPGHOME", gnupghome);
if (!m_controller->error()) {
ui->installationPage->appendPlainText(m_controller->errorText());
return;
}
startWebsocketClient();
- ui->stack->setCurrentIndex(ManifestPage);
+ generateManifest();
});
connect(m_controller, &Controller::debutOutput, this, &FirstTimeDialog::slotTlsDebutOutput);
m_controller->start();
} else {
- ui->stack->setCurrentIndex(ManifestPage);
+ generateManifest();
startLocalServer();
startWebsocketClient();
}
} else {
- ui->stack->setCurrentIndex(ManifestPage);
+ generateManifest();
}
}
void FirstTimeDialog::startLocalServer()
{
if (m_serverProcess.state() != QProcess::NotRunning) {
return;
}
m_serverProcess.start(u"gpgol-server"_s);
}
void FirstTimeDialog::startWebsocketClient()
{
const auto clientId = QUuid::createUuid().toString(QUuid::WithoutBraces);
auto &websocketClient = WebsocketClient::self(QUrl(u"wss://localhost:5657/"_s), clientId);
connect(&websocketClient, &WebsocketClient::stateChanged, this, &FirstTimeDialog::slotStateChanged);
connect(&websocketClient, &WebsocketClient::stateChanged, &m_systemTrayIcon, &SystemTrayIcon::slotStateChanged);
m_systemTrayIcon.slotStateChanged(websocketClient.stateDisplay());
slotStateChanged(websocketClient.stateDisplay());
}
void FirstTimeDialog::slotTlsDebutOutput(const QString &output)
{
ui->installationPage->appendPlainText(output);
}
+
+void FirstTimeDialog::generateManifest()
+{
+ QFile file(u":/gpgol-client/manifest.xml.in"_s);
+ if (!file.open(QIODeviceBase::ReadOnly)) {
+ Q_ASSERT(false);
+ return;
+ }
+
+ ui->stack->setCurrentIndex(ManifestPage);
+
+ QByteArray manifest = file.readAll();
+ manifest.replace("%HOST%", ui->localOption->isChecked() ? "localhost:5656" : ui->remoteServer->text().toUtf8());
+ manifest.replace("%VERSION%", GPGOLWEB_VERSION_STRING);
+
+ const auto saveFilePath = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + u"/gpgol-web-manifest.xml"_s;
+
+ QSaveFile saveFile(saveFilePath);
+ if (!saveFile.open(QIODeviceBase::WriteOnly)) {
+ Q_ASSERT(false);
+ return;
+ }
+ saveFile.write(manifest);
+ saveFile.commit();
+
+ ui->manifestPath->setText(saveFilePath);
+}
diff --git a/client/firsttimedialog.h b/client/firsttimedialog.h
index 43dc00f..4b7e0a5 100644
--- a/client/firsttimedialog.h
+++ b/client/firsttimedialog.h
@@ -1,51 +1,52 @@
// SPDX-FileCopyrightText: 2024 g10 code Gmbh
// SPDX-Contributor: Carl Schwan <carl.schwan@gnupg.com>
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "utils/systemtrayicon.h"
#include <QMainWindow>
#include <QProcess>
class QLabel;
class Controller;
namespace Ui
{
class FirstTimeDialog;
}
class FirstTimeDialog : public QMainWindow
{
Q_OBJECT
public:
explicit FirstTimeDialog(QWidget *parent = nullptr);
~FirstTimeDialog();
public Q_SLOTS:
void slotStateChanged(const QString &stateDisplay);
void slotTlsDebutOutput(const QString &output);
protected:
void closeEvent(QCloseEvent *e) override;
+ void generateManifest();
private:
void slotSetup();
void startLocalServer();
void startWebsocketClient();
enum Page {
WelcomePage = 0,
ConfigurationPage = 1,
ManifestPage = 2,
InstallationPage = 3,
};
QScopedPointer<Ui::FirstTimeDialog> ui;
QAction *m_backAction;
QLabel *m_status;
Controller *const m_controller;
SystemTrayIcon m_systemTrayIcon;
QProcess m_serverProcess;
};
diff --git a/client/firsttimedialog.ui b/client/firsttimedialog.ui
index c0c7a98..cfdb818 100644
--- a/client/firsttimedialog.ui
+++ b/client/firsttimedialog.ui
@@ -1,169 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<!--
SPDX-FileCopyrightText: 2024 g10 Code GmbH
SPDX-Contributor: Carl Schwan <carl.schwan@gnupg.com>
SPDX-License-Identifier: GPL-2.0-or-later
-->
<class>FirstTimeDialog</class>
<widget class="QMainWindow" name="FirstTimeDialog">
<widget class="QStackedWidget" name="stack">
<widget class="QWidget" name="welcomePage">
<layout class="QVBoxLayout" name="mainLayout">
<item>
<widget class="QLabel" name="logo">
<property name="logo">
</property>
</widget>
</item>
<item>
<widget class="KTitleWidget" name="titleWelcome">
<property name="text">
<string>GpgOL/Web</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="configureButton">
<property name="text"><string>Configure</string></property>
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="configurationPage">
<layout class="QVBoxLayout" name="mainLayout">
<item>
<spacer>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>80</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel">
<property name="text">
<string>Choose your configuration:</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="localOption">
<property name="text">
<string>Running the server on this machine</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="remoteOption">
<property name="text">
<string>Running the server on a seperate server (recommanded for large deployment)</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="remoteLabel">
<property name="text">
<string>Remote Server</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="remoteServer">
<property name="text">
<string></string>
</property>
+ <property name="placeholderText">
+ <string>internal.company.com</string>
+ </property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="setupButton">
<property name="text"><string>Setup</string></property>
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<spacer>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>80</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="configPage">
<layout class="QVBoxLayout" name="mainLayoutManifest">
<item>
<widget class="QLabel">
<property name="text">
<string>Configure the Outlook extension by installing it from a file in "My Add-Ins" -> "User configured Add-Ins".</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QLineEdit" name="manifestPath">
<property name="readOnly">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="manifestPathCopy">
<property name="icon">
<iconset theme="edit-copy-symbolic" />
</property>
<property name="text">
<string>Copy</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="openOutlookButton">
<property name="text"><string>Open Outlouk Extension Manager</string></property>
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPlainTextEdit" name="installationPage" />
</widget>
</widget>
<customwidgets>
<customwidget>
<class>KTitleWidget</class>
<extends>QWidget</extends>
<header>ktitlewidget.h</header>
</customwidget>
</customwidgets>
</ui>
diff --git a/server/manifest.xml b/client/manifest.xml.in
similarity index 84%
rename from server/manifest.xml
rename to client/manifest.xml.in
index 64f766e..d34afff 100644
--- a/server/manifest.xml
+++ b/client/manifest.xml.in
@@ -1,115 +1,115 @@
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
<Id>95b7e9a9-1ce6-49c2-cdf8-48aa704f156b</Id>
<Version>0.9.0.0</Version>
<ProviderName>g10code</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="GnuPG"/>
<Description DefaultValue="GunPG extension for Outlook"/>
- <IconUrl DefaultValue="https://localhost:5656/assets/logo.png"/>
- <HighResolutionIconUrl DefaultValue="https://localhost:5656/assets/logo.png"/>
+ <IconUrl DefaultValue="https://%HOST%/assets/logo.png"/>
+ <HighResolutionIconUrl DefaultValue="https://%HOST%/assets/logo.png"/>
<SupportUrl DefaultValue="https://www.gnupg.org/documentation/manuals/gnupg/"/>
<AppDomains>
<AppDomain>https://www.gnupg.org</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Mailbox"/>
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.5"/>
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
- <SourceLocation DefaultValue="https://localhost:5656/index.html?version=0.9.0"/>
+ <SourceLocation DefaultValue="https://%HOST%/index.html?version=%VERSION%"/>
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteMailbox</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
<Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read"/>
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<Requirements>
<bt:Sets DefaultMinVersion="1.12">
<bt:Set Name="Mailbox"/>
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<Runtimes>
<!-- HTML file including reference to or inline JavaScript event handlers.
This is used by Outlook on the web and Outlook on the new Mac UI. -->
<Runtime resid="EventsRuntime.Url">
<!-- JavaScript file containing event handlers. This is used by Outlook on Windows. -->
<Override type="javascript" resid="JSRuntime.Url"/>
</Runtime>
</Runtimes>
<DesktopFormFactor>
<FunctionFile resid="Commands.Url"/>
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<OfficeTab id="TabDefault">
<Group id="Gnupg.TabSecure.group">
<Label resid="SecureStatusLabel"/>
<Control xsi:type="Button" id="Gnupg.BtnSecure">
<Label resid="SecureInfo"/>
<Supertip>
<Title resid="DecryptTitle"/>
<Description resid="DecryptTipDescription"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="GnuPG.16x16"/>
<bt:Image size="32" resid="GnuPG.32x32"/>
<bt:Image size="80" resid="GnuPG.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Commands.Url"/>
<SupportsPinning>true</SupportsPinning>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
- <bt:Image id="GnuPG.16x16" DefaultValue="https://localhost:5656/assets/document-decrypt-16.png"/>
- <bt:Image id="GnuPG.32x32" DefaultValue="https://localhost:5656/assets/document-decrypt-32.png"/>
- <bt:Image id="GnuPG.80x80" DefaultValue="https://localhost:5656/assets/document-decrypt-80.png"/>
+ <bt:Image id="GnuPG.16x16" DefaultValue="https://%HOST%/assets/document-decrypt-16.png"/>
+ <bt:Image id="GnuPG.32x32" DefaultValue="https://%HOST%/assets/document-decrypt-32.png"/>
+ <bt:Image id="GnuPG.80x80" DefaultValue="https://%HOST%/assets/document-decrypt-80.png"/>
</bt:Images>
<bt:Urls>
- <bt:Url id="Commands.Url" DefaultValue="https://localhost:5656/home?version=0.9.0"/>
- <bt:Url id="EventsRuntime.Url" DefaultValue="https://localhost:5656/home?version=0.9.0"/>
- <bt:Url id="JSRuntime.Url" DefaultValue="https://localhost:5656/assets/script.js"/>
+ <bt:Url id="Commands.Url" DefaultValue="https://%HOST%/home?version=%VERSION%"/>
+ <bt:Url id="EventsRuntime.Url" DefaultValue="https://%HOST%/home?version=%VERSION%"/>
+ <bt:Url id="JSRuntime.Url" DefaultValue="https://%HOST%/assets/script.js"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="SecureStatusLabel" DefaultValue="Secure Info">
<bt:Override Locale="fr-FR" Value="Information Sécurisée"/>
<bt:Override Locale="de-DE" Value="Information Sécurisée"/>
</bt:String>
<bt:String id="DecryptTitle" DefaultValue="Decrypt">
<bt:Override Locale="fr-FR" Value="Décrypter"/>
<bt:Override Locale="de-DE" Value="Décrypter"/>
</bt:String>
<bt:String id="SecureInfo" DefaultValue="Secure information">
<bt:Override Locale="fr-FR" Value="Information Sécurisée"/>
<bt:Override Locale="de-DE" Value="Information Sécurisée"/>
</bt:String>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="DecryptTipDescription" DefaultValue="Decrypt an email with GnuPG.">
<bt:Override Locale="fr-FR" Value="Décrypter un email avec GnuPG"/>
<bt:Override Locale="de-DE" Value="Décrypter un email avec GnuPG"/>
</bt:String>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</VersionOverrides>
</OfficeApp>
diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt
index 424f2e4..222b978 100644
--- a/server/CMakeLists.txt
+++ b/server/CMakeLists.txt
@@ -1,61 +1,43 @@
# SPDX-FileCopyrightText: 2023 g10 code GmbH
# SPDX-Contributor: Carl Schwan <carl.schwan@gnupg.com>
# SPDX-License-Identifier: BSD-2-Clause
add_executable(gpgol-server)
ecm_qt_declare_logging_category(gpgol-server-static_SRCS
HEADER websocket_debug.h
IDENTIFIER WEBSOCKET_LOG
CATEGORY_NAME org.gpgol.server.websocket
DESCRIPTION "Websocket connection"
EXPORT GPGOL
)
ecm_qt_declare_logging_category(gpgol-server-static_SRCS
HEADER http_debug.h
IDENTIFIER HTTP_LOG
CATEGORY_NAME org.gpgol.server.http
DESCRIPTION "HTTP connection"
EXPORT GPGOL
)
target_sources(gpgol-server PRIVATE
${gpgol-server-static_SRCS}
# Controllers
controllers/staticcontroller.h
controllers/staticcontroller.cpp
# State
model/serverstate.cpp
model/serverstate.h
# web sever
webserver.cpp
webserver.h
main.cpp
)
-#qt_add_resources(gpgol-server
-# PREFIX
-# "/"
-# FILES
-# web/assets/logo.png
-# web/assets/document-decrypt-16.png
-# web/assets/document-decrypt-32.png
-# web/assets/document-decrypt-64.png
-# web/assets/document-decrypt-80.png
-# web/assets/script.js
-# web/assets/translation.js
-# web/assets/vue.global.v3.5.13.js
-# web/assets/main.css
-#
-# web/index.html
-#)
-
target_link_libraries(gpgol-server PRIVATE Qt6::HttpServer Qt6::Core common Qt6::WebSockets KF6::I18n)
install(TARGETS gpgol-server ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
-install(FILES manifest.xml DESTINATION ${KDE_INSTALL_DATAROOTDIR}/gpgol)
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Jul 8, 12:28 PM (11 h, 30 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
bf/bb/32f3b789486803e523d7e4dd2f08
Attached To
rOJ GpgOL.js
Event Timeline
Log In to Comment