1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-03-01 11:34:13 +08:00

style: 去掉应用列表中的更新应用列表按钮 (#6105)

This commit is contained in:
zhengkunwang 2024-08-12 18:40:10 +08:00 committed by GitHub
parent a6af97e3c1
commit 12eaa66bc5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,11 +56,6 @@
</template> </template>
<template #rightButton> <template #rightButton>
<div class="flex justify-end"> <div class="flex justify-end">
<div class="mr-10">
<el-checkbox v-model="req.resource" true-value="all" false-value="remote" @change="search(req)">
{{ $t('app.showLocal') }}
</el-checkbox>
</div>
<fu-table-pagination <fu-table-pagination
v-model:current-page="paginationConfig.currentPage" v-model:current-page="paginationConfig.currentPage"
v-model:page-size="paginationConfig.pageSize" v-model:page-size="paginationConfig.pageSize"
@ -68,11 +63,11 @@
@change="search(req)" @change="search(req)"
:layout="mobile ? ' prev, pager, next' : ' prev, pager, next'" :layout="mobile ? ' prev, pager, next' : ' prev, pager, next'"
/> />
<el-badge is-dot :hidden="!canUpdate" class="ml-5"> <div>
<el-button @click="sync" type="primary" plain :disabled="syncing"> <el-checkbox v-model="req.resource" true-value="all" false-value="remote" @change="search(req)">
{{ $t('app.syncAppList') }} {{ $t('app.showLocal') }}
</el-button> </el-checkbox>
</el-badge> </div>
</div> </div>
</template> </template>
<template #main> <template #main>
@ -168,12 +163,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import { App } from '@/api/interface/app'; import { App } from '@/api/interface/app';
import { onMounted, reactive, ref, computed } from 'vue'; import { onMounted, reactive, ref, computed } from 'vue';
import { GetAppTags, SearchApp, SyncApp } from '@/api/modules/app'; import { GetAppTags, SearchApp } from '@/api/modules/app';
import i18n from '@/lang';
import Detail from '../detail/index.vue'; import Detail from '../detail/index.vue';
import Install from '../detail/install/index.vue'; import Install from '../detail/install/index.vue';
import router from '@/routers'; import router from '@/routers';
import { MsgSuccess } from '@/utils/message';
import { GlobalStore } from '@/store'; import { GlobalStore } from '@/store';
import { getLanguage } from '@/utils/util'; import { getLanguage } from '@/utils/util';
@ -205,8 +198,6 @@ const tags = ref<App.Tag[]>([]);
const loading = ref(false); const loading = ref(false);
const activeTag = ref('all'); const activeTag = ref('all');
const showDetail = ref(false); const showDetail = ref(false);
const canUpdate = ref(false);
const syncing = ref(false);
const detailRef = ref(); const detailRef = ref();
const installRef = ref(); const installRef = ref();
const installKey = ref(''); const installKey = ref('');
@ -256,23 +247,6 @@ const openDetail = (key: string) => {
detailRef.value.acceptParams(key, 'install'); detailRef.value.acceptParams(key, 'install');
}; };
const sync = () => {
syncing.value = true;
SyncApp()
.then((res) => {
if (res.message != '') {
MsgSuccess(res.message);
} else {
MsgSuccess(i18n.global.t('app.syncStart'));
}
canUpdate.value = false;
search(req);
})
.finally(() => {
syncing.value = false;
});
};
const changeTag = (key: string) => { const changeTag = (key: string) => {
req.tags = []; req.tags = [];
activeTag.value = key; activeTag.value = key;