mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-09-04 23:17:34 +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>
|
<script setup>
|
||||||
import { NSpace, NAlert, NSwitch, NCard, NInput, NInputGroupLabel } from 'naive-ui'
|
import { NSpace, NAlert, NSwitch, NCard, NInput, NInputGroupLabel } from 'naive-ui'
|
||||||
import { NButton, NLayout, NInputGroup, NModal, NSelect, NPagination } 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 { NDrawer, NDrawerContent } from 'naive-ui'
|
||||||
import { watch, onMounted, ref } from "vue";
|
import { watch, onMounted, ref } from "vue";
|
||||||
import useClipboard from 'vue-clipboard3'
|
import useClipboard from 'vue-clipboard3'
|
||||||
@@ -107,6 +107,9 @@ const refresh = async () => {
|
|||||||
if (totalCount > 0) {
|
if (totalCount > 0) {
|
||||||
count.value = totalCount;
|
count.value = totalCount;
|
||||||
}
|
}
|
||||||
|
if (!isMobile.value && !curMail.value && data.value.length > 0) {
|
||||||
|
curMail.value = results[0];
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message.error(error.message || "error");
|
message.error(error.message || "error");
|
||||||
console.error(error);
|
console.error(error);
|
||||||
@@ -248,7 +251,8 @@ onMounted(async () => {
|
|||||||
<div v-html="curMail.message" style="max-height: 100vh;"></div>
|
<div v-html="curMail.message" style="max-height: 100vh;"></div>
|
||||||
</n-card>
|
</n-card>
|
||||||
<n-card v-else>
|
<n-card v-else>
|
||||||
{{ t('pleaseSelectMail') }}
|
<n-result status="info" :title="t('pleaseSelectMail')">
|
||||||
|
</n-result>
|
||||||
</n-card>
|
</n-card>
|
||||||
</template>
|
</template>
|
||||||
</n-split>
|
</n-split>
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ const { t } = useI18n({
|
|||||||
authTip: 'Please enter the correct auth code',
|
authTip: 'Please enter the correct auth code',
|
||||||
settings: 'Settings',
|
settings: 'Settings',
|
||||||
home: 'Home',
|
home: 'Home',
|
||||||
|
menu: 'Menu'
|
||||||
},
|
},
|
||||||
zh: {
|
zh: {
|
||||||
title: 'Cloudflare 临时邮件',
|
title: 'Cloudflare 临时邮件',
|
||||||
@@ -73,6 +74,7 @@ const { t } = useI18n({
|
|||||||
authTip: '请输入正确的授权码',
|
authTip: '请输入正确的授权码',
|
||||||
settings: '设置',
|
settings: '设置',
|
||||||
home: '主页',
|
home: '主页',
|
||||||
|
menu: '菜单'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -160,7 +162,8 @@ const menuOptions = computed(() => [
|
|||||||
|
|
||||||
const menuOptionsMobile = [
|
const menuOptionsMobile = [
|
||||||
{
|
{
|
||||||
label: () => h(
|
label: t('menu'),
|
||||||
|
icon: () => h(
|
||||||
NIcon,
|
NIcon,
|
||||||
{
|
{
|
||||||
component: MenuFilled
|
component: MenuFilled
|
||||||
|
|||||||
Reference in New Issue
Block a user