chore: update idJson and add display for idJson version (#77)

This commit is contained in:
2024-08-25 00:54:37 +08:00
committed by GitHub
parent 9b4c27b17e
commit f148315bff
6 changed files with 16 additions and 6 deletions

View File

@ -54,6 +54,7 @@
"ui.setting.fetchFullHistoryHint": "When this option is enabled, click the \"Update Data\" button to get all the card draw records within 6 months. When there are incorrect data within 6 months, this function can be used to repair.", "ui.setting.fetchFullHistoryHint": "When this option is enabled, click the \"Update Data\" button to get all the card draw records within 6 months. When there are incorrect data within 6 months, this function can be used to repair.",
"ui.setting.closeProxy": "Disable system proxy", "ui.setting.closeProxy": "Disable system proxy",
"ui.setting.closeProxyHint": "When you choose proxy mode, if the program crashes it can cause unwanted results that may affect your system. You can click this button to clear the system proxy settings.", "ui.setting.closeProxyHint": "When you choose proxy mode, if the program crashes it can cause unwanted results that may affect your system. You can click this button to clear the system proxy settings.",
"ui.setting.idVersion": "ID database version",
"ui.about.title": "About", "ui.about.title": "About",
"ui.about.license": "This software is opensource using MIT license.", "ui.about.license": "This software is opensource using MIT license.",
"ui.urlDialog.title": "Input URL manually", "ui.urlDialog.title": "Input URL manually",

View File

@ -54,6 +54,7 @@
"ui.setting.fetchFullHistoryHint": "开启时点击“更新数据”按钮会完整获取6个月内所有的抽卡记录当记录里有6个月范围以内的错误数据时可以通过这个功能修复。", "ui.setting.fetchFullHistoryHint": "开启时点击“更新数据”按钮会完整获取6个月内所有的抽卡记录当记录里有6个月范围以内的错误数据时可以通过这个功能修复。",
"ui.setting.closeProxy": "关闭系统代理", "ui.setting.closeProxy": "关闭系统代理",
"ui.setting.closeProxyHint": "如果使用过代理模式时工具非正常关闭,可能导致系统代理设置没能清除,可以通过这个按钮来清除设置过的系统代理。", "ui.setting.closeProxyHint": "如果使用过代理模式时工具非正常关闭,可能导致系统代理设置没能清除,可以通过这个按钮来清除设置过的系统代理。",
"ui.setting.idVersion": "ID 数据库版本",
"ui.about.title": "关于", "ui.about.title": "关于",
"ui.about.license": "本工具为开源软件,源代码使用 MIT 协议授权", "ui.about.license": "本工具为开源软件,源代码使用 MIT 协议授权",
"ui.urlDialog.title": "手动输入URL", "ui.urlDialog.title": "手动输入URL",

View File

@ -52,6 +52,7 @@
"ui.setting.fetchFullHistoryHint": "開啟時按下「更新資料」按鈕將會完整取得 6 個月內所有的抽卡紀錄,紀錄內有 6 個月範圍以內的錯誤資料時可以透過此功能修復。", "ui.setting.fetchFullHistoryHint": "開啟時按下「更新資料」按鈕將會完整取得 6 個月內所有的抽卡紀錄,紀錄內有 6 個月範圍以內的錯誤資料時可以透過此功能修復。",
"ui.setting.closeProxy": "停用系統 Proxy", "ui.setting.closeProxy": "停用系統 Proxy",
"ui.setting.closeProxyHint": "如果使用 Proxy 模式時程式當機,可能會影響系統網路,可以透過這個按鈕以清除系統 Proxy 設定。", "ui.setting.closeProxyHint": "如果使用 Proxy 模式時程式當機,可能會影響系統網路,可以透過這個按鈕以清除系統 Proxy 設定。",
"ui.setting.idVersion": "ID 數據庫版本",
"ui.about.title": "關於", "ui.about.title": "關於",
"ui.about.license": "本工具為開放原始碼軟體,原始碼使用 MIT 授權", "ui.about.license": "本工具為開放原始碼軟體,原始碼使用 MIT 授權",
"ui.urlDialog.title": "手動輸入 URL", "ui.urlDialog.title": "手動輸入 URL",

View File

@ -2927,7 +2927,7 @@
"rank_type": "4" "rank_type": "4"
}, },
"21047": { "21047": {
"name": "夜は影のように付き纏う", "name": "{RUBY_B#よる}夜{RUBY_E#}は{RUBY_B#かげ}影{RUBY_E#}のように{RUBY_B#つ}付{RUBY_E#}き{RUBY_B#まと}纏{RUBY_E#}う",
"item_type": "光円錐", "item_type": "光円錐",
"rank_type": "4" "rank_type": "4"
}, },
@ -3102,12 +3102,12 @@
"rank_type": "5" "rank_type": "5"
}, },
"23031": { "23031": {
"name": "我が征く巡狩の道", "name": "{RUBY_B#われ}我{RUBY_E#}が{RUBY_B#ゆ}征{RUBY_E#}く{RUBY_B#じゅんしゅ}巡狩{RUBY_E#}の{RUBY_B#みち}道{RUBY_E#}",
"item_type": "光円錐", "item_type": "光円錐",
"rank_type": "5" "rank_type": "5"
}, },
"23032": { "23032": {
"name": "唯香りが故の如く", "name": "{RUBY_B#せきじつ}昔日{RUBY_E#}の{RUBY_B#かお}香{RUBY_E#}りは{RUBY_B#いま}今{RUBY_E#}も{RUBY_B#なお}猶{RUBY_E#}",
"item_type": "光円錐", "item_type": "光円錐",
"rank_type": "5" "rank_type": "5"
}, },
@ -3789,7 +3789,7 @@
"rank_type": "4" "rank_type": "4"
}, },
"21047": { "21047": {
"name": "그림자처럼 따라다니는 밤", "name": "그림자처럼 뒤따르는 밤",
"item_type": "무기", "item_type": "무기",
"rank_type": "4" "rank_type": "4"
}, },
@ -3964,7 +3964,7 @@
"rank_type": "5" "rank_type": "5"
}, },
"23031": { "23031": {
"name": "나는 사냥을 멈추지 않으리", "name": "정복하고 사냥하리",
"item_type": "무기", "item_type": "무기",
"rank_type": "5" "rank_type": "5"
}, },
@ -4308,5 +4308,6 @@
"item_type": "캐릭터", "item_type": "캐릭터",
"rank_type": "5" "rank_type": "5"
} }
} },
"version": "2.4.54"
} }

View File

@ -53,6 +53,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<h3 class="text-lg my-4">{{about.title}}</h3> <h3 class="text-lg my-4">{{about.title}}</h3>
<p class="text-gray-600 text-xs mt-1">{{text.idVersion}} {{idJson.version}}</p>
<p class="text-gray-600 text-xs mt-1">{{about.license}}</p> <p class="text-gray-600 text-xs mt-1">{{about.license}}</p>
<p class="text-gray-600 text-xs mt-1">Github: <a @click="openGithub" class="cursor-pointer text-blue-400">https://github.com/biuuu/star-rail-warp-export</a></p> <p class="text-gray-600 text-xs mt-1">Github: <a @click="openGithub" class="cursor-pointer text-blue-400">https://github.com/biuuu/star-rail-warp-export</a></p>
<p class="text-gray-600 text-xs mt-1 pb-6">UIGF: <a @click="openUIGF" class="cursor-pointer text-blue-400">https://uigf.org/</a></p> <p class="text-gray-600 text-xs mt-1 pb-6">UIGF: <a @click="openUIGF" class="cursor-pointer text-blue-400">https://uigf.org/</a></p>
@ -88,6 +89,7 @@
<script setup> <script setup>
const { ipcRenderer, shell } = require('electron') const { ipcRenderer, shell } = require('electron')
import idJson from '../../idJson.json'
import { reactive, onMounted, computed } from 'vue' import { reactive, onMounted, computed } from 'vue'
const emit = defineEmits(['close', 'changeLang', 'refreshData']) const emit = defineEmits(['close', 'changeLang', 'refreshData'])

View File

@ -8,6 +8,7 @@ cc = OpenCC('s2t')
# 获取 JSON 数据 # 获取 JSON 数据
weapon_url = 'https://api.hakush.in/hsr/data/lightcone.json' weapon_url = 'https://api.hakush.in/hsr/data/lightcone.json'
character_url = 'https://api.hakush.in/hsr/data/character.json' character_url = 'https://api.hakush.in/hsr/data/character.json'
version_url = 'https://api.hakush.in/hsr/new.json'
# 语言映射配置 # 语言映射配置
language_map = { language_map = {
@ -45,9 +46,12 @@ def main():
try: try:
weapon_data = fetch_json(weapon_url) weapon_data = fetch_json(weapon_url)
character_data = fetch_json(character_url) character_data = fetch_json(character_url)
version_data = fetch_json(version_url)
transformed_data = {lang: {} for lang in language_map.keys()} transformed_data = {lang: {} for lang in language_map.keys()}
transformed_data["version"] = version_data["version"]
weapon_transformed = transform_data(weapon_data, "weapon") weapon_transformed = transform_data(weapon_data, "weapon")
character_transformed = transform_data(character_data, "character") character_transformed = transform_data(character_data, "character")