From cae06858fc79fc5a063e61798b905137347f8f8b Mon Sep 17 00:00:00 2001 From: John Smith Date: Sat, 1 Feb 2020 21:27:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E9=85=8D=E7=BD=AE=E6=94=BE?= =?UTF-8?q?=E5=9C=A8URL=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- frontend/src/api/config.js | 30 +-------- .../ChatRenderer/LegacyPaidMessage.vue | 2 +- .../components/ChatRenderer/PaidMessage.vue | 2 +- .../components/ChatRenderer/TextMessage.vue | 2 +- .../src/components/ChatRenderer/index.vue | 2 +- frontend/src/lang/en.js | 5 -- frontend/src/lang/ja.js | 5 -- frontend/src/lang/zh.js | 5 -- frontend/src/utils.js | 21 ++++-- frontend/src/views/Home.vue | 65 +++++++------------ frontend/src/views/Room.vue | 42 ++++++++---- frontend/src/views/StyleGenerator/fonts.js | 5 -- frontend/src/views/StyleGenerator/index.vue | 4 +- frontend/src/views/StyleGenerator/stylegen.js | 9 +-- main.py | 3 - views/config.py | 65 ------------------- 17 files changed, 77 insertions(+), 192 deletions(-) delete mode 100644 views/config.py diff --git a/README.md b/README.md index 2f54a81..33d2524 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ ``` 3. 用浏览器打开[http://localhost:12450](http://localhost:12450),输入房间ID,保存配置,复制房间URL 4. 用样式生成器生成样式,复制CSS -5. 在OBS中添加浏览器源,输入URL和自定义CSS,或者可以在首页的样式设置里输入CSS +5. 在OBS中添加浏览器源,输入URL和自定义CSS ### 公共服务器 请优先在本地使用,使用公共服务器会有更大的弹幕延迟,而且服务器故障时可能出现直播事故 diff --git a/frontend/src/api/config.js b/frontend/src/api/config.js index a3e7ae0..192c6fb 100644 --- a/frontend/src/api/config.js +++ b/frontend/src/api/config.js @@ -1,5 +1,3 @@ -import axios from 'axios' - import {mergeConfig} from '@/utils' export const DEFAULT_CONFIG = { @@ -15,9 +13,7 @@ export const DEFAULT_CONFIG = { blockNotMobileVerified: true, blockKeywords: '', blockUsers: '', - blockMedalLevel: 0, - - css: '' + blockMedalLevel: 0 } export function setLocalConfig (config) { @@ -31,27 +27,3 @@ export function getLocalConfig () { } return mergeConfig(JSON.parse(window.localStorage.config), DEFAULT_CONFIG) } - -export async function createRemoteConfig (config) { - config = mergeConfig(config, DEFAULT_CONFIG) - return (await axios.post('/config', config)).data -} - -export async function setRemoteConfig (id, config) { - config = mergeConfig(config, DEFAULT_CONFIG) - return (await axios.put(`/config/${id}`, config)).data -} - -export async function getRemoteConfig (id) { - let config = (await axios.get(`/config/${id}`)).data - return mergeConfig(config, DEFAULT_CONFIG) -} - -export default { - DEFAULT_CONFIG, - setLocalConfig, - getLocalConfig, - createRemoteConfig, - setRemoteConfig, - getRemoteConfig -} diff --git a/frontend/src/components/ChatRenderer/LegacyPaidMessage.vue b/frontend/src/components/ChatRenderer/LegacyPaidMessage.vue index c137b0a..ebd7cc5 100644 --- a/frontend/src/components/ChatRenderer/LegacyPaidMessage.vue +++ b/frontend/src/components/ChatRenderer/LegacyPaidMessage.vue @@ -21,7 +21,7 @@