mirror of
https://github.com/netfun2000/rttys_zhaojh329.git
synced 2026-02-27 09:53:24 +08:00
ui: Optimize the display effect of the right-click menus
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div ref="content" class="content" :style="{top: axis.y + 'px', left: axis.x + 'px'}" v-if="visibility">
|
<div ref="content" class="content" :style="{top: axis.y + 'px', left: axis.x + 'px'}" v-if="visibility">
|
||||||
<a v-for="item in menus" :key="item.name" @click="onMenuClick(item.name)"
|
<template v-for="(item, index) in menus" :key="item.name">
|
||||||
:style="{'text-decoration': item.underline ? 'underline' : 'none'}">
|
<a @click="onMenuClick(item.name)" :style="{'text-decoration': item.underline ? 'underline' : 'none'}">
|
||||||
{{item.caption || item.name}}
|
{{item.caption || item.name}}
|
||||||
</a>
|
</a>
|
||||||
|
<hr v-if="index < menus.length - 1"/>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -84,6 +86,8 @@ export default {
|
|||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
min-width: 160px;
|
min-width: 160px;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 5px;
|
||||||
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
|
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,4 +102,9 @@ export default {
|
|||||||
background-color: #90C8F6;
|
background-color: #90C8F6;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content hr {
|
||||||
|
margin: 0;
|
||||||
|
border: 1px solid #c1bcbc;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -53,7 +53,8 @@ export default {
|
|||||||
{name: 'paste', caption: this.$t('Paste - Shift+Insert')},
|
{name: 'paste', caption: this.$t('Paste - Shift+Insert')},
|
||||||
{name: 'clear', caption: this.$t('Clear Scrollback')},
|
{name: 'clear', caption: this.$t('Clear Scrollback')},
|
||||||
{name: 'font', caption: this.$t('Font Size')},
|
{name: 'font', caption: this.$t('Font Size')},
|
||||||
{name: 'file', caption: this.$t('Upload or download file')},
|
{name: 'upload', caption: this.$t('Upload file') + ' - rtty -R'},
|
||||||
|
{name: 'download', caption: this.$t('Download file') + ' - rtty -S file'},
|
||||||
{name: 'about', caption: this.$t('About')}
|
{name: 'about', caption: this.$t('About')}
|
||||||
],
|
],
|
||||||
font: {
|
font: {
|
||||||
@@ -95,8 +96,10 @@ export default {
|
|||||||
this.term.clear()
|
this.term.clear()
|
||||||
} else if (name === 'font') {
|
} else if (name === 'font') {
|
||||||
this.font.modal = true
|
this.font.modal = true
|
||||||
} else if (name === 'file') {
|
} else if (name === 'upload') {
|
||||||
this.$message.success(this.$t('Please execute command "rtty -R" or "rtty -S" in current terminal!'))
|
this.$message.success(this.$t('Please execute command "rtty -R" in current terminal!'))
|
||||||
|
} else if (name === 'download') {
|
||||||
|
this.$message.success(this.$t('Please execute command "rtty -S file" in current terminal!'))
|
||||||
} else if (name === 'about') {
|
} else if (name === 'about') {
|
||||||
window.open('https://github.com/zhaojh329/rtty')
|
window.open('https://github.com/zhaojh329/rtty')
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -52,9 +52,11 @@
|
|||||||
"Paste - Shift+Insert": "Paste - Shift+Insert",
|
"Paste - Shift+Insert": "Paste - Shift+Insert",
|
||||||
"Clear Scrollback": "Clear Scrollback",
|
"Clear Scrollback": "Clear Scrollback",
|
||||||
"Font Size": "Font Size",
|
"Font Size": "Font Size",
|
||||||
"Upload or download file": "Upload or download file",
|
"Upload file": "Upload file",
|
||||||
|
"Download file": "Download file",
|
||||||
"About": "About",
|
"About": "About",
|
||||||
"Please execute command \"rtty -R\" or \"rtty -S\" in current terminal!": "Please execute command \"rtty -R\" or \"rtty -S\" in current terminal!",
|
"Please execute command \"rtty -R\" in current terminal!": "Please execute command \"rtty -R\" in current terminal!",
|
||||||
|
"Please execute command \"rtty -S file\" in current terminal!": "Please execute command \"rtty -S file\" in current terminal!",
|
||||||
"Access your devices's Web": "Access your devices's Web",
|
"Access your devices's Web": "Access your devices's Web",
|
||||||
"Proto": "Proto",
|
"Proto": "Proto",
|
||||||
"ipaddr": "IP address",
|
"ipaddr": "IP address",
|
||||||
|
|||||||
@@ -54,9 +54,11 @@
|
|||||||
"Paste - Shift+Insert": "粘贴 - Shift+Insert",
|
"Paste - Shift+Insert": "粘贴 - Shift+Insert",
|
||||||
"Clear Scrollback": "清除回滚",
|
"Clear Scrollback": "清除回滚",
|
||||||
"Font Size": "字体大小",
|
"Font Size": "字体大小",
|
||||||
"Upload or download file": "上传或者下载文件",
|
"Upload file": "上传文件",
|
||||||
|
"Download file": "下载文件",
|
||||||
"About": "关于",
|
"About": "关于",
|
||||||
"Please execute command \"rtty -R\" or \"rtty -S\" in current terminal!": "请在当前终端中执行命令 \"rtty -R\" 或者 \"rtty -S\"",
|
"Please execute command \"rtty -R\" in current terminal!": "请在当前终端中执行命令 \"rtty -R\"",
|
||||||
|
"Please execute command \"rtty -S file\" in current terminal!": "请在当前终端中执行命令 \"rtty -S file\"",
|
||||||
"Proto": "协议",
|
"Proto": "协议",
|
||||||
"ipaddr": "IP 地址",
|
"ipaddr": "IP 地址",
|
||||||
"port": "端口",
|
"port": "端口",
|
||||||
|
|||||||
Reference in New Issue
Block a user