PyPyDance Discord RPC

This commit is contained in:
Natsumi
2021-09-13 04:42:55 +12:00
parent 584f0df0ed
commit b43eb982ee
7 changed files with 374 additions and 148 deletions

View File

@@ -8,6 +8,8 @@ import Noty from 'noty';
import Vue from 'vue';
import ElementUI from 'element-ui';
import locale from 'element-ui/lib/locale/lang/en';
import MarqueeText from 'vue-marquee-text-component';
Vue.component('marquee-text', MarqueeText);
import configRepository from './repository/config.js';
@@ -178,6 +180,15 @@ speechSynthesis.getVoices();
currentTime: new Date().toJSON(),
cpuUsage: 0,
config: {},
nowPlaying: {
url: '',
name: '',
length: 0,
startTime: 0,
elapsed: 0,
percentage: 0,
remainingText: ''
},
lastLocation: {
date: 0,
location: '',
@@ -280,6 +291,10 @@ speechSynthesis.getVoices();
this.config = JSON.parse(json);
};
$app.methods.nowPlayingUpdate = function (json) {
this.nowPlaying = JSON.parse(json);
};
$app.methods.lastLocationUpdate = function (json) {
this.lastLocation = JSON.parse(json);
};