Browse Source

chore: 赞赏码

nmtuan 1 year ago
parent
commit
05d8d23ef8

+ 6 - 0
app.config.ts

@@ -18,6 +18,12 @@ export default defineAppConfig({
         },
         },
         card: {
         card: {
             background: 'dark:bg-zinc-900'
             background: 'dark:bg-zinc-900'
+        },
+        modal: {
+            background: 'dark:bg-zinc-900',
+            overlay: {
+                background: 'dark:bg-black/50'
+            }
         }
         }
     }
     }
 })
 })

+ 16 - 1
app.vue

@@ -2,7 +2,7 @@
  * @Author: NMTuan
  * @Author: NMTuan
  * @Email: NMTuan@qq.com
  * @Email: NMTuan@qq.com
  * @Date: 2024-02-18 11:35:10
  * @Date: 2024-02-18 11:35:10
- * @LastEditTime: 2024-02-20 18:58:18
+ * @LastEditTime: 2024-02-22 12:23:55
  * @LastEditors: NMTuan
  * @LastEditors: NMTuan
  * @Description: 
  * @Description: 
  * @FilePath: \timeNow\app.vue
  * @FilePath: \timeNow\app.vue
@@ -42,6 +42,21 @@ onMounted(() => {
 onBeforeUnmount(() => {
 onBeforeUnmount(() => {
     clearInterval(dt)
     clearInterval(dt)
 })
 })
+
+const title = computed(() => {
+    let tit = ''
+    tit += !dateStore.hour24 && dateStore.hour > 12 ? dateStore.hour % 12 : dateStore.hour
+    tit += ':' + dateStore.minute
+    if (settingStore.showSecond) {
+        tit += ':' + dateStore.second
+    }
+    tit += '- 压感时钟'
+    return tit
+})
+
+useHead({
+    title: title
+})
 </script>
 </script>
 <style lang="scss">
 <style lang="scss">
 html,
 html,

+ 2 - 2
components/clock/board.vue

@@ -2,14 +2,14 @@
  * @Author: NMTuan
  * @Author: NMTuan
  * @Email: NMTuan@qq.com
  * @Email: NMTuan@qq.com
  * @Date: 2024-02-18 11:48:34
  * @Date: 2024-02-18 11:48:34
- * @LastEditTime: 2024-02-22 10:23:06
+ * @LastEditTime: 2024-02-22 12:28:57
  * @LastEditors: NMTuan
  * @LastEditors: NMTuan
  * @Description: 
  * @Description: 
  * @FilePath: \timeNow\components\clock\board.vue
  * @FilePath: \timeNow\components\clock\board.vue
 -->
 -->
 <template>
 <template>
     <div class="text-zinc-200 text-[22vw] leading-[24vw] text-center font-digital-dismay">
     <div class="text-zinc-200 text-[22vw] leading-[24vw] text-center font-digital-dismay">
-        <span>{{ settingStore.hour24 ? dateStore.hour : dateStore.hour % 12 }}</span>
+        <span>{{ !settingStore.hour24 && dateStore.hour > 12 ? dateStore.hour % 12 : dateStore.hour }}</span>
         <span class="transition-all"
         <span class="transition-all"
             :class="[settingStore.flicker && (dateStore.second % 2 === 0 ? 'opacity-1' : 'opacity-0')]">:</span>
             :class="[settingStore.flicker && (dateStore.second % 2 === 0 ? 'opacity-1' : 'opacity-0')]">:</span>
         <span>{{ dateStore.minute }}</span>
         <span>{{ dateStore.minute }}</span>

+ 12 - 3
components/header/index.vue

@@ -2,7 +2,7 @@
  * @Author: NMTuan
  * @Author: NMTuan
  * @Email: NMTuan@qq.com
  * @Email: NMTuan@qq.com
  * @Date: 2024-02-20 16:11:39
  * @Date: 2024-02-20 16:11:39
- * @LastEditTime: 2024-02-22 11:53:57
+ * @LastEditTime: 2024-02-22 12:42:38
  * @LastEditors: NMTuan
  * @LastEditors: NMTuan
  * @Description: 
  * @Description: 
  * @FilePath: \timeNow\components\header\index.vue
  * @FilePath: \timeNow\components\header\index.vue
@@ -10,7 +10,16 @@
 <template>
 <template>
     <div class="w-full text-right pr-6 pt-6">
     <div class="w-full text-right pr-6 pt-6">
         <!--  -->
         <!--  -->
-        <HeaderIcon name="i-ri-cup-line"></HeaderIcon>
+        <HeaderIcon @click="donateVisiable = true" name="i-ri-cup-line"></HeaderIcon>
+        <UModal v-model="donateVisiable" :ui="{ width: 'sm:max-w-4xl' }">
+            <div class="py-16">
+                <div class="flex justify-around">
+                    <img class="h-96" src="/wepay.jpg" alt="">
+                    <img class="h-96" src="/alipay.jpg" alt="">
+                </div>
+            </div>
+        </UModal>
+
         <HeaderIcon name="i-ri-github-line" href="https://github.com/NMTuan/timeNow"></HeaderIcon>
         <HeaderIcon name="i-ri-github-line" href="https://github.com/NMTuan/timeNow"></HeaderIcon>
         <ClientOnly>
         <ClientOnly>
             <HeaderToggleFullScreen></HeaderToggleFullScreen>
             <HeaderToggleFullScreen></HeaderToggleFullScreen>
@@ -51,5 +60,5 @@
 <script setup>
 <script setup>
 const settingStore = useSettingStore()
 const settingStore = useSettingStore()
 const optionsVisiable = ref(false)
 const optionsVisiable = ref(false)
-
+const donateVisiable = ref(false)
 </script>
 </script>

+ 12 - 2
components/header/toggleFullScreen.vue

@@ -1,3 +1,12 @@
+<!--
+ * @Author: NMTuan
+ * @Email: NMTuan@qq.com
+ * @Date: 2024-02-20 20:37:15
+ * @LastEditTime: 2024-02-22 12:32:41
+ * @LastEditors: NMTuan
+ * @Description: 
+ * @FilePath: \timeNow\components\header\toggleFullScreen.vue
+-->
 
 
 <template>
 <template>
     <HeaderIcon v-if="state" @click="fullScreenExit" name="i-ri-fullscreen-exit-line">
     <HeaderIcon v-if="state" @click="fullScreenExit" name="i-ri-fullscreen-exit-line">
@@ -6,6 +15,7 @@
 </template>
 </template>
 <script setup>
 <script setup>
 const state = ref(false)
 const state = ref(false)
+let evt
 const fullScreen = () => {
 const fullScreen = () => {
     document.documentElement.requestFullscreen();
     document.documentElement.requestFullscreen();
 }
 }
@@ -14,12 +24,12 @@ const fullScreenExit = () => {
 }
 }
 
 
 onMounted(() => {
 onMounted(() => {
-    document.addEventListener('fullscreenchange', () => {
+    evt = document.addEventListener('fullscreenchange', () => {
         state.value = document?.fullscreenElement !== null
         state.value = document?.fullscreenElement !== null
     })
     })
 })
 })
 onBeforeUnmount(() => {
 onBeforeUnmount(() => {
-    document.removeEventListener('fullscreenchange')
+    document.removeEventListener('fullscreenchange', evt)
 })
 })
 
 
 </script>
 </script>

+ 6 - 1
nuxt.config.ts

@@ -2,7 +2,7 @@
  * @Author: NMTuan
  * @Author: NMTuan
  * @Email: NMTuan@qq.com
  * @Email: NMTuan@qq.com
  * @Date: 2024-02-18 11:35:10
  * @Date: 2024-02-18 11:35:10
- * @LastEditTime: 2024-02-20 18:33:14
+ * @LastEditTime: 2024-02-22 12:17:25
  * @LastEditors: NMTuan
  * @LastEditors: NMTuan
  * @Description:
  * @Description:
  * @FilePath: \timeNow\nuxt.config.ts
  * @FilePath: \timeNow\nuxt.config.ts
@@ -14,6 +14,11 @@ export default defineNuxtConfig({
     colorMode: {
     colorMode: {
         preference: 'dark'
         preference: 'dark'
     },
     },
+    app: {
+        head: {
+            link: [{ rel: 'icon', type: 'image/png', href: '/favicon.png' }]
+        }
+    },
     ui: {
     ui: {
         icons: ['ri']
         icons: ['ri']
     },
     },

BIN
public/alipay.jpg


BIN
public/favicon.ico


BIN
public/favicon.png


BIN
public/wepay.jpg