Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/veops/oneterm
Browse files Browse the repository at this point in the history
  • Loading branch information
ttktatakai committed Sep 9, 2024
2 parents 3a03abb + 76b71b8 commit 658c5d0
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -530,12 +530,12 @@ export default {
this.$emit('openTerminalList', data)
},

handleRefresh() {
async handleRefresh() {
this.selectedRowKeys = []
this.$refs.opsTable.getVxetableRef().clearCheckboxRow()
this.$refs.opsTable.getVxetableRef().clearCheckboxReserve()
await this.getAccountList()
this.getFirstLayout()
this.updateTableData()
}
},
}
Expand Down
46 changes: 37 additions & 9 deletions oneterm-ui/src/modules/oneterm/views/dashboard/userRank.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<template v-for="(item, index) in rankList">
<div class="user-rank-box" :key="item.uid">
<a-avatar
class="user-rank-box-avatar"
v-if="getUserKeyByUid(item.uid, 'avatar')"
:size="36"
:src="
Expand All @@ -13,11 +14,18 @@
: `/api/common-setting/v1/file/${getUserKeyByUid(item.uid, 'avatar')}`
"
/>
<a-avatar v-else :style="{ backgroundColor: '#2F54EB', fontSize: '12px' }" :size="36">
<a-avatar
v-else
class="user-rank-box-avatar"
:style="{ backgroundColor: '#2F54EB', fontSize: '12px' }"
:size="36"
>
{{ getUserKeyByUid(item.uid).substring(0, 1) }}
</a-avatar>
<div>
<div class="user-rank-box-name">{{ getUserKeyByUid(item.uid) }}</div>
<div class="user-rank-box-center">
<a-tooltip :title="getUserKeyByUid(item.uid)" placement="topLeft" >
<div class="user-rank-box-name">{{ getUserKeyByUid(item.uid) }}</div>
</a-tooltip>
<div class="user-rank-box-time">{{ moment(item.last_time).format('YYYY-MM-DD HH:mm:ss') }}</div>
</div>
<div class="user-rank-box-count">
Expand Down Expand Up @@ -76,24 +84,44 @@ export default {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 10px 0;
position: relative;

&-avatar {
flex-shrink: 0;
}

&-center {
margin-left: 16px;
margin-right: 16px;
max-width: 100%;
overflow: hidden;
}

.user-rank-box-name {
color: #252631;
font-weight: 400;
font-size: 14px;
overflow: hidden;
text-wrap: nowrap;
text-overflow: ellipsis;
max-width: 100%;
}
.user-rank-box-time {
color: #98a9bc;
font-weight: 400;
font-size: 14px;
}
.user-rank-box-count > span {
color: @primary-color;
background-color: #dce3fb;
padding: 0 10px;
border-radius: 1px;
.user-rank-box-count {
margin-left: auto;
flex-shrink: 0;

& > span {
color: @primary-color;
background-color: #dce3fb;
padding: 0 10px;
border-radius: 1px;
}
}
}
}
Expand Down

0 comments on commit 658c5d0

Please sign in to comment.