diff options
| author | zyh <[email protected]> | 2024-09-12 09:33:44 +0800 |
|---|---|---|
| committer | zyh <[email protected]> | 2024-09-12 09:33:44 +0800 |
| commit | 3af8b9b03a4d67b6064198e6e1fa127fe45b0e1e (patch) | |
| tree | 36403d99ff7d1eb165c6697b0c3b5b42c22330e6 | |
| parent | 28fac5af3d0ad40ae6743232fcc7db60c84b757e (diff) | |
feat: env app列表增加icon
| -rw-r--r-- | src/components/layout/index.vue | 2 | ||||
| -rw-r--r-- | src/components/layout/leftMenu.vue | 6 | ||||
| -rw-r--r-- | src/views/environments/start.vue | 62 |
3 files changed, 61 insertions, 9 deletions
diff --git a/src/components/layout/index.vue b/src/components/layout/index.vue index c6cc207..525552a 100644 --- a/src/components/layout/index.vue +++ b/src/components/layout/index.vue @@ -15,7 +15,7 @@ v-show="showMenu" ></left-menu> <div class="pageContent" :class="currentRoute.name + '-page'"> - <router-view v-if="isRefresh" @refresh="refresh"></router-view> + <router-view v-if="isRefresh"></router-view> </div> </div> </div> diff --git a/src/components/layout/leftMenu.vue b/src/components/layout/leftMenu.vue index b30d6fd..f303e06 100644 --- a/src/components/layout/leftMenu.vue +++ b/src/components/layout/leftMenu.vue @@ -28,11 +28,8 @@ import { userMenus, profileMenus, normalMenuType } from '@/utils/constants' import { isAdministrator } from '@/utils/index'; const props = defineProps({ - test: { - type: String, - }, curMenuType: { - type: String, + type: Number, default: normalMenuType } }); @@ -65,7 +62,6 @@ const jummp = (name) => { }); }; -const userInfo = ref({}); let menus = computed(() => { if(props.curMenuType === normalMenuType) { return systemStore.menus; diff --git a/src/views/environments/start.vue b/src/views/environments/start.vue index 0cf3610..918bd39 100644 --- a/src/views/environments/start.vue +++ b/src/views/environments/start.vue @@ -38,7 +38,20 @@ <div class="install-title">{{ t('environment.installed') }}</div> <ul class="install-list" v-loading="appLoading"> <li class="install-item" v-for="item in appList" :key="item.id"> - <span>{{ item.packageName }}</span> + <div class="install-icon"> + <img v-if="item.icon" :src="item.icon" /> + <i + v-else-if="get(environmentInfo, 'platform') == 'ios'" + class="asw-icon icon-ios" + ></i> + <i v-else class="asw-icon icon-android"></i> + </div> + <div class="install-info"> + <p class="install-info-name">{{ item.name || '-' }}</p> + <p class="install-info-packageName"> + {{ item.packageName }} + </p> + </div> <el-button type="primary" size="default" @@ -574,10 +587,11 @@ const connect = () => { rfb = new RFB(novncRef.value, url); rfb.scaleViewport = true; // 远程会话是否应在本地缩放以适合其容器 rfb.clipViewport = true; // 远程会话是否应被剪裁到其容器,禁用时将显示滚动条以处理由此产生的溢出 - rfb.resizeSession = true; // 每当容器尺寸调整是否发送调整远程会话大小的请求 + rfb.resizeSession = false; // 每当容器尺寸调整是否发送调整远程会话大小的请求 rfb.showDotCursor = true; // 如果服务器设置了这种不可见光标,是否应显示点光标而不是零大小或完全透明的光标 rfb.viewOnly = false; // 是否应阻止将任何事件(例如按键或鼠标移动)发送到服务器 - + rfb.qualityLevel = 9; // 是一个范围为[0-9]的整数,控制所需的JPEG质量。0表示低质量,9表示高质量。 + rfb._sock._websocket.onclose = (err) => { ElMessage.error(err.reason); }; @@ -652,6 +666,7 @@ onUnmounted(() => { display: flex; gap: 0 10px; .desktop-left { + flex-shrink: 0; width: 50%; height: 100%; background: var(--background_secondary); @@ -692,6 +707,7 @@ onUnmounted(() => { } } .desktop-right { + flex-shrink: 0; width: 50%; height: 100%; background: var(--background_secondary); @@ -756,10 +772,50 @@ onUnmounted(() => { padding: 0 20px; overflow-y: auto; .install-item { + width: 100%; display: flex; justify-content: space-between; align-items: center; margin-top: 15px; + overflow: hidden; + gap: 0 12px; + .install-icon { + img { + width: 40px; + height: 40px; + } + .asw-icon { + font-size: 40px; + &.icon-ios { + color: #323232; + } + &.icon-android { + color: #8bc04e; + } + } + } + .install-info { + flex: 1; + width: 0; + height: 40px; + display: flex; + flex-direction: column; + justify-content: space-between; + .install-info-name { + font-size: 14px; + color: var(--text); + line-height: 20px; + font-weight: 600; + } + .install-info-packageName { + font-size: 14px; + color: var(--text_secondary); + line-height: 20px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } + } } } } |
