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

style: Optimize app store style and layout (#7858)

Refs #7846
This commit is contained in:
2025-02-12 21:56:52 +08:00 committed by GitHub
parent 036c973fec
commit 1c199bd3d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 134 additions and 154 deletions

View File

@ -55,7 +55,7 @@ const message = {
refresh: 'リロード', refresh: 'リロード',
get: '得る', get: '得る',
upgrade: 'アップグレード', upgrade: 'アップグレード',
ignore: 'アップグレードを無視します', ignore: '更新を無視する',
copy: 'コピー', copy: 'コピー',
random: 'ランダム', random: 'ランダム',
uninstall: 'アンインストール', uninstall: 'アンインストール',
@ -109,7 +109,7 @@ const message = {
protocol: 'プロトコル', protocol: 'プロトコル',
tableSetting: 'テーブル設定', tableSetting: 'テーブル設定',
refreshRate: 'リフレッシュレート', refreshRate: 'リフレッシュレート',
refreshRateUnit: '更新なし|{n}/ |{n}/', refreshRateUnit: '更新なし|{n}/ |{n}/',
selectColumn: '列を選択します', selectColumn: '列を選択します',
serialNumber: 'シリアル番号', serialNumber: 'シリアル番号',
}, },
@ -294,7 +294,7 @@ const message = {
units: { units: {
second: '2番目|2番目|', second: '2番目|2番目|',
minute: '||', minute: '||',
hour: '||', hour: '||',
day: '||', day: '||',
week: '||', week: '||',
month: '||数ヶ月', month: '||数ヶ月',
@ -1838,7 +1838,7 @@ const message = {
noService: 'いいえ{0}', noService: 'いいえ{0}',
toInstall: 'インストールに移動します', toInstall: 'インストールに移動します',
param: 'パラメーター', param: 'パラメーター',
alreadyRun: '年', alreadyRun: 'インストール済み',
syncAppList: '同期', syncAppList: '同期',
less1Minute: '1分未満', less1Minute: '1分未満',
appOfficeWebsite: 'オフィスのウェブサイト', appOfficeWebsite: 'オフィスのウェブサイト',
@ -1869,7 +1869,7 @@ const message = {
upgradeHelper: upgradeHelper:
'アップグレードする前に異常なアプリケーションを通常のステータスに戻しますアップグレードが失敗した場合はログ>システムログに移動して障害の理由を確認します', 'アップグレードする前に異常なアプリケーションを通常のステータスに戻しますアップグレードが失敗した場合はログ>システムログに移動して障害の理由を確認します',
installWarn: `外部アクセスは有効になっていないため、アプリケーションが外部ネットワークを介してアクセスできるようになります。続けたいですか?`, installWarn: `外部アクセスは有効になっていないため、アプリケーションが外部ネットワークを介してアクセスできるようになります。続けたいですか?`,
showIgnore: '無視されたアプリケーションを表示します', showIgnore: '無視したアプリ一覧',
cancelIgnore: 'キャンセルは無視します', cancelIgnore: 'キャンセルは無視します',
ignoreList: '無視されたアプリケーション', ignoreList: '無視されたアプリケーション',
appHelper: appHelper:

View File

@ -43,7 +43,7 @@ const message = {
collapse: 'Свернуть', collapse: 'Свернуть',
log: 'Логи', log: 'Логи',
back: 'Назад', back: 'Назад',
backup: 'Резервное копирование', backup: 'Бэкап',
recover: 'Восстановить', recover: 'Восстановить',
retry: 'Повторить', retry: 'Повторить',
upload: 'Загрузить', upload: 'Загрузить',

View File

@ -7,11 +7,7 @@
} }
.a-detail { .a-detail {
height: 100%;
width: 100%;
.d-name { .d-name {
height: 20%;
.name { .name {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
@ -21,18 +17,8 @@
font-size: 18px; font-size: 18px;
color: var(--panel-text-color); color: var(--panel-text-color);
} }
.status {
margin-left: 5px;
}
.h-button { .h-button {
float: right; float: right;
margin-right: 5px;
}
.msg {
margin-left: 5px;
}
.el-button + .el-button {
margin-left: 6px;
} }
} }
@ -50,7 +36,7 @@
} }
.d-button { .d-button {
margin-top: 10px; margin-top: 10px;
min-width: 440px; min-width: 330px;
} }
} }

View File

@ -3,7 +3,7 @@
<template #toolbar> <template #toolbar>
<el-row :gutter="5"> <el-row :gutter="5">
<el-col :xs="24" :sm="20" :md="20" :lg="20" :xl="20"> <el-col :xs="24" :sm="20" :md="20" :lg="20" :xl="20">
<div> <div class="flex flex-wrap items-center justify-start gap-y-1">
<el-button <el-button
class="tag-button" class="tag-button"
:class="activeTag === 'all' ? '' : 'no-active'" :class="activeTag === 'all' ? '' : 'no-active'"
@ -86,16 +86,7 @@
</div> </div>
</div> </div>
<el-row :gutter="5"> <el-row :gutter="5">
<el-col <el-col v-for="(installed, index) in data" :key="index" :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
v-for="(installed, index) in data"
:key="index"
:xs="24"
:sm="24"
:md="24"
:lg="12"
:xl="12"
:class="mode === 'upgrade' ? 'upgrade-card-col-12' : 'install-card-col-12'"
>
<div class="install-card"> <div class="install-card">
<el-card class="e-card"> <el-card class="e-card">
<el-row :gutter="10"> <el-row :gutter="10">
@ -111,105 +102,130 @@
<el-col :xs="24" :sm="21" :md="21" :lg="20" :xl="20"> <el-col :xs="24" :sm="21" :md="21" :lg="20" :xl="20">
<div class="a-detail"> <div class="a-detail">
<div class="d-name"> <div class="d-name">
<el-button link type="info"> <div class="flex items-center justify-between">
<el-tooltip effect="dark" :content="installed.name" placement="top"> <div class="min-w-50 flex items-center justify-start gap-1">
<span class="name">{{ installed.name }}</span> <el-button link type="info">
</el-tooltip> <el-tooltip
</el-button> effect="dark"
<span class="status"> :content="installed.name"
<Status :key="installed.status" :status="installed.status"></Status> placement="top"
</span> >
<span class="msg"> <span class="name">{{ installed.name }}</span>
<el-popover </el-tooltip>
v-if="isAppErr(installed)"
placement="bottom"
:width="400"
trigger="hover"
:content="installed.message"
:popper-options="options"
>
<template #reference>
<el-button link type="danger">
<el-icon><Warning /></el-icon>
</el-button>
</template>
<div class="app-error">
{{ installed.message }}
</div>
</el-popover>
</span>
<span class="ml-1">
<el-tooltip effect="dark" :content="$t('app.toFolder')" placement="top">
<el-button type="primary" link @click="toFolder(installed.path)">
<el-icon>
<FolderOpened />
</el-icon>
</el-button> </el-button>
</el-tooltip> <span class="status">
</span> <Status
<span class="ml-1"> :key="installed.status"
<el-tooltip :status="installed.status"
effect="dark" ></Status>
:content="$t('commons.button.log')" </span>
placement="top" <span class="msg" v-if="isAppErr(installed)">
> <el-popover
placement="bottom"
:width="400"
trigger="hover"
:content="installed.message"
:popper-options="options"
>
<template #reference>
<el-button link type="danger">
<el-icon><Warning /></el-icon>
</el-button>
</template>
<div class="app-error">
{{ installed.message }}
</div>
</el-popover>
</span>
<span>
<el-tooltip
effect="dark"
:content="$t('app.toFolder')"
placement="top"
>
<el-button
type="primary"
link
@click="toFolder(installed.path)"
>
<el-icon>
<FolderOpened />
</el-icon>
</el-button>
</el-tooltip>
</span>
<span>
<el-tooltip
effect="dark"
:content="$t('commons.button.log')"
placement="top"
>
<el-button
type="primary"
link
@click="openLog(installed)"
:disabled="installed.status === 'DownloadErr'"
>
<el-icon><Tickets /></el-icon>
</el-button>
</el-tooltip>
</span>
</div>
<div class="flex flex-wrap items-center justify-end gap-1">
<el-button <el-button
type="primary" class="h-button"
link plain
@click="openLog(installed)" round
:disabled="installed.status === 'DownloadErr'" size="small"
@click="openUploads(installed.appKey, installed.name)"
v-if="mode === 'installed'"
> >
<el-icon><Tickets /></el-icon> {{ $t('database.loadBackup') }}
</el-button> </el-button>
</el-tooltip> <el-button
</span> class="h-button"
plain
<el-button round
class="h-button" size="small"
plain @click="
round openBackups(
size="small" installed.appKey,
@click="openUploads(installed.appKey, installed.name)" installed.name,
v-if="mode === 'installed'" installed.status,
> )
{{ $t('database.loadBackup') }} "
</el-button> v-if="mode === 'installed'"
<el-button >
class="h-button" {{ $t('commons.button.backup') }}
plain </el-button>
round <el-button
size="small" class="h-button"
@click="openBackups(installed.appKey, installed.name, installed.status)" plain
v-if="mode === 'installed'" round
> size="small"
{{ $t('commons.button.backup') }} :disabled="installed.status === 'Upgrading'"
</el-button> @click="openOperate(installed, 'ignore')"
<el-button v-if="mode === 'upgrade'"
class="h-button" >
plain {{ $t('commons.button.ignore') }}
round </el-button>
size="small" <el-button
:disabled="installed.status === 'Upgrading'" class="h-button"
@click="openOperate(installed, 'ignore')" plain
v-if="mode === 'upgrade'" round
> size="small"
{{ $t('commons.button.ignore') }} :disabled="
</el-button> (installed.status !== 'Running' &&
<el-button installed.status !== 'UpgradeErr') ||
class="h-button" installed.appStatus === 'TakeDown'
plain "
round @click="openOperate(installed, 'upgrade')"
size="small" v-if="mode === 'upgrade'"
:disabled=" >
(installed.status !== 'Running' && {{ $t('commons.button.upgrade') }}
installed.status !== 'UpgradeErr') || </el-button>
installed.appStatus === 'TakeDown' </div>
" </div>
@click="openOperate(installed, 'upgrade')"
v-if="mode === 'upgrade'"
>
{{ $t('commons.button.upgrade') }}
</el-button>
</div> </div>
<div class="d-description flex flex-wrap items-center justify-start gap-1.5"> <div class="d-description flex flex-wrap items-center justify-start gap-1.5">
<el-button class="tagMargin" plain size="small"> <el-button class="tagMargin" plain size="small">
@ -631,38 +647,16 @@ onUnmounted(() => {
<style scoped lang="scss"> <style scoped lang="scss">
@use '../index'; @use '../index';
@media only screen and (max-width: 1400px) {
.install-card-col-12 {
max-width: 100%;
flex: 0 0 100%;
.a-detail {
.d-name {
.name {
max-width: 300px;
}
}
}
}
}
@media only screen and (max-width: 1499px) {
.upgrade-card-col-12 {
max-width: 100%;
flex: 0 0 100%;
.a-detail {
.d-name {
.name {
max-width: 300px;
}
}
}
}
}
.app-error { .app-error {
max-height: 500px; max-height: 500px;
overflow-y: auto; overflow-y: auto;
} }
.d-name {
.el-button + .el-button {
margin-left: 0;
}
}
.d-button { .d-button {
.el-button + .el-button { .el-button + .el-button {
margin-left: 0; margin-left: 0;