mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
Add album view
This commit is contained in:
parent
a441310966
commit
9216cfc25d
@ -110,6 +110,7 @@ class MPDClient {
|
||||
}
|
||||
|
||||
func sendCommand(command: Command) {
|
||||
print("Command:", command)
|
||||
switch command {
|
||||
|
||||
// Transport commands
|
||||
@ -224,6 +225,7 @@ class MPDClient {
|
||||
self.delegate?.didUpdateQueuePos(mpdClient: self, song: self.status!.song)
|
||||
}
|
||||
if !mpdIdle.isEmpty {
|
||||
print("Status")
|
||||
self.idle()
|
||||
}
|
||||
}
|
||||
|
||||
12
Persephone/Resources/Assets.xcassets/blankAlbum.imageset/Contents.json
vendored
Normal file
12
Persephone/Resources/Assets.xcassets/blankAlbum.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "blankAlbum.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Persephone/Resources/Assets.xcassets/blankAlbum.imageset/blankAlbum.pdf
vendored
Normal file
BIN
Persephone/Resources/Assets.xcassets/blankAlbum.imageset/blankAlbum.pdf
vendored
Normal file
Binary file not shown.
60
Persephone/Views/AlbumItem.xib
Normal file
60
Persephone/Views/AlbumItem.xib
Normal file
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14460.31"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="AlbumItem" customModule="Persephone" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="albumArtist" destination="5Uu-j1-qyT" id="2Et-tX-InT"/>
|
||||
<outlet property="albumTitle" destination="KEh-NL-c2W" id="SI3-hm-H2B"/>
|
||||
<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="206" height="248"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<textField identifier="albumTitle" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KEh-NL-c2W">
|
||||
<rect key="frame" x="-2" y="20" width="37" height="17"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" 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>
|
||||
<textField identifier="albumArtist" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5Uu-j1-qyT">
|
||||
<rect key="frame" x="-2" y="0.0" width="37" height="17"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="yZn-e9-zyP">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<imageView identifier="albumArtwork" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Kfb-8f-ean">
|
||||
<rect key="frame" x="0.0" y="42" width="206" height="206"/>
|
||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="blankAlbum" id="FsA-JX-BFh"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="KEh-NL-c2W" firstAttribute="leading" secondItem="5Uu-j1-qyT" secondAttribute="leading" id="Iji-NN-ju3"/>
|
||||
<constraint firstItem="Kfb-8f-ean" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="JMi-4i-dgs"/>
|
||||
<constraint firstItem="KEh-NL-c2W" firstAttribute="top" secondItem="Kfb-8f-ean" secondAttribute="bottom" constant="5" id="Jdb-sY-lnB"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Kfb-8f-ean" secondAttribute="trailing" id="KQC-Wz-Bsg"/>
|
||||
<constraint firstItem="Kfb-8f-ean" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="Qbk-jx-zAi"/>
|
||||
<constraint firstItem="Kfb-8f-ean" firstAttribute="leading" secondItem="KEh-NL-c2W" secondAttribute="leading" id="diY-bi-0Yg"/>
|
||||
<constraint firstAttribute="bottom" secondItem="5Uu-j1-qyT" secondAttribute="bottom" id="puG-ym-5hh"/>
|
||||
<constraint firstAttribute="bottom" secondItem="KEh-NL-c2W" secondAttribute="bottom" constant="20" symbolic="YES" id="yIJ-L1-2c5"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="3" y="142"/>
|
||||
</customView>
|
||||
<collectionViewItem id="Qgu-aI-55A" customClass="AlbumItem" customModule="Persephone" customModuleProvider="target"/>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="blankAlbum" width="128" height="128"/>
|
||||
</resources>
|
||||
</document>
|
||||
@ -930,7 +930,7 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="158"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="20" minimumLineSpacing="20" id="K0l-P8-OW0">
|
||||
<size key="itemSize" width="159" height="207"/>
|
||||
<size key="itemSize" width="206" height="248"/>
|
||||
<edgeInsets key="sectionInset" left="40" right="40" top="20" bottom="60"/>
|
||||
</collectionViewFlowLayout>
|
||||
<color key="primaryBackgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
Loading…
Reference in New Issue
Block a user