Skip to content

Commit

Permalink
chore: enhance global messages
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Apr 25, 2024
1 parent 5e4def0 commit 22b4848
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/client/app/home/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</k-slot>
</el-scrollbar>
<div v-else>
<k-card class="connect">{{ global.messages?.connecting || '正在连接到 Koishi 服务器……' }}</k-card>
<k-card class="connect">正在连接到 Koishi 服务器……</k-card>
</div>
</k-layout>
</template>
Expand Down
3 changes: 1 addition & 2 deletions packages/client/client/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import install, { Dict } from './components'
import install from './components'
import { Context } from './context'

declare module '@koishijs/plugin-console' {
export interface ClientConfig {
messages?: Dict<string>
unsupported?: string[]
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/online/app/components/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</k-content>
</el-scrollbar>
<div v-else>
<k-card class="connect">{{ global.messages?.connecting || '正在连接到 Koishi 服务器……' }}</k-card>
<k-card class="connect">正在初始化 Koishi Online 运行环境……</k-card>
</div>
</k-layout>
</template>
Expand Down
3 changes: 0 additions & 3 deletions packages/online/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ root.page({
component: Instances,
})

global.messages = {}
global.messages.connecting = '正在初始化 Koishi Online 运行环境……'

if (!('chrome' in window)) {
global.unsupported = [
'您的浏览器不支持 Koishi Online。',
Expand Down

0 comments on commit 22b4848

Please sign in to comment.