Skip to content

Commit

Permalink
update url map and open window config
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjj1024 committed Dec 25, 2024
1 parent 88df689 commit 51e0e8f
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 13 deletions.
16 changes: 15 additions & 1 deletion src/components/TauriConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@
</div>
<!-- ui config -->
<el-collapse v-else v-model="activeName" accordion>
<el-collapse-item title="windows" name="1">
<el-collapse-item name="1">
<template #title>
Windows
<el-icon
class="infoLink"
@click.stop="openUrl(urlMap.windowsConfig)"
>
<info-filled />
</el-icon>
</template>
<div class="windowsConfig">
<el-form
:model="tauriConfig.windows"
Expand Down Expand Up @@ -282,6 +291,7 @@
import { Codemirror } from 'vue-codemirror'
import { json } from '@codemirror/lang-json'
import { oneDark } from '@codemirror/theme-one-dark'
import { openUrl, urlMap } from '@/utils/common'
import { ref } from 'vue'
const activeName = ref('1')
Expand Down Expand Up @@ -340,6 +350,10 @@ defineExpose({
height: 400px;
}
.infoLink {
margin-left: 6px;
}
.windowsConfig {
width: 100%;
Expand Down
18 changes: 9 additions & 9 deletions src/pages/about.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@
<div class="description">
<p>
{{ t('aboutGuide') }}:
{{ pakeUrlMap.email }}
{{ urlMap.email }}
</p>
</div>
<div class="tools">
<p>
<span>{{ t('githubRepo') }}:</span>
<span class="link" @click="openUrl(pakeUrlMap.github)">
{{ pakeUrlMap.github }}
<span class="link" @click="openUrl(urlMap.github)">
{{ urlMap.github }}
</span>
</p>
<p>
<span>{{ t('navigation') }}:</span>
<span class="link" @click="openUrl(pakeUrlMap.github)">
{{ pakeUrlMap.github }}
<span class="link" @click="openUrl(urlMap.github)">
{{ urlMap.github }}
</span>
</p>
<p>
<span>{{ t('followme') }}:</span>
<span class="link" @click="openUrl(pakeUrlMap.csdn)">
<span class="link" @click="openUrl(urlMap.csdn)">
CSDN
</span>
<span class="link" @click="openUrl(pakeUrlMap.juejin)">
<span class="link" @click="openUrl(urlMap.juejin)">
掘金
</span>
<span class="link" @click="openUrl(pakeUrlMap.github)">
<span class="link" @click="openUrl(urlMap.github)">
Github
</span>
</p>
Expand Down Expand Up @@ -80,7 +80,7 @@ import weixin from '@/assets/images/weixin.png'
import zhifubao from '@/assets/images/zhifubao.png'
import { useI18n } from 'vue-i18n'
import { useRouter } from 'vue-router'
import { pakeUrlMap, openUrl } from '@/utils/common'
import { urlMap, openUrl } from '@/utils/common'
import { ref } from 'vue'
const { t } = useI18n()
Expand Down
1 change: 1 addition & 0 deletions src/pages/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ const tauriConfig = reactive({
useHttpsScheme: false,
zoomHotkeysEnabled: false,
acceptFirstMouse: false,
// if add additionalBrowserArgs, windows cant preview, but can build
additionalBrowserArgs:
'--disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection --autoplay-policy=no-user-gesture-required --auto-accept-camera-and-microphone-capture',
},
Expand Down
4 changes: 2 additions & 2 deletions src/pages/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{ t('projectTips') }}
</span>
<span
@click="openUrl(pakeUrlMap.github)"
@click="openUrl(urlMap.github)"
class="iconfont githubIcon"
>
&#xe709;
Expand Down Expand Up @@ -172,7 +172,7 @@ import { useRouter } from 'vue-router'
import githubApi from '@/apis/github'
import { ElMessage } from 'element-plus'
import { usePakeStore } from '@/store'
import { pakeUrlMap, openUrl, initProject } from '@/utils/common'
import { urlMap, openUrl, initProject } from '@/utils/common'
import pakePlusIcon from '@/assets/images/pakeplus.png'
import { useI18n } from 'vue-i18n'
// import { setTheme } from '@tauri-apps/api/app'
Expand Down
3 changes: 2 additions & 1 deletion src/utils/common.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { open } from '@tauri-apps/plugin-shell'

export const pakeUrlMap = {
export const urlMap = {
github: 'https://github.com/Sjj1024/PakePlus',
weixin: 'https://github.com/Sjj1024/PakePlus',
qq: '',
Expand All @@ -10,6 +10,7 @@ export const pakeUrlMap = {
google: '',
csdn: 'https://xiaoshen.blog.csdn.net/',
juejin: 'https://juejin.cn/user/70007368988926',
windowsConfig: 'https://v2.tauri.app/reference/config/#windowconfig',
}

export const openUrl = async (url: string) => {
Expand Down

0 comments on commit 51e0e8f

Please sign in to comment.