-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from makinosp/develop
Develop
- Loading branch information
Showing
21 changed files
with
555 additions
and
134 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// | ||
// URL+Identifiable.swift | ||
// Harmonie | ||
// | ||
// Created by makinosp on 2024/08/23. | ||
// | ||
|
||
import Foundation | ||
|
||
extension URL: Identifiable { | ||
public var id: Int { hashValue } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// ProfileEditViewModel.swift | ||
// Harmonie | ||
// | ||
// Created by makinosp on 2024/08/23. | ||
// | ||
|
||
import Foundation | ||
import VRCKit | ||
|
||
class ProfileEditViewModel: ObservableObject { | ||
@Published var editingUserInfo: EditableUserInfo | ||
private let id: String | ||
|
||
init(user: User) { | ||
editingUserInfo = EditableUserInfo(detail: user) | ||
id = user.id | ||
} | ||
|
||
func saveProfile(service: any UserServiceProtocol) async throws { | ||
try await service.updateUser( | ||
id: id, | ||
editedInfo: editingUserInfo | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// LanguagePickerView.swift | ||
// Harmonie | ||
// | ||
// Created by makinosp on 2024/08/23. | ||
// | ||
|
||
import SwiftUI | ||
import VRCKit | ||
|
||
struct LanguagePickerView: View { | ||
@Environment(\.dismiss) private var dismiss | ||
@Binding var selectedLanguage: LanguageTag? | ||
|
||
var body: some View { | ||
NavigationStack { | ||
Form { | ||
ForEach(LanguageTag.allCases) { languageTag in | ||
Button { | ||
selectedLanguage = languageTag | ||
dismiss() | ||
} label: { | ||
Text(languageTag.description) | ||
} | ||
} | ||
} | ||
.navigationTitle("Languages") | ||
.toolbarTitleDisplayMode(.inline) | ||
.toolbar { | ||
ToolbarItem(placement: .cancellationAction) { | ||
Button { | ||
dismiss() | ||
} label: { | ||
Text("Cancel") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.