浏览代码

增加了github page提示

Signed-off-by: 宋子桓🌈 <songzihuan@song-zh.com>
SongZihuan 3 月之前
父节点
当前提交
f62083aa34

+ 1 - 0
components.d.ts

@@ -13,6 +13,7 @@ declare module '@vue/runtime-core' {
     ElButton: typeof import('element-plus/es')['ElButton']
     ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
     ElCard: typeof import('element-plus/es')['ElCard']
+    ElDialog: typeof import('element-plus/es')['ElDialog']
     ElForm: typeof import('element-plus/es')['ElForm']
     ElFormItem: typeof import('element-plus/es')['ElFormItem']
     ElImage: typeof import('element-plus/es')['ElImage']

文件差异内容过多而无法显示
+ 0 - 0
docs/assets.base.e3823977.css


文件差异内容过多而无法显示
+ 0 - 0
docs/assets.base.f8a1107d.js


文件差异内容过多而无法显示
+ 0 - 0
docs/assets.index.2ca201d6.js


文件差异内容过多而无法显示
+ 0 - 0
docs/assets.index.547dbac2.js


文件差异内容过多而无法显示
+ 0 - 0
docs/assets.index.56aa4832.js


文件差异内容过多而无法显示
+ 0 - 0
docs/assets.index.7cf02143.js


文件差异内容过多而无法显示
+ 0 - 0
docs/assets.index.a8ce2724.js


文件差异内容过多而无法显示
+ 0 - 0
docs/assets.message.05e590be.js


文件差异内容过多而无法显示
+ 0 - 0
docs/assets.message.3a3988a9.css


文件差异内容过多而无法显示
+ 0 - 0
docs/assets.message.88a1a786.js


文件差异内容过多而无法显示
+ 0 - 0
docs/assets.message.d8589e5d.css


+ 0 - 1
docs/assets.notfound.a03a4bbb.js

@@ -1 +0,0 @@
-import{_ as e}from"./assets._plugin-vue_export-helper.1b428a4d.js";import{r as s,o as a,l as t,U as l,_ as o,v as n,y as r,F as u,a1 as i,a2 as p}from"./assets.vue.b58439d2.js";const h={},c=e=>(i("data-v-cf7e57e5"),e=e(),p(),e),d=c((()=>l("h1",null,"404",-1))),f=c((()=>l("h2",null,"Oops! The page you're looking for isn't here.",-1))),g=c((()=>l("p",null,"We can't seem to find the page you were trying to reach. This might be because of:",-1))),m=c((()=>l("ul",null,[l("li",null,"An outdated link"),l("li",null,"A mistyped address"),l("li",null,"Or the page has been moved")],-1)));const _=e(h,[["render",function(e,i){const p=s("router-link");return a(),t(u,null,[d,f,g,m,l("p",null,[o("Try going back to the "),n(p,{to:"/"},{default:r((()=>[o("homepage")])),_:1}),o(" or contact us if the problem persists.")])],64)}],["__scopeId","data-v-cf7e57e5"]]);export{_ as default};

+ 1 - 0
docs/assets.notfound.f0fb32e5.js

@@ -0,0 +1 @@
+import{_ as e}from"./assets._plugin-vue_export-helper.1b428a4d.js";import{X as s,v as a,x as t,A as l,Y as o,O as n,H as r,I as u,ac as i,ad as p}from"./assets.vue.94001827.js";const c={},d=e=>(i("data-v-cf7e57e5"),e=e(),p(),e),h=d((()=>l("h1",null,"404",-1))),f=d((()=>l("h2",null,"Oops! The page you're looking for isn't here.",-1))),g=d((()=>l("p",null,"We can't seem to find the page you were trying to reach. This might be because of:",-1))),m=d((()=>l("ul",null,[l("li",null,"An outdated link"),l("li",null,"A mistyped address"),l("li",null,"Or the page has been moved")],-1)));const v=e(c,[["render",function(e,i){const p=s("router-link");return a(),t(u,null,[h,f,g,m,l("p",null,[o("Try going back to the "),n(p,{to:"/"},{default:r((()=>[o("homepage")])),_:1}),o(" or contact us if the problem persists.")])],64)}],["__scopeId","data-v-cf7e57e5"]]);export{v as default};

文件差异内容过多而无法显示
+ 0 - 0
docs/assets.vue.94001827.js


文件差异内容过多而无法显示
+ 0 - 0
docs/assets.vue.b58439d2.js


+ 2 - 2
docs/index.html

@@ -12,8 +12,8 @@
             overflow: auto;
         }
     </style>
-  <script type="module" crossorigin src="/assets.index.547dbac2.js"></script>
-  <link rel="modulepreload" crossorigin href="/assets.vue.b58439d2.js">
+  <script type="module" crossorigin src="/assets.index.2ca201d6.js"></script>
+  <link rel="modulepreload" crossorigin href="/assets.vue.94001827.js">
   <link rel="stylesheet" href="/assets.index.5a4f4251.css">
 </head>
 <body>

+ 38 - 0
src/App.vue

@@ -13,11 +13,49 @@
 
   document.addEventListener('DOMContentLoaded', setIcon)
 
+  const hostname = window.location.hostname
+  const githubDialogVisible = ref(false)
+
+  if (hostname === 'songzihuan.github.io') {
+    githubDialogVisible.value = true
+  }
+
+  const onClose = () => {
+    githubDialogVisible.value = false
+  }
+
+  const toWebsite1 = () => {
+    window.location.href = 'https://song-zh.com'
+  }
+
+  const toWebsite2 = () => {
+    window.location.href = 'https://www.song-zh.com'
+  }
+
   placeholderLoading()
 </script>
 
 <template>
   <router-view></router-view>
+  <el-dialog v-model="githubDialogVisible" title="警告">
+    <div>
+      您当前访问的站点是由 Github Page 所托管。但本项目为 Vue3 的单页项目(SPA)。Github Page
+      无法提供很好的支持,因此建议你访问主站。
+      <br />
+      主站地址1:https://song-zh.com
+      <br />
+      主站地址2:https://www.song-zh.com
+    </div>
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button-group>
+          <el-button type="success" size="large" @click="toWebsite1">前往主站地址1</el-button>
+          <el-button type="primary" size="large" @click="toWebsite2">前往主站地址2</el-button>
+          <el-button type="warning" size="large" @click="onClose">关闭</el-button>
+        </el-button-group>
+      </div>
+    </template>
+  </el-dialog>
 </template>
 
 <style>

+ 1 - 1
src/utils/build_time.json

@@ -1 +1 @@
-{"compile_time":1738062074607,"time_zone":"Asia/Shanghai"}
+{"compile_time":1738076463116,"time_zone":"Asia/Shanghai"}

部分文件因为文件数量过多而无法显示