@@ -11,7 +11,7 @@ enum DamusPurpleEnvironment: String, CaseIterable, Codable, Identifiable, String
11
11
case local_test
12
12
case staging
13
13
case production
14
-
14
+
15
15
func text_description( ) -> String {
16
16
switch self {
17
17
case . local_test:
@@ -22,7 +22,7 @@ enum DamusPurpleEnvironment: String, CaseIterable, Codable, Identifiable, String
22
22
return NSLocalizedString ( " Production " , comment: " Label indicating the production environment for Damus Purple " )
23
23
}
24
24
}
25
-
25
+
26
26
func api_base_url( ) -> URL {
27
27
switch self {
28
28
case . local_test:
@@ -33,7 +33,7 @@ enum DamusPurpleEnvironment: String, CaseIterable, Codable, Identifiable, String
33
33
Constants . PURPLE_API_PRODUCTION_BASE_URL
34
34
}
35
35
}
36
-
36
+
37
37
func purple_landing_page_url( ) -> URL {
38
38
switch self {
39
39
case . local_test:
@@ -44,7 +44,7 @@ enum DamusPurpleEnvironment: String, CaseIterable, Codable, Identifiable, String
44
44
Constants . PURPLE_LANDING_PAGE_PRODUCTION_URL
45
45
}
46
46
}
47
-
47
+
48
48
func damus_website_url( ) -> URL {
49
49
switch self {
50
50
case . local_test:
@@ -55,15 +55,15 @@ enum DamusPurpleEnvironment: String, CaseIterable, Codable, Identifiable, String
55
55
Constants . DAMUS_WEBSITE_PRODUCTION_URL
56
56
}
57
57
}
58
-
58
+
59
59
init ? ( from string: String ) {
60
60
guard let initialized = Self . init ( rawValue: string) else { return nil }
61
61
self = initialized
62
62
}
63
-
63
+
64
64
func to_string( ) -> String {
65
65
return self . rawValue
66
66
}
67
-
67
+
68
68
var id : String { self . rawValue }
69
69
}
0 commit comments