Show online device count in web page

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
This commit is contained in:
Jianhui Zhao
2018-06-15 01:34:00 +08:00
parent c7a968b014
commit 5bb230c8a1
5 changed files with 13 additions and 3 deletions

11
assets/src/components/Home.vue Executable file → Normal file
View File

@@ -1,6 +1,11 @@
<template>
<div id="home">
<Input v-model="filterString" icon="search" size="large" @on-change="handleSearch" :placeholder="$t('Please enter the filter key...')" style="width: 400px" />
<Row type="flex" align="bottom">
<Col span="6">
<Input v-model="filterString" icon="search" size="large" @on-change="handleSearch" :placeholder="$t('Please enter the filter key...')" style="width: 400px" />
</Col>
<Col span="3" offset="15" class="counter">{{ $t('Online Device: {count}', {count: devlists.length}) }}</Col>
</Row>
<Table :loading="loading" :columns="devlistTitle" :data="filtered" style="margin-top: 10px; width: 100%" :no-data-text="$t('No devices connected')"></Table>
</div>
</template>
@@ -81,4 +86,8 @@ export default {
#home {
padding:10px;
}
.counter {
color: #3399ff;
font-size: 16px;
}
</style>

0
assets/src/components/Login.vue Executable file → Normal file
View File

0
assets/src/components/Rtty.vue Executable file → Normal file
View File

View File

@@ -30,7 +30,8 @@ const RttyI18n = {
'Login': '登录',
'username is required': '用户名为必填',
'Login Fail! username or password wrong.': '登录失败,用户名或密码错误',
'Connect failed': '连接失败'
'Connect failed': '连接失败',
'Online Device: {count}': '在线设备数:{count}',
}
}

File diff suppressed because one or more lines are too long