Skip to content

Commit

Permalink
fix: 优化移动端运行时样式 (#6460)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu authored Sep 11, 2024
1 parent 6ae9b98 commit fc70345
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 38 deletions.
59 changes: 34 additions & 25 deletions frontend/src/components/system-upgrade/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="flex w-full flex-col gap-2 md:justify-between md:flex-row">
<div class="flex flex-wrap gap-4">
<span v-if="props.footer">
<div>
<div class="flex w-full flex-col gap-2 md:flex-row">
<div class="flex flex-wrap" v-if="props.footer">
<el-button type="primary" link @click="toForum">
<span class="font-normal">{{ $t('setting.forum') }}</span>
</el-button>
Expand All @@ -13,30 +13,35 @@
<el-button type="primary" link @click="toGithub">
<span class="font-normal">{{ $t('setting.project') }}</span>
</el-button>
<el-divider direction="vertical" />
</span>
</div>
<div class="flex flex-wrap">
<el-button type="primary" link @click="toHalo">
<span class="font-normal">{{ isProductPro ? $t('license.pro') : $t('license.community') }}</span>
</el-button>
<span class="version" @click="copyText(version)">{{ version }}</span>
<el-badge is-dot style="margin-top: -3px" v-if="version !== 'Waiting' && globalStore.hasNewVersion">
<el-button type="primary" link @click="onLoadUpgradeInfo">
<span class="font-normal">({{ $t('setting.hasNewVersion') }})</span>
<el-divider v-if="!mobile" direction="vertical" />
</div>
<div class="flex flex-wrap">
<el-button type="primary" link @click="toHalo">
<span class="font-normal">
{{ isProductPro ? $t('license.pro') : $t('license.community') }}
</span>
</el-button>
<span class="version" @click="copyText(version)">{{ version }}</span>
<el-badge is-dot style="margin-top: -3px" v-if="version !== 'Waiting' && globalStore.hasNewVersion">
<el-button type="primary" link @click="onLoadUpgradeInfo">
<span class="font-normal">({{ $t('setting.hasNewVersion') }})</span>
</el-button>
</el-badge>
<el-button
v-if="version !== 'Waiting' && !globalStore.hasNewVersion"
type="primary"
link
@click="onLoadUpgradeInfo"
>
<span>({{ $t('setting.upgradeCheck') }})</span>
</el-button>
</el-badge>
<el-button
v-if="version !== 'Waiting' && !globalStore.hasNewVersion"
type="primary"
link
@click="onLoadUpgradeInfo"
>
<span>({{ $t('setting.upgradeCheck') }})</span>
</el-button>
<el-tag v-if="version === 'Waiting'" round style="margin-left: 10px">{{ $t('setting.upgrading') }}</el-tag>
<el-tag v-if="version === 'Waiting'" round style="margin-left: 10px">
{{ $t('setting.upgrading') }}
</el-tag>
</div>
</div>
</div>

<el-drawer
:close-on-click-modal="false"
:close-on-press-escape="false"
Expand Down Expand Up @@ -86,14 +91,18 @@ import i18n from '@/lang';
import 'md-editor-v3/lib/style.css';
import { MsgSuccess } from '@/utils/message';
import { copyText } from '@/utils/util';
import { onMounted, ref } from 'vue';
import { onMounted, ref, computed } from 'vue';
import { GlobalStore } from '@/store';
import { ElMessageBox } from 'element-plus';
import { storeToRefs } from 'pinia';
const globalStore = GlobalStore();
const { isDarkTheme } = storeToRefs(globalStore);
const mobile = computed(() => {
return globalStore.isMobile();
});
const version = ref<string>('');
const isProductPro = ref();
const loading = ref(false);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/app-store/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RouterButton :buttons="buttons">
<template #route-button>
<div class="pr-5 mt-1">
<el-badge is-dot :hidden="canUpdate">
<el-badge is-dot :hidden="!canUpdate">
<el-button @click="sync" type="primary" plain :disabled="syncing">
{{ $t('app.syncAppList') }}
</el-button>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/views/setting/about/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<PrimaryLogo v-else />
</div>
<h3 class="description">{{ globalStore.themeConfig.title || $t('setting.description') }}</h3>
<h3>
<div class="flex justify-center">
<SystemUpgrade />
</h3>
<div style="margin-top: 10px">
</div>
<div class="flex w-full justify-center my-5 flex-wrap md:flex-row gap-4">
<el-link @click="toDoc" class="system-link">
<el-icon><Document /></el-icon>
<span>{{ $t('setting.doc2') }}</span>
Expand Down
12 changes: 9 additions & 3 deletions frontend/src/views/website/runtime/go/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
fix
/>
<fu-table-operations
:ellipsis="10"
width="300px"
:ellipsis="mobile ? 0 : 10"
:min-width="mobile ? 'auto' : 300"
:buttons="buttons"
:label="$t('commons.table.operate')"
fixed="right"
Expand All @@ -103,7 +103,7 @@
</template>

<script setup lang="ts">
import { onMounted, onUnmounted, reactive, ref } from 'vue';
import { onMounted, onUnmounted, reactive, ref, computed } from 'vue';
import { Runtime } from '@/api/interface/runtime';
import { OperateRuntime, RuntimeDeleteCheck, SearchRuntimes, SyncRuntime } from '@/api/modules/runtime';
import { dateFormat } from '@/utils/util';
Expand All @@ -120,6 +120,7 @@ import AppResources from '@/views/website/runtime/php/check/index.vue';
import { ElMessageBox } from 'element-plus';
import { containerPrune } from '@/api/modules/container';
import { MsgSuccess } from '@/utils/message';
import { GlobalStore } from '@/store';
let timer: NodeJS.Timer | null = null;
const loading = ref(false);
Expand All @@ -130,6 +131,11 @@ const dialogPortJumpRef = ref();
const composeLogRef = ref();
const checkRef = ref();
const globalStore = GlobalStore();
const mobile = computed(() => {
return globalStore.isMobile();
});
const paginationConfig = reactive({
cacheSizeKey: 'runtime-page-size',
currentPage: 1,
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/views/website/runtime/java/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,9 @@
/>
<fu-table-operations
:ellipsis="mobile ? 0 : 3"
width="300px"
:min-width="mobile ? 'auto' : 300"
:buttons="buttons"
:min-width="mobile ? 'auto' : 200"
:fixed="mobile ? false : 'right'"
fixed="right"
:label="$t('commons.table.operate')"
fix
/>
Expand Down
12 changes: 9 additions & 3 deletions frontend/src/views/website/runtime/node/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
fix
/>
<fu-table-operations
:ellipsis="10"
width="350px"
:ellipsis="mobile ? 0 : 10"
:min-width="mobile ? 'auto' : 300"
:buttons="buttons"
:label="$t('commons.table.operate')"
fixed="right"
Expand All @@ -103,7 +103,7 @@
</template>

<script setup lang="ts">
import { onMounted, onUnmounted, reactive, ref } from 'vue';
import { onMounted, onUnmounted, reactive, ref, computed } from 'vue';
import { Runtime } from '@/api/interface/runtime';
import { OperateRuntime, RuntimeDeleteCheck, SearchRuntimes, SyncRuntime } from '@/api/modules/runtime';
import { dateFormat } from '@/utils/util';
Expand All @@ -121,6 +121,7 @@ import AppResources from '@/views/website/runtime/php/check/index.vue';
import { ElMessageBox } from 'element-plus';
import { containerPrune } from '@/api/modules/container';
import { MsgSuccess } from '@/utils/message';
import { GlobalStore } from '@/store';
let timer: NodeJS.Timer | null = null;
const loading = ref(false);
Expand All @@ -132,6 +133,11 @@ const composeLogRef = ref();
const moduleRef = ref();
const checkRef = ref();
const globalStore = GlobalStore();
const mobile = computed(() => {
return globalStore.isMobile();
});
const paginationConfig = reactive({
cacheSizeKey: 'runtime-page-size',
currentPage: 1,
Expand Down

0 comments on commit fc70345

Please sign in to comment.