mirror of
https://github.com/xfgryujk/blivechat.git
synced 2024-12-27 13:20:29 +08:00
修改一堆文案
This commit is contained in:
parent
5cdb786966
commit
ac1bda0392
@ -21,8 +21,8 @@
|
|||||||
```bat
|
```bat
|
||||||
blivechat.exe --host 127.0.0.1 --port 12450
|
blivechat.exe --host 127.0.0.1 --port 12450
|
||||||
```
|
```
|
||||||
3. 用浏览器打开[http://localhost:12450](http://localhost:12450),输入房间ID,保存配置,进入房间,复制房间URL
|
3. 用浏览器打开[http://localhost:12450](http://localhost:12450),输入房间ID,保存配置,复制房间URL
|
||||||
4. (可选)用样式生成器生成样式,复制CSS
|
4. 用样式生成器生成样式,复制CSS
|
||||||
5. 在OBS中添加浏览器源,输入URL和自定义CSS,或者可以在首页的样式设置里输入CSS
|
5. 在OBS中添加浏览器源,输入URL和自定义CSS,或者可以在首页的样式设置里输入CSS
|
||||||
|
|
||||||
### 源代码版
|
### 源代码版
|
||||||
@ -41,8 +41,8 @@
|
|||||||
```sh
|
```sh
|
||||||
python3 main.py --host 127.0.0.1 --port 12450
|
python3 main.py --host 127.0.0.1 --port 12450
|
||||||
```
|
```
|
||||||
3. 用浏览器打开[http://localhost:12450](http://localhost:12450),输入房间ID,保存配置,进入房间,复制房间URL
|
3. 用浏览器打开[http://localhost:12450](http://localhost:12450),输入房间ID,保存配置,复制房间URL
|
||||||
4. (可选)用样式生成器生成样式,复制CSS
|
4. 用样式生成器生成样式,复制CSS
|
||||||
5. 在OBS中添加浏览器源,输入URL和自定义CSS,或者可以在首页的样式设置里输入CSS
|
5. 在OBS中添加浏览器源,输入URL和自定义CSS,或者可以在首页的样式设置里输入CSS
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
import {mergeConfig} from '@/utils'
|
import {mergeConfig} from '@/utils'
|
||||||
import stylegen from '@/views/StyleGenerator/stylegen'
|
|
||||||
|
|
||||||
export const DEFAULT_CONFIG = {
|
export const DEFAULT_CONFIG = {
|
||||||
minGiftPrice: 6.911, // $1
|
minGiftPrice: 6.911, // $1
|
||||||
@ -18,7 +17,7 @@ export const DEFAULT_CONFIG = {
|
|||||||
blockUsers: '',
|
blockUsers: '',
|
||||||
blockMedalLevel: 0,
|
blockMedalLevel: 0,
|
||||||
|
|
||||||
css: stylegen.getStyle(stylegen.DEFAULT_CONFIG)
|
css: ''
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setLocalConfig (config) {
|
export function setLocalConfig (config) {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<div id="header-content" class="style-scope yt-live-chat-paid-message-renderer">
|
<div id="header-content" class="style-scope yt-live-chat-paid-message-renderer">
|
||||||
<div id="header-content-primary-column" class="style-scope yt-live-chat-paid-message-renderer">
|
<div id="header-content-primary-column" class="style-scope yt-live-chat-paid-message-renderer">
|
||||||
<div id="author-name" class="style-scope yt-live-chat-paid-message-renderer">{{authorName}}</div>
|
<div id="author-name" class="style-scope yt-live-chat-paid-message-renderer">{{authorName}}</div>
|
||||||
<div id="purchase-amount" class="style-scope yt-live-chat-paid-message-renderer">CN¥{{price}}</div>
|
<div id="purchase-amount" class="style-scope yt-live-chat-paid-message-renderer">{{priceText}}</div>
|
||||||
</div>
|
</div>
|
||||||
<span id="timestamp" class="style-scope yt-live-chat-paid-message-renderer">{{time}}</span>
|
<span id="timestamp" class="style-scope yt-live-chat-paid-message-renderer">{{time}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -33,6 +33,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import ImgShadow from './ImgShadow.vue'
|
import ImgShadow from './ImgShadow.vue'
|
||||||
import * as constants from './constants'
|
import * as constants from './constants'
|
||||||
|
import {formatCurrency} from '@/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PaidMessage',
|
name: 'PaidMessage',
|
||||||
@ -49,6 +50,9 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
color() {
|
color() {
|
||||||
return constants.getPriceConfig(this.price).colors
|
return constants.getPriceConfig(this.price).colors
|
||||||
|
},
|
||||||
|
priceText() {
|
||||||
|
return 'CN¥' + formatCurrency(this.price)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,7 @@ import ImgShadow from './ImgShadow.vue'
|
|||||||
import LegacyPaidMessage from './LegacyPaidMessage.vue'
|
import LegacyPaidMessage from './LegacyPaidMessage.vue'
|
||||||
import PaidMessage from './PaidMessage.vue'
|
import PaidMessage from './PaidMessage.vue'
|
||||||
import * as constants from './constants'
|
import * as constants from './constants'
|
||||||
|
import {formatCurrency} from '@/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Ticker',
|
name: 'Ticker',
|
||||||
@ -106,9 +107,9 @@ export default {
|
|||||||
},
|
},
|
||||||
getText(message) {
|
getText(message) {
|
||||||
if (message.type === constants.MESSAGE_TYPE_MEMBER) {
|
if (message.type === constants.MESSAGE_TYPE_MEMBER) {
|
||||||
return '会员'
|
return 'Member'
|
||||||
}
|
}
|
||||||
return `CN¥${message.price}`
|
return 'CN¥' + formatCurrency(message.price)
|
||||||
},
|
},
|
||||||
updateProgress() {
|
updateProgress() {
|
||||||
let curTime = new Date()
|
let curTime = new Date()
|
||||||
|
@ -17,14 +17,14 @@ export default {
|
|||||||
maxSpeed: 'Max speed of messages (/second, 0 for unlimited)',
|
maxSpeed: 'Max speed of messages (/second, 0 for unlimited)',
|
||||||
|
|
||||||
block: 'Block',
|
block: 'Block',
|
||||||
giftDanmaku: 'System messages (gift effect)',
|
giftDanmaku: 'Block system messages (gift effect)',
|
||||||
blockLevel: 'User level lower than',
|
blockLevel: 'Block user level lower than',
|
||||||
informalUser: 'Informal users',
|
informalUser: 'Block informal users',
|
||||||
unverifiedUser: 'Unverified users',
|
unverifiedUser: 'Block unverified users',
|
||||||
blockKeywords: 'Block keywords',
|
blockKeywords: 'Block keywords',
|
||||||
onePerLine: 'One per line',
|
onePerLine: 'One per line',
|
||||||
blockUsers: 'Block users',
|
blockUsers: 'Block users',
|
||||||
blockMedalLevel: 'Medal level lower than',
|
blockMedalLevel: 'Block medal level lower than',
|
||||||
|
|
||||||
style: 'Style',
|
style: 'Style',
|
||||||
|
|
||||||
|
@ -17,14 +17,14 @@
|
|||||||
maxSpeed: 'コメントの最大速度(バー/秒、0は無制限)',
|
maxSpeed: 'コメントの最大速度(バー/秒、0は無制限)',
|
||||||
|
|
||||||
block: 'ブロック',
|
block: 'ブロック',
|
||||||
giftDanmaku: 'システムコメント(プレゼント効果)',
|
giftDanmaku: 'ブロックシステムコメント(プレゼント効果)',
|
||||||
blockLevel: 'ユーザーレベルがx未満',
|
blockLevel: 'ブロックユーザーレベルがx未満',
|
||||||
informalUser: '非公式ユーザー',
|
informalUser: 'ブロック非公式ユーザー',
|
||||||
unverifiedUser: '認証されていないユーザー',
|
unverifiedUser: 'ブロック認証されていないユーザー',
|
||||||
blockKeywords: 'キーワード',
|
blockKeywords: 'ブロックキーワード',
|
||||||
onePerLine: '1行に1つずつ',
|
onePerLine: '1行に1つずつ',
|
||||||
blockUsers: 'ユーザー',
|
blockUsers: 'ブロックユーザー',
|
||||||
blockMedalLevel: '勲章等級がx未満',
|
blockMedalLevel: 'ブロック勲章等級がx未満',
|
||||||
|
|
||||||
style: 'スタイル',
|
style: 'スタイル',
|
||||||
|
|
||||||
|
@ -17,14 +17,14 @@ export default {
|
|||||||
maxSpeed: '弹幕最大速度(条/秒,0为无限制)',
|
maxSpeed: '弹幕最大速度(条/秒,0为无限制)',
|
||||||
|
|
||||||
block: '屏蔽',
|
block: '屏蔽',
|
||||||
giftDanmaku: '礼物弹幕',
|
giftDanmaku: '屏蔽礼物弹幕',
|
||||||
blockLevel: '用户等级低于',
|
blockLevel: '屏蔽用户等级低于',
|
||||||
informalUser: '非正式会员',
|
informalUser: '屏蔽非正式会员',
|
||||||
unverifiedUser: '未绑定手机用户',
|
unverifiedUser: '屏蔽未绑定手机用户',
|
||||||
blockKeywords: '屏蔽关键词',
|
blockKeywords: '屏蔽关键词',
|
||||||
onePerLine: '一行一个',
|
onePerLine: '一行一个',
|
||||||
blockUsers: '屏蔽用户',
|
blockUsers: '屏蔽用户',
|
||||||
blockMedalLevel: '当前直播间勋章等级低于',
|
blockMedalLevel: '屏蔽当前直播间勋章等级低于',
|
||||||
|
|
||||||
style: '样式',
|
style: '样式',
|
||||||
|
|
||||||
|
@ -6,6 +6,13 @@ export function mergeConfig (config, defaultConfig) {
|
|||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export function formatCurrency (price) {
|
||||||
mergeConfig
|
return new Intl.NumberFormat('zh-CN', {
|
||||||
|
minimumFractionDigits: price < 100 ? 2 : 0
|
||||||
|
}).format(price)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mergeConfig,
|
||||||
|
formatCurrency
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ export default {
|
|||||||
time: `${time.getMinutes()}:${time.getSeconds()}`,
|
time: `${time.getMinutes()}:${time.getSeconds()}`,
|
||||||
authorName: data.authorName,
|
authorName: data.authorName,
|
||||||
title: 'NEW MEMBER!',
|
title: 'NEW MEMBER!',
|
||||||
content: `Welcome ${data.authorName}`
|
content: `Welcome ${data.authorName}!`
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -264,7 +264,7 @@ const EXAMPLE_MESSAGES = [
|
|||||||
...legacyPaidMessageTemplate,
|
...legacyPaidMessageTemplate,
|
||||||
id: nextId++,
|
id: nextId++,
|
||||||
authorName: 'Paryi',
|
authorName: 'Paryi',
|
||||||
content: 'Welcome Paryi'
|
content: 'Welcome Paryi!'
|
||||||
}, {
|
}, {
|
||||||
...paidMessageTemplate,
|
...paidMessageTemplate,
|
||||||
id: nextId++,
|
id: nextId++,
|
||||||
|
@ -382,11 +382,11 @@ function getAnimationStyle (config) {
|
|||||||
: ` transform: translateX(${config.reverseSlide ? 16 : -16}px);`
|
: ` transform: translateX(${config.reverseSlide ? 16 : -16}px);`
|
||||||
} }`)
|
} }`)
|
||||||
curTime += config.fadeInTime
|
curTime += config.fadeInTime
|
||||||
keyframes.push(` ${(curTime / totalTime) * 100}% { opacity: 1; transform: none;}`)
|
keyframes.push(` ${(curTime / totalTime) * 100}% { opacity: 1; transform: none; }`)
|
||||||
}
|
}
|
||||||
if (config.animateOut) {
|
if (config.animateOut) {
|
||||||
curTime += config.animateOutWaitTime * 1000
|
curTime += config.animateOutWaitTime * 1000
|
||||||
keyframes.push(` ${(curTime / totalTime) * 100}% { opacity: 1; transform: none;}`)
|
keyframes.push(` ${(curTime / totalTime) * 100}% { opacity: 1; transform: none; }`)
|
||||||
curTime += config.fadeOutTime
|
curTime += config.fadeOutTime
|
||||||
keyframes.push(` ${(curTime / totalTime) * 100}% { opacity: 0;${!config.slide ? ''
|
keyframes.push(` ${(curTime / totalTime) * 100}% { opacity: 0;${!config.slide ? ''
|
||||||
: ` transform: translateX(${config.reverseSlide ? -16 : 16}px);`
|
: ` transform: translateX(${config.reverseSlide ? -16 : 16}px);`
|
||||||
|
Loading…
Reference in New Issue
Block a user