From b295b96979775b651c5840fca0d8b26aa64475f2 Mon Sep 17 00:00:00 2001 From: Valentin Vila Date: Wed, 20 Mar 2024 19:35:21 -0300 Subject: [PATCH 1/8] support item implementation --- App/App_macOS.swift | 9 ++++ Brewfile.lock.json | 78 +++++++++++++++------------- Support/en.lproj/Localizable.strings | 3 ++ 3 files changed, 55 insertions(+), 35 deletions(-) diff --git a/App/App_macOS.swift b/App/App_macOS.swift index 8710091f..ac910d2b 100644 --- a/App/App_macOS.swift +++ b/App/App_macOS.swift @@ -102,6 +102,15 @@ struct RootView: View { } } } + .safeAreaInset(edge: .bottom) { + Link(destination: URL(string: "donations.url".localized)!) { + HStack { + Image(systemName: "heart").foregroundColor(.blue) + Text("enum.navigation_item.donations".localized) + .foregroundColor(.white) + } + .padding()} + } .frame(minWidth: 150) .toolbar { Button { diff --git a/Brewfile.lock.json b/Brewfile.lock.json index c29e672d..d76c7173 100644 --- a/Brewfile.lock.json +++ b/Brewfile.lock.json @@ -2,84 +2,84 @@ "entries": { "brew": { "pre-commit": { - "version": "3.6.1", + "version": "3.6.2", "bottle": { - "rebuild": 0, + "rebuild": 1, "root_url": "https://ghcr.io/v2/homebrew/core", "files": { "arm64_sonoma": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:4e484a05a5bd384af65102fe822ce5376b77f638a5d48e774e5bf890a5ce1426", - "sha256": "4e484a05a5bd384af65102fe822ce5376b77f638a5d48e774e5bf890a5ce1426" + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:72e590bba1f4192726ff31c75f087b2fd0abd3d5a95778b8556190e936983f8d", + "sha256": "72e590bba1f4192726ff31c75f087b2fd0abd3d5a95778b8556190e936983f8d" }, "arm64_ventura": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:d291393de358a7d20a58f050a74cc7d53bfda3e1f5627fbdee8738df8cfd599c", - "sha256": "d291393de358a7d20a58f050a74cc7d53bfda3e1f5627fbdee8738df8cfd599c" + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:87ff42485d22827787f21deecd69fff06a8accbce5cb716f5e5df355ff1da65f", + "sha256": "87ff42485d22827787f21deecd69fff06a8accbce5cb716f5e5df355ff1da65f" }, "arm64_monterey": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:8a424636b2204c8956ba089dcecc0ebc8bccaa8cdb3e61e34a7c6c1bd32f236a", - "sha256": "8a424636b2204c8956ba089dcecc0ebc8bccaa8cdb3e61e34a7c6c1bd32f236a" + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:043c8cd137d106a6a6afe158e50c6d5d23af773aea2cb548391289e5f2eeb931", + "sha256": "043c8cd137d106a6a6afe158e50c6d5d23af773aea2cb548391289e5f2eeb931" }, "sonoma": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:a2525c44b30d94e9f5e517aca09835c2a3c94930cc46ea09a761b8909c38ae55", - "sha256": "a2525c44b30d94e9f5e517aca09835c2a3c94930cc46ea09a761b8909c38ae55" + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:8689e14658420ab0d6140c79510c8e20e6a95d2ff5446dea4d6ff91ad2e42fc3", + "sha256": "8689e14658420ab0d6140c79510c8e20e6a95d2ff5446dea4d6ff91ad2e42fc3" }, "ventura": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:9a2a9c8f2708d500cc8b1f08fdb1d19f09722028f4fc0d0d516b055697073e0c", - "sha256": "9a2a9c8f2708d500cc8b1f08fdb1d19f09722028f4fc0d0d516b055697073e0c" + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:a61cf7daaebd7fc939ba417b0342f06a82dd026b1801cd56735442e350b337d6", + "sha256": "a61cf7daaebd7fc939ba417b0342f06a82dd026b1801cd56735442e350b337d6" }, "monterey": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:d87f9614307145e6a5572c37d7c86ad6062f7da75e13b3b98229ce2787524509", - "sha256": "d87f9614307145e6a5572c37d7c86ad6062f7da75e13b3b98229ce2787524509" + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:e5e6a57d2f8b3c029dddffe209386c14a9b2d9648ae3f2b9ab897c59e0b5b49c", + "sha256": "e5e6a57d2f8b3c029dddffe209386c14a9b2d9648ae3f2b9ab897c59e0b5b49c" }, "x86_64_linux": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:2febc58717f13ffbd9295870b4567ce97c453466871674d16181d7431b235e5d", - "sha256": "2febc58717f13ffbd9295870b4567ce97c453466871674d16181d7431b235e5d" + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:77fc958ca25ba0aff9b98c845e891951fd55bba067b168628d0610a06870fd18", + "sha256": "77fc958ca25ba0aff9b98c845e891951fd55bba067b168628d0610a06870fd18" } } } }, "xcodegen": { - "version": "2.38.0", + "version": "2.39.1", "bottle": { "rebuild": 0, "root_url": "https://ghcr.io/v2/homebrew/core", "files": { "arm64_sonoma": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:422fb8dfbc7e2ed59125d22b4687bb54a1ab3f0ddef044a3875b624121f9be47", - "sha256": "422fb8dfbc7e2ed59125d22b4687bb54a1ab3f0ddef044a3875b624121f9be47" + "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:920fa6538d8abdc1baf1e831e5f3577f14c4a23e64a8da79e64afc931b6447cd", + "sha256": "920fa6538d8abdc1baf1e831e5f3577f14c4a23e64a8da79e64afc931b6447cd" }, "arm64_ventura": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:5b2d9dfdf8bc9912ecef48ecc4a03cfb4ba68f35f03c4ab4fc9e893b077f8796", - "sha256": "5b2d9dfdf8bc9912ecef48ecc4a03cfb4ba68f35f03c4ab4fc9e893b077f8796" + "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:aeb51bd068d90ccd72734af6c5e3a800429a8d0966d49cb898e82e4684191c72", + "sha256": "aeb51bd068d90ccd72734af6c5e3a800429a8d0966d49cb898e82e4684191c72" }, "arm64_monterey": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:7a239feca86c46f78ae91d631858d957cb2e7e63ea7230b30f3d618097774bff", - "sha256": "7a239feca86c46f78ae91d631858d957cb2e7e63ea7230b30f3d618097774bff" + "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:dc0ed0999561d9508394c438ceb2edc74be21a5ea0197902cda59f203459216a", + "sha256": "dc0ed0999561d9508394c438ceb2edc74be21a5ea0197902cda59f203459216a" }, "sonoma": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:346164300a7e835f8516c70b25793702bab2437d7e9fb606b5394ab757dab4f5", - "sha256": "346164300a7e835f8516c70b25793702bab2437d7e9fb606b5394ab757dab4f5" + "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:98f8ec64249e75a66ea273db761bdbdf964f65af060d580a6e31f51afa2a733b", + "sha256": "98f8ec64249e75a66ea273db761bdbdf964f65af060d580a6e31f51afa2a733b" }, "ventura": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:2bca799f6fee1e679a3f826a9a977449a23f81f02896b22a525056f6cd4a07dd", - "sha256": "2bca799f6fee1e679a3f826a9a977449a23f81f02896b22a525056f6cd4a07dd" + "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:f7af86b796621f18ff648ac259ba1412b884cf5ab6827369946bc5e70163cac4", + "sha256": "f7af86b796621f18ff648ac259ba1412b884cf5ab6827369946bc5e70163cac4" }, "monterey": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:3e306a4b9ad078c77b61d93090c224304c7dac35ca119808db87792edb983be8", - "sha256": "3e306a4b9ad078c77b61d93090c224304c7dac35ca119808db87792edb983be8" + "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:3e7365278fd9dbc2fe942c50fc704268c8152b9771d05d691d952f448883633f", + "sha256": "3e7365278fd9dbc2fe942c50fc704268c8152b9771d05d691d952f448883633f" } } } @@ -139,6 +139,14 @@ "CLT": "15.1.0.0.1.1700200546", "Xcode": "15.1", "macOS": "13.6.4" + }, + "sonoma": { + "HOMEBREW_VERSION": "4.2.13", + "HOMEBREW_PREFIX": "/opt/homebrew", + "Homebrew/homebrew-core": "api", + "CLT": "15.3.0.0.1.1708646388", + "Xcode": "15.3", + "macOS": "14.4" } } } diff --git a/Support/en.lproj/Localizable.strings b/Support/en.lproj/Localizable.strings index d82d0bbb..9c9e5b40 100644 --- a/Support/en.lproj/Localizable.strings +++ b/Support/en.lproj/Localizable.strings @@ -263,7 +263,10 @@ "enum.navigation_item.new" = "New"; "enum.navigation_item.downloads" = "Downloads"; "enum.navigation_item.settings" = "Settings"; +"enum.navigation_item.donations" = "Support Kiwix"; "enum.search_result_snippet_mode.disabled" = "Disabled"; "enum.search_result_snippet_mode.paragraph" = "First Paragraph"; "enum.search_result_snippet_mode.sentence" = "First Sentence"; "enum.search_result_snippet_mode.matches" = "Matches"; + +"donations.url" = "https://kiwix.org/en/get-involved/"; \ No newline at end of file From 5658bd928e8305576f2fda1d57a39e1820ed75c3 Mon Sep 17 00:00:00 2001 From: Valentin Vila Date: Thu, 21 Mar 2024 12:52:41 -0300 Subject: [PATCH 2/8] use SystemColors --- App/App_macOS.swift | 2 +- Brewfile.lock.json | 122 ++++++++++++++++++++---------------------- SwiftUI/Patches.swift | 2 + 3 files changed, 60 insertions(+), 66 deletions(-) diff --git a/App/App_macOS.swift b/App/App_macOS.swift index ac910d2b..8b81ef1e 100644 --- a/App/App_macOS.swift +++ b/App/App_macOS.swift @@ -107,7 +107,7 @@ struct RootView: View { HStack { Image(systemName: "heart").foregroundColor(.blue) Text("enum.navigation_item.donations".localized) - .foregroundColor(.white) + .foregroundColor(.foregroundColor(.systemTextColor)) } .padding()} } diff --git a/Brewfile.lock.json b/Brewfile.lock.json index d76c7173..c29e672d 100644 --- a/Brewfile.lock.json +++ b/Brewfile.lock.json @@ -2,84 +2,84 @@ "entries": { "brew": { "pre-commit": { - "version": "3.6.2", - "bottle": { - "rebuild": 1, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_sonoma": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:72e590bba1f4192726ff31c75f087b2fd0abd3d5a95778b8556190e936983f8d", - "sha256": "72e590bba1f4192726ff31c75f087b2fd0abd3d5a95778b8556190e936983f8d" - }, - "arm64_ventura": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:87ff42485d22827787f21deecd69fff06a8accbce5cb716f5e5df355ff1da65f", - "sha256": "87ff42485d22827787f21deecd69fff06a8accbce5cb716f5e5df355ff1da65f" - }, - "arm64_monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:043c8cd137d106a6a6afe158e50c6d5d23af773aea2cb548391289e5f2eeb931", - "sha256": "043c8cd137d106a6a6afe158e50c6d5d23af773aea2cb548391289e5f2eeb931" - }, - "sonoma": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:8689e14658420ab0d6140c79510c8e20e6a95d2ff5446dea4d6ff91ad2e42fc3", - "sha256": "8689e14658420ab0d6140c79510c8e20e6a95d2ff5446dea4d6ff91ad2e42fc3" - }, - "ventura": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:a61cf7daaebd7fc939ba417b0342f06a82dd026b1801cd56735442e350b337d6", - "sha256": "a61cf7daaebd7fc939ba417b0342f06a82dd026b1801cd56735442e350b337d6" - }, - "monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:e5e6a57d2f8b3c029dddffe209386c14a9b2d9648ae3f2b9ab897c59e0b5b49c", - "sha256": "e5e6a57d2f8b3c029dddffe209386c14a9b2d9648ae3f2b9ab897c59e0b5b49c" - }, - "x86_64_linux": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:77fc958ca25ba0aff9b98c845e891951fd55bba067b168628d0610a06870fd18", - "sha256": "77fc958ca25ba0aff9b98c845e891951fd55bba067b168628d0610a06870fd18" - } - } - } - }, - "xcodegen": { - "version": "2.39.1", + "version": "3.6.1", "bottle": { "rebuild": 0, "root_url": "https://ghcr.io/v2/homebrew/core", "files": { "arm64_sonoma": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:920fa6538d8abdc1baf1e831e5f3577f14c4a23e64a8da79e64afc931b6447cd", - "sha256": "920fa6538d8abdc1baf1e831e5f3577f14c4a23e64a8da79e64afc931b6447cd" + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:4e484a05a5bd384af65102fe822ce5376b77f638a5d48e774e5bf890a5ce1426", + "sha256": "4e484a05a5bd384af65102fe822ce5376b77f638a5d48e774e5bf890a5ce1426" }, "arm64_ventura": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:aeb51bd068d90ccd72734af6c5e3a800429a8d0966d49cb898e82e4684191c72", - "sha256": "aeb51bd068d90ccd72734af6c5e3a800429a8d0966d49cb898e82e4684191c72" + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:d291393de358a7d20a58f050a74cc7d53bfda3e1f5627fbdee8738df8cfd599c", + "sha256": "d291393de358a7d20a58f050a74cc7d53bfda3e1f5627fbdee8738df8cfd599c" }, "arm64_monterey": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:dc0ed0999561d9508394c438ceb2edc74be21a5ea0197902cda59f203459216a", - "sha256": "dc0ed0999561d9508394c438ceb2edc74be21a5ea0197902cda59f203459216a" + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:8a424636b2204c8956ba089dcecc0ebc8bccaa8cdb3e61e34a7c6c1bd32f236a", + "sha256": "8a424636b2204c8956ba089dcecc0ebc8bccaa8cdb3e61e34a7c6c1bd32f236a" }, "sonoma": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:98f8ec64249e75a66ea273db761bdbdf964f65af060d580a6e31f51afa2a733b", - "sha256": "98f8ec64249e75a66ea273db761bdbdf964f65af060d580a6e31f51afa2a733b" + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:a2525c44b30d94e9f5e517aca09835c2a3c94930cc46ea09a761b8909c38ae55", + "sha256": "a2525c44b30d94e9f5e517aca09835c2a3c94930cc46ea09a761b8909c38ae55" }, "ventura": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:f7af86b796621f18ff648ac259ba1412b884cf5ab6827369946bc5e70163cac4", - "sha256": "f7af86b796621f18ff648ac259ba1412b884cf5ab6827369946bc5e70163cac4" + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:9a2a9c8f2708d500cc8b1f08fdb1d19f09722028f4fc0d0d516b055697073e0c", + "sha256": "9a2a9c8f2708d500cc8b1f08fdb1d19f09722028f4fc0d0d516b055697073e0c" }, "monterey": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:3e7365278fd9dbc2fe942c50fc704268c8152b9771d05d691d952f448883633f", - "sha256": "3e7365278fd9dbc2fe942c50fc704268c8152b9771d05d691d952f448883633f" + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:d87f9614307145e6a5572c37d7c86ad6062f7da75e13b3b98229ce2787524509", + "sha256": "d87f9614307145e6a5572c37d7c86ad6062f7da75e13b3b98229ce2787524509" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:2febc58717f13ffbd9295870b4567ce97c453466871674d16181d7431b235e5d", + "sha256": "2febc58717f13ffbd9295870b4567ce97c453466871674d16181d7431b235e5d" + } + } + } + }, + "xcodegen": { + "version": "2.38.0", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_sonoma": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:422fb8dfbc7e2ed59125d22b4687bb54a1ab3f0ddef044a3875b624121f9be47", + "sha256": "422fb8dfbc7e2ed59125d22b4687bb54a1ab3f0ddef044a3875b624121f9be47" + }, + "arm64_ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:5b2d9dfdf8bc9912ecef48ecc4a03cfb4ba68f35f03c4ab4fc9e893b077f8796", + "sha256": "5b2d9dfdf8bc9912ecef48ecc4a03cfb4ba68f35f03c4ab4fc9e893b077f8796" + }, + "arm64_monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:7a239feca86c46f78ae91d631858d957cb2e7e63ea7230b30f3d618097774bff", + "sha256": "7a239feca86c46f78ae91d631858d957cb2e7e63ea7230b30f3d618097774bff" + }, + "sonoma": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:346164300a7e835f8516c70b25793702bab2437d7e9fb606b5394ab757dab4f5", + "sha256": "346164300a7e835f8516c70b25793702bab2437d7e9fb606b5394ab757dab4f5" + }, + "ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:2bca799f6fee1e679a3f826a9a977449a23f81f02896b22a525056f6cd4a07dd", + "sha256": "2bca799f6fee1e679a3f826a9a977449a23f81f02896b22a525056f6cd4a07dd" + }, + "monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:3e306a4b9ad078c77b61d93090c224304c7dac35ca119808db87792edb983be8", + "sha256": "3e306a4b9ad078c77b61d93090c224304c7dac35ca119808db87792edb983be8" } } } @@ -139,14 +139,6 @@ "CLT": "15.1.0.0.1.1700200546", "Xcode": "15.1", "macOS": "13.6.4" - }, - "sonoma": { - "HOMEBREW_VERSION": "4.2.13", - "HOMEBREW_PREFIX": "/opt/homebrew", - "Homebrew/homebrew-core": "api", - "CLT": "15.3.0.0.1.1708646388", - "Xcode": "15.3", - "macOS": "14.4" } } } diff --git a/SwiftUI/Patches.swift b/SwiftUI/Patches.swift index e12ef454..a7e12295 100644 --- a/SwiftUI/Patches.swift +++ b/SwiftUI/Patches.swift @@ -53,10 +53,12 @@ extension Color { static let background = Color(NSColor.windowBackgroundColor) static let secondaryBackground = Color(NSColor.underPageBackgroundColor) static let tertiaryBackground = Color(NSColor.controlBackgroundColor) + static let systemTextColor = Color(NSColor.textColor) #elseif os(iOS) static let background = Color(UIColor.systemBackground) static let secondaryBackground = Color(UIColor.secondarySystemBackground) static let tertiaryBackground = Color(UIColor.tertiarySystemBackground) + static let systemTextColor = Color(NSColor.textColor) #endif } From b69a718b22aac1a44ff5587246673b6c0797fbd4 Mon Sep 17 00:00:00 2001 From: Valentin Vila Date: Thu, 21 Mar 2024 12:57:16 -0300 Subject: [PATCH 3/8] remove hardcoded colour from Image --- App/App_macOS.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App/App_macOS.swift b/App/App_macOS.swift index 8b81ef1e..b234d32b 100644 --- a/App/App_macOS.swift +++ b/App/App_macOS.swift @@ -105,7 +105,7 @@ struct RootView: View { .safeAreaInset(edge: .bottom) { Link(destination: URL(string: "donations.url".localized)!) { HStack { - Image(systemName: "heart").foregroundColor(.blue) + Image(systemName: "heart") Text("enum.navigation_item.donations".localized) .foregroundColor(.foregroundColor(.systemTextColor)) } From c429ced2e9b45c0911361cbeb56a123fd43577a6 Mon Sep 17 00:00:00 2001 From: Valentin Vila Date: Thu, 21 Mar 2024 13:16:56 -0300 Subject: [PATCH 4/8] duplicate foregroundColor --- App/App_macOS.swift | 2 +- SwiftUI/Patches.swift | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/App/App_macOS.swift b/App/App_macOS.swift index b234d32b..6d165bdd 100644 --- a/App/App_macOS.swift +++ b/App/App_macOS.swift @@ -107,7 +107,7 @@ struct RootView: View { HStack { Image(systemName: "heart") Text("enum.navigation_item.donations".localized) - .foregroundColor(.foregroundColor(.systemTextColor)) + .foregroundColor(.systemTextColor) } .padding()} } diff --git a/SwiftUI/Patches.swift b/SwiftUI/Patches.swift index a7e12295..5ea74368 100644 --- a/SwiftUI/Patches.swift +++ b/SwiftUI/Patches.swift @@ -58,7 +58,6 @@ extension Color { static let background = Color(UIColor.systemBackground) static let secondaryBackground = Color(UIColor.secondarySystemBackground) static let tertiaryBackground = Color(UIColor.tertiarySystemBackground) - static let systemTextColor = Color(NSColor.textColor) #endif } From 1fbc4be30fbe9f7251eee803cfce76e6ce017701 Mon Sep 17 00:00:00 2001 From: Valentin Vila Date: Thu, 21 Mar 2024 20:31:14 -0300 Subject: [PATCH 5/8] add mobile version of the support kiwix --- Support/en.lproj/Localizable.strings | 1 + Views/Settings/Settings.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/Support/en.lproj/Localizable.strings b/Support/en.lproj/Localizable.strings index 9c9e5b40..e8a0fdc0 100644 --- a/Support/en.lproj/Localizable.strings +++ b/Support/en.lproj/Localizable.strings @@ -167,6 +167,7 @@ "settings.miscellaneous.title" = "Misc"; "settings.miscellaneous.button.feedback" = "Feedback"; "settings.miscellaneous.button.rate_app" = "Rate the App"; +"settings.miscellaneous.button.donate" = "Support Kiwix"; "settings.miscellaneous.navigation.about" = "About"; "settings.selected_language.title" = "Languages"; "language_selector.name.title" = "Name"; diff --git a/Views/Settings/Settings.swift b/Views/Settings/Settings.swift index ea58a329..9e20c8da 100644 --- a/Views/Settings/Settings.swift +++ b/Views/Settings/Settings.swift @@ -228,6 +228,7 @@ struct Settings: View { appStoreID: Brand.appStoreId) UIApplication.shared.open(url) } + Link("settings.miscellaneous.button.donate".localized, destination: URL(string: "donations.url".localized)!) NavigationLink("settings.miscellaneous.navigation.about".localized) { About() } } } From 8408183f6bbdec5ed939a1b287ed11de0b465e62 Mon Sep 17 00:00:00 2001 From: Valentin Vila Date: Fri, 22 Mar 2024 12:48:27 -0300 Subject: [PATCH 6/8] update url --- Support/en.lproj/Localizable.strings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Support/en.lproj/Localizable.strings b/Support/en.lproj/Localizable.strings index e8a0fdc0..d6edc9d8 100644 --- a/Support/en.lproj/Localizable.strings +++ b/Support/en.lproj/Localizable.strings @@ -270,4 +270,4 @@ "enum.search_result_snippet_mode.sentence" = "First Sentence"; "enum.search_result_snippet_mode.matches" = "Matches"; -"donations.url" = "https://kiwix.org/en/get-involved/"; \ No newline at end of file +"donations.url" = "https://kiwix.org/get-involved/"; From 519f4d974048b4b66cd68f558d1e25777c8f7e7b Mon Sep 17 00:00:00 2001 From: BPH Date: Sat, 23 Mar 2024 00:25:29 +0100 Subject: [PATCH 7/8] use .primary colour --- App/App_macOS.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App/App_macOS.swift b/App/App_macOS.swift index 6d165bdd..56559c34 100644 --- a/App/App_macOS.swift +++ b/App/App_macOS.swift @@ -107,7 +107,7 @@ struct RootView: View { HStack { Image(systemName: "heart") Text("enum.navigation_item.donations".localized) - .foregroundColor(.systemTextColor) + .foregroundColor(.primary) } .padding()} } From 4c6206d0db3fe9399cd46a1f7cf77a15d9df48b7 Mon Sep 17 00:00:00 2001 From: BPH Date: Sat, 23 Mar 2024 00:25:42 +0100 Subject: [PATCH 8/8] use .primary colour --- SwiftUI/Patches.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/SwiftUI/Patches.swift b/SwiftUI/Patches.swift index 5ea74368..e12ef454 100644 --- a/SwiftUI/Patches.swift +++ b/SwiftUI/Patches.swift @@ -53,7 +53,6 @@ extension Color { static let background = Color(NSColor.windowBackgroundColor) static let secondaryBackground = Color(NSColor.underPageBackgroundColor) static let tertiaryBackground = Color(NSColor.controlBackgroundColor) - static let systemTextColor = Color(NSColor.textColor) #elseif os(iOS) static let background = Color(UIColor.systemBackground) static let secondaryBackground = Color(UIColor.secondarySystemBackground)