summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/langs/nheko_pt_PT.ts16
-rw-r--r--resources/langs/nheko_zh_CN.ts6
-rw-r--r--resources/qml/TimelineDefaultMessageStyle.qml5
-rw-r--r--resources/qml/dialogs/ImagePackDeleteDialog.qml23
-rw-r--r--resources/qml/dialogs/ImagePackSettingsDialog.qml36
5 files changed, 66 insertions, 20 deletions
diff --git a/resources/langs/nheko_pt_PT.ts b/resources/langs/nheko_pt_PT.ts
index 93cfe1a2..afa843b2 100644
--- a/resources/langs/nheko_pt_PT.ts
+++ b/resources/langs/nheko_pt_PT.ts
@@ -133,7 +133,7 @@
         <location filename="../../src/Cache.cpp" line="+3143"/>
         <source>%1 and %2</source>
         <comment>RoomName</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1 e %2</translation>
     </message>
     <message numerus="yes">
         <location line="+2"/>
@@ -216,12 +216,12 @@
     <message>
         <location filename="../../src/voip/CallManager.cpp" line="+878"/>
         <source>X11</source>
-        <translation type="unfinished"></translation>
+        <translation>X11</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>PipeWire</source>
-        <translation type="unfinished"></translation>
+        <translation>PipeWire</translation>
     </message>
     <message>
         <location line="+17"/>
@@ -246,9 +246,13 @@
         <location line="-687"/>
         <source>%n unread message(s) in room %1
 </source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
+        <translation>
+            <numerusform>%n mensagem não lida na sala %1
+</numerusform>
+            <numerusform>%n mensagens não lidas na sala %
+</numerusform>
+            <numerusform>%n mensagens não lidas na sala %1
+</numerusform>
         </translation>
     </message>
     <message>
diff --git a/resources/langs/nheko_zh_CN.ts b/resources/langs/nheko_zh_CN.ts
index f694bd17..133e187b 100644
--- a/resources/langs/nheko_zh_CN.ts
+++ b/resources/langs/nheko_zh_CN.ts
@@ -793,7 +793,7 @@ You may optionally provide a reason for others to accept your knock:</source>
     <message>
         <location line="+2"/>
         <source>Rooms you have favourited.</source>
-        <translation>你收藏的聊天室。</translation>
+        <translation>收藏的聊天室。</translation>
     </message>
     <message>
         <location line="+7"/>
@@ -1984,12 +1984,12 @@ Example: https://yourserver.example.com:8787</source>
     <message>
         <location line="+14"/>
         <source>To allow other users to see which of your devices actually belong to you, you can verify them. This also allows key backup to work automatically. Verify an unverified device now? (Please make sure you have one of those devices available.)</source>
-        <translation>为了允许其他用户查看你的哪些设备实际上属于你,你可以对其进行验证。这也允许密钥备份自动工作。立即验证未验证的设备?(请确保你有其中一个可用的设备。)</translation>
+        <translation>为了让其他用户看到哪些设备真正属于你,可以对这些设备进行验证。这样还可以自动进行密钥备份。要现在就验证未验证的设备吗?(请确保你有其中一个设备可用)</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>To allow other users to see which of your devices actually belong to you, you can verify them. This also allows key backup to work automatically. Verify %1 now?</source>
-        <translation>为了允许其他用户查看你的哪些设备实际上属于你,你可以对其进行验证。这也允许密钥备份自动工作。现在验证 %1 ?</translation>
+        <translation>为了让其他用户看到哪些设备真正属于你,可以对这些设备进行验证。这样还可以自动进行密钥备份。要现在就验证 %1 吗?</translation>
     </message>
     <message>
         <location line="+2"/>
diff --git a/resources/qml/TimelineDefaultMessageStyle.qml b/resources/qml/TimelineDefaultMessageStyle.qml
index e9b52e93..661aabdc 100644
--- a/resources/qml/TimelineDefaultMessageStyle.qml
+++ b/resources/qml/TimelineDefaultMessageStyle.qml
@@ -130,13 +130,13 @@ TimelineEvent {
             anchors.top: gridContainer.top
             anchors.left: gridContainer.left 
             anchors.topMargin: -2
-            anchors.leftMargin: -2
+            anchors.leftMargin: -2 + (stateEventSpacing.visible ? (stateEventSpacing.width + gridContainer.spacing) : 0)
             color: "transparent"
             border.color: Nheko.theme.red
             border.width: wrapper.notificationlevel == MtxEvent.Highlight ? 1 : 0
             radius: 4
             height: contentColumn.implicitHeight + 4
-            width: contentColumn.implicitWidth + 4
+            width: contentColumn.implicitWidth + 4 + (wrapper.threadId ? (4 + gridContainer.spacing) : 0)
         },
         Row {
             id: gridContainer
@@ -181,6 +181,7 @@ TimelineEvent {
             }
 
             Item {
+                id: stateEventSpacing
                 visible: wrapper.isStateEvent
                 width: (wrapper.maxWidth - (wrapper.main?.width ?? 0)) / 2
                 height: 1
diff --git a/resources/qml/dialogs/ImagePackDeleteDialog.qml b/resources/qml/dialogs/ImagePackDeleteDialog.qml
new file mode 100644
index 00000000..91407a9e
--- /dev/null
+++ b/resources/qml/dialogs/ImagePackDeleteDialog.qml
@@ -0,0 +1,23 @@
+// SPDX-FileCopyrightText: Nheko Contributors
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+import Qt.labs.platform 1.1 as P
+import QtQuick
+import im.nheko
+
+P.MessageDialog {
+    id: deleteStickerPackRoot
+
+    property SingleImagePackModel imagePack
+
+    text: qsTr("Are you sure you wish to delete the sticker pack '%1'?").arg(imagePack.packname)
+    modality: Qt.ApplicationModal
+    flags: Qt.Tool | Qt.WindowStaysOnTopHint | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
+    buttons: P.MessageDialog.Yes | P.MessageDialog.No
+        
+    onAccepted: {
+        console.info("deleting image pack " + imagePack.packname);
+        imagePack.remove()
+    }
+}
diff --git a/resources/qml/dialogs/ImagePackSettingsDialog.qml b/resources/qml/dialogs/ImagePackSettingsDialog.qml
index 9f807e65..69068405 100644
--- a/resources/qml/dialogs/ImagePackSettingsDialog.qml
+++ b/resources/qml/dialogs/ImagePackSettingsDialog.qml
@@ -32,7 +32,11 @@ ApplicationWindow {
 
         ImagePackEditorDialog {
         }
+    }
 
+    Component {
+        id: packDeleteDialog
+        ImagePackDeleteDialog {}
     }
 
     AdaptiveLayout {
@@ -189,16 +193,30 @@ ApplicationWindow {
 
                     }
 
-                    Button {
+                    RowLayout {
                         Layout.alignment: Qt.AlignHCenter
-                        text: qsTr("Edit")
-                        enabled: currentPack.canEdit
-                        onClicked: {
-                            var dialog = packEditor.createObject(timelineRoot, {
-                                "imagePack": currentPack
-                            });
-                            dialog.show();
-                            timelineRoot.destroyOnClose(dialog);
+
+                        Button {
+                            text: qsTr("Edit")
+                            enabled: currentPack.canEdit
+                            onClicked: {
+                                var dialog = packEditor.createObject(timelineRoot, {
+                                    "imagePack": currentPack
+                                });
+                                dialog.show();
+                                timelineRoot.destroyOnClose(dialog);
+                            }
+                        }
+                        Button {
+                            text: qsTr("Remove")
+                            enabled: currentPack.canEdit
+                            onClicked: {
+                                var dialog = packDeleteDialog.createObject(timelineRoot, {
+                                    "imagePack": currentPack
+                                });
+                                dialog.open();
+                                timelineRoot.destroyOnClose(dialog);
+                            }
                         }
                     }