From bb3ed4cea48eae2da1e0d6aaf396923e928d9675 Mon Sep 17 00:00:00 2001
From: Jed Fox <git@jedfox.com>
Date: Sun, 25 Jun 2023 12:55:08 -0400
Subject: [PATCH] =?UTF-8?q?Fix=20=E2=80=9Cdelete=20file=E2=80=9D=20modal?=
 =?UTF-8?q?=20layout=20(#1170)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../src/components/manager/DeleteFile.js      | 52 +++++++++----------
 upcoming-release-notes/1066.md                |  2 +-
 upcoming-release-notes/1170.md                |  6 +++
 3 files changed, 31 insertions(+), 29 deletions(-)
 create mode 100644 upcoming-release-notes/1170.md

diff --git a/packages/desktop-client/src/components/manager/DeleteFile.js b/packages/desktop-client/src/components/manager/DeleteFile.js
index e2ead6fb7..fc783d097 100644
--- a/packages/desktop-client/src/components/manager/DeleteFile.js
+++ b/packages/desktop-client/src/components/manager/DeleteFile.js
@@ -39,9 +39,10 @@ export default function DeleteMenu({ modalProps, actions, file }) {
         <View
           style={{
             padding: 15,
+            gap: 15,
             paddingTop: 0,
             paddingBottom: 25,
-            width: 500,
+            maxWidth: 512,
             lineHeight: '1.5em',
           }}
         >
@@ -61,7 +62,6 @@ export default function DeleteMenu({ modalProps, actions, file }) {
                   backgroundColor: colors.r4,
                   alignSelf: 'center',
                   border: 0,
-                  marginTop: 10,
                   padding: '10px 30px',
                   fontSize: 14,
                 }}
@@ -74,32 +74,28 @@ export default function DeleteMenu({ modalProps, actions, file }) {
 
           {file.id && (
             <>
-              <Text style={[isRemote && { marginTop: 20 }]}>
-                {isRemote ? (
-                  <Text>
-                    You can also delete just the local copy. This will remove
-                    all local data and the file will be listed as available for
-                    download.
-                  </Text>
-                ) : (
-                  <Text>
-                    {file.state === 'broken' ? (
-                      <Text>
-                        This is a <strong>hosted file</strong> but it was
-                        created by another user. You can only delete the local
-                        copy.
-                      </Text>
-                    ) : (
-                      <Text>
-                        This a <strong>local file</strong> which is not stored
-                        on a server.
-                      </Text>
-                    )}{' '}
-                    Deleting it will remove it and all of its backups
-                    permanently.
-                  </Text>
-                )}
-              </Text>
+              {isRemote ? (
+                <Text>
+                  You can also delete just the local copy. This will remove all
+                  local data and the file will be listed as available for
+                  download.
+                </Text>
+              ) : (
+                <Text>
+                  {file.state === 'broken' ? (
+                    <>
+                      This is a <strong>hosted file</strong> but it was created
+                      by another user. You can only delete the local copy.
+                    </>
+                  ) : (
+                    <>
+                      This a <strong>local file</strong> which is not stored on
+                      a server.
+                    </>
+                  )}{' '}
+                  Deleting it will remove it and all of its backups permanently.
+                </Text>
+              )}
 
               <ButtonWithLoading
                 primary={!isRemote}
diff --git a/upcoming-release-notes/1066.md b/upcoming-release-notes/1066.md
index d4af039d4..38a23f701 100644
--- a/upcoming-release-notes/1066.md
+++ b/upcoming-release-notes/1066.md
@@ -1,6 +1,6 @@
 ---
 category: Maintenance
-authors: [trevdor]
+authors: [trevdor, j-f1]
 ---
 
 Upgrade to react-router v6 and adopt v6 routing conventions.
diff --git a/upcoming-release-notes/1170.md b/upcoming-release-notes/1170.md
new file mode 100644
index 000000000..c82d0d1ff
--- /dev/null
+++ b/upcoming-release-notes/1170.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [j-f1]
+---
+
+Fix “delete file” modal layout
-- 
GitLab