diff --git a/client/translations/en.ts b/client/translations/en.ts
index a5d5e13e..f61181d5 100644
--- a/client/translations/en.ts
+++ b/client/translations/en.ts
@@ -958,6 +958,10 @@
%1 already exists.<br />Do you want replace it?
+
+
+
+
FirstRun
diff --git a/client/translations/et.ts b/client/translations/et.ts
index 3b596e74..78036c37 100644
--- a/client/translations/et.ts
+++ b/client/translations/et.ts
@@ -958,6 +958,10 @@
%1 on juba olemas.<br />Soovid asendada?
+
+
+
+
FirstRun
diff --git a/client/translations/ru.ts b/client/translations/ru.ts
index 05f8343a..e1d9c045 100644
--- a/client/translations/ru.ts
+++ b/client/translations/ru.ts
@@ -958,6 +958,10 @@
%1 уже существует.<br />Заменить?
+
+
+
+
FirstRun
diff --git a/client/widgets/FileList.cpp b/client/widgets/FileList.cpp
index 9aab95d6..159c226d 100644
--- a/client/widgets/FileList.cpp
+++ b/client/widgets/FileList.cpp
@@ -210,6 +210,8 @@ void FileList::setModel(DocumentModel *documentModel)
auto count = documentModel->rowCount();
for(int i = 0; i < count; i++)
addFile(documentModel->data(i));
+ if(state == EncryptedContainer && count == 0)
+ addWidget(new LabelItem(tr("To view container content please decrypt encrypted container!")));
}
void FileList::stateChange(ria::qdigidoc4::ContainerState state)
diff --git a/client/widgets/Item.cpp b/client/widgets/Item.cpp
index d8d2a83f..7f786b25 100644
--- a/client/widgets/Item.cpp
+++ b/client/widgets/Item.cpp
@@ -19,6 +19,37 @@
#include "Item.h"
+#include
+#include
+
void Item::idChanged(const SslCertificate & /* cert */) {}
void Item::initTabOrder(QWidget * /* item */) {}
QWidget* Item::lastTabWidget() { return this; }
+
+LabelItem::LabelItem(const QString &text, QWidget *parent)
+ : Item(parent)
+{
+ setObjectName(QStringLiteral("LabelItem"));
+ setStyleSheet(QStringLiteral(R"(
+QWidget {
+font-family: Roboto, Helvetica;
+font-size: 14px;
+}
+#LabelItem {
+border-bottom: 1px solid rgba(217, 217, 216, 0.45);
+}
+#label {
+color: #07142A;
+}
+)"));
+ setLayout(new QVBoxLayout);
+ layout()->setContentsMargins(8, 16, 8, 16);
+ layout()->addWidget(label = new QLabel(text, this));
+ label->setObjectName("label");
+}
+
+void LabelItem::initTabOrder(QWidget *item)
+{
+ setTabOrder(item, label);
+ setTabOrder(label, lastTabWidget());
+}
diff --git a/client/widgets/Item.h b/client/widgets/Item.h
index a35d4ce0..54eedcdf 100644
--- a/client/widgets/Item.h
+++ b/client/widgets/Item.h
@@ -21,6 +21,7 @@
#include "widgets/StyledWidget.h"
+class QLabel;
class SslCertificate;
class Item : public StyledWidget
@@ -38,3 +39,16 @@ class Item : public StyledWidget
void add(Item* item);
void remove(Item* item);
};
+
+
+class LabelItem : public Item
+{
+ Q_OBJECT
+
+public:
+ LabelItem(const QString &text, QWidget *parent = nullptr);
+ void initTabOrder(QWidget *item) override;
+
+private:
+ QLabel *label;
+};