-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Adjust the empty status prompt layout #7350
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,15 +189,15 @@ | |
<LayoutContent :title="'PostgreSQL ' + $t('menu.database')" :divider="true"> | ||
<template #main> | ||
<div class="app-warn"> | ||
<div> | ||
<div class="flex flex-col gap-2 items-center justify-center w-full sm:flex-row"> | ||
<span>{{ $t('app.checkInstalledWarn', [$t('database.noPostgresql')]) }}</span> | ||
<span @click="goRouter('app')"> | ||
<el-icon class="ml-2"><Position /></el-icon> | ||
<span @click="goRouter('app')" class="flex items-center justify-center gap-0.5"> | ||
<el-icon><Position /></el-icon> | ||
{{ $t('database.goInstall') }} | ||
</span> | ||
<div> | ||
<img src="@/assets/images/no_app.svg" /> | ||
</div> | ||
</div> | ||
<div> | ||
<img src="@/assets/images/no_app.svg" /> | ||
</div> | ||
</div> | ||
</template> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code changes you provided have several areas that need attention:
Here's a slightly adjusted version with these considerations addressed: <template #main>
<div class="app-warn">
<!-- First span -->
<div class="items-center justify-center w-full sm:hidden">
<span>{{ $t('app.checkInstalledWarn', [$t('database.noPostgresql')]) }}</span>
<span @click="goRouter('app')" class="flex items-center justify-center gap-0.5 mx-auto">
<el-icon><Position /></el-icon>
{{ $t('database.goInstall') }}
</span>
<div v-if="$device.isMobile" style="height: 2rem;"></div> <!-- Ensure equal height across devices -->
</div>
<!-- Second span wrapped in a flexbox -->
<div v-if="$!$device.isMobile" class="hidden px-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-4 mt-8 mb-6 gap-y-6 xl:gap-y-7">
<span>{{ $t('app.checkInstalledWarn', [$t('database.noPostgresql')]) }}</span>
<span @click="goRouter('app')">
<el-icon><Position /></el-icon>
{{ $t('database.goInstall') }}
</span>
<div>
<img src="@/assets/images/no_app.svg" />
</div>
</div>
<!-- Mobile-specific image placement -->
<div v-if="$$device.isMobile"
class="w-[50%] relative bottom-5 left-1/2 translate-x-[-50%]"
style="background-image: url('@/assets/images/no_app.png'); background-position:center; background-repeat:no-repeat;">
</div>
</div>
</template> Key Changes Made:
This should lead to a cleaner and functional UI layout, ensuring compatibility across various devices and screen resolutions. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,15 +99,15 @@ | |
<LayoutContent :title="$t('firewall.firewall')" :divider="true"> | ||
<template #main> | ||
<div class="app-warn"> | ||
<div> | ||
<div class="flex flex-col gap-2 items-center justify-center w-full sm:flex-row"> | ||
<span>{{ $t('firewall.notSupport') }}</span> | ||
<span @click="toDoc"> | ||
<el-icon class="ml-2"><Position /></el-icon> | ||
<span @click="toDoc" class="flex items-center justify-center gap-0.5"> | ||
<el-icon><Position /></el-icon> | ||
{{ $t('firewall.quickJump') }} | ||
</span> | ||
<div> | ||
<img src="@/assets/images/no_app.svg" /> | ||
</div> | ||
</div> | ||
<div> | ||
<img src="@/assets/images/no_app.svg" /> | ||
</div> | ||
</div> | ||
</template> | ||
|
@@ -130,6 +130,7 @@ import { Host } from '@/api/interface/host'; | |
import { ElMessageBox } from 'element-plus'; | ||
import i18n from '@/lang'; | ||
import { MsgSuccess } from '@/utils/message'; | ||
import {Position} from "@element-plus/icons-vue"; | ||
|
||
const loading = ref(); | ||
const activeTag = ref('address'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code you provided appears to be an HTML template using Vue.js with Element Plus components. Here are some points for review: Irregularities and Potential Issues
Optimization Suggestions
Overall, checking for typos, ensuring consistency, and considering accessibility practices would help improve the quality of your web application. |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes appear to be minor corrections and optimizations. Here's a summary of the adjustments:
<div>
wrapper with two nested divs (<div class="flex flex-col gap-2 items-center justify-center w-full sm:flex-row">
) for better styling alignment.class
attribute on the span element instead of adding it directly as a child node.These changes help improve layout flow and make the HTML more readable while maintaining functionality.