新增设置-基本设置-软件字体设置
parent
83ddf74890
commit
5eb9107adf
|
@ -3,6 +3,7 @@
|
||||||
- 新增“双击列表里的歌曲时自动切换到当前列表播放”设置,此功能仅对歌单、排行榜有效,默认关闭
|
- 新增“双击列表里的歌曲时自动切换到当前列表播放”设置,此功能仅对歌单、排行榜有效,默认关闭
|
||||||
- 新增打开收藏的在线列表的对应平台详情页功能,可以在我的列表-列表右键菜单中使用
|
- 新增打开收藏的在线列表的对应平台详情页功能,可以在我的列表-列表右键菜单中使用
|
||||||
- 新增定时暂停播放功能,由于此功能大多数人可能不常用,所以将其放在设置-基本设置中
|
- 新增定时暂停播放功能,由于此功能大多数人可能不常用,所以将其放在设置-基本设置中
|
||||||
|
- 新增设置-基本设置-软件字体设置,此设置可用于设置主界面的字体(已知的问题:Windows 7 下可能会出现字体列表为空的情况,这是当前系统的 Powershell 版本小于5.1导致的,请自行尝试看常见解决)
|
||||||
- 新增Scheme URL对音乐搜索的调用支持,详情看常见问题-Scheme URL支持
|
- 新增Scheme URL对音乐搜索的调用支持,详情看常见问题-Scheme URL支持
|
||||||
- 新增Scheme URL以url传参的方式调用,详情看常见问题-Scheme URL支持
|
- 新增Scheme URL以url传参的方式调用,详情看常见问题-Scheme URL支持
|
||||||
- 自定义源新增更新弹窗方法,同时自定义源管理新增是否允许源显示更新弹窗设置(出于防止滥用考虑),当源作者想要通知用户源已更新时,可以调用此方法弹窗告诉用户,调用说明看常见问题-自定义源部分
|
- 自定义源新增更新弹窗方法,同时自定义源管理新增是否允许源显示更新弹窗设置(出于防止滥用考虑),当源作者想要通知用户源已更新时,可以调用此方法弹窗告诉用户,调用说明看常见问题-自定义源部分
|
||||||
|
|
|
@ -2,7 +2,7 @@ const path = require('path')
|
||||||
const os = require('os')
|
const os = require('os')
|
||||||
|
|
||||||
const defaultSetting = {
|
const defaultSetting = {
|
||||||
version: '1.0.50',
|
version: '1.0.51',
|
||||||
player: {
|
player: {
|
||||||
togglePlayMethod: 'listLoop',
|
togglePlayMethod: 'listLoop',
|
||||||
highQuality: false,
|
highQuality: false,
|
||||||
|
@ -102,6 +102,7 @@ const defaultSetting = {
|
||||||
sourceId: 'kw',
|
sourceId: 'kw',
|
||||||
apiSource: 'temp',
|
apiSource: 'temp',
|
||||||
sourceNameType: 'alias',
|
sourceNameType: 'alias',
|
||||||
|
font: '',
|
||||||
isShowAnimation: true,
|
isShowAnimation: true,
|
||||||
randomAnimate: true,
|
randomAnimate: true,
|
||||||
ignoreVersion: null,
|
ignoreVersion: null,
|
||||||
|
|
|
@ -210,6 +210,7 @@
|
||||||
"setting__basic_control_btn_position": "Control Button Position",
|
"setting__basic_control_btn_position": "Control Button Position",
|
||||||
"setting__basic_control_btn_position_left": "Left",
|
"setting__basic_control_btn_position_left": "Left",
|
||||||
"setting__basic_control_btn_position_right": "Right",
|
"setting__basic_control_btn_position_right": "Right",
|
||||||
|
"setting__basic_font": "Font",
|
||||||
"setting__basic_lang": "Language",
|
"setting__basic_lang": "Language",
|
||||||
"setting__basic_lang_title": "The language displayed in the software",
|
"setting__basic_lang_title": "The language displayed in the software",
|
||||||
"setting__basic_show_animation": "Show switching animation",
|
"setting__basic_show_animation": "Show switching animation",
|
||||||
|
|
|
@ -210,6 +210,7 @@
|
||||||
"setting__basic_control_btn_position": "控制按钮位置",
|
"setting__basic_control_btn_position": "控制按钮位置",
|
||||||
"setting__basic_control_btn_position_left": "左边",
|
"setting__basic_control_btn_position_left": "左边",
|
||||||
"setting__basic_control_btn_position_right": "右边",
|
"setting__basic_control_btn_position_right": "右边",
|
||||||
|
"setting__basic_font": "字体",
|
||||||
"setting__basic_lang": "语言",
|
"setting__basic_lang": "语言",
|
||||||
"setting__basic_lang_title": "软件显示的语言",
|
"setting__basic_lang_title": "软件显示的语言",
|
||||||
"setting__basic_show_animation": "显示切换动画",
|
"setting__basic_show_animation": "显示切换动画",
|
||||||
|
|
|
@ -210,6 +210,7 @@
|
||||||
"setting__basic_control_btn_position": "控制按鈕位置",
|
"setting__basic_control_btn_position": "控制按鈕位置",
|
||||||
"setting__basic_control_btn_position_left": "左邊",
|
"setting__basic_control_btn_position_left": "左邊",
|
||||||
"setting__basic_control_btn_position_right": "右邊",
|
"setting__basic_control_btn_position_right": "右邊",
|
||||||
|
"setting__basic_font": "字體",
|
||||||
"setting__basic_lang": "語言",
|
"setting__basic_lang": "語言",
|
||||||
"setting__basic_lang_title": "軟件顯示的語言",
|
"setting__basic_lang_title": "軟件顯示的語言",
|
||||||
"setting__basic_show_animation": "顯示切換動畫",
|
"setting__basic_show_animation": "顯示切換動畫",
|
||||||
|
|
|
@ -20,13 +20,20 @@ import useApp from '@renderer/core/useApp'
|
||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
const theme = useRefGetter('theme')
|
const theme = useRefGetter('theme')
|
||||||
|
const font = useRefGetter('font')
|
||||||
|
|
||||||
const dom_root = document.getElementById('root')
|
const dom_root = document.getElementById('root')
|
||||||
|
|
||||||
watch(theme, (val) => {
|
watch(theme, (val) => {
|
||||||
dom_root.className = val
|
dom_root.className = val
|
||||||
|
}, {
|
||||||
|
immediate: true,
|
||||||
|
})
|
||||||
|
watch(font, (val) => {
|
||||||
|
document.documentElement.style.fontFamily = val
|
||||||
|
}, {
|
||||||
|
immediate: true,
|
||||||
})
|
})
|
||||||
dom_root.className = theme.value
|
|
||||||
|
|
||||||
useApp()
|
useApp()
|
||||||
|
|
||||||
|
|
|
@ -41,3 +41,6 @@ table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
}
|
}
|
||||||
|
button {
|
||||||
|
font-family: inherit;
|
||||||
|
}
|
||||||
|
|
|
@ -6,6 +6,9 @@ export default {
|
||||||
let theme = themes.find(theme => theme.id == state.setting.themeId)
|
let theme = themes.find(theme => theme.id == state.setting.themeId)
|
||||||
return (theme && theme.className) || ''
|
return (theme && theme.className) || ''
|
||||||
},
|
},
|
||||||
|
font(state) {
|
||||||
|
return state.setting.font
|
||||||
|
},
|
||||||
themes(state) {
|
themes(state) {
|
||||||
return {
|
return {
|
||||||
active: state.setting.themeId,
|
active: state.setting.themeId,
|
||||||
|
|
|
@ -45,12 +45,16 @@ dd(:tips="$t('setting__basic_sourcename_title')")
|
||||||
div
|
div
|
||||||
base-checkbox.gap-left(v-for="item in sourceNameTypes" :key="item.id" :id="`setting_abasic_sourcename_${item.id}`"
|
base-checkbox.gap-left(v-for="item in sourceNameTypes" :key="item.id" :id="`setting_abasic_sourcename_${item.id}`"
|
||||||
name="setting_basic_sourcename" need v-model="currentStting.sourceNameType" :value="item.id" :label="item.label")
|
name="setting_basic_sourcename" need v-model="currentStting.sourceNameType" :value="item.id" :label="item.label")
|
||||||
|
|
||||||
dd
|
dd
|
||||||
h3#basic_control_btn_position {{$t('setting__basic_control_btn_position')}}
|
h3#basic_control_btn_position {{$t('setting__basic_control_btn_position')}}
|
||||||
div
|
div
|
||||||
base-checkbox.gap-left(v-for="item in controlBtnPositionList" :key="item.id" :id="`setting_basic_control_btn_position_${item.id}`"
|
base-checkbox.gap-left(v-for="item in controlBtnPositionList" :key="item.id" :id="`setting_basic_control_btn_position_${item.id}`"
|
||||||
name="setting_basic_control_btn_position" need v-model="currentStting.controlBtnPosition" :value="item.id" :label="item.name")
|
name="setting_basic_control_btn_position" need v-model="currentStting.controlBtnPosition" :value="item.id" :label="item.name")
|
||||||
|
dd
|
||||||
|
h3#basic_font {{$t('setting__basic_font')}}
|
||||||
|
div
|
||||||
|
base-selection.gap-teft(:list="fontList" v-model="currentStting.font" item-key="id" item-name="label")
|
||||||
|
|
||||||
play-timeout-modal(v-model="isShowPlayTimeoutModal")
|
play-timeout-modal(v-model="isShowPlayTimeoutModal")
|
||||||
user-api-modal(v-model="isShowUserApiModal")
|
user-api-modal(v-model="isShowUserApiModal")
|
||||||
</template>
|
</template>
|
||||||
|
@ -63,10 +67,12 @@ import { currentStting } from '../setting'
|
||||||
import { setWindowSize } from '@renderer/utils'
|
import { setWindowSize } from '@renderer/utils'
|
||||||
import apiSourceInfo from '@renderer/utils/music/api-source-info'
|
import apiSourceInfo from '@renderer/utils/music/api-source-info'
|
||||||
import { useTimeout } from '@renderer/utils/timeoutStop'
|
import { useTimeout } from '@renderer/utils/timeoutStop'
|
||||||
|
import { getSystemFonts } from '@renderer/utils/tools'
|
||||||
|
|
||||||
import PlayTimeoutModal from './PlayTimeoutModal'
|
import PlayTimeoutModal from './PlayTimeoutModal'
|
||||||
import UserApiModal from './UserApiModal'
|
import UserApiModal from './UserApiModal'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SettingBasic',
|
name: 'SettingBasic',
|
||||||
components: {
|
components: {
|
||||||
|
@ -144,6 +150,13 @@ export default {
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const systemFontList = ref([])
|
||||||
|
const fontList = computed(() => {
|
||||||
|
return [{ id: '', label: t('setting__desktop_lyric_font_default') }, ...systemFontList.value]
|
||||||
|
})
|
||||||
|
getSystemFonts().then(fonts => {
|
||||||
|
systemFontList.value = fonts.map(f => ({ id: f, label: f.replace(/(^"|"$)/g, '') }))
|
||||||
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
currentStting,
|
currentStting,
|
||||||
|
@ -156,6 +169,7 @@ export default {
|
||||||
langList,
|
langList,
|
||||||
sourceNameTypes,
|
sourceNameTypes,
|
||||||
controlBtnPositionList,
|
controlBtnPositionList,
|
||||||
|
fontList,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,6 +75,7 @@ export const currentStting = ref({
|
||||||
langId: 'cns',
|
langId: 'cns',
|
||||||
themeId: 0,
|
themeId: 0,
|
||||||
sourceId: 0,
|
sourceId: 0,
|
||||||
|
font: '',
|
||||||
isShowAnimation: true,
|
isShowAnimation: true,
|
||||||
randomAnimate: true,
|
randomAnimate: true,
|
||||||
isAgreePact: false,
|
isAgreePact: false,
|
||||||
|
|
Loading…
Reference in New Issue