From 736dcf9bcdefd80ac665c8ee19e5472d6b0a4ed7 Mon Sep 17 00:00:00 2001 From: viarotel Date: Wed, 10 Jul 2024 18:42:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=9A=80=20Update=20memo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 26 ++++++++--------- src/components/HomeFeaturesBefore/index.vue | 2 +- src/data/repos.data.js | 31 ++++++--------------- src/notes/memo/git/common.md | 4 ++- src/notes/memo/microsoft/oobe.md | 13 +++++++++ src/utils/index.js | 7 +++++ 6 files changed, 46 insertions(+), 37 deletions(-) create mode 100644 src/notes/memo/microsoft/oobe.md create mode 100644 src/utils/index.js diff --git a/package.json b/package.json index 1ab4bf7f..c1e47add 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "viarotel-site", "type": "module", "version": "1.8.0", - "packageManager": "pnpm@8.15.7", + "packageManager": "pnpm@9.5.0", "description": "viarotel site", "author": "viarotel", "license": "ISC", @@ -16,24 +16,24 @@ }, "dependencies": { "@lottiefiles/lottie-player": "^2.0.4", - "@waline/client": "^3.1.3", - "dayjs": "^1.11.10", + "@waline/client": "^3.3.0", + "dayjs": "^1.11.11", "ga-gtag": "^1.2.0", "gsap": "^3.12.5", "lodash-es": "^4.17.21", "ofetch": "^1.3.4" }, "devDependencies": { - "@antfu/eslint-config": "^2.14.0", - "@unocss/preset-wind": "^0.59.3", - "@unocss/transformer-directives": "^0.59.3", - "eslint": "^9.0.0", - "typescript": "^5.4.5", - "unocss": "^0.59.3", - "unplugin-auto-import": "^0.17.5", - "unplugin-vue-components": "^0.26.0", + "@antfu/eslint-config": "^2.22.0", + "@unocss/preset-wind": "^0.61.3", + "@unocss/transformer-directives": "^0.61.3", + "eslint": "^9.6.0", + "typescript": "^5.5.3", + "unocss": "^0.61.3", + "unplugin-auto-import": "^0.17.6", + "unplugin-vue-components": "^0.27.2", "vite-plugin-remove-console": "^2.2.0", - "vitepress": "^1.1.0", - "vitepress-sidebar": "^1.22.0" + "vitepress": "^1.3.0", + "vitepress-sidebar": "^1.24.0" } } diff --git a/src/components/HomeFeaturesBefore/index.vue b/src/components/HomeFeaturesBefore/index.vue index 285a5920..75d204e6 100644 --- a/src/components/HomeFeaturesBefore/index.vue +++ b/src/components/HomeFeaturesBefore/index.vue @@ -7,7 +7,7 @@ const { lang } = useData() const features = computed(() => { const repos = data.repos || [] - // console.log('repos', repos) + return repos.map(item => ({ ...item, title: item.name, diff --git a/src/data/repos.data.js b/src/data/repos.data.js index d5e4de4b..5f2b9d17 100644 --- a/src/data/repos.data.js +++ b/src/data/repos.data.js @@ -2,33 +2,20 @@ import { ofetch } from 'ofetch' const baseURL = 'https://ungh.cc' -const includes = [ - 'escrcpy', - 'vite-uniapp-template', - 'packages', - 'environments', - 'waline-service', - 'vue-cli-uniapp', - 'vue-apicloud-cli', - 'bing-chat-live-open', - 'blog-demo', -] +const excludes = ['waline-service'] async function getRepos() { - const promises = includes.map(name => - ofetch(`${baseURL}/repos/viarotel-org/${name}`, { - method: 'GET', - }).catch(e => console.warn(e)), - ) + const res = await ofetch(`${baseURL}/orgs/viarotel-org/repos`, { + method: 'GET', + }).catch(e => console.warn(e)) - const res = await Promise.allSettled(promises) + const repos = res?.repos || [] - const repos = res - .filter(item => item.status === 'fulfilled') - .map(item => item.value.repo) - // console.log('repos', repos) + const data = repos + .filter(item => !excludes.includes(item.name)) + .sort((a, b) => b.stars - a.stars) - return repos + return data } export default { diff --git a/src/notes/memo/git/common.md b/src/notes/memo/git/common.md index 6abe0a7e..59aba47e 100644 --- a/src/notes/memo/git/common.md +++ b/src/notes/memo/git/common.md @@ -39,4 +39,6 @@ git push --delete origin oldName git push origin newName # 把修改后的本地分支与远程分支关联 git branch --set-upstream-to origin/newName -``` +# 修复合并分支时中途取消无法拉取代码 +git merge --abort +``` \ No newline at end of file diff --git a/src/notes/memo/microsoft/oobe.md b/src/notes/memo/microsoft/oobe.md new file mode 100644 index 00000000..76fcdc93 --- /dev/null +++ b/src/notes/memo/microsoft/oobe.md @@ -0,0 +1,13 @@ +# Windows 开箱体验常用命令 + +## 跳过联网 + +```shell +oobe/bypassnro +``` + +## 忽略安装错误 + +```shell +oobe/msoobe +``` diff --git a/src/utils/index.js b/src/utils/index.js new file mode 100644 index 00000000..9cb1758a --- /dev/null +++ b/src/utils/index.js @@ -0,0 +1,7 @@ +export function sleep(time = 500) { + return new Promise((resolve) => { + setTimeout(() => { + resolve() + }, time) + }) +}