Skip to content

Commit

Permalink
Merge pull request #43 from jumpserver/pr@dev@perf_page_layout
Browse files Browse the repository at this point in the history
perf: 优化首页布局显示问题;优化asciinema播放器字体大小随窗口大小变化问题
  • Loading branch information
huailei000 authored Oct 27, 2022
2 parents f4a99a4 + 7f9b33b commit ca690b9
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 28 deletions.
Binary file modified build/icons/player.ico
Binary file not shown.
19 changes: 17 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "jumperver_video_player",
"version": "0.1.5",
"version": "0.1.8",
"author": "OrangeM21 <[email protected]>",
"description": "An electron-vue project",
"license": null,
"main": "./dist/electron/main.js",
"scripts": {
"build": "node .electron-vue/build.js && electron-builder",
"build:dir": "node .electron-vue/build.js && electron-builder --dir",
"build:win": "node .electron-vue/build.js && electron-builder --win --x64",
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
"build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
"dev": "node .electron-vue/dev-runner.js",
Expand All @@ -27,6 +28,15 @@
"directories": {
"output": "build"
},
"nsis": {
"oneClick": false,
"allowElevation": true,
"allowToChangeInstallationDirectory": true,
"installerIcon": "./build/icons/player.ico",
"installerHeaderIcon": "./build/icons/player.ico",
"createDesktopShortcut": true,
"createStartMenuShortcut": true
},
"files": [
"dist/electron/**/*"
],
Expand All @@ -49,7 +59,12 @@
"icon": "build/icons/player.icns"
},
"win": {
"icon": "build/icons/icon.ico"
"icon": "build/icons/player.ico",
"target": [
{
"target": "nsis"
}
]
},
"linux": {
"icon": "build/icons"
Expand Down
31 changes: 8 additions & 23 deletions src/renderer/components/mainPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,15 @@
v-loading.fullscreen.lock="fullscreenLoading"
element-loading-text="解压中"
>
<el-row>
<el-col
class="main-col"
:lg="{span:8,offset:8}"
:md="{span:8,offset:6}"
>
<el-row style="text-align: center;">
<el-col class="main-col">
<img
id="logo"
src="@/assets/jumpserver-menu-logo.png"
alt="electron-vue"
/>
</el-col>
<el-col
class="main-col"
:lg="{span:8,offset:9}"
:md="{span:8,offset:7}"
>
<el-col class="main-col">
<el-upload
class="upload-demo"
drag
Expand All @@ -37,21 +29,11 @@
</div>
</el-upload>
</el-col>
<el-col
v-if="version === 1"
:lg="{span:8,offset:10}"
:md="{span:8,offset:9}"
style="margin-top:20px;"
>
<el-col v-if="version === 1" class="margin-top">
<el-radio v-model="type" label="1">Linux录像</el-radio>
<el-radio v-model="type" label="2">Windows录像</el-radio>
</el-col>
<el-col
v-if="version === 1"
:lg="{span:4,offset:12}"
:md="{span:4,offset:11}"
style="margin-top:20px;"
>
<el-col v-if="version === 1" class="margin-top">
<el-button round @click="play" type="primary">播放</el-button>
</el-col>
</el-row>
Expand Down Expand Up @@ -192,6 +174,9 @@ body {
margin-top: -20px;
margin-bottom: 20px;
}
.margin-top {
margin-top: 20px;
}
.main-col {
text-align: center;
}
Expand Down
18 changes: 15 additions & 3 deletions src/renderer/components/player/asciicastPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@
<el-button round @click="$router.push({name:'mainPage'})" size="small">返回</el-button>
</el-col>
<el-col :span="2" :offset="17" :v-if="this.version_internal === 2">
<el-tooltip placement="top" style="line-height:32px" >
<div slot="content">资产名: {{this.asset}}<br/>用户: {{this.admin_user}}<br/>系统用户: {{this.system_user}}<br/>开始时间: {{this.date_start}}<br/>结束时间: {{this.date_end}}</div>
<el-tooltip placement="top" style="line-height:32px; cursor: pointer;" >
<div slot="content">
资产名: {{this.asset}}<br/>
用户: {{this.admin_user}}<br/>
系统用户: {{this.system_user}}<br/>
开始时间: {{this.date_start}}<br/>
结束时间: {{this.date_end}}
</div>
<i class="el-icon-warning"></i>
</el-tooltip>
</el-col>
Expand Down Expand Up @@ -85,7 +91,8 @@ export default {
startAt: this.startAt,
speed: this.speed,
preload: true,
fontSize: '14px',
fit: false,
fontSize: '13px',
autoPlay: this.isPlaying ? 1 : 0
}
},
Expand Down Expand Up @@ -133,4 +140,9 @@ export default {
padding-top: 15px;
padding-bottom: 15px;
}
#terminal{
width: 100%;
background: #1f1b1b;
height: calc(100% - 62px);
}
</style>

0 comments on commit ca690b9

Please sign in to comment.