fix bugs and add tag order
1 parent 2cf9123 commit bc19aa350b615e70abd8b7471f8868bfeb5c5c30
yhornisse authored on 17 Sep 2023
Showing 11 changed files
View
10
Bremer.xcodeproj/project.pbxproj
38ECE1D12A4B31110044E913 /* LoginWebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38ECE1D02A4B31110044E913 /* LoginWebView.swift */; };
38FB93612A9A16FA00967B01 /* SettingViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38FB93602A9A16FA00967B01 /* SettingViewModel.swift */; };
38FB93632A9A257C00967B01 /* SettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38FB93622A9A257C00967B01 /* SettingView.swift */; };
38FB93672AA2DCA400967B01 /* SearchDetailAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38FB93662AA2DCA400967B01 /* SearchDetailAlertView.swift */; };
38FB936F2AA2DE5D00967B01 /* RenameAudioAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38FB936E2AA2DE5D00967B01 /* RenameAudioAlertView.swift */; };
5DA23E753A5913DC36665E82 /* Pods_Bremer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9ABE7FFD426EF8354B37CD27 /* Pods_Bremer.framework */; };
/* End PBXBuildFile section */
 
/* Begin PBXFileReference section */
38ECE1D02A4B31110044E913 /* LoginWebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginWebView.swift; sourceTree = "<group>"; };
38FB93602A9A16FA00967B01 /* SettingViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingViewModel.swift; sourceTree = "<group>"; };
38FB93622A9A257C00967B01 /* SettingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingView.swift; sourceTree = "<group>"; };
38FB93662AA2DCA400967B01 /* SearchDetailAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchDetailAlertView.swift; sourceTree = "<group>"; };
38FB936E2AA2DE5D00967B01 /* RenameAudioAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RenameAudioAlertView.swift; sourceTree = "<group>"; };
70A47812EFF9D6BB89E5CF8A /* Pods_BremerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BremerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
74CD6B89272147713072414F /* Pods_Bremer_BremerUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Bremer_BremerUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9ABE7FFD426EF8354B37CD27 /* Pods_Bremer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Bremer.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9EFB19BFE75A26E2FB4FFDF4 /* Pods-BremerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BremerTests.debug.xcconfig"; path = "Target Support Files/Pods-BremerTests/Pods-BremerTests.debug.xcconfig"; sourceTree = "<group>"; };
383999AE2A065DD3005DAB56 /* ContentView.swift */,
38ECE1D02A4B31110044E913 /* LoginWebView.swift */,
3847F0202A6447C700DDB350 /* PlaylistView.swift */,
3847F0222A64FAA900DDB350 /* SearchView.swift */,
38006C422A7E42240027A05C /* AudioPlayerView.swift */,
38006C442A7FEE640027A05C /* TagView.swift */,
38006C422A7E42240027A05C /* AudioPlayerView.swift */,
382AB95F2A8BBC5A00928393 /* ToastView.swift */,
382AB9612A90DC4300928393 /* LatestRecentlyPlayedView.swift */,
382AB96F2A93B9D900928393 /* LocalView.swift */,
38FB93622A9A257C00967B01 /* SettingView.swift */,
38317EDC2AAC12C0003193B7 /* RenameAudioView.swift */,
38317EDB2AABF9AA003193B7 /* Component */,
38FB93702AA2DE7500967B01 /* Alert */,
38317EDC2AAC12C0003193B7 /* RenameAudioView.swift */,
);
path = View;
sourceTree = "<group>";
};
};
38317EDB2AABF9AA003193B7 /* Component */ = {
isa = PBXGroup;
children = (
382AB95F2A8BBC5A00928393 /* ToastView.swift */,
38317ED92AA8BA15003193B7 /* NameAlertView.swift */,
3847F0282A6C121100DDB350 /* LoginButton.swift */,
);
path = Component;
38FB93702AA2DE7500967B01 /* Alert */ = {
isa = PBXGroup;
children = (
38FB93662AA2DCA400967B01 /* SearchDetailAlertView.swift */,
38FB936E2AA2DE5D00967B01 /* RenameAudioAlertView.swift */,
);
path = Alert;
sourceTree = "<group>";
};
38317EDA2AA8BA15003193B7 /* NameAlertView.swift in Sources */,
38006C412A7E3FCC0027A05C /* ApiModel.swift in Sources */,
382AB9662A93B88800928393 /* PlaylistAudioViewModel.swift in Sources */,
382AB9622A90DC4300928393 /* LatestRecentlyPlayedView.swift in Sources */,
38FB936F2AA2DE5D00967B01 /* RenameAudioAlertView.swift in Sources */,
3847F0292A6C121100DDB350 /* LoginButton.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
47
BremerApp/View/Alert/RenameAudioAlertView.swift 100644 → 0
//
// RenameAudioAlertView.swift
// Bremer
//
// Created by yhornisse on 2023/09/02.
//
 
 
import SwiftUI
 
struct RenameAudioAlertView : View {
@State
var audioInfo : AudioInfo
var onOk: (_ audioInfo: AudioInfo) -> Void
var onError: (_ message: String) -> Void
var body : some View {
TextField("曲名", text: $audioInfo.audioName)
TextField("歌手名", text: $audioInfo.artistName)
TextField("アルバム名", text: $audioInfo.albumName)
TextField("ローカルパス(変更不可)", text: $audioInfo.localPath)
.disabled(true) // TODO 効かないがいずれ治す
Button("OK", role: .cancel){
if audioInfo.audioName.isEmpty {
self.onError("名前の変更に失敗しました")
return
}
if audioInfo.albumName.isEmpty {
self.onError("名前の変更に失敗しました")
return
}
self.onOk(audioInfo)
clear()
}
Button("キャンセル", role: .destructive){
clear()
}
}
func clear() {
self.audioInfo.audioName = ""
self.audioInfo.artistName = ""
self.audioInfo.albumName = ""
}
}
 
View
BremerApp/View/Component/NameAlertView.swift
View
BremerApp/View/LatestRecentlyPlayedView.swift
View
BremerApp/View/PlaylistView.swift
View
BremerApp/View/RenameAudioView.swift
View
BremerApp/View/SearchView.swift
View
BremerApp/View/TagView.swift
View
BremerApp/ViewModel/AudioPlayerViewModel.swift
View
BremerApp/ViewModel/BremerApi.swift
View
BremerApp/ViewModel/TagAudioViewModel.swift