Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
82fa96c329
11 changed files with 136 additions and 2 deletions
|
@ -150,6 +150,39 @@ export class BrowserWindow {
|
|||
res.render("main", this.EnvironmentVariables);
|
||||
});
|
||||
|
||||
app.get("/api/playback/:action", (req, res)=>{
|
||||
const action = req.params.action;
|
||||
switch(action) {
|
||||
case "playpause":
|
||||
BrowserWindow.win.webContents.executeJavaScript("wsapi.togglePlayPause()")
|
||||
res.send("Play/Pause toggle")
|
||||
break;
|
||||
case "play":
|
||||
BrowserWindow.win.webContents.executeJavaScript("MusicKit.getInstance().play()")
|
||||
res.send("Playing")
|
||||
break;
|
||||
case "pause":
|
||||
BrowserWindow.win.webContents.executeJavaScript("MusicKit.getInstance().pause()")
|
||||
res.send("Paused")
|
||||
break;
|
||||
case "stop":
|
||||
BrowserWindow.win.webContents.executeJavaScript("MusicKit.getInstance().stop()")
|
||||
res.send("Stopped")
|
||||
break;
|
||||
case "next":
|
||||
BrowserWindow.win.webContents.executeJavaScript("MusicKit.getInstance().skipToNextItem()")
|
||||
res.send("Next")
|
||||
break;
|
||||
case "previous":
|
||||
BrowserWindow.win.webContents.executeJavaScript("MusicKit.getInstance().skipToPreviousItem()")
|
||||
res.send("Previous")
|
||||
break;
|
||||
default: {
|
||||
res.send("Invalid action")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
app.get("/themes/:theme", (req, res) => {
|
||||
const theme = req.params.theme.toLowerCase();
|
||||
const themePath = join(utils.getPath('srcPath'), "./renderer/themes/", theme);
|
||||
|
|
39
src/renderer/assets/AppChromeBtn-Open.svg
Normal file
39
src/renderer/assets/AppChromeBtn-Open.svg
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 300 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g transform="matrix(0.30081,0,0,0.30081,-41.1651,-47.9227)">
|
||||
<g transform="matrix(1.26848,0,0,1.26848,167,195.512)">
|
||||
<circle cx="101" cy="102.5" r="79.5" style="fill:rgb(15,15,15);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.260038,0,0,0.260038,167,195.511)">
|
||||
<g id="Release.afdesign">
|
||||
<g>
|
||||
<path d="M501,21C765.367,21 980,235.633 980,500C980,764.367 765.367,979 501,979C236.633,979 22,764.367 22,500C22,235.633 236.633,21 501,21ZM501,169C683.684,169 832,317.316 832,500C832,682.684 683.684,831 501,831C318.316,831 170,682.684 170,500C170,317.316 318.316,169 501,169Z" style="fill:rgb(255,38,84);"/>
|
||||
<path d="M501,224C653.053,224 776.5,347.447 776.5,499.5C776.5,651.553 653.053,775 501,775C348.947,775 225.5,651.553 225.5,499.5C225.5,347.447 348.947,224 501,224ZM589.165,492.207C595.163,495.672 595.163,504.328 589.165,507.793L439.502,594.256C433.502,597.722 426,593.392 426,586.463L426,413.537C426,406.608 433.502,402.278 439.502,405.744L589.165,492.207Z" style="fill:rgb(255,38,84);"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(10.0544,0,0,10.0544,472.765,384.95)">
|
||||
<g transform="matrix(16,0,0,16,0,0)">
|
||||
<path d="M0.705,-0.473C0.685,-0.641 0.558,-0.737 0.389,-0.737C0.197,-0.737 0.05,-0.602 0.05,-0.364C0.05,-0.126 0.195,0.01 0.389,0.01C0.576,0.01 0.688,-0.114 0.705,-0.248L0.549,-0.249C0.535,-0.171 0.474,-0.126 0.392,-0.126C0.281,-0.126 0.206,-0.208 0.206,-0.364C0.206,-0.515 0.28,-0.601 0.393,-0.601C0.477,-0.601 0.538,-0.553 0.549,-0.473L0.705,-0.473Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,12.0341,0)">
|
||||
<path d="M0.06,-0L0.212,-0L0.212,-0.545L0.06,-0.545L0.06,-0ZM0.136,-0.616C0.181,-0.616 0.218,-0.65 0.218,-0.692C0.218,-0.734 0.181,-0.769 0.136,-0.769C0.092,-0.769 0.055,-0.734 0.055,-0.692C0.055,-0.65 0.092,-0.616 0.136,-0.616Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,16.3864,0)">
|
||||
<path d="M0.261,0.009C0.349,0.009 0.395,-0.042 0.416,-0.087L0.423,-0.087L0.423,-0L0.572,-0L0.572,-0.727L0.421,-0.727L0.421,-0.454L0.416,-0.454C0.396,-0.498 0.352,-0.553 0.261,-0.553C0.141,-0.553 0.04,-0.46 0.04,-0.272C0.04,-0.089 0.137,0.009 0.261,0.009ZM0.309,-0.112C0.235,-0.112 0.195,-0.178 0.195,-0.273C0.195,-0.367 0.234,-0.432 0.309,-0.432C0.383,-0.432 0.424,-0.37 0.424,-0.273C0.424,-0.175 0.382,-0.112 0.309,-0.112Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,26.5511,0)">
|
||||
<path d="M0.309,0.011C0.444,0.011 0.535,-0.055 0.556,-0.156L0.416,-0.165C0.401,-0.124 0.362,-0.102 0.311,-0.102C0.236,-0.102 0.188,-0.152 0.188,-0.234L0.188,-0.234L0.559,-0.234L0.559,-0.276C0.559,-0.461 0.447,-0.553 0.303,-0.553C0.142,-0.553 0.038,-0.439 0.038,-0.27C0.038,-0.097 0.141,0.011 0.309,0.011ZM0.188,-0.328C0.191,-0.39 0.238,-0.44 0.305,-0.44C0.371,-0.44 0.417,-0.393 0.417,-0.328L0.188,-0.328Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,36.1136,0)">
|
||||
<path d="M0.06,-0L0.212,-0L0.212,-0.309C0.212,-0.376 0.261,-0.422 0.327,-0.422C0.348,-0.422 0.377,-0.418 0.391,-0.414L0.391,-0.548C0.378,-0.551 0.359,-0.553 0.344,-0.553C0.283,-0.553 0.233,-0.518 0.213,-0.45L0.207,-0.45L0.207,-0.545L0.06,-0.545L0.06,-0Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(-0.0132579,-1.62362e-18,-1.62362e-18,0.0132579,288.703,42.7877)">
|
||||
<g id="g3003">
|
||||
<path id="path3005" d="M1611,832C1611,796.667 1598.67,766.667 1574,742L923,91C897.667,65.667 867.333,53 832,53C796,53 766,65.667 742,91L91,742C65.667,766 53,796 53,832C53,867.333 65.667,897.667 91,923L165,998C191,1022.67 221.333,1035 256,1035C291.333,1035 321.333,1022.67 346,998L832,512L1318,998C1342.67,1022.67 1372.67,1035 1408,1035C1442.67,1035 1473,1022.67 1499,998L1574,923C1598.67,897 1611,866.667 1611,832Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 36 KiB |
BIN
src/renderer/assets/banner2.png
Normal file
BIN
src/renderer/assets/banner2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
49
src/renderer/assets/twitter.svg
Normal file
49
src/renderer/assets/twitter.svg
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 112.197 112.197" style="enable-background:new 0 0 112.197 112.197;" xml:space="preserve">
|
||||
<g>
|
||||
<circle style="fill:#55ACEE;" cx="56.099" cy="56.098" r="56.098"/>
|
||||
<g>
|
||||
<path style="fill:#F1F2F2;" d="M90.461,40.316c-2.404,1.066-4.99,1.787-7.702,2.109c2.769-1.659,4.894-4.284,5.897-7.417
|
||||
c-2.591,1.537-5.462,2.652-8.515,3.253c-2.446-2.605-5.931-4.233-9.79-4.233c-7.404,0-13.409,6.005-13.409,13.409
|
||||
c0,1.051,0.119,2.074,0.349,3.056c-11.144-0.559-21.025-5.897-27.639-14.012c-1.154,1.98-1.816,4.285-1.816,6.742
|
||||
c0,4.651,2.369,8.757,5.965,11.161c-2.197-0.069-4.266-0.672-6.073-1.679c-0.001,0.057-0.001,0.114-0.001,0.17
|
||||
c0,6.497,4.624,11.916,10.757,13.147c-1.124,0.308-2.311,0.471-3.532,0.471c-0.866,0-1.705-0.083-2.523-0.239
|
||||
c1.706,5.326,6.657,9.203,12.526,9.312c-4.59,3.597-10.371,5.74-16.655,5.74c-1.08,0-2.15-0.063-3.197-0.188
|
||||
c5.931,3.806,12.981,6.025,20.553,6.025c24.664,0,38.152-20.432,38.152-38.153c0-0.581-0.013-1.16-0.039-1.734
|
||||
C86.391,45.366,88.664,43.005,90.461,40.316L90.461,40.316z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
|
@ -96,6 +96,9 @@ const wsapi = {
|
|||
toggleShuffle() {
|
||||
MusicKit.getInstance().shuffleMode = MusicKit.getInstance().shuffleMode === 0 ? 1 : 0
|
||||
},
|
||||
togglePlayPause() {
|
||||
app.mk.isPlaying ? app.mk.pause() : app.mk.play()
|
||||
},
|
||||
toggleRepeat() {
|
||||
if(MusicKit.getInstance().repeatMode == 0) {
|
||||
MusicKit.getInstance().repeatMode = 1
|
||||
|
|
|
@ -998,7 +998,7 @@ input[type=range].web-slider::-webkit-slider-runnable-track {
|
|||
}
|
||||
|
||||
.app-chrome .app-chrome-item > .app-mainmenu {
|
||||
width: 116px;
|
||||
width: 110px;
|
||||
font-size: 13px;
|
||||
background: url("./assets/AppChromeBtn.svg");
|
||||
background-size: contain;
|
||||
|
@ -1007,6 +1007,7 @@ input[type=range].web-slider::-webkit-slider-runnable-track {
|
|||
height: 70%;
|
||||
margin-right: 16px;
|
||||
margin-left: 16px;
|
||||
margin-top: 1.5px;
|
||||
border: 0px;
|
||||
border-radius: 6px;
|
||||
|
||||
|
@ -1017,6 +1018,10 @@ input[type=range].web-slider::-webkit-slider-runnable-track {
|
|||
&:active, &.active {
|
||||
background-color: var(--selected-click);
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-image: url("./assets/AppChromeBtn-Open.svg");
|
||||
}
|
||||
}
|
||||
|
||||
.app-chrome .app-chrome-item > .window-controls {
|
||||
|
|
3
src/renderer/themes/dark.less
Normal file
3
src/renderer/themes/dark.less
Normal file
|
@ -0,0 +1,3 @@
|
|||
#app {
|
||||
--color1: #111;
|
||||
}
|
|
@ -172,7 +172,7 @@
|
|||
</template>
|
||||
|
||||
</div>
|
||||
<div class="app-chrome-item full-height" v-if="chrome.windowControlPosition == 'right'">
|
||||
<div class="app-chrome-item full-height" id="window-controls-container" v-if="chrome.windowControlPosition == 'right'">
|
||||
<div class="window-controls">
|
||||
<div class="minimize" @click="ipcRenderer.send('minimize', true)"></div>
|
||||
<div class="minmax restore" v-if="chrome.maximized"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<button onclick="window.open('https://opencollective.com/ciderapp')" class="md-btn sponsorBtn"><img src="./assets/open_collective.svg"/>Open Collective</button>
|
||||
<h3>{{$root.getLz('term.socials')}}</h3>
|
||||
<button onclick="window.open('https://discord.gg/applemusic')" class="md-btn sponsorBtn"><img src="./assets/discord.svg"/>{{$root.getLz('term.discord')}}</button>
|
||||
<button onclick="window.open('https://twitter.com/UseCider')" class="md-btn sponsorBtn"><img style="width: 20.5px;" src="./assets/twitter.svg"/>Twitter</button>
|
||||
|
||||
</div>
|
||||
<div class="col">
|
||||
|
|
|
@ -104,6 +104,7 @@
|
|||
<div class="md-option-segment md-option-segment_auto">
|
||||
<select class="md-select" @change="$root.setTheme($root.cfg.visual.theme)" v-model="$root.cfg.visual.theme">
|
||||
<option value="default.less">Cider</option>
|
||||
<option value="dark.less">Dark</option>
|
||||
<option v-for="theme in themes" :value="theme">{{ theme }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue