feat: add menu label for mobile (#82)

* feat: add menu label for mobile

* feat: pc select 1 email
This commit is contained in:
Dream Hunter
2024-03-30 12:07:06 +08:00
committed by GitHub
parent fc5a251a88
commit 0d81d05aa3
2 changed files with 10 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
<script setup>
import { NSpace, NAlert, NSwitch, NCard, NInput, NInputGroupLabel } from 'naive-ui'
import { NButton, NLayout, NInputGroup, NModal, NSelect, NPagination } from 'naive-ui'
import { NList, NListItem, NThing, NTag, NIcon, NSplit } from 'naive-ui'
import { NList, NListItem, NThing, NTag, NIcon, NSplit, NResult } from 'naive-ui'
import { NDrawer, NDrawerContent } from 'naive-ui'
import { watch, onMounted, ref } from "vue";
import useClipboard from 'vue-clipboard3'
@@ -107,6 +107,9 @@ const refresh = async () => {
if (totalCount > 0) {
count.value = totalCount;
}
if (!isMobile.value && !curMail.value && data.value.length > 0) {
curMail.value = results[0];
}
} catch (error) {
message.error(error.message || "error");
console.error(error);
@@ -248,7 +251,8 @@ onMounted(async () => {
<div v-html="curMail.message" style="max-height: 100vh;"></div>
</n-card>
<n-card v-else>
{{ t('pleaseSelectMail') }}
<n-result status="info" :title="t('pleaseSelectMail')">
</n-result>
</n-card>
</template>
</n-split>

View File

@@ -61,6 +61,7 @@ const { t } = useI18n({
authTip: 'Please enter the correct auth code',
settings: 'Settings',
home: 'Home',
menu: 'Menu'
},
zh: {
title: 'Cloudflare 临时邮件',
@@ -73,6 +74,7 @@ const { t } = useI18n({
authTip: '请输入正确的授权码',
settings: '设置',
home: '主页',
menu: '菜单'
}
}
});
@@ -160,7 +162,8 @@ const menuOptions = computed(() => [
const menuOptionsMobile = [
{
label: () => h(
label: t('menu'),
icon: () => h(
NIcon,
{
component: MenuFilled