Compare commits

..

No commits in common. "56959c77333bab83b0cbf887668db78ec6df1d2a" and "8e6489ba5c49a27a9b08439f7b4e9d83071e08f9" have entirely different histories.

6 changed files with 23 additions and 37 deletions

View File

@ -18,27 +18,27 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 2 fetch-depth: 2 # 获取最近的两次提交
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: '20' node-version: '20' # 根据项目需求调整版本
- name: Install dependencies - name: Install dependencies
run: npm install run: npm install
- name: Get version from package.json - name: Get version from package.json
id: get_version id: get_version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT run: echo "::set-output name=version::$(node -p "require('./package.json').version")"
- name: Determine version - name: Determine version
id: determine_version id: determine_version
run: | run: |
if [ "${{ github.event.inputs.version }}" ]; then if [ "${{ github.event.inputs.version }}" ]; then
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT echo "::set-output name=version::${{ github.event.inputs.version }}"
else else
echo "version=${{ steps.get_version.outputs.version }}" >> $GITHUB_OUTPUT echo "::set-output name=version::${{ steps.get_version.outputs.version }}"
fi fi
- name: Create Release - name: Create Release
@ -131,14 +131,18 @@ jobs:
- name: Add release notes - name: Add release notes
run: | run: |
# 获取最近一次提交的变更内容
git log -1 --pretty=format:"%s%n%b" > changes.txt
# 获取现有的发布说明 # 获取现有的发布说明
gh release view v${{ steps.determine_version.outputs.version }} --json body -q .body > body.txt gh release view v${{ steps.determine_version.outputs.version }} --json body -q .body > body.txt
# 获取最近一次提交的变更内容 # 将变更内容添加到发布说明中
git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"%s%n%b" >> body.txt echo -e "### Changes in this release\n" >> body.txt
cat changes.txt >> body.txt
# 添加其他发布说明 # 添加其他发布说明
echo -e "\n哪吒V1请下载dist.zip\n哪吒V0请下载v0-${{ steps.determine_version.outputs.version }}-cdn-jsdelivr.zip\n -all是全量包-cdn-jsdelivr是jsdelivr引用版-cdn-loli是cdnjs的loli.net引用版\nv0版本构建物通过修改./config.js指定nezhaVersion版本号为'v1'v1也可以正常使用" >> body.txt echo -e "\n哪吒V1请下载dist.zip\n哪吒V0请下载v0-${{ steps.determine_version.outputs.version }}-all.zip\n至于all是全量包cdn-jsdelivr是jsdelivr引用版cdn-loli是cdnjs引用版\nv0版本构建物通过修改./config.js指定nezhaVersion版本可以正常在v1中使用" >> body.txt
# 更新发布说明 # 更新发布说明
gh release edit v${{ steps.determine_version.outputs.version }} --notes-file body.txt gh release edit v${{ steps.determine_version.outputs.version }} --notes-file body.txt

View File

@ -1,6 +1,6 @@
{ {
"name": "nazhua", "name": "nazhua",
"version": "0.4.10", "version": "0.4.9",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@ -15,7 +15,7 @@
默认的数据是基于V0 默认的数据是基于V0
### Release版本的nazhua ### Release版本的nazhua
V1下载最新版本[Releases](https://github.com/hi2shark/nazhua/releases)的`dist.zip` V1下载最新版本[Releases](https://github.com/hi2shark/nazhua/releases)的`dist.zip`
V0下载最新版本[Releases](https://github.com/hi2shark/nazhua/releases)的`v0-{版本}-all.zip`或`v0-{版本}-cdn-{CDN供应方}.zip`; V0下载最新版本[Releases](https://github.com/hi2shark/nazhua/releases)的`v0-{版本}-all.zip`或`v0-{版本}.zip`;
## 关于点阵地图 ## 关于点阵地图
点阵地图是一个失真的地图,地图边际与城市位置都不是真实的经纬度坐标,因此无法通过经纬度来定位城市。 点阵地图是一个失真的地图,地图边际与城市位置都不是真实的经纬度坐标,因此无法通过经纬度来定位城市。

View File

@ -192,23 +192,6 @@ export function calcTransfer(bytes) {
return result; return result;
} }
export function getPlatformLogoIconClassName(platform) {
const platformStr = (platform || '').toLowerCase();
if (platformStr.includes('windows') || platformStr.includes('microsoft')) {
return 'ri-microsoft-fill';
}
switch (platformStr) {
case 'darwin':
case 'macos':
return 'fl-apple';
default:
}
if (platform) {
return `fl-${platform}`;
}
return 'ri-server-line';
}
/** /**
* 获取系统发行版本 * 获取系统发行版本
*/ */

View File

@ -21,9 +21,12 @@
class="cpu-mem-group" class="cpu-mem-group"
> >
<span <span
v-if="info?.Host?.Platform"
class="system-os-icon" class="system-os-icon"
> >
<span :class="platformLogoIconClassName" /> <span
:class="'fl-' + info?.Host?.Platform"
/>
</span> </span>
<span class="core-mem">{{ cpuAndMemAndDisk }}</span> <span class="core-mem">{{ cpuAndMemAndDisk }}</span>
</span> </span>
@ -88,7 +91,6 @@ const { cpuAndMemAndDisk } = handleServerInfo({
const slogan = computed(() => props.info?.PublicNote?.customData?.slogan); const slogan = computed(() => props.info?.PublicNote?.customData?.slogan);
const cpuInfo = computed(() => hostUtils.getCPUInfo(props.info?.Host?.CPU?.[0])); const cpuInfo = computed(() => hostUtils.getCPUInfo(props.info?.Host?.CPU?.[0]));
const platformLogoIconClassName = computed(() => hostUtils.getPlatformLogoIconClassName(props.info?.Host?.Platform));
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -18,7 +18,10 @@
<span <span
class="server-flag" class="server-flag"
> >
<span :class="platformLogoIconClassName" /> <span
class="fi"
:class="'fi-' + (info?.Host?.CountryCode || 'un')"
/>
</span> </span>
<span class="server-name"> <span class="server-name">
{{ info.Name }} {{ info.Name }}
@ -63,13 +66,9 @@
* 单节点 * 单节点
*/ */
import {
computed,
} from 'vue';
import { import {
useRouter, useRouter,
} from 'vue-router'; } from 'vue-router';
import * as hostUtils from '@/utils/host';
import handleServerInfo from '@/views/composable/server-info'; import handleServerInfo from '@/views/composable/server-info';
import ServerRealTime from '@/views/components/server/server-real-time.vue'; import ServerRealTime from '@/views/components/server/server-real-time.vue';
@ -92,8 +91,6 @@ const { cpuAndMemAndDisk } = handleServerInfo({
props, props,
}); });
const platformLogoIconClassName = computed(() => hostUtils.getPlatformLogoIconClassName(props.info?.Host?.Platform));
function openDetail() { function openDetail() {
router.push({ router.push({
name: 'ServerDetail', name: 'ServerDetail',