From 8fba01eb4b109a8b697c8efc31a0a42f0e69e68e Mon Sep 17 00:00:00 2001 From: Dream Hunter Date: Sun, 31 Mar 2024 17:29:37 +0800 Subject: [PATCH] feat: UI: add menu icon (#85) --- frontend/package.json | 1 + frontend/pnpm-lock.yaml | 7 ++ frontend/src/views/Content.vue | 9 +- frontend/src/views/Header.vue | 155 +++++++++++++++++++++++---------- 4 files changed, 123 insertions(+), 49 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 2f843643..b7aa0ed5 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -20,6 +20,7 @@ "vue-router": "^4.3.0" }, "devDependencies": { + "@vicons/fa": "^0.12.0", "@vitejs/plugin-vue": "^4.6.2", "vite": "^5.2.6", "vite-plugin-pwa": "^0.19.7", diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index a0e90786..626a20e9 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -34,6 +34,9 @@ dependencies: version: 4.3.0(vue@3.4.21) devDependencies: + '@vicons/fa': + specifier: ^0.12.0 + version: 0.12.0 '@vitejs/plugin-vue': specifier: ^4.6.2 version: 4.6.2(vite@5.2.6)(vue@3.4.21) @@ -1755,6 +1758,10 @@ packages: resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} dev: false + /@vicons/fa@0.12.0: + resolution: {integrity: sha512-g2PIeJLsTHUjt6bK63LxqC0uYQB7iu+xViJOxvp1s8b9/akpXVPVWjDTTsP980/0KYyMMe4U7F/aUo7wY+MsXA==} + dev: true + /@vicons/material@0.12.0: resolution: {integrity: sha512-chv1CYAl8P32P3Ycwgd5+vw/OFNc2mtkKdb1Rw4T5IJmKy6GVDsoUKV3N2l208HATn7CCQphZtuPDdsm7K2kmA==} dev: false diff --git a/frontend/src/views/Content.vue b/frontend/src/views/Content.vue index 2ea134f7..2ab8ad76 100644 --- a/frontend/src/views/Content.vue +++ b/frontend/src/views/Content.vue @@ -4,7 +4,6 @@ import { NButton, NLayout, NInputGroup, NModal, NSelect, NPagination } from 'nai 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' import { useMessage } from 'naive-ui' import { useI18n } from 'vue-i18n' import { useGlobalState } from '../store' @@ -119,6 +118,10 @@ const getAttachments = async (attachment_id) => { } }; +const mailItemClass = (row) => { + return curMail.value && row.id == curMail.value.id ? (themeSwitch.value ? 'overlay overlay-dark-backgroud' : 'overlay overlay-light-backgroud') : ''; +}; + onMounted(async () => { await api.getSettings(); await refresh(); @@ -128,7 +131,7 @@ onMounted(async () => {