This PR contains the work done to open the *Settings* view and also, implemented the rendering of its tab items. Reviewed-on: #5 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
37 lines
816 B
Swift
37 lines
816 B
Swift
//
|
|
// Repository+Samples.swift
|
|
// Piper ~ App
|
|
//
|
|
// Created by Javier Cicchelli on 06/10/2024.
|
|
// Copyright © 2024 Röck+Cöde. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import SwiftData
|
|
|
|
extension Repository {
|
|
|
|
// MARK: Functions
|
|
|
|
@MainActor
|
|
static func samples(in container: ModelContainer) {
|
|
let context = container.mainContext
|
|
|
|
context.insert(Repository(
|
|
URL(filePath: "/full/path/to/repository/name-0.git"),
|
|
sortOrder: 0
|
|
))
|
|
|
|
context.insert(Repository(
|
|
URL(filePath: "/full/path/to/repository/name-1.git"),
|
|
sortOrder: 1
|
|
))
|
|
|
|
context.insert(Repository(
|
|
URL(filePath: "/full/path/to/repository/name-2.git"),
|
|
sortOrder: 2
|
|
))
|
|
}
|
|
|
|
}
|