Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mkmayer authored Sep 1, 2023
2 parents e9b20cf + 0448f7e commit 6a70335
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 83 deletions.
2 changes: 2 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk
DEB_CMAKE_EXTRA_FLAGS = \
-DBUNDLE_XPI=ON
DEB_MAKE_CHECK_TARGET = test
11 changes: 8 additions & 3 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,11 @@ elseif(APPLE)
)
endif()
else()
option(BUNDLE_XPI "Download and bundle the Firefox extension" OFF)
include(GNUInstallDirs)
file(DOWNLOAD ${FIREFOX_URL} ${CMAKE_CURRENT_BINARY_DIR}/${FIREFOX_UUID}.xpi)
if (BUNDLE_XPI)
file(DOWNLOAD ${FIREFOX_URL} ${CMAKE_CURRENT_BINARY_DIR}/${FIREFOX_UUID}.xpi)
endif()
set(WEBEID_PATH ${CMAKE_INSTALL_FULL_BINDIR}/web-eid)
install(TARGETS web-eid DESTINATION ${CMAKE_INSTALL_BINDIR})
if(EXISTS "/etc/debian_version")
Expand All @@ -179,8 +182,10 @@ else()
DESTINATION ${CMAKE_INSTALL_DATADIR}/google-chrome/extensions)
install(FILES ${CMAKE_SOURCE_DIR}/install/web-eid.desktop
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${FIREFOX_UUID}.xpi
DESTINATION ${CMAKE_INSTALL_DATADIR}/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384})
if (BUNDLE_XPI)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${FIREFOX_UUID}.xpi
DESTINATION ${CMAKE_INSTALL_DATADIR}/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384})
endif()
foreach(RES 16 32 128 256 512)
install(
FILES ${CMAKE_SOURCE_DIR}/install/appicon_${RES}.png
Expand Down
15 changes: 8 additions & 7 deletions src/ui/certificatewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,24 @@ CertificateWidgetInfo::CertificateWidgetInfo(QWidget* self) :
icon(new QLabel(self)), info(new QLabel(self)), warnIcon(new QLabel(self)),
warn(new QLabel(CertificateWidget::tr("Pin locked"), self))
{
icon->setPixmap(QStringLiteral(":/images/id-card.svg"));
warnIcon->setPixmap(QStringLiteral(":/images/fatal.svg"));
if (qApp->isDarkTheme()) {
if (Application::isDarkTheme()) {
icon->setPixmap(QStringLiteral(":/images/id-card_dark.svg"));
warnIcon->setPixmap(QStringLiteral(":/images/fatal_dark.svg"));
} else {
icon->setPixmap(QStringLiteral(":/images/id-card.svg"));
warnIcon->setPixmap(QStringLiteral(":/images/fatal.svg"));
}
warnIcon->hide();
warnIcon->installEventFilter(self);
warn->setObjectName(QStringLiteral("warn"));
warn->hide();
QHBoxLayout* layout = new QHBoxLayout(self);
auto* layout = new QHBoxLayout(self);
layout->setContentsMargins(20, 0, 20, 0);
layout->setSpacing(20);
layout->setSpacing(10);
layout->addWidget(icon);
layout->addWidget(info, 1);
layout->addWidget(warnIcon);
QHBoxLayout* warnLayout = new QHBoxLayout;
auto* warnLayout = new QHBoxLayout;
warnLayout->setSpacing(6);
warnLayout->addWidget(warnIcon);
warnLayout->addWidget(warn);
Expand Down Expand Up @@ -91,7 +92,7 @@ void CertificateWidgetInfo::setCertificateInfo(const CardCertificateAndPinInfo&
{
warn->setText(CertificateWidget::tr("Pin locked"));
certAndPinInfo = cardCertPinInfo;
const auto certInfo = cardCertPinInfo.certInfo;
const auto& certInfo = cardCertPinInfo.certInfo;
QString warning, effectiveDate = certInfo.effectiveDate, expiryDate = certInfo.expiryDate;
if (certInfo.notEffective) {
effectiveDate = displayInRed(effectiveDate);
Expand Down
100 changes: 54 additions & 46 deletions src/ui/dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<rect>
<x>0</x>
<y>0</y>
<width>500</width>
<height>495</height>
<width>550</width>
<height>510</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>500</width>
<width>550</width>
<height>0</height>
</size>
</property>
Expand Down Expand Up @@ -527,7 +527,7 @@ height: 24px;
<enum>Qt::TabFocus</enum>
</property>
<property name="text">
<string>Authenticate</string>
<string notr="true">Authenticate</string>
</property>
</widget>
</item>
Expand All @@ -545,7 +545,7 @@ height: 24px;
<enum>Qt::TabFocus</enum>
</property>
<property name="text">
<string>By authenticating, I agree to the transfer of my name and personal identification code to the service provider.</string>
<string notr="true">By authenticating, I agree to the transfer of my name and personal identification code to the service provider.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
Expand All @@ -569,49 +569,48 @@ height: 24px;
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="pinInputPageContentLayout">
<property name="spacing">
<layout class="QGridLayout" name="pinInputPageContentLayout">
<property name="horizontalSpacing">
<number>0</number>
</property>
<property name="verticalSpacing">
<number>8</number>
</property>
<item>
<item row="0" column="0" colspan="2">
<widget class="CertificateWidget" name="pinInputCertificateInfo" native="true"/>
</item>
<item>
<layout class="QHBoxLayout" name="selectAnotherCertificateLayout">
<item>
<widget class="QToolButton" name="selectAnotherCertificate">
<property name="text">
<string>Select another certificate</string>
</property>
<property name="icon">
<iconset resource="web-eid-resources.qrc">
<normaloff>:/images/left.svg</normaloff>:/images/left.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item>
<spacer name="selectAnotherCertificateSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
<item row="1" column="0">
<widget class="QToolButton" name="selectAnotherCertificate">
<property name="text">
<string>Select another certificate</string>
</property>
<property name="icon">
<iconset resource="web-eid-resources.qrc">
<normaloff>:/images/left.svg</normaloff>:/images/left.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item row="1" column="1">
<spacer name="selectAnotherCertificateSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
Expand All @@ -630,7 +629,7 @@ height: 24px;
</font>
</property>
<property name="text">
<string>Enter PIN1 for authentication</string>
<string notr="true">Enter PIN1 for authentication</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand All @@ -652,6 +651,12 @@ height: 24px;
</item>
<item>
<widget class="QLabel" name="pinErrorLabel">
<property name="minimumSize">
<size>
<width>0</width>
<height>36</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
Expand All @@ -661,6 +666,9 @@ height: 24px;
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
Expand Down Expand Up @@ -688,7 +696,7 @@ height: 24px;
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
<height>5</height>
</size>
</property>
</spacer>
Expand Down
Loading

0 comments on commit 6a70335

Please sign in to comment.