Make version and copyright years dynamic
This commit is contained in:
parent
a4ad6443e3
commit
0a358e8a1b
4 changed files with 22 additions and 8 deletions
|
@ -548,12 +548,14 @@
|
|||
DEVELOPMENT_TEAM = 9Z6DE6KNJ9;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
INFOPLIST_FILE = "Pi-helper/Info.plist";
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "Pi-helper";
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.3;
|
||||
MARKETING_VERSION = 1.4;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.wbrawner.pihelper;
|
||||
PRODUCT_NAME = "Pi-helper";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
|
@ -576,12 +578,14 @@
|
|||
DEVELOPMENT_TEAM = 9Z6DE6KNJ9;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
INFOPLIST_FILE = "Pi-helper/Info.plist";
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "Pi-helper";
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.3;
|
||||
MARKETING_VERSION = 1.4;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.wbrawner.pihelper;
|
||||
PRODUCT_NAME = "Pi-helper";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
|
|
|
@ -9,14 +9,24 @@
|
|||
import SwiftUI
|
||||
|
||||
struct AboutView: View {
|
||||
var version: String? {
|
||||
get {
|
||||
Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
|
||||
}
|
||||
}
|
||||
var currentYear: String {
|
||||
get {
|
||||
String(Calendar.current.dateComponents([.year], from: Date()).year ?? 2022)
|
||||
}
|
||||
}
|
||||
var body: some View {
|
||||
VStack {
|
||||
Image("logo")
|
||||
Text("pihelper")
|
||||
.font(.title)
|
||||
Text("pihelper_version")
|
||||
Text("version \(version ?? "")")
|
||||
.font(.subheadline)
|
||||
Text("copyright")
|
||||
Text("copyright \(currentYear)")
|
||||
.font(.subheadline)
|
||||
.padding(.bottom)
|
||||
Button(action: {
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
"verify_ip_address" = "Pi-helper was unable to connect to your Pi-hole. Please verify that you've entered the correct host and port if applicable.";
|
||||
"verify_credentials" = "Pi-helper was unable to connect to your Pi-hole. Please verify that you've entered the correct password or API key.";
|
||||
"pihelper" = "Pi-helper";
|
||||
"pihelper_version" = "Version 1.0";
|
||||
"copyright" = "Copyright © 2019, 2020 William Brawner";
|
||||
"version %@" = "Version %@";
|
||||
"copyright %@" = "Copyright © 2019-%@ William Brawner";
|
||||
"forget_pihole" = "Forget Pi-hole";
|
||||
"view_on_github" = "View on GitHub";
|
||||
"duration" = "Duration";
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
"verify_ip_address" = "Pi-helper no pudo conectar a su Pi-hole. Por favor verifique que haya introducido el nombre de máquina correcto y puerto si aplica.";
|
||||
"verify_credentials" = "Pi-helper no pudo conectar a su Pi-hole. Por favor verifique que haya introducido la contraseña o clave API correcta.";
|
||||
"pihelper" = "Pi-helper";
|
||||
"pihelper_version" = "Versión 1.0";
|
||||
"copyright" = "Derechos Reservados © 2019, 2020 William Brawner";
|
||||
"version %@" = "Versión %@";
|
||||
"copyright %@" = "Derechos Reservados © 2019-%@ William Brawner";
|
||||
"forget_pihole" = "Olvidar Pi-hole";
|
||||
"view_on_github" = "Ver en GitHub";
|
||||
"duration" = "Duración";
|
||||
|
|
Loading…
Reference in a new issue