From 6ea4e02ba7bf1b77739431dfa97f2b0195051f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=AB=AD=E5=8A=9B?= Date: Wed, 3 Jan 2024 14:28:56 +0800 Subject: [PATCH] wip --- main/.env.dev | 2 +- main/src/assets/lang/en_US.json | 2 +- main/src/assets/lang/zh_CN.json | 2 +- main/src/assets/scss/common/_others.scss | 10 +- main/src/assets/scss/common/_size.scss | 5 + main/src/components/Apps/AppCard.vue | 60 +++--- main/src/components/Apps/AppCardSkeleton.vue | 15 +- main/src/components/Apps/AppDetailInfo.vue | 126 ++++++------ main/src/components/Apps/AppPanel.vue | 34 ++-- main/src/components/Apps/AppSideBar.vue | 8 - .../Apps/AppStoreSourceManagement.vue | 125 ++++++------ main/src/components/Apps/AppTerminalPanel.vue | 26 +-- .../Apps/AppsInstallationLocation.vue | 76 +++----- main/src/components/Apps/ComposeConfig.vue | 97 ++++------ .../src/components/Apps/ExternalLinkPanel.vue | 6 +- main/src/components/Apps/TipEditorModal.vue | 21 +- main/src/components/Apps/progress.js | 61 +++--- main/src/components/CoreService.vue | 1 - main/src/components/TopBar.vue | 6 +- .../components/SidebarMenuButton.vue | 2 +- .../filebrowser/drop/DropContextMenu.vue | 15 -- .../components/filebrowser/drop/Network.js | 1 - main/src/components/forms/EnvInputGroup.vue | 2 +- main/src/components/forms/ImportPanel.vue | 179 ++---------------- main/src/components/forms/InputGroup.vue | 2 +- main/src/components/forms/Ports.vue | 2 +- .../components/forms/VolumesInputGroup.vue | 2 +- main/src/mixins/ListViewMixin.js | 1 - 28 files changed, 320 insertions(+), 569 deletions(-) diff --git a/main/.env.dev b/main/.env.dev index 7ac36ef7..8be23524 100644 --- a/main/.env.dev +++ b/main/.env.dev @@ -9,6 +9,6 @@ NODE_ENV=dev # VUE_APP_DEV_IP=192.168.2.132 # VUE_APP_DEV_IP=192.168.2.219 #VUE_APP_DEV_IP=192.168.2.243 -VUE_APP_DEV_IP=192.168.2.132 +VUE_APP_DEV_IP=192.168.2.63 VUE_APP_DEV_PORT=80 #VUE_APP_DEV_PORT=81 diff --git a/main/src/assets/lang/en_US.json b/main/src/assets/lang/en_US.json index 5f77338a..7bcf3df3 100644 --- a/main/src/assets/lang/en_US.json +++ b/main/src/assets/lang/en_US.json @@ -373,7 +373,7 @@ "Connection lost. Retry in 5 seconds...": "Connection lost. Retry in 5 seconds...", "cli to compose...": "cli to compose...", "View tutorial": "View tutorial", - "Add Source": "Add Source", + "Add Source": "More apps", "More": "More", "Search an app...": "Search an app...", "Tips": "Tips", diff --git a/main/src/assets/lang/zh_CN.json b/main/src/assets/lang/zh_CN.json index 2cbadb19..6074c9e1 100644 --- a/main/src/assets/lang/zh_CN.json +++ b/main/src/assets/lang/zh_CN.json @@ -370,7 +370,7 @@ "Connection lost. Retry in 5 seconds...": "连接丢失。5秒后重试...", "cli to compose...": "cli 转为 Compose", "View tutorial": "观看教程", - "Add Source": "添加软件源", + "Add Source": "更多应用", "More": "浏览更多", "Search an app...": "搜索应用……", "Tips": "提示", diff --git a/main/src/assets/scss/common/_others.scss b/main/src/assets/scss/common/_others.scss index 26f74e38..9f5eb419 100644 --- a/main/src/assets/scss/common/_others.scss +++ b/main/src/assets/scss/common/_others.scss @@ -158,7 +158,7 @@ } .container-icon { - padding: 0 0.5rem; + padding: 0 0.25rem; } } @@ -240,3 +240,11 @@ button.dropdown-item.is-active { .w-full { width: 100% !important; } + +.swiper-button-next, .swiper-button-prev{ + transition: opacity 0.3s; + &.swiper-button-disabled{ + opacity: 0 !important; + } +} + diff --git a/main/src/assets/scss/common/_size.scss b/main/src/assets/scss/common/_size.scss index f71de937..ea125b6b 100644 --- a/main/src/assets/scss/common/_size.scss +++ b/main/src/assets/scss/common/_size.scss @@ -23,6 +23,11 @@ word-break: keep-all; } +.is-14x14 { + width: 14px; + height: 14px; +} + .is-16x16 { width: 16px; height: 16px; diff --git a/main/src/components/Apps/AppCard.vue b/main/src/components/Apps/AppCard.vue index 09d2e83d..db2540e7 100644 --- a/main/src/components/Apps/AppCard.vue +++ b/main/src/components/Apps/AppCard.vue @@ -5,16 +5,17 @@
- {{ $t('Open') }} + {{ + $t('Open') }} {{ $t('Tips') }} @@ -23,11 +24,6 @@ $t('Setting') }} - {{ - $t('Clone') - }} - {{ $t('Check then update') @@ -47,25 +43,6 @@ }} - - - - {{ $t('Open') }} - {{ $t('Open') }} - - - - {{ $t('Open') }} - {{ $t('Open') }} - - - - - {{ $t('Delete') }} @@ -82,16 +59,16 @@
- - + +
+ :custom-class="shutDownClass">
@@ -175,6 +152,7 @@ export default { // Public. Only changes the state of the card, not the state of the button. isSaving: false, isActiveTooltip: false, + dropdownPosition: "is-bottom-right", } }, props: { @@ -245,6 +223,9 @@ export default { isLinkApp() { return this.item.app_type === "LinkApp" }, + shutDownClass() { + return this.item.status !== 'running'? "shutdown-rounded": "" + }, }, @@ -271,6 +252,15 @@ export default { }, methods: { + handleDorpdownPosition(event) { + this.$nextTick(() => { + const rightOffset = window.innerWidth - event.clientX - 160 + const horizontalPos = rightOffset > 0 ? "right" : "left" + const bottomOffset = window.innerHeight - event.clientY - 212 + const verticalPos = bottomOffset > 0 ? "bottom" : "top" + this.dropdownPosition = `is-${verticalPos}-${horizontalPos}` + }) + }, /** * @description: Open app in new windows * @param {String} status App status @@ -825,6 +815,12 @@ export default { padding-bottom: 3px; } +.shutdown-rounded { + border-radius: 50%; + background-color: #000; + color: #fff; +} + .app-card-drop { .dropdown-menu { min-width: 10rem; @@ -1026,7 +1022,7 @@ export default { padding-bottom: 1.5rem; padding-right: 1.5rem; - //styleName: Text 400Regular/Text03; + font-size: 14px; font-weight: 400; line-height: 20px; diff --git a/main/src/components/Apps/AppCardSkeleton.vue b/main/src/components/Apps/AppCardSkeleton.vue index a8e5363b..9975fc68 100644 --- a/main/src/components/Apps/AppCardSkeleton.vue +++ b/main/src/components/Apps/AppCardSkeleton.vue @@ -1,13 +1,3 @@ - @@ -80,7 +69,5 @@ export default { border-radius: 0.25rem; background-color: rgba(133, 149, 163, 0.6); } - - } \ No newline at end of file diff --git a/main/src/components/Apps/AppDetailInfo.vue b/main/src/components/Apps/AppDetailInfo.vue index 4515f197..4e8f1371 100644 --- a/main/src/components/Apps/AppDetailInfo.vue +++ b/main/src/components/Apps/AppDetailInfo.vue @@ -15,39 +15,35 @@
+ :src-fallback="require('@/assets/img/app/default.svg')" class="is-128x128 icon-shadow" + webp-fallback=".jpg">

{{ i18n(appDetailData.title) }}

{{ - i18n(appDetailData.tagline) - }}

+ i18n(appDetailData.tagline) + }}

+ :loading="appDetailData.id == currentInstallId" rounded size="is-normal" type="is-primary" + @click="openThirdContainerByAppInfo(appDetailData)"> {{ $t('Open') }} - + {{ $t('Install') }}

+ class="has-background-red-tertiary has-text-red has-text-full-04 _is-normal is-flex is-align-items-center font pr-2" + style="width: fit-content;height: 1.5rem;border-radius: 0.25rem"> - {{ $t('Not compatible with {arch} devices.', {arch: archTitle}) }} + {{ $t('Not compatible with {arch} devices.', { arch: archTitle }) }}

@@ -60,8 +56,7 @@

{{ $t('CATEGORY') }}

- +

{{ appDetailData.category }}

@@ -78,8 +73,8 @@

{{ - $t('REQUIRE') - }} {{ $t('MEMORY') }}

+ $t('REQUIRE') + }} {{ $t('MEMORY') }}

{{ appDetailData.min_memory }}

MB

@@ -89,31 +84,25 @@
- - + +
- +
-
-
-
+
+
-
- +
+
@@ -123,16 +112,16 @@ - + diff --git a/main/src/components/Apps/AppsInstallationLocation.vue b/main/src/components/Apps/AppsInstallationLocation.vue index 05f720a3..dcef981f 100644 --- a/main/src/components/Apps/AppsInstallationLocation.vue +++ b/main/src/components/Apps/AppsInstallationLocation.vue @@ -1,60 +1,44 @@ - - - + diff --git a/main/src/components/filebrowser/drop/DropContextMenu.vue b/main/src/components/filebrowser/drop/DropContextMenu.vue index 51ad860c..bbacc792 100644 --- a/main/src/components/filebrowser/drop/DropContextMenu.vue +++ b/main/src/components/filebrowser/drop/DropContextMenu.vue @@ -1,13 +1,3 @@ -