feat: 优化设置页面布局,方便配置必须项
This commit is contained in:
parent
e9b1d94fb3
commit
27fecd788b
@ -22,8 +22,12 @@ var vConsole = new window.VConsole();
|
|||||||
</a>)
|
</a>)
|
||||||
</h2>
|
</h2>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
<div class="rows">
|
||||||
<select id="did">
|
<select id="did">
|
||||||
</select>
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="cmds">
|
<div id="cmds">
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
@ -37,14 +41,14 @@ var vConsole = new window.VConsole();
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div>
|
<div class="rows">
|
||||||
<datalist id="autocomplete-list"></datalist>
|
<datalist id="autocomplete-list"></datalist>
|
||||||
<input id="music-name" type="text" placeholder="请输入搜索关键词(如:MV高清版 周杰伦 七里香)" list="autocomplete-list"></input>
|
<input id="music-name" type="text" placeholder="请输入搜索关键词(如:MV高清版 周杰伦 七里香)" list="autocomplete-list"></input>
|
||||||
<input id="music-filename" type="text" placeholder="请输入保存为的文件名称(如:周杰伦七里香)"></input>
|
<input id="music-filename" type="text" placeholder="请输入保存为的文件名称(如:周杰伦七里香)"></input>
|
||||||
</div>
|
<button id="play">播放</button>
|
||||||
<button id="play">播放</button>
|
<div class="container">
|
||||||
<div class="container">
|
<div id="playering-music" class="text"></div>
|
||||||
<div id="playering-music" class="text"></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
@ -53,15 +57,17 @@ var vConsole = new window.VConsole();
|
|||||||
<select id="music_list"></select>
|
<select id="music_list"></select>
|
||||||
<label for="music_name">歌曲:</label>
|
<label for="music_name">歌曲:</label>
|
||||||
<select id="music_name"></select>
|
<select id="music_name"></select>
|
||||||
|
<div>
|
||||||
|
<button id="play_music_list">播放列表歌曲</button>
|
||||||
|
<button id="del_music">删除选中歌曲</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button id="play_music_list">播放列表歌曲</button>
|
|
||||||
<button id="del_music">删除选中歌曲</button>
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<div>
|
<div class="rows">
|
||||||
<input id="music-url" type="text" placeholder="链接(http://ngcdn001.cnr.cn/live/zgzs/index.m3u8)"></input>
|
<input id="music-url" type="text" placeholder="链接(http://ngcdn001.cnr.cn/live/zgzs/index.m3u8)"></input>
|
||||||
|
<button id="playurl">播放链接</button>
|
||||||
</div>
|
</div>
|
||||||
<button id="playurl">播放链接</button>
|
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<p>Powered by <a href="https://github.com/hanxi/xiaomusic" target="_blank">xiaomusic</a></p>
|
<p>Powered by <a href="https://github.com/hanxi/xiaomusic" target="_blank">xiaomusic</a></p>
|
||||||
|
@ -30,111 +30,117 @@ var vConsole = new window.VConsole();
|
|||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div id="setting" class="rows">
|
<div id="setting">
|
||||||
<label for="account">*小米账号:</label>
|
<div class="rows">
|
||||||
<input id="account" type="text" placeholder="填写小米登录账号"></input>
|
<label for="account">*小米账号:</label>
|
||||||
|
<input id="account" type="text" placeholder="填写小米登录账号"></input>
|
||||||
|
|
||||||
<label for="password">*小米密码:</label>
|
<label for="password">*小米密码:</label>
|
||||||
<input id="password" type="password" placeholder="填写小米登录密码"></input>
|
<input id="password" type="password" placeholder="填写小米登录密码"></input>
|
||||||
|
|
||||||
<label for="hostname">*XIAOMUSIC_HOSTNAME(IP或域名):</label>
|
<label for="hostname">*XIAOMUSIC_HOSTNAME(IP或域名):</label>
|
||||||
<input id="hostname" type="text"></input>
|
<input id="hostname" type="text"></input>
|
||||||
|
|
||||||
<label for="verbose">是否开启调试日志:</label>
|
<label for="verbose">是否开启调试日志:</label>
|
||||||
<select id="verbose">
|
<select id="verbose">
|
||||||
<option value="true" selected>true</option>
|
<option value="true" selected>true</option>
|
||||||
<option value="false">false</option>
|
<option value="false">false</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<label for="group_list">设备分组配置:</label>
|
<button class="save-button">保存</button>
|
||||||
<input id="group_list" type="text" placeholder="did1:组名1,did2:组名1,did3:组名2"></input>
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="rows">
|
||||||
|
<label for="group_list">设备分组配置:</label>
|
||||||
|
<input id="group_list" type="text" placeholder="did1:组名1,did2:组名1,did3:组名2"></input>
|
||||||
|
|
||||||
<label for="music_path">音乐目录:</label>
|
<label for="music_path">音乐目录:</label>
|
||||||
<input id="music_path" type="text" value="music"></input>
|
<input id="music_path" type="text" value="music"></input>
|
||||||
|
|
||||||
<label for="download_path">音乐下载目录(必须是music的子目录):</label>
|
<label for="download_path">音乐下载目录(必须是music的子目录):</label>
|
||||||
<input id="download_path" type="text" value='music/download'></input>
|
<input id="download_path" type="text" value='music/download'></input>
|
||||||
|
|
||||||
<label for="conf_path">配置文件目录:</label>
|
<label for="conf_path">配置文件目录:</label>
|
||||||
<input id="conf_path" type="text"></input>
|
<input id="conf_path" type="text"></input>
|
||||||
|
|
||||||
<label for="ffmpeg_location">ffmpeg路径:</label>
|
<label for="ffmpeg_location">ffmpeg路径:</label>
|
||||||
<input id="ffmpeg_location" type="text" value="./ffmpeg/bin"></input>
|
<input id="ffmpeg_location" type="text" value="./ffmpeg/bin"></input>
|
||||||
|
|
||||||
<label for="log_file">日志路径:</label>
|
<label for="log_file">日志路径:</label>
|
||||||
<input id="log_file" type="text" value="/tmp/xiaomusic.txt"></input>
|
<input id="log_file" type="text" value="/tmp/xiaomusic.txt"></input>
|
||||||
|
|
||||||
<label for="active_cmd">允许唤醒的命令:</label>
|
<label for="active_cmd">允许唤醒的命令:</label>
|
||||||
<input id="active_cmd" type="text" value="play,random_play,playlocal,play_music_list,stop"></input>
|
<input id="active_cmd" type="text" value="play,random_play,playlocal,play_music_list,stop"></input>
|
||||||
|
|
||||||
<label for="exclude_dirs">忽略目录(逗号分割):</label>
|
<label for="exclude_dirs">忽略目录(逗号分割):</label>
|
||||||
<input id="exclude_dirs" type="text" value="@eaDir"></input>
|
<input id="exclude_dirs" type="text" value="@eaDir"></input>
|
||||||
|
|
||||||
<label for="music_path_depth">目录深度:</label>
|
<label for="music_path_depth">目录深度:</label>
|
||||||
<input id="music_path_depth" type="number" value="10"></input>
|
<input id="music_path_depth" type="number" value="10"></input>
|
||||||
|
|
||||||
<label for="search_prefix">XIAOMUSIC_SEARCH(歌曲下载方式):</label>
|
<label for="search_prefix">XIAOMUSIC_SEARCH(歌曲下载方式):</label>
|
||||||
<select id="search_prefix">
|
<select id="search_prefix">
|
||||||
<option value="bilisearch:">bilisearch:</option>
|
<option value="bilisearch:">bilisearch:</option>
|
||||||
<option value="ytsearch:">ytsearch:</option>
|
<option value="ytsearch:">ytsearch:</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<label for="proxy">XIAOMUSIC_PROXY(ytsearch需要):</label>
|
<label for="proxy">XIAOMUSIC_PROXY(ytsearch需要):</label>
|
||||||
<input id="proxy" type="text" placeholder="http://192.168.2.5:8080"></input>
|
<input id="proxy" type="text" placeholder="http://192.168.2.5:8080"></input>
|
||||||
|
|
||||||
<label for="disable_httpauth">关闭密码验证:</label>
|
<label for="disable_httpauth">关闭密码验证:</label>
|
||||||
<select id="disable_httpauth">
|
<select id="disable_httpauth">
|
||||||
<option value="true" selected>true</option>
|
<option value="true" selected>true</option>
|
||||||
<option value="false">false</option>
|
<option value="false">false</option>
|
||||||
</select>
|
</select>
|
||||||
<label for="httpauth_username">web控制台账户:</label>
|
<label for="httpauth_username">web控制台账户:</label>
|
||||||
<input id="httpauth_username" type="text" value=""></input>
|
<input id="httpauth_username" type="text" value=""></input>
|
||||||
<label for="httpauth_password">web控制台密码:</label>
|
<label for="httpauth_password">web控制台密码:</label>
|
||||||
<input id="httpauth_password" type="password" value=""></input>
|
<input id="httpauth_password" type="password" value=""></input>
|
||||||
|
|
||||||
<label for="disable_download">关闭下载功能:</label>
|
<label for="disable_download">关闭下载功能:</label>
|
||||||
<select id="disable_download">
|
<select id="disable_download">
|
||||||
<option value="true">true</option>
|
<option value="true">true</option>
|
||||||
<option value="false" selected>false</option>
|
<option value="false" selected>false</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<label for="use_music_audio_id">触屏版显示歌曲ID:</label>
|
<label for="use_music_audio_id">触屏版显示歌曲ID:</label>
|
||||||
<input id="use_music_audio_id" type="text" value="1582971365183456177"></input>
|
<input id="use_music_audio_id" type="text" value="1582971365183456177"></input>
|
||||||
<label for="use_music_id">触屏版显示歌曲分段ID:</label>
|
<label for="use_music_id">触屏版显示歌曲分段ID:</label>
|
||||||
<input id="use_music_id" type="text" value="355454500"></input>
|
<input id="use_music_id" type="text" value="355454500"></input>
|
||||||
|
|
||||||
<label for="fuzzy_match_cutoff">模糊匹配阈值(0.1~0.9):</label>
|
<label for="fuzzy_match_cutoff">模糊匹配阈值(0.1~0.9):</label>
|
||||||
<input id="fuzzy_match_cutoff" type="number" value="0.6"></input>
|
<input id="fuzzy_match_cutoff" type="number" value="0.6"></input>
|
||||||
|
|
||||||
<label for="enable_fuzzy_match">开启模糊搜索:</label>
|
<label for="enable_fuzzy_match">开启模糊搜索:</label>
|
||||||
<select id="enable_fuzzy_match">
|
<select id="enable_fuzzy_match">
|
||||||
<option value="true" selected>true</option>
|
<option value="true" selected>true</option>
|
||||||
<option value="false">false</option>
|
<option value="false">false</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<label for="public_port">外网访问端口(0表示跟监听端口一致):</label>
|
<label for="public_port">外网访问端口(0表示跟监听端口一致):</label>
|
||||||
<input id="public_port" type="number" value="0"></input>
|
<input id="public_port" type="number" value="0"></input>
|
||||||
|
|
||||||
<label for="stop_tts_msg">停止提示音:</label>
|
<label for="stop_tts_msg">停止提示音:</label>
|
||||||
<input id="stop_tts_msg" type="text" value="收到,再见"></input>
|
<input id="stop_tts_msg" type="text" value="收到,再见"></input>
|
||||||
<label for="keywords_playlocal">播放本地歌曲口令:</label>
|
<label for="keywords_playlocal">播放本地歌曲口令:</label>
|
||||||
<input id="keywords_playlocal" type="text" value="播放本地歌曲,本地播放歌曲"></input>
|
<input id="keywords_playlocal" type="text" value="播放本地歌曲,本地播放歌曲"></input>
|
||||||
<label for="keywords_play">播放歌曲口令:</label>
|
<label for="keywords_play">播放歌曲口令:</label>
|
||||||
<input id="keywords_play" type="text" value="播放歌曲,放歌曲"></input>
|
<input id="keywords_play" type="text" value="播放歌曲,放歌曲"></input>
|
||||||
<label for="keywords_stop">停止口令:</label>
|
<label for="keywords_stop">停止口令:</label>
|
||||||
<input id="keywords_stop" type="text" value="关机,暂停,停止,停止播放"></input>
|
<input id="keywords_stop" type="text" value="关机,暂停,停止,停止播放"></input>
|
||||||
|
|
||||||
<label for="music_list_url">歌单地址:</label>
|
<label for="music_list_url">歌单地址:</label>
|
||||||
<input id="music_list_url" type="text" value="https://gist.githubusercontent.com/hanxi/dda82d964a28f8110f8fba81c3ff8314/raw/example.json"></input>
|
<input id="music_list_url" type="text" value="https://gist.githubusercontent.com/hanxi/dda82d964a28f8110f8fba81c3ff8314/raw/example.json"></input>
|
||||||
|
|
||||||
<label for="music_list_json">歌单内容:</label>
|
<label for="music_list_json">歌单内容:</label>
|
||||||
<textarea id="music_list_json" type="text"></textarea>
|
<textarea id="music_list_json" type="text"></textarea>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<button onclick="location.href='/';">返回首页</button>
|
<button onclick="location.href='/';">返回首页</button>
|
||||||
<button id="get_music_list">获取歌单</button>
|
<button id="get_music_list">获取歌单</button>
|
||||||
<button id="save">保存</button>
|
<button class="save-button">保存</button>
|
||||||
<a class="button" href="/downloadlog" download="xiaomusic.txt">下载日志文件</a>
|
<a class="button" href="/downloadlog" download="xiaomusic.txt">下载日志文件</a>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ $(function(){
|
|||||||
autoSelectOne();
|
autoSelectOne();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#save").on("click", () => {
|
$(".save-button").on("click", () => {
|
||||||
var setting = $('#setting');
|
var setting = $('#setting');
|
||||||
var inputs = setting.find('input, select, textarea');
|
var inputs = setting.find('input, select, textarea');
|
||||||
var data = {};
|
var data = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user