mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-06-11 10:30:47 +08:00
feat: add menu label for mobile (#82)
* feat: add menu label for mobile * feat: pc select 1 email
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user