[App] Open settings #5
@ -1,12 +1,6 @@
|
||||
{
|
||||
"sourceLanguage" : "en",
|
||||
"strings" : {
|
||||
"Add Item" : {
|
||||
|
||||
},
|
||||
"Item at %@" : {
|
||||
|
||||
},
|
||||
"menu-bar.item.empty.button.text" : {
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
@ -48,8 +42,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Select an item" : {
|
||||
|
||||
"settings.tab-bar.repositories.text" : {
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Repositories"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"version" : "1.0"
|
||||
|
35
Piper/Sources/UI/Enumerations/SettingsItem.swift
Normal file
35
Piper/Sources/UI/Enumerations/SettingsItem.swift
Normal file
@ -0,0 +1,35 @@
|
||||
//
|
||||
// SettingsItem.swift
|
||||
// Piper ~ App
|
||||
//
|
||||
// Created by Javier Cicchelli on 13/10/2024.
|
||||
// Copyright © 2024 Röck+Cöde. All rights reserved.
|
||||
//
|
||||
|
||||
enum SettingsItem: Int, Hashable {
|
||||
case repositories = 0
|
||||
}
|
||||
|
||||
// MARK: - CaseIterable
|
||||
|
||||
extension SettingsItem: CaseIterable {
|
||||
|
||||
// MARK: Computed
|
||||
|
||||
var allCases: [SettingsItem] {
|
||||
[.repositories]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Identifiable
|
||||
|
||||
extension SettingsItem: Identifiable {
|
||||
|
||||
// MARK: Computed
|
||||
|
||||
var id: Int {
|
||||
rawValue
|
||||
}
|
||||
|
||||
}
|
27
Piper/Sources/UI/Extensions/SettingsItem+Properties.swift
Normal file
27
Piper/Sources/UI/Extensions/SettingsItem+Properties.swift
Normal file
@ -0,0 +1,27 @@
|
||||
//
|
||||
// SettingsItem+Properties.swift
|
||||
// Piper ~ App
|
||||
//
|
||||
// Created by Javier Cicchelli on 13/10/2024.
|
||||
// Copyright © 2024 Röck+Cöde. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
extension SettingsItem {
|
||||
|
||||
// MARK: Computed
|
||||
|
||||
var icon: String {
|
||||
switch self {
|
||||
case .repositories: "folder"
|
||||
}
|
||||
}
|
||||
|
||||
var title: LocalizedStringKey {
|
||||
switch self {
|
||||
case .repositories: "settings.tab-bar.repositories.text"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user