oobe progress

This commit is contained in:
booploops 2022-06-02 05:16:31 -07:00
parent f4a30fbe11
commit af76dff3b6
10 changed files with 526 additions and 236 deletions

View file

@ -571,5 +571,44 @@
"share.platform.email": "Email",
"share.platform.songLink": "Copy with song.link",
"share.platform.clipboard": "Copy Link",
"about.thanks": "Major thanks to the Cider Collective Team and all of our contributors."
"about.thanks": "Major thanks to the Cider Collective Team and all of our contributors.",
"oobe.yes": "Yes",
"oobe.no": "No",
"oobe.next": "Next",
"oobe.previous": "Previous",
"oobe.done": "Done",
"oobe.amupsell.title": "Before we start",
"oobe.amupsell.text": "Cider requires an active, paid Apple Music subscription\nCider will not work with Apple Music Voice Plan or some promotional trial subscriptions. If you already have a qualified Apple Music subscription click Next to continue.",
"oobe.amupsell.subscribeBtn": "Subscribe to Apple Music",
"oobe.amupsell.explainBtn": "Explain",
"oobe.amupsell.subscribeUrl": "https://apple.co/3MdqJVQ",
"oobe.amupsell.amWebUrl": "https://beta.music.apple.com/",
"oobe.amupsell.promoExplained": "Some promotional and non US Apple Music trial subscriptions do not have access to the required Apple Music Web Player API's needed for Cider to function. To verify if your active trial will work with Cider go to <a href='{{ amWebUrl }}'>{{ amWebUrl }}</a> log in and try to play some music. If it works, great! You're ready to use Cider, however if it does not consider subscribing to Apple Music here: <a href='{{ subscribeUrl }}'>{{ subscribeUrl }}</a>",
"oobe.intro.title": "Welcome to Cider",
"oobe.intro.subtitle": "",
"oobe.intro.text": "Let's get a few things set up so you can use Cider, how you'd like. You can always change these settings later.",
"oobe.general.title": "General",
"oobe.general.subtitle": "",
"oobe.general.text": "",
"oobe.audio.title": "Audio",
"oobe.audio.subtitle": "",
"oobe.audio.text": "Cider features a custom tuned and designed audio stack that delivers a rich high quality audio experience.\nFeaturing Cider Adrenaline, Atmosphere Realizer, and Spatialized Audio.\nTo enable this functionality \"Advanced Audio Functionality\" must be enabled.\nEnabling Advanced Audio Functionality will give you access to these enhancements in the Cider Audio Labs, found in the app settings.",
"oobe.audio.advancedFunctionality": "",
"oobe.visual.title": "Visual",
"oobe.visual.subtitle": "",
"oobe.visual.text": "",
"oobe.visual.layout.text": "Cider features two window different layouts.\nMaverick is an iTunes like layout with the player at the top of the window.\nMojave is a new spin created by the Cider Collective.\n\nYou can change the layout any time in the settings.",
"oobe.visual.suggestingThemes": "Theming is a great way to personalize your experience. Here are a few we suggest: ",
"oobe.visual.suggestingThemes.subtext": "(These themes will be downloaded from GitHub)",
"oobe.visual.suggestingThemes.default": "Cider",
"oobe.visual.suggestingThemes.default.text": "The classic Cider theme.",
"oobe.visual.suggestingThemes.dark": "Dark",
"oobe.visual.suggestingThemes.dark.text": "Darkness.",
"oobe.visual.suggestingThemes.community1": "Groovy",
"oobe.visual.suggestingThemes.community1.text": "A WinUI influenced theme",
"oobe.visual.suggestingThemes.community2": "iTheme",
"oobe.visual.suggestingThemes.community2.text": "The classic big fruit layout.",
"oobe.visual.suggestingThemes.community3": "Dracula",
"oobe.visual.suggestingThemes.community3.text": "The iconic Dracula color scheme.",
"oobe.amsignin.title": ""
}

View file

@ -263,6 +263,7 @@
"action.tray.playpause": "Play/Pause",
"action.tray.next": "Next",
"action.tray.previous": "Previous",
"action.tray.listento": "Listen To:",
"action.update": "Update",
"action.install": "Install",
"action.copy": "Copy",
@ -366,6 +367,7 @@
"settings.header.audio": "Audio",
"settings.header.audio.description": "Adjust the audio settings for Cider.",
"settings.option.audio.volumeStep": "Volume Step",
"settings.option.audio.advanced": "Advanced Volume Control",
"settings.option.audio.maxVolume": "Max Volume",
"settings.option.audio.changePlaybackRate": "Change Playback Rate",
"settings.option.audio.playbackRate": "Playback Rate",
@ -398,20 +400,29 @@
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizer.description": "Realizes a different musical atmosphere modelled after the state of the art audio setups.",
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode": "Cider Atmosphere Realizer™ Mode",
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.description": "Changes the mode of operation of the Atmosphere Realizer module.",
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.NATURAL_STANDARD": "Natural (Standard)",
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.NATURAL_PLUS": "Natural (Plus)",
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.NATURAL_STANDARD": "Hōjicha Cheese Foam Tea",
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.NATURAL_PLUS": "Genmaicha Tapioca Milk Tea",
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.E68_1": "Rock Salt Cheese Foam Tea",
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.E68_2": "Uji Matcha Milk Tea",
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.E168_1": "Jasmine Macchiato",
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.Z3600": "Hokkaido Milk Tea",
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.Z8500": "Moonlight Softcake",
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.BSCBM": "Brown Sugar Creme Brûlée Milk",
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.CUDDLE": "Cuddle Warmth",
"settings.option.audio.enableAdvancedFunctionality.ciderPPE": "Cider Adrenaline Processor™",
"settings.option.audio.enableAdvancedFunctionality.ciderPPE.description": "Enhances the perceived audio quality of 256 kbps AAC audio by using a real-time algorithm that takes advantage of both psychoacoustic models of human hearing and AAC encoding characteristics.",
"settings.option.audio.enableAdvancedFunctionality.ciderPPE.description": "Enhances the perceived audio quality of AAC encoded audio by using a real-time algorithm that takes advantage of both psychoacoustic models of human hearing and AAC encoding characteristics.",
"settings.warn.audio.enableAdvancedFunctionality.ciderPPE.compatibility": "CAP is not compatible with Spatialization. Please disable Spatialization to continue.",
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength": "CAP Strength",
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.description": "Changes the strength of the processing done to the audio. (Aggressive may yield undesirable results)",
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.standard": "Standard",
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.adaptive": "Adaptive",
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.legacy": "Legacy",
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.aggressive": "Aggressive",
"settings.option.audio.enableAdvancedFunctionality.audioNormalization": "Audio Normalization",
"settings.option.audio.enableAdvancedFunctionality.audioNormalization.description": "Normalizes peak volume for individual tracks to create a more uniform listening experience. (Does not work on user uploaded tracks)",
"settings.option.audio.enableAdvancedFunctionality.audioNormalization.disabled": "Managed by Audio Lab",
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization": "Cider Tuned Spatialization",
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.description": "Pre-tuned Spatializing Effect, disables the customizable settings of Audio Spatialization. Spatialization must be enabled as a prerequisite.",
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.description": "Pre-tuned Spatializing Effect, disables the customizable settings of Audio Spatialization.",
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile": "Cider Spatialization Profile",
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.description": "Changes the Tuning Profile of the Spatialization.",
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.standard": "Standard",
@ -419,6 +430,9 @@
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.separation": "Separation",
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.minimal": "Minimal",
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.audiophile": "Audiophile",
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.diffused": "Diffused",
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.bplk": "Encore",
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.hw2k": "Expanded Encore",
"settings.warn.audio.enableAdvancedFunctionality.audioSpatialization.compatibility": "Spatialization is not compatible with CAP. Please disable CAP to continue.",
"settings.option.audio.dbspl.display": "dB SPL Display",
"settings.option.audio.dbspl.description": "(Advanced users only) Display dB SPL instead of dBFS on the volume slider.",
@ -557,5 +571,43 @@
"share.platform.email": "Email",
"share.platform.songLink": "Copy with song.link",
"share.platform.clipboard": "Copy Link",
"about.thanks": "Major thanks to the Cider Collective Team and all of our contributors."
"about.thanks": "Major thanks to the Cider Collective Team and all of our contributors.",
"oobe.yes": "Yes",
"oobe.no": "No",
"oobe.next": "Next",
"oobe.previous": "Previous",
"oobe.done": "Done",
"oobe.amupsell.title": "Before we start",
"oobe.amupsell.text": "Cider requires an active, paid Apple Music subscription\nCider will not work with Apple Music Voice Plan or some promotional trial subscriptions. If you already have a qualified Apple Music subscription click Next to continue.",
"oobe.amupsell.subscribeBtn": "Subscribe to Apple Music",
"oobe.amupsell.explainBtn": "Explain",
"oobe.amupsell.subscribeUrl": "https://apple.co/3MdqJVQ",
"oobe.amupsell.amWebUrl": "https://beta.music.apple.com/",
"oobe.amupsell.promoExplained": "Some promotional and non US Apple Music trial subscriptions do not have access to the required Apple Music Web Player API's needed for Cider to function. To verify if your active trial will work with Cider go to <a href='{{ amWebUrl }}'>{{ amWebUrl }}</a> log in and try to play some music. If it works, great! You're ready to use Cider, however if it does not consider subscribing to Apple Music here: <a href='{{ subscribeUrl }}'>{{ subscribeUrl }}</a>",
"oobe.intro.title": "Welcome to Cider",
"oobe.intro.subtitle": "",
"oobe.intro.text": "Let's get a few things set up so you can use Cider, how you'd like. You can always change these settings later.",
"oobe.general.title": "General",
"oobe.general.subtitle": "",
"oobe.general.text": "",
"oobe.audio.title": "Audio",
"oobe.audio.subtitle": "",
"oobe.audio.text": "",
"oobe.audio.advancedFunctionality": "",
"oobe.visual.title": "Visual",
"oobe.visual.subtitle": "",
"oobe.visual.text": "",
"oobe.visual.suggestingThemes": "Theming is a great way to personalize your experience. Here are a few we suggest: ",
"oobe.visual.suggestingThemes.subtext": "(These themes will be downloaded from GitHub)",
"oobe.visual.suggestingThemes.default": "Cider",
"oobe.visual.suggestingThemes.default.text": "The classic Cider theme.",
"oobe.visual.suggestingThemes.dark": "Dark",
"oobe.visual.suggestingThemes.dark.text": "Darkness.",
"oobe.visual.suggestingThemes.community1": "Groovy",
"oobe.visual.suggestingThemes.community1.text": "A WinUI influenced theme",
"oobe.visual.suggestingThemes.community2": "iTheme",
"oobe.visual.suggestingThemes.community2.text": "The classic big fruit layout.",
"oobe.visual.suggestingThemes.community3": "Dracula",
"oobe.visual.suggestingThemes.community3.text": "The iconic Dracula color scheme.",
"oobe.amsignin.title": ""
}

View file

@ -83,6 +83,7 @@ export class BrowserWindow {
"pages/zoo",
"pages/plugin-renderer",
"pages/keybinds",
"pages/oobe",
"components/mediaitem-artwork",
"components/artwork-material",
"components/menu-panel",

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

View file

@ -115,7 +115,6 @@ function fallbackinitMusicKit() {
request.open("GET", "https://raw.githubusercontent.com/lujjjh/LitoMusic/main/token.json");
request.send();
}
document.addEventListener('musickitloaded', function () {
console.log('MusicKit loaded')
// MusicKit global is now defined
@ -288,7 +287,6 @@ webGPU().then()
let screenWidth = screen.width;
let screenHeight = screen.height;
// window.onerror = function (error) {
// console.log(error)
// bootbox.alert("Error occurred: " + error)
// };
document.addEventListener('DOMContentLoaded', async function () {
// app.oobeInit()
})

View file

@ -119,11 +119,13 @@
&.search-page {
.searchToggle {
float:right;
>button {
float: right;
> button {
min-width: 120px;
}
}
.cd-mediaitem-square.mediaitem-brick {
width: 530px !important;
@ -1661,31 +1663,87 @@
.content-inner.oobe {
position: absolute;
overflow: hidden;
left: 0;
bottom: 0;
right: 0;
.oobe-view {
display: flex;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
right: 0;
display: grid;
place-items: center;
width: 100%;
background: #1e1e1e;
.oobe-view {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 32px;
gap: 32px;
max-width: 1280px;
max-height: 720px;
align-self: center;
justify-self: center;
height: 100%;
width: 100%;
.oobe-header {
font-size: 3em;
text-shadow: var(--replayTextShadow);
font-weight: 600;
}
.oobe-body {
flex: 1;
width: 100%;
background: #ffffff0d;
border-radius: 20px;
padding: 3em;
&.text {
white-space: pre-wrap;
}
.blurb {
white-space: pre-wrap;
margin: 16px;
line-height: 1.5em;
}
&.visual {
padding: 1em;
.stylePicker {
border-radius: 10px;
overflow: hidden;
cursor: pointer;
transition: .25s all;
box-shadow: 0px 2px 6px rgb(0 0 0 / 25%);
.visualPreview {
pointer-events: none;
transition: .25s all;
width: 100%;
filter: drop-shadow(0px 8px 6px rgb(0 0 0 / 30%));
}
.card-footer {
font-size: 1.25em;
font-weight: 500;
}
&:hover {
transform: scale(1.10) translateZ(-1px);
z-index: 1;
box-shadow: 0px 12px 16px rgb(0 0 0 / 25%);
.visualPreview {
transform: scale(1.5) translateZ(-1px);
}
}
}
}
}
.oobe-footer {
@ -1694,6 +1752,12 @@
justify-content: center;
align-items: center;
padding: 16px;
.md-btn {
font-size: 18px;
min-width: 128px;
text-align: center;
}
}
}
}

View file

@ -1,4 +1,4 @@
import { store } from './vuex-store.js';
import {store} from './vuex-store.js';
Vue.use(VueHorizontal);
Vue.use(VueObserveVisibility);
@ -80,7 +80,7 @@ const app = new Vue({
sorting: "name",
sortOrder: "asc",
listing: [],
meta: { total: 0, progress: 0 },
meta: {total: 0, progress: 0},
search: "",
displayListing: [],
downloadState: 0 // 0 = not started, 1 = in progress, 2 = complete, 3 = empty library
@ -96,7 +96,7 @@ const app = new Vue({
sorting: ["dateAdded", "name"], // [0] = recentlyadded page, [1] = albums page
sortOrder: ["desc", "asc"], // [0] = recentlyadded page, [1] = albums page
listing: [],
meta: { total: 0, progress: 0 },
meta: {total: 0, progress: 0},
search: "",
displayListing: [],
downloadState: 0 // 0 = not started, 1 = in progress, 2 = complete, 3 = empty library
@ -112,7 +112,7 @@ const app = new Vue({
sorting: ["dateAdded", "name"], // [0] = recentlyadded page, [1] = albums page
sortOrder: ["desc", "asc"], // [0] = recentlyadded page, [1] = albums page
listing: [],
meta: { total: 0, progress: 0 },
meta: {total: 0, progress: 0},
search: "",
displayListing: [],
downloadState: 0 // 0 = not started, 1 = in progress, 2 = complete, 3 = empty library
@ -175,12 +175,10 @@ const app = new Vue({
"attributes": {
"name": "Cider User",
"handle": "CiderUser",
"artwork": { "url": "./assets/logocut.png" }
"artwork": {"url": "./assets/logocut.png"}
}
},
forceDirectives: {
},
forceDirectives: {},
menuOpened: false,
maximized: false,
drawerOpened: false,
@ -242,8 +240,8 @@ const app = new Vue({
},
moreinfodata: [],
notyf: notyf,
idleTimer : null,
idleState : false,
idleTimer: null,
idleState: false,
},
watch: {
cfg: {
@ -275,11 +273,20 @@ const app = new Vue({
}, false)
},
methods: {
async oobeInit() {
this.appMode = "oobe"
this.setLz(this.cfg.general.language)
this.setLzManual()
clearTimeout(this.hangtimer)
document.body.removeAttribute("loading")
ipcRenderer.invoke("renderer-ready", true)
document.querySelector("#LOADER").remove()
},
setTimeout(func, time) {
return setTimeout(func, time);
},
songLinkShare(amUrl) {
notyf.open({ type: "info", className: "notyf-info", message: app.getLz('term.song.link.generate') })
notyf.open({type: "info", className: "notyf-info", message: app.getLz('term.song.link.generate')})
let self = this
let httpRequest = new XMLHttpRequest();
httpRequest.open('GET', `https://api.song.link/v1-alpha.1/links?url=${amUrl}&userCountry=US`, true);
@ -302,7 +309,7 @@ const app = new Vue({
return this.cfg.audio.advanced ? advancedTooltip : (this.mk.volume * 100).toFixed(0) + '%'
},
mainMenuVisibility(val, isContextMenu) {
if(this.chrome.sidebarCollapsed && !isContextMenu) {
if (this.chrome.sidebarCollapsed && !isContextMenu) {
this.chrome.sidebarCollapsed = false
return
}
@ -336,7 +343,8 @@ const app = new Vue({
this.listennow.timestamp = 0;
this.browsepage.timestamp = 0;
this.radio.timestamp = 0;
} catch (e) { }
} catch (e) {
}
},
/**
* Grabs translation for localization.
@ -394,7 +402,7 @@ const app = new Vue({
},
async showSocialListeningTo() {
let contentIds = Object.keys(app.socialBadges.badgeMap)
app.showCollection({ data: this.socialBadges.mediaItems }, "Friends Listening To", "albums")
app.showCollection({data: this.socialBadges.mediaItems}, "Friends Listening To", "albums")
if (this.socialBadges.mediaItemDLState == 1 || this.socialBadges.mediaItemDLState == 2) {
return
}
@ -537,7 +545,7 @@ const app = new Vue({
self.selectedMediaItems[i].kind = "albums"
let res = await self.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/albums/${self.selectedMediaItems[i].id}/tracks`);
let ids = res.data.data.map(function (i) {
return { id: i.id, type: i.type }
return {id: i.id, type: i.type}
})
pl_items = pl_items.concat(ids)
} else if (self.selectedMediaItems[i].kind == "library-song" || self.selectedMediaItems[i].kind == "library-songs") {
@ -550,7 +558,7 @@ const app = new Vue({
self.selectedMediaItems[i].kind = "library-albums"
let res = await self.mk.api.v3.music(`/v1/me/library/albums/${self.selectedMediaItems[i].id}/tracks`);
let ids = res.data.data.map(function (i) {
return { id: i.id, type: i.type }
return {id: i.id, type: i.type}
})
pl_items = pl_items.concat(ids)
} else {
@ -577,7 +585,7 @@ const app = new Vue({
self.selectedMediaItems[i].kind = "albums"
let res = await self.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/albums/${self.selectedMediaItems[i].id}/tracks`);
let ids = res.data.data.map(function (i) {
return { id: i.id, type: i.type }
return {id: i.id, type: i.type}
})
pl_items = pl_items.concat(ids)
} else if (self.selectedMediaItems[i].kind == "library-song" || self.selectedMediaItems[i].kind == "library-songs") {
@ -590,7 +598,7 @@ const app = new Vue({
self.selectedMediaItems[i].kind = "library-albums"
let res = await self.mk.api.v3.music(`/v1/me/library/albums/${self.selectedMediaItems[i].id}/tracks`);
let ids = res.data.data.map(function (i) {
return { id: i.id, type: i.type }
return {id: i.id, type: i.type}
})
pl_items = pl_items.concat(ids)
} else {
@ -681,7 +689,7 @@ const app = new Vue({
"attributes": {
"name": "Cider User",
"handle": "CiderUser",
"artwork": { "url": "./assets/logocut.png" }
"artwork": {"url": "./assets/logocut.png"}
}
}
}
@ -735,7 +743,7 @@ const app = new Vue({
let truekind = (!kind.endsWith("s")) ? (kind + "s") : kind;
app.mk.setQueue({
[truekind]: [lastItem.attributes.playParams.id],
parameters: { l: app.mklang }
parameters: {l: app.mklang}
})
app.mk.mute()
setTimeout(() => {
@ -754,7 +762,7 @@ const app = new Vue({
for (let id of ids) {
if (!(i == 0 && ids[0] == lastItem.attributes.playParams.id)) {
try {
app.mk.playLater({ songs: [id] })
app.mk.playLater({songs: [id]})
} catch (err) {
}
}
@ -776,14 +784,14 @@ const app = new Vue({
}
break;
case "history":
let history = await app.mk.api.v3.music(`/v1/me/recent/played/tracks`, { l: app.mklang })
let history = await app.mk.api.v3.music(`/v1/me/recent/played/tracks`, {l: app.mklang})
if (history.data.data.length > 0) {
let lastItem = history.data.data[0]
let kind = lastItem.attributes.playParams.kind;
let truekind = (!kind.endsWith("s")) ? (kind + "s") : kind;
app.mk.setQueue({
[truekind]: [lastItem.attributes.playParams.id],
parameters: { l: app.mklang }
parameters: {l: app.mklang}
})
app.mk.mute()
setTimeout(() => {
@ -816,8 +824,7 @@ const app = new Vue({
try {
if (app.mk.nowPlayingItem.type !== 'song') {
CiderAudio.audioNodes.gainNode.gain.value = 0.70794578438;
}
else {
} else {
let soundcheck = tag.split(" ")
let numbers = []
for (let item of soundcheck) {
@ -831,20 +838,25 @@ const app = new Vue({
try {
//CiderAudio.audioNodes.gainNode.gain.value = (Math.min(Math.pow(10, (replaygain.gain / 20)), (1 / replaygain.peak)))
CiderAudio.audioNodes.gainNode.gain.value = gain
} catch (e) { }
} catch (e) {
}
}
} catch (e) {
try { ipcRenderer.send('SoundCheckTag', event, tag); }
catch (e) {
try {ipcRenderer.send('SoundCheckTag', event, tag);}
catch (e) {console.log("[Cider][MaikiwiSoundCheck] Error [Gave up after 3 consecutive attempts]: " + e)}
try {
ipcRenderer.send('SoundCheckTag', event, tag);
} catch (e) {
try {
ipcRenderer.send('SoundCheckTag', event, tag);
} catch (e) {
console.log("[Cider][MaikiwiSoundCheck] Error [Gave up after 3 consecutive attempts]: " + e)
}
}
} // brute force until it works
})
ipcRenderer.on('play', function (_event, mode, id) {
if (mode !== 'url') {
self.mk.setQueue({ [mode]: id, parameters: { l: self.mklang } }).then(() => {
self.mk.setQueue({[mode]: id, parameters: {l: self.mklang}}).then(() => {
app.mk.play()
})
@ -866,9 +878,9 @@ const app = new Vue({
ipcRenderer.send('wsapi-updatePlaybackState', wsapi.getAttributes());
})
this.mk.addEventListener(MusicKit.Events.queueItemsDidChange, ()=>{
this.mk.addEventListener(MusicKit.Events.queueItemsDidChange, () => {
if (self.$refs.queue) {
setTimeout(()=>{
setTimeout(() => {
self.$refs.queue.updateQueue();
}, 100)
}
@ -886,18 +898,16 @@ const app = new Vue({
localStorage.setItem("playingBitrate", "64")
CiderAudio.hierarchical_loading();
}
}
else if (app.mk.nowPlayingItem.flavor.includes("256")) {
} else if (app.mk.nowPlayingItem.flavor.includes("256")) {
if (localStorage.getItem("playingBitrate") !== "256") {
localStorage.setItem("playingBitrate", "256")
CiderAudio.hierarchical_loading();
}
}
else {
} else {
localStorage.setItem("playingBitrate", "256")
CiderAudio.hierarchical_loading();
}
} catch(e) {
} catch (e) {
localStorage.setItem("playingBitrate", "256")
CiderAudio.hierarchical_loading();
}
@ -962,7 +972,7 @@ const app = new Vue({
}
setTimeout(() => {
let i = (document.querySelector('#apple-music-player')?.src ?? "")
if (i.endsWith(".m3u8") || i.endsWith(".m3u")){
if (i.endsWith(".m3u8") || i.endsWith(".m3u")) {
this._playRadioStream(i)
}
}, 1500)
@ -979,7 +989,7 @@ const app = new Vue({
this.appRoute(window.location.hash)
}
if(this.page != "home") {
if (this.page != "home") {
this.resumeTabs()
}
this.mediaKeyFixes()
@ -990,7 +1000,7 @@ const app = new Vue({
this.$forceUpdate()
}, 500)
document.querySelector('#apple-music-video-player-controls').addEventListener('mousemove', () => {
this.showFoo('.music-player-info',2000);
this.showFoo('.music-player-info', 2000);
})
ipcRenderer.invoke("renderer-ready", true)
document.querySelector("#LOADER").remove()
@ -998,7 +1008,7 @@ const app = new Vue({
this.checkForThemeUpdates()
}
},
showFoo(querySelector,time) {
showFoo(querySelector, time) {
clearTimeout(this.idleTimer);
if (this.idleState == true) {
document.querySelector(querySelector).classList.remove("inactive");
@ -1021,7 +1031,11 @@ const app = new Vue({
.then(res => res.json())
.then(res => {
if (res[0].sha != theme.commit) {
const notify = notyf.open({ className: "notyf-info", type: "info", message: `[Themes] ${theme.name} has an update available.` })
const notify = notyf.open({
className: "notyf-info",
type: "info",
message: `[Themes] ${theme.name} has an update available.`
})
notify.on("click", () => {
app.appRoute("themes-github")
notyf.dismiss(notify)
@ -1269,10 +1283,12 @@ const app = new Vue({
}
})
}
} catch (e) { }
} catch (e) {
}
if (playlist.type == "library-playlist-folders") {
try {
await deepScan(playlist.id).catch(e => { })
await deepScan(playlist.id).catch(e => {
})
} catch (e) {
}
@ -1328,7 +1344,7 @@ const app = new Vue({
fetchOptions: {
method: "PATCH",
body: JSON.stringify({
attributes: { name: name }
attributes: {name: name}
})
}
}
@ -1343,7 +1359,7 @@ const app = new Vue({
fetchOptions: {
method: "PATCH",
body: JSON.stringify({
attributes: { name: name }
attributes: {name: name}
})
}
}
@ -1358,7 +1374,7 @@ const app = new Vue({
fetchOptions: {
method: "PATCH",
body: JSON.stringify({
attributes: { description: name }
attributes: {description: name}
})
}
}
@ -1386,9 +1402,9 @@ const app = new Vue({
fetchOptions: {
method: "POST",
body: JSON.stringify({
"attributes": { "name": name },
"attributes": {"name": name},
"relationships": {
"tracks": { "data": tracks },
"tracks": {"data": tracks},
}
})
}
@ -1451,7 +1467,7 @@ const app = new Vue({
app.appRoute("collection-list")
},
async showArtistView(artist, title, view) {
let response = (await app.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/artists/${artist}/view/${view}?l=${this.mklang}`, {}, { includeResponseMeta: !0 })).data
let response = (await app.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/artists/${artist}/view/${view}?l=${this.mklang}`, {}, {includeResponseMeta: !0})).data
console.debug(response)
await this.showCollection(response, title, "artists")
},
@ -1568,7 +1584,7 @@ const app = new Vue({
"limit[artists:top-songs]": 20,
"art[url]": "f",
l: this.mklang
}, { includeResponseMeta: !0 })
}, {includeResponseMeta: !0})
console.debug(artistData.data.data[0])
this.artistPage.data = artistData.data.data[0]
this.page = "artist-page"
@ -1651,13 +1667,12 @@ const app = new Vue({
const m = Math.floor(seconds % 3600 / 60);
const s = Math.floor(seconds % 60);
const dDisplay = d > 0 ? `${d} ${app.getLz("term.time.day", { "count": d })}` : "";
const hDisplay = h > 0 ? `${h} ${app.getLz("term.time.hour", { "count": h })}` : "";
const mDisplay = m > 0 ? `${m} ${app.getLz("term.time.minute", { "count": m })}` : "";
const dDisplay = d > 0 ? `${d} ${app.getLz("term.time.day", {"count": d})}` : "";
const hDisplay = h > 0 ? `${h} ${app.getLz("term.time.hour", {"count": h})}` : "";
const mDisplay = m > 0 ? `${m} ${app.getLz("term.time.minute", {"count": m})}` : "";
return dDisplay + (dDisplay && hDisplay ? ", " : "") + hDisplay + (hDisplay && mDisplay ? ", " : "") + mDisplay;
}
else {
} else {
let returnTime = datetime.toISOString().substring(11, 19);
const timeGates = {
@ -1726,7 +1741,7 @@ const app = new Vue({
kind: page,
id: id,
attributes: {
playParams: { kind: page, id: id, isLibrary: isLibrary }
playParams: {kind: page, id: id, isLibrary: isLibrary}
}
})
},
@ -1760,7 +1775,7 @@ const app = new Vue({
app.getTypeFromID("multiroom", id, false, {
platform: "web",
extend: "editorialArtwork,uber,lockupStyle"
}).then(()=> {
}).then(() => {
kind = "multiroom"
window.location.hash = `${kind}/${id}`
document.querySelector("#app-content").scrollTop = 0
@ -1768,14 +1783,15 @@ const app = new Vue({
return;
} else {
window.open(item.attributes.link.url)}
window.open(item.attributes.link.url)
}
}
} else if (kind == "multirooms"){
} else if (kind == "multirooms") {
app.getTypeFromID("multiroom", id, false, {
platform: "web",
extend: "editorialArtwork,uber,lockupStyle"
}).then(()=> {
}).then(() => {
kind = "multiroom"
window.location.hash = `${kind}/${id}`
document.querySelector("#app-content").scrollTop = 0
@ -1814,7 +1830,7 @@ const app = new Vue({
params["meta[albums:tracks]"] = 'popularity'
params["fields[albums]"] = "artistName,artistUrl,artwork,contentRating,editorialArtwork,editorialNotes,editorialVideo,name,playParams,releaseDate,url,copyright"
}
if (kind.includes("playlist") || kind.includes("album")){
if (kind.includes("playlist") || kind.includes("album")) {
app.page = (kind) + "_" + (id);
window.location.hash = `${kind}/${id}${isLibrary ? "/" + isLibrary : ''}`
app.getTypeFromID((kind), (id), (isLibrary), params);
@ -1849,19 +1865,19 @@ const app = new Vue({
}
},
isDisabled() {
if(!app.mk.nowPlayingItem || app.mk.nowPlayingItem.attributes.playParams.kind == 'radioStation') {
if (!app.mk.nowPlayingItem || app.mk.nowPlayingItem.attributes.playParams.kind == 'radioStation') {
return true;
}
return false;
},
isPrevDisabled() {
if(this.isDisabled() || (app.mk.queue._position == 0 && app.mk.currentPlaybackTime <= 2)) {
if (this.isDisabled() || (app.mk.queue._position == 0 && app.mk.currentPlaybackTime <= 2)) {
return true;
}
return false;
},
isNextDisabled() {
if(this.isDisabled() || app.mk.queue._position + 1 == app.mk.queue.length) {
if (this.isDisabled() || app.mk.queue._position + 1 == app.mk.queue.length) {
return true;
}
return false;
@ -1872,7 +1888,7 @@ const app = new Vue({
let u = await app.mkapi(app.mk.nowPlayingItem.playParams.kind,
(app.mk.nowPlayingItem.songId == -1),
(app.mk.nowPlayingItem.songId != -1) ? app.mk.nowPlayingItem.songId : app.mk.nowPlayingItem["id"],
{ "include[songs]": "albums,artists", l: app.mklang });
{"include[songs]": "albums,artists", l: app.mklang});
app.searchAndNavigate(u.data.data[0], target)
} catch (e) {
app.searchAndNavigate(app.mk.nowPlayingItem, target)
@ -1976,7 +1992,7 @@ const app = new Vue({
}
if (labelId != "") {
app.showingPlaylist = []
await app.getTypeFromID("recordLabel", labelId, false, { views: 'top-releases,latest-releases,top-artists' });
await app.getTypeFromID("recordLabel", labelId, false, {views: 'top-releases,latest-releases,top-artists'});
app.page = "recordLabel_" + labelId;
}
@ -2014,11 +2030,10 @@ const app = new Vue({
// console.log(kind, id, isLibrary)
app.mk.stop().then(() => {
if (kind.includes("artist")) {
app.mk.setStationQueue({ artist: 'a-' + id }).then(() => {
app.mk.setStationQueue({artist: 'a-' + id}).then(() => {
app.mk.play()
})
}
else {
} else {
app.playMediaItemById((id), (kind), (isLibrary), item.attributes.url ?? '')
}
})
@ -2041,7 +2056,7 @@ const app = new Vue({
} finally {
if (kind == "appleCurator") {
app.appleCurator = a.data.data[0]
} else if (kind == "multiroom"){
} else if (kind == "multiroom") {
app.multiroom = a.data.data[0]
} else {
this.getPlaylistContinuous(a, true)
@ -2050,7 +2065,7 @@ const app = new Vue({
} finally {
if (kind == "appleCurator") {
app.appleCurator = a.data.data[0]
} else if (kind == "multiroom"){
} else if (kind == "multiroom") {
app.multiroom = a.data.data[0]
} else {
this.getPlaylistContinuous(a, true)
@ -2062,7 +2077,7 @@ const app = new Vue({
let self = this
let prefs = this.cfg.libraryPrefs.songs
let albumAdded = self.library?.albums?.listing?.map(function (i) {
return { [i.id]: i.attributes?.dateAdded }
return {[i.id]: i.attributes?.dateAdded}
})
let startTime = new Date().getTime()
@ -2294,8 +2309,7 @@ const app = new Vue({
try {
if (method.includes(`multiroom`)) {
return await this.mk.api.v3.music(`v1/editorial/${app.mk.storefrontId}/${truemethod}/${term.toString()}`, params, params2)
}
else if (library) {
} else if (library) {
return await this.mk.api.v3.music(`v1/me/library/${truemethod}/${term.toString()}`, params, params2)
} else {
return await this.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/${truemethod}/${term.toString()}`, params, params2)
@ -2602,19 +2616,19 @@ const app = new Vue({
getTotalTime() {
try {
if (app.showingPlaylist.relationships.tracks.data.length === 0) return ""
const timeInSeconds = Math.round([].concat(...app.showingPlaylist.relationships.tracks.data).reduce((a, { attributes: { durationInMillis } }) => a + durationInMillis, 0) / 1000);
return `${app.showingPlaylist.relationships.tracks.data.length} ${app.getLz("term.track", { "count": app.showingPlaylist.relationships.tracks.data.length })}, ${app.convertTime(timeInSeconds, 'long')}`
const timeInSeconds = Math.round([].concat(...app.showingPlaylist.relationships.tracks.data).reduce((a, {attributes: {durationInMillis}}) => a + durationInMillis, 0) / 1000);
return `${app.showingPlaylist.relationships.tracks.data.length} ${app.getLz("term.track", {"count": app.showingPlaylist.relationships.tracks.data.length})}, ${app.convertTime(timeInSeconds, 'long')}`
} catch (err) {
return ""
}
},
async getLibrarySongs() {
let response = await this.mkapi("songs", true, "", { limit: 100, l: this.mklang }, { includeResponseMeta: !0 })
let response = await this.mkapi("songs", true, "", {limit: 100, l: this.mklang}, {includeResponseMeta: !0})
this.library.songs.listing = response.data.data
this.library.songs.meta = response.data.meta
},
async getLibraryAlbums() {
let response = await this.mkapi("albums", true, "", { limit: 100, l: this.mklang }, { includeResponseMeta: !0 })
let response = await this.mkapi("albums", true, "", {limit: 100, l: this.mklang}, {includeResponseMeta: !0})
this.library.albums.listing = response.data.data
this.library.albums.meta = response.data.meta
},
@ -2708,7 +2722,7 @@ const app = new Vue({
fetchOptions: {
method: "POST",
body: JSON.stringify({
attributes: { name: name }
attributes: {name: name}
})
}
}
@ -3044,7 +3058,8 @@ const app = new Vue({
} else { //4xx rejected
getToken(2, '', '', id, lang, '');
}
} catch (e) { }
} catch (e) {
}
}
req2.send();
}
@ -3102,8 +3117,7 @@ const app = new Vue({
translation: ''
});
app.lyrics = preLrc.reverse();
}
catch (e) {
} catch (e) {
app.lyrics = "";
}
};
@ -3145,6 +3159,7 @@ const app = new Vue({
function b64_to_utf8(str) {
return decodeURIComponent(escape(window.atob(str)));
}
const htmlDecode = (input) => {
const doc = new DOMParser().parseFromString(input, "text/html");
return doc.documentElement.textContent;
@ -3175,8 +3190,7 @@ const app = new Vue({
translation: ''
});
app.lyrics = preLrc.reverse();
}
catch (e) {
} catch (e) {
console.log(e)
app.loadNeteaseLyrics();
app.lyrics = "";
@ -3227,15 +3241,15 @@ const app = new Vue({
line: "lrcInstrumental"
});
}
preLrc.push({ startTime: start, endTime: end, line: element.textContent });
preLrc.push({startTime: start, endTime: end, line: element.textContent});
endTimes.push(end);
}
// first line dot
if (preLrc.length > 0)
preLrc.unshift({ startTime: 0, endTime: preLrc[0].startTime, line: "lrcInstrumental" });
preLrc.unshift({startTime: 0, endTime: preLrc[0].startTime, line: "lrcInstrumental"});
} else {
for (let element of lyricsLines) {
preLrc.push({ startTime: 9999999, endTime: 9999999, line: element.textContent });
preLrc.push({startTime: 9999999, endTime: 9999999, line: element.textContent});
}
}
this.lyrics = preLrc;
@ -3303,17 +3317,17 @@ const app = new Vue({
console.debug(id, truekind, isLibrary)
try {
if (truekind.includes("artist")) {
app.mk.setStationQueue({ artist: 'a-' + id }).then(() => {
app.mk.setStationQueue({artist: 'a-' + id}).then(() => {
app.mk.play()
})
} else if (truekind == "radioStations") {
this.mk.setStationQueue({ url: raurl }).then(function (queue) {
this.mk.setStationQueue({url: raurl}).then(function (queue) {
MusicKit.getInstance().play()
});
} else {
this.mk.setQueue({
[truekind]: [id],
parameters: { l: this.mklang }
parameters: {l: this.mklang}
}).then(function (queue) {
MusicKit.getInstance().play()
})
@ -3354,7 +3368,7 @@ const app = new Vue({
if (item) {
app.mk.setQueue({
[item.attributes.playParams.kind ?? item.type]: item.attributes.playParams.id ?? item.id,
parameters: { l: app.mklang }
parameters: {l: app.mklang}
}).then(function () {
app.mk.play().then(() => {
if (app.mk.shuffleMode == 1) {
@ -3411,7 +3425,7 @@ const app = new Vue({
for (let kind in itemsToPlay) {
let ids = itemsToPlay[kind]
if (ids.length > 0) {
app.mk.playLater({ [kind + "s"]: itemsToPlay[kind] })
app.mk.playLater({[kind + "s"]: itemsToPlay[kind]})
}
}
})
@ -3432,7 +3446,7 @@ const app = new Vue({
let ids = itemsToPlay[kind]
if (ids.length > 0) {
if (app.mk.queue._itemIDs.length > 0) {
app.mk.playLater({ [kind + "s"]: itemsToPlay[kind] }).then(function () {
app.mk.playLater({[kind + "s"]: itemsToPlay[kind]}).then(function () {
ind += 1;
console.log(ind, Object.keys(itemsToPlay).length)
if (ind >= Object.keys(itemsToPlay).length) {
@ -3441,7 +3455,7 @@ const app = new Vue({
}
)
} else {
app.mk.setQueue({ [kind + "s"]: itemsToPlay[kind] }).then(function () {
app.mk.setQueue({[kind + "s"]: itemsToPlay[kind]}).then(function () {
ind += 1;
console.log(ind, Object.keys(itemsToPlay).length)
if (ind >= Object.keys(itemsToPlay).length) {
@ -3460,7 +3474,7 @@ const app = new Vue({
if (truekind == "playlists" && (id.startsWith("p.") || id.startsWith("pl.u"))) {
app.mk.setQueue({
[item.attributes.playParams.kind ?? item.type]: item.attributes.playParams.id ?? item.id,
parameters: { l: app.mklang }
parameters: {l: app.mklang}
}).then(function () {
app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.id) ?? 1).then(function () {
if ((app.showingPlaylist && app.showingPlaylist.id == id)) {
@ -3500,7 +3514,7 @@ const app = new Vue({
} else {
this.mk.setQueue({
[truekind]: [id],
parameters: { l: this.mklang }
parameters: {l: this.mklang}
}).then(function (queue) {
if (item && ((queue._itemIDs[childIndex] != item.id))) {
childIndex = queue._itemIDs.indexOf(item.id)
@ -3624,12 +3638,16 @@ const app = new Vue({
with: ["serverBubbles", "lyricSnippet"],
"art[url]": "f",
"art[social-profiles:url]": "c"
}, { includeResponseMeta: !0 }).then(function (results) {
}, {includeResponseMeta: !0}).then(function (results) {
results.data.results["meta"] = results.data.meta
self.search.resultsSocial = results.data.results
})
this.search.resultsLibrary = await app.mk.api.library.search(app.search.term, { types: 'library-songs,library-albums,library-playlists,library-artists', limit: 25, offset: 0 })
this.search.resultsLibrary = await app.mk.api.library.search(app.search.term, {
types: 'library-songs,library-albums,library-playlists,library-artists',
limit: 25,
offset: 0
})
},
async inLibrary(items = []) {
@ -3647,7 +3665,7 @@ const app = new Vue({
return type.type == this
}, type)
if (index == -1) {
types.push({ type: type, id: [id] })
types.push({type: type, id: [id]})
} else {
types[index].id.push(id)
}
@ -3783,7 +3801,7 @@ const app = new Vue({
if (app.mk.nowPlayingItem != null && app.mk.nowPlayingItem.attributes != null && app.mk.nowPlayingItem.attributes.artwork != null && app.mk.nowPlayingItem.attributes.artwork.url != null && app.mk.nowPlayingItem.attributes.artwork.url != '') {
this.currentArtUrlRaw = (this.mk["nowPlayingItem"]["attributes"]["artwork"]["url"] ?? '')
this.currentArtUrl = (this.mk["nowPlayingItem"]["attributes"]["artwork"]["url"] ?? '').replace('{w}', artworkSize).replace('{h}', artworkSize);
if(this.mk.nowPlayingItem._assets[0].artworkURL) {
if (this.mk.nowPlayingItem._assets[0].artworkURL) {
this.currentArtUrl = this.mk.nowPlayingItem._assets[0].artworkURL
}
try {
@ -3796,7 +3814,7 @@ const app = new Vue({
if (data != null && data !== "" && data.attributes != null && data.attributes.artwork != null) {
this.currentArtUrlRaw = (data["attributes"]["artwork"]["url"] ?? '')
this.currentArtUrl = (data["attributes"]["artwork"]["url"] ?? '').replace('{w}', artworkSize).replace('{h}', artworkSize);
if(this.mk.nowPlayingItem._assets[0].artworkURL) {
if (this.mk.nowPlayingItem._assets[0].artworkURL) {
this.currentArtUrl = this.mk.nowPlayingItem._assets[0].artworkURL
}
ipcRenderer.send('updateRPCImage', this.currentArtUrl ?? '');
@ -3851,10 +3869,10 @@ const app = new Vue({
},
quickPlay(query) {
let self = this
MusicKit.getInstance().api.search(query, { limit: 2, types: 'songs' }).then(function (data) {
MusicKit.getInstance().api.search(query, {limit: 2, types: 'songs'}).then(function (data) {
MusicKit.getInstance().setQueue({
song: data["songs"]['data'][0]["id"],
parameters: { l: app.mklang }
parameters: {l: app.mklang}
}).then(function (queue) {
MusicKit.getInstance().play()
setTimeout(() => {
@ -4011,10 +4029,10 @@ const app = new Vue({
setAirPlayCodeUI() {
this.modals.airplayPW = true
},
sendAirPlaySuccess(){
sendAirPlaySuccess() {
notyf.success('Device paired successfully!');
},
sendAirPlayFailed(){
sendAirPlayFailed() {
notyf.error('Device paring failed!');
},
windowFocus(val) {
@ -4039,7 +4057,7 @@ const app = new Vue({
let data_type = this.mk.nowPlayingItem.playParams.kind
let item_id = this.mk.nowPlayingItem.attributes.playParams.id ?? this.mk.nowPlayingItem.id
let isLibrary = this.mk.nowPlayingItem.attributes.playParams.isLibrary ?? false
let params = { "fields[songs]": "inLibrary", "fields[albums]": "inLibrary", "relate": "library", "t": "1" }
let params = {"fields[songs]": "inLibrary", "fields[albums]": "inLibrary", "relate": "library", "t": "1"}
app.selectedMediaItems = []
app.select_selectMediaItem(item_id, data_type, 0, '12344', isLibrary)
let useMenu = "normal"
@ -4119,7 +4137,7 @@ const app = new Vue({
"icon": "./assets/feather/radio.svg",
"name": app.getLz('action.startRadio'),
"action": function () {
app.mk.setStationQueue({ song: app.mk.nowPlayingItem.id }).then(() => {
app.mk.setStationQueue({song: app.mk.nowPlayingItem.id}).then(() => {
app.mk.play()
app.selectedMediaItems = []
})
@ -4280,7 +4298,7 @@ const app = new Vue({
app.appMode = 'player';
}
},
pip(){
pip() {
document.querySelector('video#apple-music-video-player').requestPictureInPicture()
// .then(pictureInPictureWindow => {
// pictureInPictureWindow.addEventListener("resize", () => {
@ -4461,12 +4479,15 @@ const app = new Vue({
_playRadioStream(e) {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = process;
xhr.open("GET", e , true);
xhr.open("GET", e, true);
xhr.send();
let self = this
function process() {
if (xhr.readyState == 4) {
let sources = xhr.responseText.match(/^(?!#)(?!\s).*$/mg).filter(function(element){return (element);});
let sources = xhr.responseText.match(/^(?!#)(?!\s).*$/mg).filter(function (element) {
return (element);
});
// Load first source
let src = sources[0];
app.mk._services.mediaItemPlayback._currentPlayer._playAssetURL(src, false)
@ -4477,4 +4498,4 @@ const app = new Vue({
})
export { app }
export {app}

View file

@ -64,7 +64,6 @@
background-color: #eee;
}
}
</style>
</head>
@ -92,6 +91,11 @@
</mini-view>
</div>
</transition>
<transition name="fsModeSwitch">
<div class="fullscreen-view-container oobe" v-if="appMode == 'oobe'">
<cider-oobe></cider-oobe>
</div>
</transition>
<%- include('app/panels'); %>
<div class="cursor" v-if="chrome.showCursor"></div>
</div>

View file

@ -1,19 +1,127 @@
<script type="text/x-template" id="cider-oobe">
<div class="content-inner oobe">
<div class="oobe-view">
<!-- before_we_start-->
<transition name="fade">
<div class="oobe-view" v-if="screen == 'before_we_start'">
<div class="oobe-header">
Welcome to Cider
{{ getLz("oobe.amupsell.title") }}
</div>
<div class="oobe-body">
body text
<div class="oobe-body text">{{ getLz("oobe.amupsell.text") }}</div>
<div class="oobe-footer">
<div class="btn-group">
<div class="md-btn" @click="screen = 'welcome'">{{ getLz("oobe.next") }}</div>
</div>
</div>
</div>
</transition>
<!-- Welcome -->
<transition name="fade">
<div class="oobe-view" v-if="screen == 'welcome'">
<div class="oobe-header">
{{ getLz("oobe.intro.title") }}
</div>
<div class="oobe-body text">{{ getLz("oobe.intro.text") }}</div>
<div class="oobe-footer">
<div class="btn-group">
<div class="md-btn" @click="screen = 'before_we_start'">{{ getLz("oobe.previous") }}</div>
<div class="md-btn" @click="screen = 'general'">{{ getLz("oobe.next") }}</div>
</div>
</div>
</div>
</transition>
<!-- General -->
<transition name="fade">
<div class="oobe-view" v-if="screen == 'general'">
<div class="oobe-header">
{{ getLz("oobe.general.title") }}
</div>
<div class="oobe-body text">{{ getLz("oobe.general.text") }}</div>
<div class="oobe-footer">
<div class="btn-group">
<div class="md-btn" @click="screen = 'welcome'">{{ getLz("oobe.previous") }}</div>
<div class="md-btn" @click="screen = 'visual'">{{ getLz("oobe.next") }}</div>
</div>
</div>
</div>
</transition>
<!-- Visual -->
<transition name="fade">
<div class="oobe-view" v-if="screen == 'visual'">
<div class="oobe-header">
{{ getLz("oobe.visual.title") }}
</div>
<div class="oobe-body visual">
<b-row>
<b-col>
<div class="card bg-dark text-white stylePicker">
<div class="card-body">
<img class="visualPreview" src="./assets/oobe/ss1.png" alt="TEMP">
</div>
<div class="card-footer">
Mojave
</div>
</div>
</b-col>
<b-col>
<div class="card bg-dark text-white stylePicker">
<div class="card-body">
<img class="visualPreview" src="./assets/oobe/ss2.png" alt="TEMP">
</div>
<div class="card-footer">
Maverick
</div>
</div>
</b-col>
</b-row>
<div class="blurb">{{getLz("oobe.visual.layout.text")}}</div>
</div>
<div class="oobe-footer">
<div class="btn-group">
<div class="md-btn">Previous</div>
<div class="md-btn">Next</div>
<div class="md-btn" @click="screen = 'general'">{{ getLz("oobe.previous") }}</div>
<div class="md-btn" @click="screen = 'audio'">{{ getLz("oobe.next") }}</div>
</div>
</div>
</div>
</transition>
<!-- Audio -->
<transition name="fade">
<div class="oobe-view" v-if="screen == 'audio'">
<div class="oobe-header">
{{ getLz("oobe.audio.title") }}
</div>
<div class="oobe-body">
<div class="blurb">{{ getLz("oobe.audio.text") }}</div>
<div class="md-option-container">
<div class="settings-option-body">
<div class="md-option-line">
<div class="md-option-segment">
{{getLz('settings.option.audio.enableAdvancedFunctionality')}}
<br>
<small>{{getLz('settings.option.audio.enableAdvancedFunctionality.description')}}</small>
</div>
<div class="md-option-segment md-option-segment_auto">
<label>
<input type="checkbox" v-model="$root.cfg.advanced.AudioContext"
v-on:change="toggleAudioContext"
switch/>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="oobe-footer">
<div class="btn-group">
<div class="md-btn" @click="screen = 'visual'">{{ getLz("oobe.previous") }}</div>
<div class="md-btn">{{ getLz("oobe.next") }}</div>
</div>
</div>
</div>
</transition>
</div>
</script>
<script>
@ -21,13 +129,16 @@
template: '#cider-oobe',
data: function () {
return {
screen: "before_we_start"
}
},
async mounted() {
},
methods: {
getLz() {
return this.$root.getLz.apply(this.$root, arguments);
}
}
});
</script>