About screen + Open Dyslexic font close #599 (#626)

* Add dyslexia and hyper-legible fonts

* AboutView to satisfy font licensing requirements, and generally credit libraries in use.

* Fix background

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
This commit is contained in:
Gareth Simpson 2023-02-03 06:03:32 +00:00 committed by GitHub
parent 2a1e37779d
commit 5621b243a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 170 additions and 0 deletions

View file

@ -9,6 +9,9 @@
/* Begin PBXBuildFile section */
065FA1FE29866CD600012EA0 /* LRUCache in Frameworks */ = {isa = PBXBuildFile; productRef = 065FA1FD29866CD600012EA0 /* LRUCache */; };
065FA20A298675BA00012EA0 /* LRUCache in Frameworks */ = {isa = PBXBuildFile; productRef = 065FA209298675BA00012EA0 /* LRUCache */; };
069709A5298C8545006E4CB5 /* Atkinson-Hyperlegible-Regular-102.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 069709A3298C8545006E4CB5 /* Atkinson-Hyperlegible-Regular-102.ttf */; };
069709A8298C87B5006E4CB5 /* OpenDyslexic-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 069709A7298C87B5006E4CB5 /* OpenDyslexic-Regular.otf */; };
069709AA298C9AD7006E4CB5 /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 069709A9298C9AD7006E4CB5 /* AboutView.swift */; };
639CDF9C296AC82F00C35E58 /* SafariRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 639CDF9B296AC82F00C35E58 /* SafariRouter.swift */; };
7429BCE2297C55D00069A946 /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 7429BCE4297C55D00069A946 /* Localizable.stringsdict */; };
7429BCE5297C5A750069A946 /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 7429BCE4297C55D00069A946 /* Localizable.stringsdict */; };
@ -128,6 +131,9 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
069709A3298C8545006E4CB5 /* Atkinson-Hyperlegible-Regular-102.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Atkinson-Hyperlegible-Regular-102.ttf"; sourceTree = "<group>"; };
069709A7298C87B5006E4CB5 /* OpenDyslexic-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "OpenDyslexic-Regular.otf"; sourceTree = "<group>"; };
069709A9298C9AD7006E4CB5 /* AboutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutView.swift; sourceTree = "<group>"; };
56B5BC132984206F00CF3A98 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "pt-BR"; path = "pt-BR.lproj/Localizable.stringsdict"; sourceTree = "<group>"; };
56B5BC142984206F00CF3A98 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/Localizable.strings"; sourceTree = "<group>"; };
639CDF9B296AC82F00C35E58 /* SafariRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SafariRouter.swift; sourceTree = "<group>"; };
@ -328,6 +334,8 @@
9F398AB529360A6100A889F2 /* Resources */ = {
isa = PBXGroup;
children = (
069709A3298C8545006E4CB5 /* Atkinson-Hyperlegible-Regular-102.ttf */,
069709A7298C87B5006E4CB5 /* OpenDyslexic-Regular.otf */,
9F2A542D296B1CC0009B2D7C /* glass.wav */,
9F2A542B296B1177009B2D7C /* glass.caf */,
9F24EEB729360C330042359D /* Preview Assets.xcassets */,
@ -443,6 +451,7 @@
9F2A5410296A1429009B2D7C /* PushNotificationsView.swift */,
C9B22676297F6C2E001F9EFE /* ContentSettingsView.swift */,
9F7D939929805DBD00EE6B7A /* AccountSettingView.swift */,
069709A9298C9AD7006E4CB5 /* AboutView.swift */,
);
path = Settings;
sourceTree = "<group>";
@ -670,11 +679,13 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
069709A5298C8545006E4CB5 /* Atkinson-Hyperlegible-Regular-102.ttf in Resources */,
9F2A542C296B1177009B2D7C /* glass.caf in Resources */,
E9B576C329743F4C00BCE646 /* Localizable.strings in Resources */,
9FD34823293D06E800DB0EE9 /* Assets.xcassets in Resources */,
7429BCE2297C55D00069A946 /* Localizable.stringsdict in Resources */,
9F24EEB829360C330042359D /* Preview Assets.xcassets in Resources */,
069709A8298C87B5006E4CB5 /* OpenDyslexic-Regular.otf in Resources */,
9FAD85832971BF7200496AB1 /* Secret.plist in Resources */,
9F2A542E296B1CC0009B2D7C /* glass.wav in Resources */,
);
@ -716,6 +727,7 @@
files = (
9FE151A6293C90F900E9683D /* IconSelectorView.swift in Sources */,
9F7D939A29805DBD00EE6B7A /* AccountSettingView.swift in Sources */,
069709AA298C9AD7006E4CB5 /* AboutView.swift in Sources */,
9F2B92FC295DA94500DE16D0 /* InstanceInfoView.swift in Sources */,
C9B22677297F6C2E001F9EFE /* ContentSettingsView.swift in Sources */,
9F35DB4C2952005C00B3281A /* MessagesTab.swift in Sources */,

View file

@ -0,0 +1,102 @@
import SwiftUI
import Env
import DesignSystem
struct AboutView: View {
@EnvironmentObject private var routerPath: RouterPath
@EnvironmentObject private var theme: Theme
let versionNumber:String
init() {
if let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {
versionNumber = version + " "
}
else {
versionNumber = ""
}
}
var body: some View {
ScrollView{
VStack(alignment: .leading) {
Divider()
HStack {
Spacer()
Image("icon0")
.resizable()
.frame(width: 50, height: 50)
.cornerRadius(4)
Image("icon14")
.resizable()
.frame(width: 50, height: 50)
.cornerRadius(4)
Image("icon17")
.resizable()
.frame(width: 50, height: 50)
.cornerRadius(4)
Image("icon23")
.resizable()
.frame(width: 50, height: 50)
.cornerRadius(4)
Spacer()
}
.padding(.top, 10)
HStack {
Spacer()
Text("\(versionNumber)©2023 Thomas Ricouard")
.font(.scaledFootnote)
.foregroundColor(.gray)
.fontWeight(.semibold)
.padding(.bottom, 10)
Spacer()
}
Divider()
Text("settings.about.built-with")
.padding(.horizontal, 25)
.padding(.bottom, 10)
.font(.scaledSubheadline)
.foregroundColor(.gray)
Text("""
[EmojiText](https://github.com/divadretlaw/EmojiText)
[HTML2Markdown](https://gitlab.com/mflint/HTML2Markdown)
[KeychainSwift](https://github.com/evgenyneu/keychain-swift)
[LRUCache](https://github.com/nicklockwood/LRUCache)
[Nuke](https://github.com/kean/Nuke)
[SwiftSoup](https://github.com/scinfu/SwiftSoup.git)
[TextView](https://github.com/Dimillian/TextView)
[Atkinson Hyperlegible](https://github.com/googlefonts/atkinson-hyperlegible)
[OpenDyslexic](http://opendyslexic.org)
""")
.padding(.horizontal, 25)
.multilineTextAlignment(.leading)
.font(.scaledSubheadline)
.foregroundColor(.gray)
}
Divider()
Spacer()
}
.scrollContentBackground(.hidden)
.background(theme.secondaryBackgroundColor)
.navigationTitle(Text("settings.about.title"))
.navigationBarTitleDisplayMode(.large)
.environment(\.openURL, OpenURLAction { url in
routerPath.handle(url: url)
})
}
}
struct AboutView_Previews: PreviewProvider {
static var previews: some View {
AboutView()
}
}

View file

@ -175,6 +175,12 @@ struct SettingsTabs: View {
}
.tint(theme.labelColor)
}
NavigationLink(destination: AboutView()) {
Label("settings.app.about", systemImage: "info.circle")
}
} header: {
Text("settings.section.app")
} footer: {

View file

@ -21,5 +21,10 @@
<array>
<string>remote-notification</string>
</array>
<key>UIAppFonts</key>
<array>
<string>Atkinson-Hyperlegible-Regular-102.ttf</string>
<string>OpenDyslexic-Regular.otf</string>
</array>
</dict>
</plist>

View file

@ -56,6 +56,7 @@
"settings.app.icon.navigation-title" = "Icones";
"settings.app.source" = "Font (enllaç a GitHub)";
"settings.app.support" = "Dona suport a l'aplicació";
"settings.app.about" = "About";
"settings.display.avatar.position" = "Posició de les fotos de perfil";
"settings.display.avatar.shape" = "Forma de les fotos de perfil";
"settings.display.navigation-title" = "Configuració de l'aparença";
@ -134,6 +135,8 @@
"settings.display.font.system" = "Sistema";
"settings.display.font.custom" = "Personalitzada";
"settings.display.font.scaling-%@" = "Escalat de la lletra: %@";
"settings.about.built-with" = "Ice Cubes is built with the following Open Source software:";
"settings.about.title" = "Ice Cubes";
// MARK: Tabs
"tab.explore" = "Exploreu";

View file

@ -57,6 +57,7 @@
"settings.app.icon.navigation-title" = "Icons";
"settings.app.source" = "Quellcode (auf GitHub)";
"settings.app.support" = "Unterstütze die App";
"settings.app.about" = "About";
"settings.display.avatar.position" = "Profilbild-Position";
"settings.display.avatar.shape" = "Profilbild-Form";
"settings.display.navigation-title" = "Anzeigeeinstellungen";
@ -132,6 +133,8 @@
"settings.display.font.system" = "System";
"settings.display.font.custom" = "Eigene";
"settings.display.font.scaling-%@" = "Schriftskalierung: %@";
"settings.about.built-with" = "Ice Cubes is built with the following Open Source software:";
"settings.about.title" = "Ice Cubes";
"enum.expand-media.show" = "Alle zeigen";
"enum.expand-media.hide" = "Alle ausblenden";

View file

@ -57,6 +57,7 @@
"settings.app.icon.navigation-title" = "Icons";
"settings.app.source" = "Source (GitHub link)";
"settings.app.support" = "Support the app";
"settings.app.about" = "About";
"settings.display.font" = "Timeline Font";
"settings.display.font.system" = "System";
"settings.display.font.custom" = "Custom";
@ -134,6 +135,8 @@
"settings.push.duplicate.footer" = "Receiving duplicate notifications? Try this magic button in order to fix it";
"settings.push.duplicate.button.fix" = "🪄 Fix it";
"settings.other.autoplay-video" = "Auto Play Videos";
"settings.about.built-with" = "Ice Cubes is built with the following Open Source software:";
"settings.about.title" = "Ice Cubes";
// MARK: Tabs
"tab.explore" = "Explore";

View file

@ -57,6 +57,7 @@
"settings.app.icon.navigation-title" = "Icons";
"settings.app.source" = "Source (GitHub link)";
"settings.app.support" = "Support the app";
"settings.app.about" = "About";
"settings.display.font" = "Timeline Font";
"settings.display.font.system" = "System";
"settings.display.font.custom" = "Custom";
@ -135,6 +136,8 @@
"settings.push.duplicate.footer" = "Receiving duplicate notifications? Try this magic button in order to fix it";
"settings.push.duplicate.button.fix" = "🪄 Fix it";
"settings.other.autoplay-video" = "Auto Play Videos";
"settings.about.built-with" = "Ice Cubes is built with the following Open Source software:";
"settings.about.title" = "Ice Cubes";
// MARK: Tabs
"tab.explore" = "Explore";

View file

@ -57,6 +57,7 @@
"settings.app.icon.navigation-title" = "Iconos";
"settings.app.source" = "Código fuente (Enlace a GitHub)";
"settings.app.support" = "Apoya a Ice Cubes";
"settings.app.about" = "About";
"settings.display.avatar.position" = "Posición del avatar";
"settings.display.avatar.shape" = "Forma del avatar";
"settings.display.navigation-title" = "Ajustes de apariencia";
@ -132,6 +133,8 @@
"settings.display.font.system" = "De sistema";
"settings.display.font.custom" = "Personalizada";
"settings.display.font.scaling-%@" = "Escalado de tipografía: %@";
"settings.about.built-with" = "Ice Cubes is built with the following Open Source software:";
"settings.about.title" = "Ice Cubes";
"enum.expand-media.show" = "Siempre";
"enum.expand-media.hide" = "Nunca";

View file

@ -57,6 +57,7 @@
"settings.app.icon.navigation-title" = "Icônes";
"settings.app.source" = "Source (lien GitHub)";
"settings.app.support" = "Soutenir l'application";
"settings.app.about" = "About";
"settings.display.avatar.position" = "Position de l'avatar";
"settings.display.avatar.shape" = "Forme de l'avatar";
"settings.display.navigation-title" = "Paramètres d'affichage";
@ -135,6 +136,8 @@
"settings.display.font.system" = "System";
"settings.display.font.custom" = "Custom";
"settings.display.font.scaling-%@" = "Font scaling: %@";
"settings.about.built-with" = "Ice Cubes is built with the following Open Source software:";
"settings.about.title" = "Ice Cubes";
// MARK: Tabs
"tab.explore" = "Explorer";

View file

@ -57,6 +57,7 @@
"settings.app.icon.navigation-title" = "Icone";
"settings.app.source" = "Sorgenti (link GitHub)";
"settings.app.support" = "Supporta l'applicazione";
"settings.app.about" = "About";
"settings.display.avatar.position" = "Posizione dell'avatar";
"settings.display.avatar.shape" = "Forma dell'avatar";
"settings.display.navigation-title" = "Impostazioni di visualizzazione";
@ -135,6 +136,8 @@
"settings.display.font.custom" = "Personalizzato";
"settings.display.font.scaling-%@" = "Font scaling: %@";
"settings.other.autoplay-video" = "Auto Play dei video";
"settings.about.built-with" = "Ice Cubes is built with the following Open Source software:";
"settings.about.title" = "Ice Cubes";
// MARK: Tabs
"tab.explore" = "Esplora";

View file

@ -57,6 +57,7 @@
"settings.app.icon.navigation-title" = "アイコン";
"settings.app.source" = "ソース (GitHub link)";
"settings.app.support" = "アプリを支援する";
"settings.app.about" = "About";
"settings.display.font" = "タイムラインのフォント";
"settings.display.font.system" = "システムフォント";
"settings.display.font.custom" = "カスタム";
@ -135,6 +136,8 @@
"settings.push.duplicate.footer" = "重複して通知を受け取っていませんか?それを修正するためにこの魔法のボタンを試してみて";
"settings.push.duplicate.button.fix" = "🪄 修正する";
"settings.other.autoplay-video" = "動画を自動再生";
"settings.about.built-with" = "Ice Cubes is built with the following Open Source software:";
"settings.about.title" = "Ice Cubes";
// MARK: Tabs
"tab.explore" = "エクスプローラー";

View file

@ -57,6 +57,7 @@
"settings.app.icon.navigation-title" = "앱 아이콘";
"settings.app.source" = "소스 코드 (GitHub)";
"settings.app.support" = "이 앱 지원하기";
"settings.app.about" = "About";
"settings.display.avatar.position" = "프로필 사진 위치";
"settings.display.avatar.shape" = "프로필 사진 모양";
"settings.display.navigation-title" = "화면 설정";
@ -135,6 +136,8 @@
"settings.display.font.system" = "시스템 글꼴 사용";
"settings.display.font.custom" = "직접 설정";
"settings.display.font.scaling-%@" = "Font scaling: %@";
"settings.about.built-with" = "Ice Cubes is built with the following Open Source software:";
"settings.about.title" = "Ice Cubes";
// MARK: Tabs
"tab.explore" = "둘러보기";

View file

@ -57,6 +57,7 @@
"settings.app.icon.navigation-title" = "Ikon";
"settings.app.source" = "Kilde (GitHub-lenke)";
"settings.app.support" = "Støtt denne appen";
"settings.app.about" = "About";
"settings.display.font" = "Tidslinjefont";
"settings.display.font.system" = "System";
"settings.display.font.custom" = "Tilpasset";
@ -135,6 +136,8 @@
"settings.push.duplicate.footer" = "Får du dupliserte varsler? Prøv denne magiske knappen for å fikse det.";
"settings.push.duplicate.button.fix" = "🪄 Fiks det";
"settings.other.autoplay-video" = "Spill av videoer automatisk";
"settings.about.built-with" = "Ice Cubes is built with the following Open Source software:";
"settings.about.title" = "Ice Cubes";
// MARK: Tabs
"tab.explore" = "Utforsk";

View file

@ -57,6 +57,7 @@
"settings.app.icon.navigation-title" = "Iconen";
"settings.app.source" = "Broncode (GitHub-link)";
"settings.app.support" = "De app steunen";
"settings.app.about" = "About";
"settings.display.avatar.position" = "Avatarpositie";
"settings.display.avatar.shape" = "Avatarvorm";
"settings.display.navigation-title" = "Weergaveopties";
@ -132,6 +133,8 @@
"settings.display.font.system" = "Systeem";
"settings.display.font.custom" = "Aangepast";
"settings.display.font.scaling-%@" = "Font scaling: %@";
"settings.about.built-with" = "Ice Cubes is built with the following Open Source software:";
"settings.about.title" = "Ice Cubes";
// MARK: Tabs
"tab.explore" = "Ontdekken";

View file

@ -57,6 +57,7 @@
"settings.app.icon.navigation-title" = "Icons"; // ---------
"settings.app.source" = "Źródło (link do GitHub)";
"settings.app.support" = "Wspieraj aplikację";
"settings.app.about" = "About";
"settings.display.avatar.position" = "Położenie awatara";
"settings.display.avatar.shape" = "Kształt awatara";
"settings.display.navigation-title" = "Ustawienia ekranu";
@ -135,6 +136,8 @@
"settings.display.font.system" = "Systemowa";
"settings.display.font.custom" = "Własna";
"settings.display.font.scaling-%@" = "Font scaling: %@";
"settings.about.built-with" = "Ice Cubes is built with the following Open Source software:";
"settings.about.title" = "Ice Cubes";
// MARK: Tabs
"tab.explore" = "Odkrywaj";

View file

@ -57,6 +57,7 @@
"settings.app.icon.navigation-title" = "Ícones";
"settings.app.source" = "Código fonte (link GitHub)";
"settings.app.support" = "Apoie o app";
"settings.app.about" = "About";
"settings.display.avatar.position" = "Posição do avatar";
"settings.display.avatar.shape" = "Formato do avatar";
"settings.display.navigation-title" = "Ver Configurações";
@ -135,6 +136,8 @@
"settings.display.font.system" = "System";
"settings.display.font.custom" = "Custom";
"settings.display.font.scaling-%@" = "Font scaling: %@";
"settings.about.built-with" = "Ice Cubes is built with the following Open Source software:";
"settings.about.title" = "Ice Cubes";
// MARK: Tabs
"tab.explore" = "Explorar";

View file

@ -57,6 +57,7 @@
"settings.app.icon.navigation-title" = "İkonlar";
"settings.app.source" = "Kaynak Kodu (GitHub link)";
"settings.app.support" = "Uygulamayı Destekleyin";
"settings.app.about" = "About";
"settings.display.avatar.position" = "Avatar Pozisyonu";
"settings.display.avatar.shape" = "Avatar Şekli";
"settings.display.navigation-title" = "Gösterim Ayarları";
@ -135,6 +136,8 @@
"settings.display.font.system" = "System";
"settings.display.font.custom" = "Custom";
"settings.display.font.scaling-%@" = "Font scaling: %@";
"settings.about.built-with" = "Ice Cubes is built with the following Open Source software:";
"settings.about.title" = "Ice Cubes";
// MARK: Tabs
"tab.explore" = "Keşfet";

View file

@ -57,6 +57,7 @@
"settings.app.icon.navigation-title" = "图标";
"settings.app.source" = "源代码GitHub 链接)";
"settings.app.support" = "支持本应用";
"settings.app.about" = "About";
"settings.display.avatar.position" = "头像位置";
"settings.display.avatar.shape" = "头像边框";
"settings.display.navigation-title" = "显示设置";
@ -130,6 +131,8 @@
"settings.push.duplicate.footer" = "有收到重复的推送通知?试试用这个魔法按钮去修复吧";
"settings.push.duplicate.button.fix" = "🪄 修复";
"settings.other.autoplay-video" = "自动播放视频";
"settings.about.built-with" = "Ice Cubes is built with the following Open Source software:";
"settings.about.title" = "Ice Cubes";
"settings.display.font" = "时间线字体";
"settings.display.font.system" = "系统";

Binary file not shown.