Skip to content

Commit

Permalink
修复构建
Browse files Browse the repository at this point in the history
  • Loading branch information
Yesterday17 committed May 4, 2019
1 parent 823ae99 commit c07699a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
13 changes: 2 additions & 11 deletions src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ export class I18n {
this.defaultLocale = defaultLocale
// 设置活动的语言列表
this.actives = actives

;(() => {
/**
* 格式化模板字符串
Expand Down Expand Up @@ -257,17 +256,9 @@ export class I18n {
return 'MissingText'
}
f._chains = chainsArray
/**
* @param htmlElement
* @param args
*/
f.renderAsText = (htmlElement: HTMLElement, ...args: string[]) => {
this.bindElementText(f, htmlElement, ...args)
}
/**
* @param htmlElement
* @param args
*/
f.renderAsHTML = (htmlElement: HTMLElement, ...args: string[]) => {
this.bindElementHTML(f, htmlElement, ...args)
}
Expand Down Expand Up @@ -337,9 +328,9 @@ export class I18n {

/**
* 解绑指定DOM元素的所有绑定
* @param htmlElement HTMLElement
* @param Element Element
*/
unbindElement(htmlElement: HTMLElement) {
unbindElement(htmlElement: Element) {
// FIXME: 完成该函数
// htmlElementTest 是假的
// this._bindElementList = this._bindElementList.filter(
Expand Down
7 changes: 4 additions & 3 deletions src/manager/utils/Ping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,16 @@ export class Ping {
renderError = (err: Error) => {
console.error(err)
const serverTextDom = document.querySelector('#serverText')
serverTextDom.innerText = '加载失败'
serverTextDom.textContent = '加载失败'
// serverTextDom.innerText = '加载失败'
}

renderService = () => {
const serverTextDom = document.querySelector('#serverText')
const pingInfoDom = document.querySelector('#pingInfo')
const pingTextDom = document.querySelector('#pingText')
pingInfoDom.className = 'offline'
pingTextDom.innerText = '--'
pingTextDom.textContent = '--'
i18n.unbindElement(serverTextDom)
this.getServiceName(this.currentService).renderAsText(serverTextDom)
return Promise.resolve()
Expand All @@ -114,7 +115,7 @@ export class Ping {
renderPing = (time: number) => {
const pingTextDom = document.querySelector('#pingText')
const pingInfoDom = document.querySelector('#pingInfo')
pingTextDom.innerText = String(time >> 0)
pingTextDom.textContent = String(time >> 0)
pingInfoDom.className = time < 150 ? 'green' : time < 500 ? 'orange' : 'red'
}

Expand Down
6 changes: 6 additions & 0 deletions src/mod/manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class MajsoulPlusModManager {
//
}

// tslint:disable-next-line
export const ModManager = new MajsoulPlusModManager()

0 comments on commit c07699a

Please sign in to comment.