[App] Open settings #5

Merged
javier merged 10 commits from app/open-settings into main 2024-10-13 22:17:50 +00:00
3 changed files with 71 additions and 8 deletions
Showing only changes of commit da37cf60e6 - Show all commits

View File

@ -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"

View 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
}
}

View 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"
}
}
}