Skip to content

Commit

Permalink
style(connection): modify connection list styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ysfscream committed Apr 2, 2021
1 parent 7a8affd commit 2c10be4
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 61 deletions.
20 changes: 8 additions & 12 deletions src/assets/font/iconfont.css

Large diffs are not rendered by default.

Binary file modified src/assets/font/iconfont.eot
Binary file not shown.
2 changes: 1 addition & 1 deletion src/assets/font/iconfont.js

Large diffs are not rendered by default.

17 changes: 5 additions & 12 deletions src/assets/font/iconfont.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,11 @@
"description": "",
"glyphs": [
{
"icon_id": "20730817",
"name": "collapse",
"font_class": "collapse",
"unicode": "ea08",
"unicode_decimal": 59912
},
{
"icon_id": "17504370",
"name": "triangle",
"font_class": "triangle",
"unicode": "e691",
"unicode_decimal": 59025
"icon_id": "19526525",
"name": "折叠",
"font_class": "fold",
"unicode": "e663",
"unicode_decimal": 58979
},
{
"icon_id": "19023717",
Expand Down
5 changes: 1 addition & 4 deletions src/assets/font/iconfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/font/iconfont.ttf
Binary file not shown.
Binary file modified src/assets/font/iconfont.woff
Binary file not shown.
Binary file modified src/assets/font/iconfont.woff2
Binary file not shown.
5 changes: 0 additions & 5 deletions src/lang/connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,6 @@ export default {
en: 'collection name',
ja: 'フォルダ名',
},
collapseCollection: {
zh: '收起文件夹',
en: 'Collapse Collection',
ja: '折りたたみフォルダ',
},
deleteCollection: {
zh: '删除文件夹',
en: 'Delete Collection',
Expand Down
37 changes: 10 additions & 27 deletions src/views/connections/ConnectionsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@
<i class="el-icon-folder-add"></i>
</a>
</el-tooltip>
<el-tooltip
placement="bottom"
:effect="theme !== 'light' ? 'light' : 'dark'"
:open-delay="500"
:content="$t('connections.collapseCollection')"
>
<a class="collapse-collection-btn" href="javascript:;" @click="handleCollapseCollection">
<i class="iconfont icon-collapse"></i>
</a>
</el-tooltip>
</div>
</div>
<div class="connections-list">
Expand Down Expand Up @@ -98,7 +88,7 @@
<div class="collection-name">
<i v-if="!node.expanded" class="el-icon-folder"> </i>
<i v-else class="el-icon-folder-opened"> </i>
{{ data.name }}
<span>{{ data.name }}</span>
</div>
</div>
</span>
Expand All @@ -116,12 +106,12 @@
<a href="javascript:;" class="context-menu__item" @click="handleNewCollection">
<i class="el-icon-plus"></i>{{ $t('connections.newCollection') }}
</a>
<a href="javascript:;" class="context-menu__item danger" @click="handleDeleteCollection">
<i class="iconfont icon-delete"></i>{{ $t('connections.deleteCollection') }}
</a>
<a href="javascript:;" class="context-menu__item" @click="handleRenameCollection">
<i class="iconfont icon-edit"></i>{{ $t('connections.renameCollection') }}
</a>
<a href="javascript:;" class="context-menu__item danger" @click="handleDeleteCollection">
<i class="iconfont icon-delete"></i>{{ $t('connections.deleteCollection') }}
</a>
</contextmenu>
</div>
</div>
Expand Down Expand Up @@ -331,15 +321,6 @@ export default class ConnectionsList extends Vue {
this.flushCollectionChange()
}
private handleCollapseCollection() {
const treeRef = this.$refs.tree as $TSFixed
if (!treeRef) return
const nodes = treeRef.store.nodesMap
for (const idx in nodes) {
nodes[idx].expanded = false
}
}
private handleSelectConnection(row: ConnectionModel) {
this.handleConnectionTreeClick(row)
this.initUnreadMessageCount(row.id as string)
Expand Down Expand Up @@ -548,7 +529,7 @@ export default class ConnectionsList extends Vue {
justify-content: space-between;
.connection-item {
@include flex-space-between;
height: 64px;
height: 48px;
width: 100%;
cursor: pointer;
position: relative;
Expand Down Expand Up @@ -586,7 +567,7 @@ export default class ConnectionsList extends Vue {
}
}
.new-msg-count {
margin-right: 8px;
margin-right: 28px;
min-width: 18px;
height: 18px;
line-height: 18px;
Expand All @@ -612,10 +593,11 @@ export default class ConnectionsList extends Vue {
}
.custom-tree-node-collection {
width: 100%;
height: 36px;
height: 48px;
@include flex-space-between;
.collection-name {
display: block;
display: flex;
align-items: center;
font-size: $font-size--body;
font-weight: 500;
color: var(--color-text-title);
Expand All @@ -626,6 +608,7 @@ export default class ConnectionsList extends Vue {
i {
font-size: 18px;
color: #c0c4cc;
padding-right: 6px;
}
}
}
Expand Down

0 comments on commit 2c10be4

Please sign in to comment.