mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
Working artist browser
This commit is contained in:
parent
89320037b7
commit
0a318ce81e
@ -54,6 +54,9 @@
|
||||
E440519C227BAF2E0090CD6F /* UIActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E440519B227BAF2E0090CD6F /* UIActions.swift */; };
|
||||
E440519E227BB0720090CD6F /* UIReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = E440519D227BB0720090CD6F /* UIReducer.swift */; };
|
||||
E44051A0227BB0AB0090CD6F /* UIState.swift in Sources */ = {isa = PBXBuildFile; fileRef = E440519F227BB0AB0090CD6F /* UIState.swift */; };
|
||||
E442CCCD2347E73C00004E0C /* Artist.swift in Sources */ = {isa = PBXBuildFile; fileRef = E442CCCC2347E73C00004E0C /* Artist.swift */; };
|
||||
E442CCCF2347E90800004E0C /* ArtistViewItem.xib in Resources */ = {isa = PBXBuildFile; fileRef = E442CCCE2347E90800004E0C /* ArtistViewItem.xib */; };
|
||||
E442CCD12347EAEB00004E0C /* ArtistViewItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E442CCD02347EAEB00004E0C /* ArtistViewItem.swift */; };
|
||||
E450AD7E222620A10091BED3 /* Album.swift in Sources */ = {isa = PBXBuildFile; fileRef = E450AD7D222620A10091BED3 /* Album.swift */; };
|
||||
E450AD9522262DF10091BED3 /* CoverArtQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = E450AD9422262DF10091BED3 /* CoverArtQueue.swift */; };
|
||||
E451E36B22BD214D008BE9B2 /* DraggedSongType.swift in Sources */ = {isa = PBXBuildFile; fileRef = E451E36A22BD214D008BE9B2 /* DraggedSongType.swift */; };
|
||||
@ -67,9 +70,8 @@
|
||||
E47E2FD122205C4600F747E6 /* MainSplitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47E2FD022205C4600F747E6 /* MainSplitViewController.swift */; };
|
||||
E47E2FD322205D2500F747E6 /* MainWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47E2FD222205D2500F747E6 /* MainWindow.swift */; };
|
||||
E47E2FD5222071FD00F747E6 /* AlbumViewItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47E2FD4222071FD00F747E6 /* AlbumViewItem.swift */; };
|
||||
E47E2FD72220720300F747E6 /* AlbumItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47E2FD62220720300F747E6 /* AlbumItemView.swift */; };
|
||||
E47E2FDD2220A6D100F747E6 /* Time.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47E2FDC2220A6D100F747E6 /* Time.swift */; };
|
||||
E47E2FE52220AA0700F747E6 /* AlbumViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47E2FE42220AA0700F747E6 /* AlbumViewLayout.swift */; };
|
||||
E47E2FE52220AA0700F747E6 /* FlexibleGridViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47E2FE42220AA0700F747E6 /* FlexibleGridViewLayout.swift */; };
|
||||
E489E39922B85D0400CA8CBD /* NSPasteboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = E489E39822B85D0400CA8CBD /* NSPasteboard.swift */; };
|
||||
E489E39D22B9CF0000CA8CBD /* NSView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E489E39C22B9CF0000CA8CBD /* NSView.swift */; };
|
||||
E489E3A422B9D31800CA8CBD /* DraggedSongView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E489E3A222B9D31800CA8CBD /* DraggedSongView.swift */; };
|
||||
@ -103,11 +105,8 @@
|
||||
E4B11BC02275EE150075461B /* QueueActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4B11BBF2275EE150075461B /* QueueActions.swift */; };
|
||||
E4B11BC22275EE410075461B /* AlbumListActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4B11BC12275EE410075461B /* AlbumListActions.swift */; };
|
||||
E4B5AE7E22F4C49600CCEC65 /* MPDServerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4B5AE7D22F4C49600CCEC65 /* MPDServerDelegate.swift */; };
|
||||
E4BBD2E923356DC100702C16 /* BrowseViewButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4BBD2E823356DC100702C16 /* BrowseViewButton.swift */; };
|
||||
E4BBD2EB2335735500702C16 /* BrowseController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4BBD2EA2335735500702C16 /* BrowseController.swift */; };
|
||||
E4BBD2ED2335798E00702C16 /* ArtistViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4BBD2EC2335798E00702C16 /* ArtistViewController.swift */; };
|
||||
E4BBD2F0233579EF00702C16 /* ArtistViewItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4BBD2EE233579EF00702C16 /* ArtistViewItem.swift */; };
|
||||
E4BBD2F1233579EF00702C16 /* ArtistViewItem.xib in Resources */ = {isa = PBXBuildFile; fileRef = E4BBD2EF233579EF00702C16 /* ArtistViewItem.xib */; };
|
||||
E4BBD2F323357C0700702C16 /* ArtistListState.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4BBD2F223357C0700702C16 /* ArtistListState.swift */; };
|
||||
E4C8B53C22342005009A20F3 /* PreferencesWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4C8B53B22342005009A20F3 /* PreferencesWindowController.swift */; };
|
||||
E4C8B53E22349002009A20F3 /* MPDIdle.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4C8B53D22349002009A20F3 /* MPDIdle.swift */; };
|
||||
@ -120,11 +119,9 @@
|
||||
E4EB2379220F10B8008C70C0 /* MPDPair.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4EB2378220F10B8008C70C0 /* MPDPair.swift */; };
|
||||
E4EB237B220F7CF1008C70C0 /* MPDAlbum.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4EB237A220F7CF1008C70C0 /* MPDAlbum.swift */; };
|
||||
E4F26F732341166200D45FF9 /* ArtistDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F26F722341166200D45FF9 /* ArtistDataSource.swift */; };
|
||||
E4F26F75234117D600D45FF9 /* ArtistItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F26F74234117D600D45FF9 /* ArtistItemView.swift */; };
|
||||
E4F26F7723411AE300D45FF9 /* ArtistListActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F26F7623411AE300D45FF9 /* ArtistListActions.swift */; };
|
||||
E4F26F7923411B1500D45FF9 /* ArtistReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F26F7823411B1500D45FF9 /* ArtistReducer.swift */; };
|
||||
E4F26F7B23411D5400D45FF9 /* MPDClient+Artist.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F26F7A23411D5400D45FF9 /* MPDClient+Artist.swift */; };
|
||||
E4F26F7D2341441C00D45FF9 /* ArtistViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F26F7C2341441C00D45FF9 /* ArtistViewLayout.swift */; };
|
||||
E4F6B460221E119B00ACF42A /* QueueDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F6B45F221E119B00ACF42A /* QueueDataSource.swift */; };
|
||||
E4F6B463221E125900ACF42A /* QueueItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F6B462221E125900ACF42A /* QueueItem.swift */; };
|
||||
E4F6B467221E233200ACF42A /* AlbumDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4F6B466221E233200ACF42A /* AlbumDataSource.swift */; };
|
||||
@ -266,6 +263,9 @@
|
||||
E440519B227BAF2E0090CD6F /* UIActions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIActions.swift; sourceTree = "<group>"; };
|
||||
E440519D227BB0720090CD6F /* UIReducer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIReducer.swift; sourceTree = "<group>"; };
|
||||
E440519F227BB0AB0090CD6F /* UIState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIState.swift; sourceTree = "<group>"; };
|
||||
E442CCCC2347E73C00004E0C /* Artist.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Artist.swift; sourceTree = "<group>"; };
|
||||
E442CCCE2347E90800004E0C /* ArtistViewItem.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ArtistViewItem.xib; path = "Persephone/Components/Browser/Artist Browser/ArtistViewItem.xib"; sourceTree = SOURCE_ROOT; };
|
||||
E442CCD02347EAEB00004E0C /* ArtistViewItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ArtistViewItem.swift; path = "Persephone/Components/Browser/Artist Browser/ArtistViewItem.swift"; sourceTree = SOURCE_ROOT; };
|
||||
E450AD7D222620A10091BED3 /* Album.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Album.swift; sourceTree = "<group>"; };
|
||||
E450AD9422262DF10091BED3 /* CoverArtQueue.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoverArtQueue.swift; sourceTree = "<group>"; };
|
||||
E450AD9E2229B9BC0091BED3 /* PersephoneBridgingHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PersephoneBridgingHeader.h; sourceTree = "<group>"; };
|
||||
@ -279,9 +279,8 @@
|
||||
E47E2FD022205C4600F747E6 /* MainSplitViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainSplitViewController.swift; sourceTree = "<group>"; };
|
||||
E47E2FD222205D2500F747E6 /* MainWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainWindow.swift; sourceTree = "<group>"; };
|
||||
E47E2FD4222071FD00F747E6 /* AlbumViewItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlbumViewItem.swift; sourceTree = "<group>"; };
|
||||
E47E2FD62220720300F747E6 /* AlbumItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlbumItemView.swift; sourceTree = "<group>"; };
|
||||
E47E2FDC2220A6D100F747E6 /* Time.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Time.swift; sourceTree = "<group>"; };
|
||||
E47E2FE42220AA0700F747E6 /* AlbumViewLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlbumViewLayout.swift; sourceTree = "<group>"; };
|
||||
E47E2FE42220AA0700F747E6 /* FlexibleGridViewLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FlexibleGridViewLayout.swift; sourceTree = "<group>"; };
|
||||
E489E39822B85D0400CA8CBD /* NSPasteboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSPasteboard.swift; sourceTree = "<group>"; };
|
||||
E489E39C22B9CF0000CA8CBD /* NSView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSView.swift; sourceTree = "<group>"; };
|
||||
E489E3A222B9D31800CA8CBD /* DraggedSongView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DraggedSongView.swift; sourceTree = "<group>"; };
|
||||
@ -308,11 +307,8 @@
|
||||
E4B11BBF2275EE150075461B /* QueueActions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QueueActions.swift; sourceTree = "<group>"; };
|
||||
E4B11BC12275EE410075461B /* AlbumListActions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlbumListActions.swift; sourceTree = "<group>"; };
|
||||
E4B5AE7D22F4C49600CCEC65 /* MPDServerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPDServerDelegate.swift; sourceTree = "<group>"; };
|
||||
E4BBD2E823356DC100702C16 /* BrowseViewButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowseViewButton.swift; sourceTree = "<group>"; };
|
||||
E4BBD2EA2335735500702C16 /* BrowseController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowseController.swift; sourceTree = "<group>"; };
|
||||
E4BBD2EC2335798E00702C16 /* ArtistViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtistViewController.swift; sourceTree = "<group>"; };
|
||||
E4BBD2EE233579EF00702C16 /* ArtistViewItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtistViewItem.swift; sourceTree = "<group>"; };
|
||||
E4BBD2EF233579EF00702C16 /* ArtistViewItem.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ArtistViewItem.xib; sourceTree = "<group>"; };
|
||||
E4BBD2F223357C0700702C16 /* ArtistListState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtistListState.swift; sourceTree = "<group>"; };
|
||||
E4C8B53B22342005009A20F3 /* PreferencesWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferencesWindowController.swift; sourceTree = "<group>"; };
|
||||
E4C8B53D22349002009A20F3 /* MPDIdle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPDIdle.swift; sourceTree = "<group>"; };
|
||||
@ -324,11 +320,9 @@
|
||||
E4EB2378220F10B8008C70C0 /* MPDPair.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPDPair.swift; sourceTree = "<group>"; };
|
||||
E4EB237A220F7CF1008C70C0 /* MPDAlbum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPDAlbum.swift; sourceTree = "<group>"; };
|
||||
E4F26F722341166200D45FF9 /* ArtistDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtistDataSource.swift; sourceTree = "<group>"; };
|
||||
E4F26F74234117D600D45FF9 /* ArtistItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtistItemView.swift; sourceTree = "<group>"; };
|
||||
E4F26F7623411AE300D45FF9 /* ArtistListActions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtistListActions.swift; sourceTree = "<group>"; };
|
||||
E4F26F7823411B1500D45FF9 /* ArtistReducer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtistReducer.swift; sourceTree = "<group>"; };
|
||||
E4F26F7A23411D5400D45FF9 /* MPDClient+Artist.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MPDClient+Artist.swift"; sourceTree = "<group>"; };
|
||||
E4F26F7C2341441C00D45FF9 /* ArtistViewLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtistViewLayout.swift; sourceTree = "<group>"; };
|
||||
E4F6B45F221E119B00ACF42A /* QueueDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QueueDataSource.swift; sourceTree = "<group>"; };
|
||||
E4F6B462221E125900ACF42A /* QueueItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QueueItem.swift; sourceTree = "<group>"; };
|
||||
E4F6B466221E233200ACF42A /* AlbumDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlbumDataSource.swift; sourceTree = "<group>"; };
|
||||
@ -399,25 +393,19 @@
|
||||
E407861A2110CE6E006887B1 /* Persephone */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E407861B2110CE6E006887B1 /* AppDelegate.swift */,
|
||||
E44051932278765A0090CD6F /* App.swift */,
|
||||
E407861B2110CE6E006887B1 /* AppDelegate.swift */,
|
||||
E407861F2110CE70006887B1 /* Assets.xcassets */,
|
||||
E4D1B597220BA3A20026F233 /* Controllers */,
|
||||
E4F6B45E221E117600ACF42A /* DataSources */,
|
||||
E408D3B7220DE8CC0006D9BE /* Extensions */,
|
||||
E442CCC42347D5B900004E0C /* Components */,
|
||||
E41B22C721FB966C00D544F6 /* include */,
|
||||
E40786242110CE70006887B1 /* Info.plist */,
|
||||
E47E2FE32220AA0700F747E6 /* Layouts */,
|
||||
E4F6B461221E124700ACF42A /* Models */,
|
||||
E4A642DB220912FA00067D21 /* MPDClient */,
|
||||
E450AD8922262B420091BED3 /* Operations */,
|
||||
E40786252110CE70006887B1 /* Persephone.entitlements */,
|
||||
E450AD9E2229B9BC0091BED3 /* PersephoneBridgingHeader.h */,
|
||||
E4A83BEC2221F5DD0098FED6 /* Preferences */,
|
||||
E4D1B598220BA3C90026F233 /* Resources */,
|
||||
E4A83BF2222207BE0098FED6 /* Services */,
|
||||
E4B11B64226A4F460075461B /* State */,
|
||||
E408D3C3220E138B0006D9BE /* Views */,
|
||||
);
|
||||
path = Persephone;
|
||||
sourceTree = "<group>";
|
||||
@ -475,24 +463,6 @@
|
||||
path = Extensions;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E408D3C3220E138B0006D9BE /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E43AC1F722C7065A001E483C /* AlbumCoverButton.swift */,
|
||||
E4A3A6A022A457B600EA2C40 /* AlbumDetailSongListView.swift */,
|
||||
E45878372296173C00586A1C /* AlbumDetailSongRowView.swift */,
|
||||
E47E2FD62220720300F747E6 /* AlbumItemView.swift */,
|
||||
E4F26F74234117D600D45FF9 /* ArtistItemView.swift */,
|
||||
E4BBD2E823356DC100702C16 /* BrowseViewButton.swift */,
|
||||
E4B11BB7227538FA0075461B /* CurrentCoverArtView.swift */,
|
||||
E489E3A222B9D31800CA8CBD /* DraggedSongView.swift */,
|
||||
E47E2FD222205D2500F747E6 /* MainWindow.swift */,
|
||||
E423563F228623D2001216D6 /* QueueSongTitleView.swift */,
|
||||
E4120D6B22AD8139004CB1F8 /* QueueView.swift */,
|
||||
);
|
||||
path = Views;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E41B22BE21FB6B3300D544F6 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -562,6 +532,104 @@
|
||||
path = Extensions;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCC42347D5B900004E0C /* Components */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E442CCCB2347D77A00004E0C /* Browser */,
|
||||
E4A83BEC2221F5DD0098FED6 /* Preferences */,
|
||||
E442CCC62347D5E700004E0C /* Queue */,
|
||||
E442CCC92347D6FD00004E0C /* Shared */,
|
||||
E442CCC52347D5CA00004E0C /* Window */,
|
||||
);
|
||||
path = Components;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCC52347D5CA00004E0C /* Window */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E40786212110CE70006887B1 /* Main.storyboard */,
|
||||
E47E2FD022205C4600F747E6 /* MainSplitViewController.swift */,
|
||||
E47E2FD222205D2500F747E6 /* MainWindow.swift */,
|
||||
E465049921E94DF500A70F4C /* WindowController.swift */,
|
||||
);
|
||||
path = Window;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCC62347D5E700004E0C /* Queue */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4B11BB7227538FA0075461B /* CurrentCoverArtView.swift */,
|
||||
E4F6B45F221E119B00ACF42A /* QueueDataSource.swift */,
|
||||
E423563F228623D2001216D6 /* QueueSongTitleView.swift */,
|
||||
E4120D6B22AD8139004CB1F8 /* QueueView.swift */,
|
||||
E4E8CC912204F4B80024217A /* QueueViewController.swift */,
|
||||
E4D3BFA522B419C000C56F48 /* QueueViewController+NSOutlineViewDelegate.swift */,
|
||||
);
|
||||
path = Queue;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCC72347D62F00004E0C /* Album Browser */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E408D3C9220E341D0006D9BE /* AlbumViewItem.xib */,
|
||||
E43AC1F722C7065A001E483C /* AlbumCoverButton.swift */,
|
||||
E4F6B466221E233200ACF42A /* AlbumDataSource.swift */,
|
||||
E408D3C1220E134F0006D9BE /* AlbumViewController.swift */,
|
||||
E43AC1F222C6A439001E483C /* AlbumViewController+NSCollectionViewDelegate.swift */,
|
||||
E47E2FD4222071FD00F747E6 /* AlbumViewItem.swift */,
|
||||
);
|
||||
path = "Album Browser";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCC82347D65300004E0C /* Album Detail */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E43B67A922909793007DCF55 /* AlbumDetailView.xib */,
|
||||
E4A3A6A022A457B600EA2C40 /* AlbumDetailSongListView.swift */,
|
||||
E45878372296173C00586A1C /* AlbumDetailSongRowView.swift */,
|
||||
E43B67A822909793007DCF55 /* AlbumDetailView.swift */,
|
||||
E4E7A6AC22AAAF98006D566C /* AlbumDetailView+NSTableViewDelegate.swift */,
|
||||
E43B67AC229194CD007DCF55 /* AlbumTracksDataSource.swift */,
|
||||
);
|
||||
path = "Album Detail";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCC92347D6FD00004E0C /* Shared */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4E13C2C2350D8CB00092A6E /* Layouts */,
|
||||
E408D3B7220DE8CC0006D9BE /* Extensions */,
|
||||
E489E3A222B9D31800CA8CBD /* DraggedSongView.swift */,
|
||||
E489E3A322B9D31800CA8CBD /* DraggedSongView.xib */,
|
||||
E4405191227644340090CD6F /* MPDServerController.swift */,
|
||||
E4B5AE7D22F4C49600CCEC65 /* MPDServerDelegate.swift */,
|
||||
E4B11BB52275374B0075461B /* UserNotificationsController.swift */,
|
||||
);
|
||||
path = Shared;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCCA2347D74B00004E0C /* Artist Browser */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E442CCCE2347E90800004E0C /* ArtistViewItem.xib */,
|
||||
E4F26F722341166200D45FF9 /* ArtistDataSource.swift */,
|
||||
E442CCD02347EAEB00004E0C /* ArtistViewItem.swift */,
|
||||
E4BBD2EC2335798E00702C16 /* ArtistViewController.swift */,
|
||||
);
|
||||
path = "Artist Browser";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E442CCCB2347D77A00004E0C /* Browser */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E442CCC82347D65300004E0C /* Album Detail */,
|
||||
E442CCC72347D62F00004E0C /* Album Browser */,
|
||||
E442CCCA2347D74B00004E0C /* Artist Browser */,
|
||||
E4BBD2EA2335735500702C16 /* BrowseController.swift */,
|
||||
);
|
||||
path = Browser;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E450AD8922262B420091BED3 /* Operations */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -570,15 +638,6 @@
|
||||
path = Operations;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E47E2FE32220AA0700F747E6 /* Layouts */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E47E2FE42220AA0700F747E6 /* AlbumViewLayout.swift */,
|
||||
E4F26F7C2341441C00D45FF9 /* ArtistViewLayout.swift */,
|
||||
);
|
||||
path = Layouts;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4A642DB220912FA00067D21 /* MPDClient */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -591,14 +650,6 @@
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4A83BEC2221F5DD0098FED6 /* Preferences */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4A83BED2221F5E60098FED6 /* Controllers */,
|
||||
);
|
||||
path = Preferences;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4A83BED2221F5E60098FED6 /* Controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4A83BEE2221F8CF0098FED6 /* CoverArtPrefsController.swift */,
|
||||
@ -606,15 +657,15 @@
|
||||
E4A83BF02221FAA00098FED6 /* PreferencesViewController.swift */,
|
||||
E4C8B53B22342005009A20F3 /* PreferencesWindowController.swift */,
|
||||
);
|
||||
path = Controllers;
|
||||
path = Preferences;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4A83BF2222207BE0098FED6 /* Services */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E41E530C223EF4BA00173814 /* Extensions */,
|
||||
E4A83BF3222207D50098FED6 /* CoverArtService.swift */,
|
||||
E439109722640213002982E9 /* SongNotifierService.swift */,
|
||||
E41E530C223EF4BA00173814 /* Extensions */,
|
||||
);
|
||||
path = Services;
|
||||
sourceTree = "<group>";
|
||||
@ -637,13 +688,13 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4B11B6B226A5AF50075461B /* Actions */,
|
||||
E4B11B5F226A4BED0075461B /* Reducers */,
|
||||
E4B11B69226A4FBC0075461B /* AlbumListState.swift */,
|
||||
E4B11B52226928F20075461B /* AppState.swift */,
|
||||
E4BBD2F223357C0700702C16 /* ArtistListState.swift */,
|
||||
E4B11B65226A4F830075461B /* PlayerState.swift */,
|
||||
E4FF718D2276010E00D4C412 /* PreferencesState.swift */,
|
||||
E4B11B67226A4FA00075461B /* QueueState.swift */,
|
||||
E4B11B5F226A4BED0075461B /* Reducers */,
|
||||
E440519F227BB0AB0090CD6F /* UIState.swift */,
|
||||
);
|
||||
path = State;
|
||||
@ -684,64 +735,28 @@
|
||||
path = Protocols;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4D1B597220BA3A20026F233 /* Controllers */ = {
|
||||
E4E13C2C2350D8CB00092A6E /* Layouts */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E43B67A822909793007DCF55 /* AlbumDetailView.swift */,
|
||||
E4E7A6AC22AAAF98006D566C /* AlbumDetailView+NSTableViewDelegate.swift */,
|
||||
E408D3C1220E134F0006D9BE /* AlbumViewController.swift */,
|
||||
E43AC1F222C6A439001E483C /* AlbumViewController+NSCollectionViewDelegate.swift */,
|
||||
E47E2FD4222071FD00F747E6 /* AlbumViewItem.swift */,
|
||||
E4BBD2EC2335798E00702C16 /* ArtistViewController.swift */,
|
||||
E4BBD2EE233579EF00702C16 /* ArtistViewItem.swift */,
|
||||
E4BBD2EA2335735500702C16 /* BrowseController.swift */,
|
||||
E47E2FD022205C4600F747E6 /* MainSplitViewController.swift */,
|
||||
E4405191227644340090CD6F /* MPDServerController.swift */,
|
||||
E4B5AE7D22F4C49600CCEC65 /* MPDServerDelegate.swift */,
|
||||
E4E8CC912204F4B80024217A /* QueueViewController.swift */,
|
||||
E4D3BFA522B419C000C56F48 /* QueueViewController+NSOutlineViewDelegate.swift */,
|
||||
E4B11BB52275374B0075461B /* UserNotificationsController.swift */,
|
||||
E465049921E94DF500A70F4C /* WindowController.swift */,
|
||||
E47E2FE42220AA0700F747E6 /* FlexibleGridViewLayout.swift */,
|
||||
);
|
||||
path = Controllers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4D1B598220BA3C90026F233 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4BBD2EF233579EF00702C16 /* ArtistViewItem.xib */,
|
||||
E43B67A922909793007DCF55 /* AlbumDetailView.xib */,
|
||||
E408D3C9220E341D0006D9BE /* AlbumViewItem.xib */,
|
||||
E489E3A322B9D31800CA8CBD /* DraggedSongView.xib */,
|
||||
E40786212110CE70006887B1 /* Main.storyboard */,
|
||||
);
|
||||
path = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4F6B45E221E117600ACF42A /* DataSources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E4F6B466221E233200ACF42A /* AlbumDataSource.swift */,
|
||||
E4F6B45F221E119B00ACF42A /* QueueDataSource.swift */,
|
||||
E43B67AC229194CD007DCF55 /* AlbumTracksDataSource.swift */,
|
||||
E4F26F722341166200D45FF9 /* ArtistDataSource.swift */,
|
||||
);
|
||||
path = DataSources;
|
||||
path = Layouts;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E4F6B461221E124700ACF42A /* Models */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E450AD7D222620A10091BED3 /* Album.swift */,
|
||||
E442CCCC2347E73C00004E0C /* Artist.swift */,
|
||||
E43AC1F422C6A4F4001E483C /* DraggedAlbum.swift */,
|
||||
E451E36C22BD23DB008BE9B2 /* DraggedSong.swift */,
|
||||
E451E36A22BD214D008BE9B2 /* DraggedSongType.swift */,
|
||||
E4B11BA82274EDE30075461B /* Loading.swift */,
|
||||
E4FF71932276043A00D4C412 /* MPDServer.swift */,
|
||||
E4F6B462221E125900ACF42A /* QueueItem.swift */,
|
||||
E419E2862249B96600216A8C /* Song.swift */,
|
||||
E47E2FDC2220A6D100F747E6 /* Time.swift */,
|
||||
E4B11B72226A6C770075461B /* TrackTimer.swift */,
|
||||
E451E36A22BD214D008BE9B2 /* DraggedSongType.swift */,
|
||||
E451E36C22BD23DB008BE9B2 /* DraggedSong.swift */,
|
||||
E43AC1F422C6A4F4001E483C /* DraggedAlbum.swift */,
|
||||
);
|
||||
path = Models;
|
||||
sourceTree = "<group>";
|
||||
@ -890,7 +905,7 @@
|
||||
E40786202110CE70006887B1 /* Assets.xcassets in Resources */,
|
||||
E42A8F3C22176D6400A13ED9 /* README.md in Resources */,
|
||||
E408D3CB220E341D0006D9BE /* AlbumViewItem.xib in Resources */,
|
||||
E4BBD2F1233579EF00702C16 /* ArtistViewItem.xib in Resources */,
|
||||
E442CCCF2347E90800004E0C /* ArtistViewItem.xib in Resources */,
|
||||
E40786232110CE70006887B1 /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -955,21 +970,19 @@
|
||||
E4F6B460221E119B00ACF42A /* QueueDataSource.swift in Sources */,
|
||||
E4C8B53C22342005009A20F3 /* PreferencesWindowController.swift in Sources */,
|
||||
E4B11B63226A4C510075461B /* AppReducer.swift in Sources */,
|
||||
E4BBD2F0233579EF00702C16 /* ArtistViewItem.swift in Sources */,
|
||||
E41E5307223C019100173814 /* MPDClient+Status.swift in Sources */,
|
||||
E41E5310223EF6CE00173814 /* CoverArtService+Remote.swift in Sources */,
|
||||
E442CCCD2347E73C00004E0C /* Artist.swift in Sources */,
|
||||
E41E530B223C033700173814 /* MPDClient+Album.swift in Sources */,
|
||||
E42410B62241B956005ED6DF /* MPDClient+Database.swift in Sources */,
|
||||
E4235640228623D2001216D6 /* QueueSongTitleView.swift in Sources */,
|
||||
E451E36E22BD2501008BE9B2 /* DraggedSong.swift in Sources */,
|
||||
E4A642DA22090CBE00067D21 /* MPDStatus.swift in Sources */,
|
||||
E4B11BC02275EE150075461B /* QueueActions.swift in Sources */,
|
||||
E47E2FD72220720300F747E6 /* AlbumItemView.swift in Sources */,
|
||||
E450AD9522262DF10091BED3 /* CoverArtQueue.swift in Sources */,
|
||||
E43B67AD229194CD007DCF55 /* AlbumTracksDataSource.swift in Sources */,
|
||||
E41E52FD223BF87300173814 /* MPDClient+Connection.swift in Sources */,
|
||||
E450AD7E222620A10091BED3 /* Album.swift in Sources */,
|
||||
E4F26F7D2341441C00D45FF9 /* ArtistViewLayout.swift in Sources */,
|
||||
E408D3B6220DD8970006D9BE /* Notification.swift in Sources */,
|
||||
E43AC1F822C7065A001E483C /* AlbumCoverButton.swift in Sources */,
|
||||
E45962C62241A78500FC1A1E /* MPDCommand.swift in Sources */,
|
||||
@ -1000,14 +1013,12 @@
|
||||
E407861C2110CE6E006887B1 /* AppDelegate.swift in Sources */,
|
||||
E4B11B75226CC4D30075461B /* QueueReducer.swift in Sources */,
|
||||
E41E5309223C020400173814 /* MPDClient+Command.swift in Sources */,
|
||||
E4BBD2E923356DC100702C16 /* BrowseViewButton.swift in Sources */,
|
||||
E4F26F7923411B1500D45FF9 /* ArtistReducer.swift in Sources */,
|
||||
E4B11B73226A6C770075461B /* TrackTimer.swift in Sources */,
|
||||
E4BBD2EB2335735500702C16 /* BrowseController.swift in Sources */,
|
||||
E44051942278765A0090CD6F /* App.swift in Sources */,
|
||||
E4B11B79226D346B0075461B /* AlbumListReducer.swift in Sources */,
|
||||
E47E2FE52220AA0700F747E6 /* AlbumViewLayout.swift in Sources */,
|
||||
E4F26F75234117D600D45FF9 /* ArtistItemView.swift in Sources */,
|
||||
E47E2FE52220AA0700F747E6 /* FlexibleGridViewLayout.swift in Sources */,
|
||||
E41E52FF223BF95E00173814 /* MPDClient+Transport.swift in Sources */,
|
||||
E47E2FD322205D2500F747E6 /* MainWindow.swift in Sources */,
|
||||
E47E2FD122205C4600F747E6 /* MainSplitViewController.swift in Sources */,
|
||||
@ -1024,6 +1035,7 @@
|
||||
E4B11BBE2275EDAA0075461B /* PlayerActions.swift in Sources */,
|
||||
E4F26F7723411AE300D45FF9 /* ArtistListActions.swift in Sources */,
|
||||
E4FF71942276043A00D4C412 /* MPDServer.swift in Sources */,
|
||||
E442CCD12347EAEB00004E0C /* ArtistViewItem.swift in Sources */,
|
||||
E41E530E223EF4CF00173814 /* CoverArtService+Caching.swift in Sources */,
|
||||
E4E8CC922204F4B80024217A /* QueueViewController.swift in Sources */,
|
||||
E440519C227BAF2E0090CD6F /* UIActions.swift in Sources */,
|
||||
|
||||
@ -13,6 +13,7 @@ import Differ
|
||||
class AlbumViewController: NSViewController,
|
||||
NSCollectionViewDelegateFlowLayout {
|
||||
var dataSource = AlbumDataSource()
|
||||
let layout = FlexibleGridViewLayout(coder: NSCoder())
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
@ -27,6 +28,8 @@ class AlbumViewController: NSViewController,
|
||||
albumScrollView.postsBoundsChangedNotifications = true
|
||||
|
||||
albumCollectionView.dataSource = dataSource
|
||||
layout?.extraHeight = 44
|
||||
albumCollectionView.collectionViewLayout = layout
|
||||
|
||||
registerForDragAndDrop(albumCollectionView)
|
||||
}
|
||||
@ -38,7 +41,7 @@ class AlbumViewController: NSViewController,
|
||||
override func viewWillLayout() {
|
||||
super.viewWillLayout()
|
||||
|
||||
if let layout = albumCollectionView.collectionViewLayout as? AlbumViewLayout {
|
||||
if let layout = albumCollectionView.collectionViewLayout as? FlexibleGridViewLayout {
|
||||
layout.saveScrollPosition()
|
||||
}
|
||||
|
||||
@ -48,7 +51,7 @@ class AlbumViewController: NSViewController,
|
||||
override func viewDidLayout() {
|
||||
super.viewDidLayout()
|
||||
|
||||
guard let layout = albumCollectionView.collectionViewLayout as? AlbumViewLayout
|
||||
guard let layout = albumCollectionView.collectionViewLayout as? FlexibleGridViewLayout
|
||||
else { return }
|
||||
|
||||
layout.setScrollPosition()
|
||||
@ -73,7 +76,7 @@ extension AlbumViewController: StoreSubscriber {
|
||||
|
||||
func newState(state: StoreSubscriberStateType) {
|
||||
let oldAlbums = dataSource.albums
|
||||
|
||||
|
||||
dataSource.albums = state.albums
|
||||
|
||||
albumCollectionView.animateItemChanges(
|
||||
@ -17,7 +17,7 @@
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView id="Hz6-mo-xeY" customClass="AlbumItemView" customModule="Persephone" customModuleProvider="target">
|
||||
<customView identifier="albumViewItem" id="Hz6-mo-xeY">
|
||||
<rect key="frame" x="0.0" y="0.0" width="158" height="192"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14868" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14868"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@ -22,7 +22,7 @@
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="m2v-pR-e9v">
|
||||
<rect key="frame" x="357" y="514" width="448" height="29"/>
|
||||
<rect key="frame" x="357" y="515" width="448" height="28"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="444" id="erC-QS-9hc"/>
|
||||
</constraints>
|
||||
@ -33,7 +33,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4Jx-I5-Nkv">
|
||||
<rect key="frame" x="357" y="487" width="448" height="19"/>
|
||||
<rect key="frame" x="357" y="488" width="448" height="19"/>
|
||||
<textFieldCell key="cell" title="Artist Name" id="ztJ-4E-qvI">
|
||||
<font key="font" metaFont="system" size="16"/>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -53,28 +53,14 @@
|
||||
</shadow>
|
||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="defaultCoverArt" id="scE-kj-gex"/>
|
||||
</imageView>
|
||||
<button verticalHuggingPriority="750" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jMU-bv-TNF">
|
||||
<rect key="frame" x="31" y="184" width="119" height="35"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="33" id="2uQ-mC-4QY"/>
|
||||
<constraint firstAttribute="width" constant="119" id="h2n-ZB-Ufr"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="smallSquare" title="Play Album" bezelStyle="smallSquare" image="playButton" imagePosition="left" alignment="center" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Rtg-Zd-JYc">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="playAlbum:" target="-2" id="LTw-Lg-yH2"/>
|
||||
</connections>
|
||||
</button>
|
||||
<scrollView horizontalCompressionResistancePriority="250" borderType="none" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" hasHorizontalScroller="NO" horizontalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="BOb-Lr-10M">
|
||||
<rect key="frame" x="359" y="33" width="444" height="425"/>
|
||||
<rect key="frame" x="359" y="33" width="444" height="426"/>
|
||||
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="9QN-UB-b4l">
|
||||
<rect key="frame" x="0.0" y="0.0" width="444" height="425"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="444" height="426"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="none" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" viewBased="YES" id="ehr-qh-87Q" customClass="AlbumDetailSongListView" customModule="Persephone" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="444" height="425"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="444" height="426"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<size key="intercellSpacing" width="3" height="2"/>
|
||||
<color key="backgroundColor" red="0.11764705882352941" green="0.11764705882352941" blue="0.11764705882352941" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
@ -98,7 +84,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="6eU-Jx-HDR">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="17"/>
|
||||
<rect key="frame" x="0.0" y="1" width="40" height="16"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="left" title="1." id="Z5y-oS-Qm8">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -120,7 +106,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="nwx-zY-r5o">
|
||||
<rect key="frame" x="0.0" y="0.0" width="441" height="17"/>
|
||||
<rect key="frame" x="0.0" y="1" width="441" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="437" id="irN-AG-Pcj"/>
|
||||
</constraints>
|
||||
@ -159,7 +145,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="R8t-bV-9LI">
|
||||
<rect key="frame" x="0.0" y="0.0" width="353" height="17"/>
|
||||
<rect key="frame" x="0.0" y="1" width="353" height="16"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="left" title="My Song Title" id="Sdi-jJ-EOM">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -196,7 +182,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="pCr-f1-wNs">
|
||||
<rect key="frame" x="0.0" y="0.0" width="42" height="17"/>
|
||||
<rect key="frame" x="0.0" y="1" width="42" height="16"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="right" title="0:00" id="Qe2-WO-eXr">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -233,6 +219,20 @@
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
</scrollView>
|
||||
<button verticalHuggingPriority="750" misplaced="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jMU-bv-TNF">
|
||||
<rect key="frame" x="31" y="32" width="119" height="35"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="33" id="2uQ-mC-4QY"/>
|
||||
<constraint firstAttribute="width" constant="119" id="h2n-ZB-Ufr"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="smallSquare" title="Play Album" bezelStyle="smallSquare" image="playButton" imagePosition="left" alignment="center" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Rtg-Zd-JYc">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="playAlbum:" target="-2" id="LTw-Lg-yH2"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="FWd-vZ-5CT" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="31" id="694-aS-G4N"/>
|
||||
@ -9,7 +9,7 @@
|
||||
import AppKit
|
||||
|
||||
class ArtistDataSource: NSObject, NSCollectionViewDataSource {
|
||||
var artists: [String] = []
|
||||
var artists: [Artist] = []
|
||||
|
||||
func collectionView(_ collectionView: NSCollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
return artists.count
|
||||
@ -17,9 +17,9 @@ class ArtistDataSource: NSObject, NSCollectionViewDataSource {
|
||||
|
||||
func collectionView(_ collectionView: NSCollectionView, itemForRepresentedObjectAt indexPath: IndexPath) -> NSCollectionViewItem {
|
||||
let item = collectionView.makeItem(withIdentifier: .artistViewItem, for: indexPath)
|
||||
guard let artistViewItem = item as? ArtistViewItem
|
||||
else { return item }
|
||||
guard let artistViewItem = item as? ArtistViewItem else { return item }
|
||||
|
||||
artistViewItem.view.wantsLayer = true
|
||||
artistViewItem.setArtist(artists[indexPath.item])
|
||||
|
||||
return artistViewItem
|
||||
@ -0,0 +1,63 @@
|
||||
//
|
||||
// ArtistViewController.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/20.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import ReSwift
|
||||
import Differ
|
||||
|
||||
class ArtistViewController: NSViewController,
|
||||
NSCollectionViewDelegateFlowLayout {
|
||||
var dataSource = ArtistDataSource()
|
||||
let layout = FlexibleGridViewLayout(coder: NSCoder())
|
||||
|
||||
@IBOutlet var artistCollectionView: NSCollectionView!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
App.store.subscribe(self) {
|
||||
$0.select { $0.artistListState }
|
||||
}
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(didConnect), name: .didConnect, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(willDisconnect), name: .willDisconnect, object: nil)
|
||||
|
||||
artistCollectionView.dataSource = dataSource
|
||||
layout?.extraHeight = 26
|
||||
artistCollectionView.collectionViewLayout = layout
|
||||
}
|
||||
|
||||
deinit {
|
||||
App.store.unsubscribe(self)
|
||||
}
|
||||
|
||||
@objc func didConnect() {
|
||||
App.mpdClient.fetchAllArtists()
|
||||
}
|
||||
|
||||
@objc func willDisconnect() {
|
||||
DispatchQueue.main.async {
|
||||
App.store.dispatch(UpdateArtistListAction(artists: []))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension ArtistViewController: StoreSubscriber {
|
||||
typealias StoreSubscriberStateType = ArtistListState
|
||||
|
||||
func newState(state: StoreSubscriberStateType) {
|
||||
let oldArtists = dataSource.artists
|
||||
|
||||
dataSource.artists = state.artists
|
||||
|
||||
artistCollectionView.animateItemChanges(
|
||||
oldData: oldArtists,
|
||||
newData: dataSource.artists
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
//
|
||||
// artistViewItem.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/2/08.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
class ArtistViewItem: NSCollectionViewItem {
|
||||
var observer: NSKeyValueObservation?
|
||||
var artist: Artist?
|
||||
|
||||
// override var isSelected: Bool {
|
||||
// didSet {
|
||||
// artistCoverBox.layer?.borderWidth = isSelected ? 5 : 0
|
||||
// }
|
||||
// }
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
//
|
||||
// artistCoverView.wantsLayer = true
|
||||
// artistCoverView.layer?.cornerRadius = 3
|
||||
// artistCoverView.layer?.borderWidth = 1
|
||||
//
|
||||
// artistCoverBox.wantsLayer = true
|
||||
// artistCoverBox.layer?.cornerRadius = 5
|
||||
// artistCoverBox.layer?.borderWidth = 0
|
||||
//
|
||||
// setAppearance()
|
||||
//
|
||||
// if #available(OSX 10.14, *) {
|
||||
// observer = NSApp.observe(\.effectiveAppearance) { (app, _) in
|
||||
// self.setAppearance()
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
// override func prepareForReuse() {
|
||||
// super.prepareForReuse()
|
||||
//
|
||||
// artistDetailView.popover.close()
|
||||
// }
|
||||
|
||||
func setArtist(_ artist: Artist) {
|
||||
self.artist = artist
|
||||
artistName.stringValue = artist.name
|
||||
}
|
||||
|
||||
// func setAppearance() {
|
||||
// if #available(OSX 10.14, *) {
|
||||
// let darkMode = NSApp.effectiveAppearance.bestMatch(from:
|
||||
// [.darkAqua, .aqua]) == .darkAqua
|
||||
//
|
||||
// artistCoverView.layer?.borderColor = darkMode ? .albumBorderColorDark : .albumBorderColorLight
|
||||
// artistCoverBox.layer?.borderColor = NSColor.controlAccentColor.cgColor
|
||||
// } else {
|
||||
// artistCoverView.layer?.borderColor = .albumBorderColorLight
|
||||
// artistImageBox.layer?.borderColor = NSColor.selectedControlColor.cgColor
|
||||
// }
|
||||
// }
|
||||
|
||||
@IBOutlet var artistName: NSTextField!
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14868" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14868"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="ArtistViewItem" customModule="Persephone" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="artistName" destination="KEh-NL-c2W" id="xf0-q9-NIs"/>
|
||||
<outlet property="view" destination="Hz6-mo-xeY" id="v7W-XA-Emc"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView id="Hz6-mo-xeY">
|
||||
<rect key="frame" x="0.0" y="0.0" width="158" height="173"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<box boxType="custom" borderType="none" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="oat-Vd-t1v" userLabel="Artist Cover Box">
|
||||
<rect key="frame" x="5" y="30" width="148" height="138"/>
|
||||
<view key="contentView" wantsLayer="YES" id="h1X-3X-S5v">
|
||||
<rect key="frame" x="0.0" y="0.0" width="148" height="138"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="juD-33-Glf" customClass="AlbumCoverButton" customModule="Persephone" customModuleProvider="target">
|
||||
<rect key="frame" x="5" y="5" width="138" height="128"/>
|
||||
<shadow key="shadow" blurRadius="4">
|
||||
<size key="offset" width="0.0" height="2"/>
|
||||
<color key="color" white="0.0" alpha="0.34603323063380281" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</shadow>
|
||||
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="defaultCoverArt" imagePosition="only" alignment="center" lineBreakMode="truncatingTail" refusesFirstResponder="YES" state="on" transparent="YES" imageScaling="proportionallyUpOrDown" inset="2" id="t8A-Hz-L38">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="juD-33-Glf" firstAttribute="leading" secondItem="h1X-3X-S5v" secondAttribute="leading" constant="5" id="0bH-QU-yNJ"/>
|
||||
<constraint firstItem="juD-33-Glf" firstAttribute="top" secondItem="h1X-3X-S5v" secondAttribute="top" constant="5" id="iOP-iI-5gF"/>
|
||||
<constraint firstAttribute="bottom" secondItem="juD-33-Glf" secondAttribute="bottom" constant="5" id="kaN-bP-Ej1"/>
|
||||
<constraint firstItem="juD-33-Glf" firstAttribute="top" secondItem="h1X-3X-S5v" secondAttribute="top" constant="5" id="rvB-6b-GGM"/>
|
||||
<constraint firstAttribute="trailing" secondItem="juD-33-Glf" secondAttribute="trailing" constant="5" id="suk-y8-rCG"/>
|
||||
<constraint firstItem="juD-33-Glf" firstAttribute="leading" secondItem="h1X-3X-S5v" secondAttribute="leading" constant="5" id="tEg-gx-mw1"/>
|
||||
<constraint firstAttribute="trailing" secondItem="juD-33-Glf" secondAttribute="trailing" constant="5" id="tYM-2j-z4N"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</box>
|
||||
<textField identifier="artistName" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KEh-NL-c2W" userLabel="Artist Name">
|
||||
<rect key="frame" x="8" y="9" width="142" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="17" id="kyh-jb-F0f"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" title="Label" id="pDs-0t-e1j">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="oat-Vd-t1v" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="5" id="KmJ-Lb-i34"/>
|
||||
<constraint firstItem="oat-Vd-t1v" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="bv4-qt-QTu"/>
|
||||
<constraint firstItem="KEh-NL-c2W" firstAttribute="top" secondItem="oat-Vd-t1v" secondAttribute="bottom" constant="4" id="jrN-Au-nkP"/>
|
||||
<constraint firstAttribute="trailing" secondItem="oat-Vd-t1v" secondAttribute="trailing" constant="5" id="n0s-RV-XbI"/>
|
||||
<constraint firstItem="oat-Vd-t1v" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="5" id="nLr-b7-Yfv"/>
|
||||
<constraint firstItem="KEh-NL-c2W" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="10" id="qDQ-KT-BNm"/>
|
||||
<constraint firstItem="oat-Vd-t1v" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="5" id="vFS-1V-I70"/>
|
||||
<constraint firstItem="oat-Vd-t1v" firstAttribute="centerX" secondItem="KEh-NL-c2W" secondAttribute="centerX" id="zoQ-iI-caI"/>
|
||||
<constraint firstAttribute="bottom" secondItem="KEh-NL-c2W" secondAttribute="bottom" constant="9" id="zvu-px-zE8"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="-20" y="102.5"/>
|
||||
</customView>
|
||||
<collectionViewItem id="Zx6-dd-JBD" customClass="ArtistViewItem" customModule="Persephone" customModuleProvider="target"/>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="defaultCoverArt" width="128" height="128"/>
|
||||
</resources>
|
||||
</document>
|
||||
@ -18,7 +18,6 @@ class GeneralPrefsViewController: NSViewController {
|
||||
}
|
||||
|
||||
if let mpdPort = App.store.state.preferencesState.mpdServer.port {
|
||||
print(mpdPort)
|
||||
mpdPortField.stringValue = "\(mpdPort)"
|
||||
}
|
||||
|
||||
@ -23,4 +23,6 @@ extension NSUserInterfaceItemIdentifier {
|
||||
static let trackNumber = NSUserInterfaceItemIdentifier("trackNumberCell")
|
||||
static let songTitle = NSUserInterfaceItemIdentifier("songTitleCell")
|
||||
static let songDuration = NSUserInterfaceItemIdentifier("songDurationCell")
|
||||
|
||||
static let artistListName = NSUserInterfaceItemIdentifier("artistCell")
|
||||
}
|
||||
@ -8,9 +8,9 @@
|
||||
|
||||
import AppKit
|
||||
|
||||
class AlbumViewLayout: NSCollectionViewFlowLayout {
|
||||
class FlexibleGridViewLayout: NSCollectionViewFlowLayout {
|
||||
let maxItemWidth: CGFloat = 200
|
||||
let albumInfoHeight: CGFloat = 44
|
||||
var extraHeight: CGFloat = 0
|
||||
var scrollPosition: CGFloat = 0
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
@ -43,7 +43,7 @@ class AlbumViewLayout: NSCollectionViewFlowLayout {
|
||||
divider = divider + 1
|
||||
} while itemWidth > maxItemWidth
|
||||
|
||||
let itemHeight = itemWidth + albumInfoHeight
|
||||
let itemHeight = itemWidth + extraHeight
|
||||
|
||||
itemSize = NSSize(width: itemWidth, height: itemHeight)
|
||||
}
|
||||
@ -886,39 +886,39 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hef-8H-doh">
|
||||
<scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lkE-Eh-ZKl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
|
||||
<clipView key="contentView" id="NYM-zm-wx1">
|
||||
<clipView key="contentView" id="W3C-r7-oJL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<collectionView id="8MP-vD-0zS">
|
||||
<collectionView id="bg7-32-4Jl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="158"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
|
||||
<collectionViewLayout key="collectionViewLayout" id="Xgs-hh-JPN" customClass="ArtistViewLayout" customModule="Persephone" customModuleProvider="target"/>
|
||||
<collectionViewLayout key="collectionViewLayout" id="48h-7k-nVB" customClass="FlexibleGridViewLayout" customModule="Persephone" customModuleProvider="target"/>
|
||||
<color key="primaryBackgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
</clipView>
|
||||
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="AK9-5R-0F5">
|
||||
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="aW3-Xd-iIz">
|
||||
<rect key="frame" x="1" y="144" width="233" height="15"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="f89-z2-LIY">
|
||||
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="DhO-CB-eX0">
|
||||
<rect key="frame" x="234" y="1" width="15" height="143"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
</scrollView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="Hef-8H-doh" firstAttribute="leading" secondItem="vxO-fC-BpZ" secondAttribute="leading" id="9Jt-Aa-9B9"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Hef-8H-doh" secondAttribute="trailing" id="Znr-1M-fxs"/>
|
||||
<constraint firstItem="Hef-8H-doh" firstAttribute="top" secondItem="vxO-fC-BpZ" secondAttribute="top" id="mpB-KM-RZw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Hef-8H-doh" secondAttribute="bottom" id="puR-GX-c6y"/>
|
||||
<constraint firstAttribute="trailing" secondItem="lkE-Eh-ZKl" secondAttribute="trailing" id="HPW-OE-lpd"/>
|
||||
<constraint firstItem="lkE-Eh-ZKl" firstAttribute="leading" secondItem="vxO-fC-BpZ" secondAttribute="leading" id="LnL-RZ-Lcm"/>
|
||||
<constraint firstItem="lkE-Eh-ZKl" firstAttribute="top" secondItem="vxO-fC-BpZ" secondAttribute="top" id="ZyG-hn-fPw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="lkE-Eh-ZKl" secondAttribute="bottom" id="l4W-l0-fZS"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="artistCollectionView" destination="8MP-vD-0zS" id="Bb1-07-sRH"/>
|
||||
<outlet property="artistCollectionView" destination="bg7-32-4Jl" id="g9V-jO-2wj"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<customObject id="Ras-zf-6qF" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
@ -942,7 +942,7 @@
|
||||
<collectionView identifier="albumCollectionView" selectable="YES" id="lfq-AB-epE">
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="158"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
|
||||
<collectionViewLayout key="collectionViewLayout" id="YE8-sD-l5P" customClass="AlbumViewLayout" customModule="Persephone" customModuleProvider="target"/>
|
||||
<collectionViewLayout key="collectionViewLayout" id="YE8-sD-l5P" customClass="FlexibleGridViewLayout" customModule="Persephone" customModuleProvider="target"/>
|
||||
<color key="primaryBackgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="gPn-fP-LFc" id="LQ2-Vl-r08"/>
|
||||
@ -1,59 +0,0 @@
|
||||
//
|
||||
// ArtistViewController.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/20.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import ReSwift
|
||||
import Differ
|
||||
|
||||
class ArtistViewController: NSViewController {
|
||||
var dataSource = ArtistDataSource()
|
||||
|
||||
@IBOutlet var artistCollectionView: NSCollectionView!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
App.store.subscribe(self) {
|
||||
$0.select { $0.artistListState }
|
||||
}
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(didConnect), name: .didConnect, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(willDisconnect), name: .willDisconnect, object: nil)
|
||||
|
||||
artistCollectionView.dataSource = dataSource
|
||||
}
|
||||
|
||||
deinit {
|
||||
App.store.unsubscribe(self)
|
||||
}
|
||||
|
||||
@objc func didConnect() {
|
||||
App.mpdClient.fetchAllArtists()
|
||||
}
|
||||
|
||||
@objc func willDisconnect() {
|
||||
DispatchQueue.main.async {
|
||||
App.store.dispatch(UpdateArtistListAction(artists: []))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension ArtistViewController: StoreSubscriber {
|
||||
typealias StoreSubscriberStateType = ArtistListState
|
||||
|
||||
func newState(state: StoreSubscriberStateType) {
|
||||
let oldArtists = dataSource.artists
|
||||
|
||||
dataSource.artists = state.artists
|
||||
|
||||
artistCollectionView.animateItemChanges(
|
||||
oldData: oldArtists,
|
||||
newData: dataSource.artists
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
//
|
||||
// ArtistViewItem.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/20.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import Cocoa
|
||||
|
||||
class ArtistViewItem: NSCollectionViewItem {
|
||||
var artist: String?
|
||||
|
||||
@IBOutlet var artistName: NSTextField!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
}
|
||||
|
||||
func setArtist(_ artist: String) {
|
||||
self.artist = artist
|
||||
|
||||
artistName.stringValue = artist
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
//
|
||||
// ArtistViewLayout.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/29.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
class ArtistViewLayout: NSCollectionViewFlowLayout {
|
||||
override func prepare() {
|
||||
super.prepare()
|
||||
|
||||
guard let collectionView = collectionView
|
||||
else { return }
|
||||
|
||||
let width = collectionView.bounds.size.width
|
||||
|
||||
itemSize.width = width
|
||||
}
|
||||
}
|
||||
24
Persephone/Models/Artist.swift
Normal file
24
Persephone/Models/Artist.swift
Normal file
@ -0,0 +1,24 @@
|
||||
//
|
||||
// Artist.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/10/04.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
struct Artist {
|
||||
var name: String
|
||||
var image: Loading<NSImage?> = .notLoaded
|
||||
|
||||
init(name: String) {
|
||||
self.name = name
|
||||
}
|
||||
}
|
||||
|
||||
extension Artist: Equatable {
|
||||
static func == (lhs: Artist, rhs: Artist) -> Bool {
|
||||
return (lhs.name == rhs.name)
|
||||
}
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14868" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14868"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="ArtistViewItem" customModule="Persephone" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="artistName" destination="XcT-rc-7KI" id="Sj2-H7-b4t"/>
|
||||
<outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView id="Hz6-mo-xeY" customClass="ArtistItemView" customModule="Persephone" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="497" height="63"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<textField identifier="artistName" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XcT-rc-7KI">
|
||||
<rect key="frame" x="18" y="22" width="108" height="21"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Artist Name" id="Ojy-kp-TUe">
|
||||
<font key="font" metaFont="systemBold" size="18"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="XcT-rc-7KI" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="20" symbolic="YES" id="0Ro-rq-VVD"/>
|
||||
<constraint firstItem="XcT-rc-7KI" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="20" symbolic="YES" id="r6f-6f-Lq2"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="-21.5" y="-20.5"/>
|
||||
</customView>
|
||||
<collectionViewItem id="Thj-la-1Au" customClass="ArtistViewItem" customModule="Persephone" customModuleProvider="target"/>
|
||||
</objects>
|
||||
</document>
|
||||
@ -9,5 +9,5 @@
|
||||
import ReSwift
|
||||
|
||||
struct ArtistListState: StateType, Equatable {
|
||||
var artists: [String] = []
|
||||
var artists: [Artist] = []
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ func artistListReducer(action: Action, state: ArtistListState?) -> ArtistListSta
|
||||
|
||||
switch action {
|
||||
case let action as UpdateArtistListAction:
|
||||
state.artists = action.artists
|
||||
state.artists = action.artists.map { Artist(name: $0) }
|
||||
|
||||
default:
|
||||
break
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
//
|
||||
// AlbumItemView.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/2/17.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
class AlbumItemView: NSView {
|
||||
required init?(coder decoder: NSCoder) {
|
||||
super.init(coder: decoder)
|
||||
}
|
||||
|
||||
@IBOutlet var imageView: NSImageView!
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
//
|
||||
// ArtistViewItem.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/29.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
class ArtistItemView: NSView {
|
||||
required init?(coder decoder: NSCoder) {
|
||||
super.init(coder: decoder)
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
//
|
||||
// BrowseViewButton.swift
|
||||
// Persephone
|
||||
//
|
||||
// Created by Daniel Barber on 2019/9/20.
|
||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
class BrowseViewButton: NSButton {
|
||||
override func draw(_ dirtyRect: NSRect) {
|
||||
super.draw(dirtyRect)
|
||||
// Drawing code here.
|
||||
self.layer?.cornerRadius = 4
|
||||
self.layer?.masksToBounds = true
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user