chore: update dependencies and fix dark mode for native platforms
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { Capacitor } from '@capacitor/core'
|
||||
import { StatusBar, Style } from '@capacitor/status-bar'
|
||||
import { ionDarkClass } from '~/constants'
|
||||
|
||||
@@ -8,15 +9,19 @@ export const useDarkMode = createSharedComposable(() => {
|
||||
async function setLightMode() {
|
||||
document.documentElement.classList.remove(ionDarkClass)
|
||||
|
||||
await StatusBar.setStyle({ style: Style.Light })
|
||||
await StatusBar.setBackgroundColor({ color: '#f2f2f6ff' })
|
||||
if (Capacitor.isNativePlatform()) {
|
||||
await StatusBar.setStyle({ style: Style.Light })
|
||||
await StatusBar.setBackgroundColor({ color: '#f2f2f6ff' })
|
||||
}
|
||||
}
|
||||
|
||||
async function setDarkMode() {
|
||||
document.documentElement.classList.add(ionDarkClass)
|
||||
|
||||
await StatusBar.setStyle({ style: Style.Dark })
|
||||
await StatusBar.setBackgroundColor({ color: '#ff000000' })
|
||||
if (Capacitor.isNativePlatform()) {
|
||||
await StatusBar.setStyle({ style: Style.Dark })
|
||||
await StatusBar.setBackgroundColor({ color: '#ff000000' })
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export const tabRootPaths = ['/', '/home', '/apps', '/my', '/tabs']
|
||||
|
||||
@@ -18,6 +18,11 @@ export const links = {
|
||||
changelog: 'https://docs.yunyoujun.cn/projects/cook/changelog',
|
||||
releaseNotes: 'https://github.com/YunYouJun/cook/releases',
|
||||
|
||||
/**
|
||||
* 企业微信 云乐坊 kf
|
||||
*/
|
||||
wecomKf: 'https://work.weixin.qq.com/kfid/kfc9d4dcc4b6bd1c69e',
|
||||
|
||||
/**
|
||||
* author
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import { App } from '@capacitor/app'
|
||||
import { Capacitor } from '@capacitor/core'
|
||||
import { useBackButton } from '@ionic/vue'
|
||||
import { tabRootPaths } from '../config'
|
||||
|
||||
useHead({
|
||||
title: 'Cook Tabs',
|
||||
@@ -11,9 +12,7 @@ const router = useRouter()
|
||||
const ionRouter = useIonRouter()
|
||||
|
||||
function isTabRootPath(path: string) {
|
||||
// Tabs are set up with aliases: '/', '/home', '/random', '/my'
|
||||
// Treat '/tabs' as root too for safety
|
||||
return ['/', '/home', '/random', '/my', '/tabs'].includes(path)
|
||||
return tabRootPaths.includes(path)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "yunyoujun-docs-template",
|
||||
"name": "@cook/docs",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@@ -13,15 +13,15 @@
|
||||
"@yunyoujun/docs": "^0.1.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@shikijs/vitepress-twoslash": "^3.13.0",
|
||||
"sass": "^1.93.2",
|
||||
"typedoc": "^0.28.13",
|
||||
"@shikijs/vitepress-twoslash": "^3.15.0",
|
||||
"sass": "^1.94.2",
|
||||
"typedoc": "^0.28.14",
|
||||
"typedoc-plugin-markdown": "^4.9.0",
|
||||
"typedoc-vitepress-theme": "^1.1.2",
|
||||
"unocss": "^66.5.2",
|
||||
"unplugin-vue-components": "^29.1.0",
|
||||
"vite-plugin-vue-devtools": "^8.0.2",
|
||||
"vitepress": "^2.0.0-alpha.12",
|
||||
"vitepress-plugin-group-icons": "^1.6.3"
|
||||
"unocss": "^66.5.9",
|
||||
"unplugin-vue-components": "^30.0.0",
|
||||
"vite-plugin-vue-devtools": "^8.0.5",
|
||||
"vitepress": "^2.0.0-alpha.14",
|
||||
"vitepress-plugin-group-icons": "^1.6.5"
|
||||
}
|
||||
}
|
||||
|
||||
67
package.json
67
package.json
@@ -3,7 +3,7 @@
|
||||
"type": "module",
|
||||
"version": "2.0.0-beta.11",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@10.18.1",
|
||||
"packageManager": "pnpm@10.23.0",
|
||||
"engines": {
|
||||
"node": "^20.19.0 || >=22.12.0"
|
||||
},
|
||||
@@ -12,7 +12,7 @@
|
||||
"build:nuxt": "nuxt build",
|
||||
"build:android": "bash ./scripts/android/build.sh",
|
||||
"convert": "pnpm -C scripts run convert",
|
||||
"dev": "nuxt dev --host",
|
||||
"dev": "nuxt dev",
|
||||
"dev:pwa": "VITE_PLUGIN_PWA=true nuxi dev",
|
||||
"dev:android": "bash ./scripts/android/dev.sh",
|
||||
"bash:ios": "bash ./scripts/ios.sh",
|
||||
@@ -40,61 +40,62 @@
|
||||
"@capacitor/ios": "7.4.3",
|
||||
"@capacitor/keyboard": "7.0.3",
|
||||
"@capacitor/status-bar": "7.0.3",
|
||||
"dayjs": "^1.11.18",
|
||||
"vue-about-me": "^1.4.0"
|
||||
"dayjs": "^1.11.19",
|
||||
"vue-about-me": "^1.4.0",
|
||||
"vue-virtual-scroller": "2.0.0-beta.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^5.4.1",
|
||||
"@capacitor/android": "^7.4.3",
|
||||
"@antfu/eslint-config": "^6.2.0",
|
||||
"@capacitor/android": "^7.4.4",
|
||||
"@capacitor/cli": "7.4.3",
|
||||
"@capacitor/dialog": "^7.0.2",
|
||||
"@headlessui/vue": "^1.7.23",
|
||||
"@iconify-json/carbon": "^1.2.13",
|
||||
"@iconify-json/carbon": "^1.2.14",
|
||||
"@iconify-json/fe": "^1.2.4",
|
||||
"@iconify-json/gg": "^1.2.2",
|
||||
"@iconify-json/ic": "^1.2.4",
|
||||
"@iconify-json/mdi": "^1.2.3",
|
||||
"@iconify-json/ri": "^1.2.5",
|
||||
"@iconify-json/ri": "^1.2.6",
|
||||
"@iconify-json/twemoji": "^1.2.4",
|
||||
"@nuxt/devtools": "^2.6.5",
|
||||
"@nuxt/eslint": "^1.9.0",
|
||||
"@nuxt/scripts": "^0.12.1",
|
||||
"@nuxt/test-utils": "^3.19.2",
|
||||
"@nuxtjs/color-mode": "^3.5.2",
|
||||
"@nuxtjs/ionic": "1.0.1",
|
||||
"@pinia/nuxt": "^0.11.2",
|
||||
"@pinia/testing": "^1.0.2",
|
||||
"@types/node": "^24.7.0",
|
||||
"@unhead/vue": "^2.0.18",
|
||||
"@unocss/eslint-config": "^66.5.2",
|
||||
"@unocss/nuxt": "^66.5.2",
|
||||
"@vite-pwa/nuxt": "^1.0.4",
|
||||
"@nuxt/devtools": "^3.1.0",
|
||||
"@nuxt/eslint": "^1.10.0",
|
||||
"@nuxt/scripts": "^0.13.0",
|
||||
"@nuxt/test-utils": "^3.20.1",
|
||||
"@nuxtjs/color-mode": "^4.0.0",
|
||||
"@nuxtjs/ionic": "1.0.2",
|
||||
"@pinia/nuxt": "^0.11.3",
|
||||
"@pinia/testing": "^1.0.3",
|
||||
"@types/node": "^24.10.1",
|
||||
"@unhead/vue": "^2.0.19",
|
||||
"@unocss/eslint-config": "^66.5.9",
|
||||
"@unocss/nuxt": "^66.5.9",
|
||||
"@vite-pwa/nuxt": "^1.0.7",
|
||||
"@vue/test-utils": "^2.4.6",
|
||||
"@vueuse/nuxt": "^13.9.0",
|
||||
"@vueuse/nuxt": "^14.0.0",
|
||||
"@yunlefun/vue": "^0.1.1",
|
||||
"bumpp": "^10.3.1",
|
||||
"consola": "^3.4.2",
|
||||
"dexie": "^4.2.1",
|
||||
"eslint": "^9.37.0",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-plugin-format": "^1.0.2",
|
||||
"fake-indexeddb": "^6.2.2",
|
||||
"jsdom": "^27.0.0",
|
||||
"lint-staged": "^16.2.3",
|
||||
"nuxt": "^4.1.3",
|
||||
"pinia": "^3.0.3",
|
||||
"sass": "^1.93.2",
|
||||
"fake-indexeddb": "^6.2.5",
|
||||
"jsdom": "^27.2.0",
|
||||
"lint-staged": "^16.2.7",
|
||||
"nuxt": "^4.2.1",
|
||||
"pinia": "^3.0.4",
|
||||
"sass": "^1.94.2",
|
||||
"serve": "^14.2.5",
|
||||
"simple-git-hooks": "^2.13.1",
|
||||
"star-markdown-css": "^0.5.3",
|
||||
"tsx": "^4.20.6",
|
||||
"typescript": "^5.9.3",
|
||||
"unocss": "^66.5.2",
|
||||
"vitest": "^3.2.4",
|
||||
"vue-tsc": "^3.1.1"
|
||||
"unocss": "^66.5.9",
|
||||
"vitest": "^4.0.12",
|
||||
"vue-tsc": "^3.1.4"
|
||||
},
|
||||
"resolutions": {
|
||||
"unplugin": "^2.3.10",
|
||||
"vite": "^7.1.9"
|
||||
"vite": "^7.2.4"
|
||||
},
|
||||
"simple-git-hooks": {
|
||||
"pre-commit": "pnpm lint-staged"
|
||||
|
||||
6290
pnpm-lock.yaml
generated
6290
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
"convert": "tsx convert.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"simple-git": "^3.28.0",
|
||||
"simple-git": "^3.30.0",
|
||||
"tsx": "^4.20.6"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user