|
|
@ -397,7 +397,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { mapState } from 'vuex';
|
|
|
|
import { mapState, mapActions } from 'vuex';
|
|
|
|
import { isLooseLoggedIn, doLogout } from '@/utils/auth';
|
|
|
|
import { isLooseLoggedIn, doLogout } from '@/utils/auth';
|
|
|
|
import { auth as lastfmAuth } from '@/api/lastfm';
|
|
|
|
import { auth as lastfmAuth } from '@/api/lastfm';
|
|
|
|
import { changeAppearance, bytesToSize } from '@/utils/common';
|
|
|
|
import { changeAppearance, bytesToSize } from '@/utils/common';
|
|
|
@ -485,17 +485,16 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
outputDevice: {
|
|
|
|
outputDevice: {
|
|
|
|
get() {
|
|
|
|
get() {
|
|
|
|
// if (this.withoutAudioPrivilege === true) this.getAllOutputDevices();
|
|
|
|
if (this.withoutAudioPrivilege === true) this.getAllOutputDevices();
|
|
|
|
// const isValidDevice = this.allOutputDevices.find(
|
|
|
|
const isValidDevice = this.allOutputDevices.find(
|
|
|
|
// device => device.deviceId === this.settings.outputDevice
|
|
|
|
device => device.deviceId === this.settings.outputDevice
|
|
|
|
// );
|
|
|
|
);
|
|
|
|
// if (
|
|
|
|
if (
|
|
|
|
// this.settings.outputDevice === undefined ||
|
|
|
|
this.settings.outputDevice === undefined ||
|
|
|
|
// isValidDevice === undefined
|
|
|
|
isValidDevice === undefined
|
|
|
|
// )
|
|
|
|
)
|
|
|
|
// return 'default'; // Default deviceId
|
|
|
|
return 'default'; // Default deviceId
|
|
|
|
// return this.settings.outputDevice;
|
|
|
|
return this.settings.outputDevice;
|
|
|
|
return 'default'; // Default deviceId
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
set(deviceId) {
|
|
|
|
set(deviceId) {
|
|
|
|
if (deviceId === this.settings.outputDevice || deviceId === undefined)
|
|
|
|
if (deviceId === this.settings.outputDevice || deviceId === undefined)
|
|
|
@ -640,6 +639,7 @@ export default {
|
|
|
|
config.protocol = value;
|
|
|
|
config.protocol = value;
|
|
|
|
if (value === 'noProxy') {
|
|
|
|
if (value === 'noProxy') {
|
|
|
|
ipcRenderer.send('removeProxy');
|
|
|
|
ipcRenderer.send('removeProxy');
|
|
|
|
|
|
|
|
this.showToast('已关闭代理');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.$store.commit('updateSettings', {
|
|
|
|
this.$store.commit('updateSettings', {
|
|
|
|
key: 'proxyConfig',
|
|
|
|
key: 'proxyConfig',
|
|
|
@ -684,6 +684,7 @@ export default {
|
|
|
|
this.countDBSize('tracks');
|
|
|
|
this.countDBSize('tracks');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
...mapActions(['showToast']),
|
|
|
|
getAllOutputDevices() {
|
|
|
|
getAllOutputDevices() {
|
|
|
|
navigator.mediaDevices.enumerateDevices().then(devices => {
|
|
|
|
navigator.mediaDevices.enumerateDevices().then(devices => {
|
|
|
|
this.allOutputDevices = devices.filter(device => {
|
|
|
|
this.allOutputDevices = devices.filter(device => {
|
|
|
@ -752,6 +753,7 @@ export default {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
ipcRenderer.send('setProxy', config);
|
|
|
|
ipcRenderer.send('setProxy', config);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.showToast('已更新代理设置');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -865,7 +867,7 @@ h3 {
|
|
|
|
.title {
|
|
|
|
.title {
|
|
|
|
font-size: 16px;
|
|
|
|
font-size: 16px;
|
|
|
|
font-weight: 500;
|
|
|
|
font-weight: 500;
|
|
|
|
opacity: 0.68;
|
|
|
|
opacity: 0.78;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|