mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
feat: add RealIP setting
This commit is contained in:
parent
481ba6bce3
commit
adafffd86b
3 changed files with 58 additions and 0 deletions
|
|
@ -641,6 +641,33 @@
|
|||
<button @click="sendProxyConfig">更新代理</button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="isElectron">
|
||||
<h3>Real IP</h3>
|
||||
<div class="item">
|
||||
<div class="left">
|
||||
<div class="title"> Real IP </div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="toggle">
|
||||
<input
|
||||
id="enable-real-ip"
|
||||
v-model="enableRealIP"
|
||||
type="checkbox"
|
||||
name="enable-real-ip"
|
||||
/>
|
||||
<label for="enable-real-ip"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="real-ip" :class="{ disabled: !enableRealIP }">
|
||||
<input
|
||||
v-model="realIP"
|
||||
class="text-input"
|
||||
placeholder="IP地址"
|
||||
:disabled="!enableRealIP"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="isElectron">
|
||||
<h3>快捷键</h3>
|
||||
|
|
@ -1124,6 +1151,28 @@ export default {
|
|||
});
|
||||
},
|
||||
},
|
||||
enableRealIP: {
|
||||
get() {
|
||||
return this.settings.enableRealIP || false;
|
||||
},
|
||||
set(value) {
|
||||
this.$store.commit('updateSettings', {
|
||||
key: 'enableRealIP',
|
||||
value: value,
|
||||
});
|
||||
},
|
||||
},
|
||||
realIP: {
|
||||
get() {
|
||||
return this.settings.realIP || '';
|
||||
},
|
||||
set(value) {
|
||||
this.$store.commit('updateSettings', {
|
||||
key: 'realIP',
|
||||
value: value,
|
||||
});
|
||||
},
|
||||
},
|
||||
proxyPort: {
|
||||
get() {
|
||||
return this.settings.proxyConfig?.port || '';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue