Skip to content

Commit

Permalink
将 OPGG 出装信息导入到 itemSets 中
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanxven committed Aug 12, 2024
1 parent 914ea5d commit 5e2a7bc
Show file tree
Hide file tree
Showing 9 changed files with 714 additions and 412 deletions.
Binary file modified .yarn/install-state.gz
Binary file not shown.
10 changes: 3 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
# v1.2.4 DRAFT

## ROADMAP

- [ ] 重写对局分析页面。
# v1.2.4 (2024-08-?)

## 新增

- 现在支持**腾讯服**范围内的跨区战绩查询。由于一些技术性限制,查询结果仅支持战绩数据,不支持排位数据。

- 现在点击辅助窗口左上角,可切换为 OP.GG 页面
- 在辅助窗口添加了 OP.GG。

- 引入了一个数据源 `gtimg`,因此现在自动选择模块的英雄列表,可以按照模糊名称或称号查找。

## 调整

- 辅助窗口在未被关闭时将始终展示任务栏图标,可以调整大小且可以最小化
- 辅助窗口现在划分为两种状态:普通状态和 OP.GG 状态。前者保持原本功能,后者将展示 OP.GG 页面,并且会在英雄选择阶段弹出。可在左上角切换

- 战绩页面在提供较小宽度时会改变布局,展示更少的内容。

Expand Down
54 changes: 27 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "league-akari",
"version": "1.2.4-rabi.4",
"version": "1.2.4-rabi.5",
"author": {
"name": "Hanxven",
"email": "[email protected]"
Expand All @@ -22,61 +22,61 @@
"@electron-toolkit/preload": "^3.0.1",
"@electron-toolkit/utils": "^3.0.0",
"@types/luaparse": "^0.2.12",
"axios": "^1.7.2",
"axios-retry": "^4.4.1",
"dayjs": "^1.11.11",
"axios": "^1.7.3",
"axios-retry": "^4.5.0",
"dayjs": "^1.11.12",
"lodash": "^4.17.21",
"luaparse": "^0.3.1",
"mobx": "^6.13.0",
"mobx": "^6.13.1",
"node-7z": "^3.0.0",
"node-global-key-listener": "0.1.1",
"reflect-metadata": "^0.2.2",
"sqlite3": "5.1.6",
"typeorm": "^0.3.20",
"vm2": "^3.9.19",
"winston": "^3.13.0",
"ws": "^8.17.1"
"winston": "^3.14.1",
"ws": "^8.18.0"
},
"devDependencies": {
"@electron-toolkit/tsconfig": "^1.0.1",
"@electron/notarize": "^2.3.2",
"@rushstack/eslint-patch": "^1.10.3",
"@swc/core": "^1.6.7",
"@rushstack/eslint-patch": "^1.10.4",
"@swc/core": "^1.7.10",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/deep-eql": "^4.0.2",
"@types/lodash": "^4.17.6",
"@types/markdown-it": "^14.1.1",
"@types/node": "^20.14.9",
"@types/lodash": "^4.17.7",
"@types/markdown-it": "^14.1.2",
"@types/node": "^20.14.15",
"@types/node-7z": "^2.1.8",
"@types/semver": "^7.5.8",
"@types/ws": "^8.5.10",
"@types/ws": "^8.5.12",
"@vicons/carbon": "^0.12.0",
"@vicons/fluent": "^0.12.0",
"@vicons/ionicons5": "^0.12.0",
"@vicons/material": "^0.12.0",
"@vitejs/plugin-vue": "^5.0.5",
"@vueuse/components": "^10.11.0",
"@vueuse/core": "^10.11.0",
"@vitejs/plugin-vue": "^5.1.2",
"@vueuse/components": "^10.11.1",
"@vueuse/core": "^10.11.1",
"chart.js": "^4.4.3",
"deep-eql": "^5.0.2",
"electron": "^31.1.0",
"electron": "^31.3.1",
"electron-builder": "^24.13.3",
"electron-vite": "^2.3.0",
"less": "^4.2.0",
"markdown-it": "^14.1.0",
"naive-ui": "^2.38.2",
"naive-ui": "^2.39.0",
"p-queue": "^8.0.1",
"pinia": "^2.1.7",
"pinyin-pro": "^3.23.0",
"prettier": "^3.3.2",
"semver": "^7.6.2",
"typescript": "^5.5.3",
"pinia": "^2.2.1",
"pinyin-pro": "^3.24.2",
"prettier": "^3.3.3",
"semver": "^7.6.3",
"typescript": "^5.5.4",
"vfonts": "^0.0.3",
"vite": "^5.3.3",
"vue": "^3.4.31",
"vite": "^5.4.0",
"vue": "^3.4.37",
"vue-chartjs": "^5.3.1",
"vue-router": "^4.4.0",
"vue-tsc": "^2.0.24"
"vue-router": "^4.4.3",
"vue-tsc": "^2.0.29"
},
"packageManager": "[email protected]"
}
12 changes: 6 additions & 6 deletions src/renderer/src-auxiliary-window/assets/css/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ a:visited {
background-color: #3e3e3ef0;
}

// .n-base-select-menu .n-scrollbar {
// max-height: 140px;
.n-base-select-menu .n-scrollbar {
max-height: 50vh;

// .n-virtual-list.v-vl {
// max-height: 140px;
// }
// }
.n-virtual-list.v-vl {
max-height: 50vh;
}
}

.n-popover-shared.popover-transition-enter-from,
.n-popover-shared.popover-transition-leave-to {
Expand Down
93 changes: 48 additions & 45 deletions src/renderer/src-auxiliary-window/views/opgg/Opgg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ import { computed, h, onErrorCaptured, onMounted, ref, shallowRef, watchEffect }
import OpggChampion from './OpggChampion.vue'
import OpggTier from './OpggTier.vue'
import { MODE_TEXT, POSITION_TEXT, REGION_TEXT, TIER_TEXT } from './text'
const currentTab = ref('tier')
const gameflow = useGameflowStore()
Expand Down Expand Up @@ -239,7 +240,7 @@ const loadVersionsData = async () => {
}
message.warning(`获取版本数据失败: ${(error as any).message}`)
console.error(error)
am.logger.warn(`[OP.GG] 获取版本数据失败: ${(error as any).message}`, error)
} finally {
isLoadingVersions.value = false
}
Expand All @@ -266,8 +267,8 @@ const loadTierData = async () => {
return
}
message.warning(`获取数据失败: ${(error as any).message}`)
console.error(error)
message.warning(`获取 tier 数据失败: ${(error as any).message}`)
am.logger.warn(`[OP.GG] 获取 tier 数据失败: ${(error as any).message}`, error)
} finally {
isLoadingTier.value = false
}
Expand Down Expand Up @@ -301,7 +302,7 @@ const loadChampionData = async () => {
}
message.warning(`获取英雄数据失败: ${(error as any).message}`)
console.error(error)
am.logger.warn(`[OP.GG] 获取英雄数据失败: ${(error as any).message}`, error)
} finally {
isLoadingChampion.value = false
}
Expand Down Expand Up @@ -368,55 +369,55 @@ const championItem = computed(() => {
})
const modeOptions = [
{ label: '排位', value: 'ranked' },
{ label: '大乱斗', value: 'aram' },
{ label: '斗魂竞技场', value: 'arena' },
{ label: '极限闪击', value: 'nexus_blitz' },
{ label: '无限火力', value: 'urf' }
{ label: MODE_TEXT['ranked'], value: 'ranked' },
{ label: MODE_TEXT['aram'], value: 'aram' },
{ label: MODE_TEXT['arena'], value: 'arena' },
{ label: MODE_TEXT['nexus_blitz'], value: 'nexus_blitz' },
{ label: MODE_TEXT['urf'], value: 'urf' }
]
const positionOptions = computed(() => [
{ label: '上单', value: 'top' },
{ label: '打野', value: 'jungle' },
{ label: '中单', value: 'mid' },
{ label: '下路', value: 'adc' },
{ label: '辅助', value: 'support' },
{ label: '', value: 'none', disabled: mode.value === 'ranked' }
{ label: POSITION_TEXT['top'], value: 'top' },
{ label: POSITION_TEXT['jungle'], value: 'jungle' },
{ label: POSITION_TEXT['mid'], value: 'mid' },
{ label: POSITION_TEXT['adc'], value: 'adc' },
{ label: POSITION_TEXT['support'], value: 'support' },
{ label: POSITION_TEXT['none'], value: 'none', disabled: mode.value === 'ranked' }
])
const regionOptions = [
{ label: '全球', value: 'global' },
{ label: '北美', value: 'na' },
{ label: '欧洲西', value: 'euw' },
{ label: '韩国', value: 'kr' },
{ label: '巴西', value: 'br' },
{ label: '欧洲东北', value: 'eune' },
{ label: '日本', value: 'jp' },
{ label: '拉丁美洲北', value: 'lan' },
{ label: '拉丁美洲南', value: 'las' },
{ label: '大洋洲', value: 'oce' },
{ label: '土耳其', value: 'tr' },
{ label: '俄罗斯', value: 'ru' },
{ label: '新加坡', value: 'sg' },
{ label: '印尼', value: 'id' },
{ label: '菲律宾', value: 'ph' },
{ label: '泰国', value: 'th' },
{ label: '越南', value: 'vn' },
{ label: '台湾', value: 'tw' },
{ label: '中东', value: 'me' }
{ label: REGION_TEXT['global'], value: 'global' },
{ label: REGION_TEXT['na'], value: 'na' },
{ label: REGION_TEXT['euw'], value: 'euw' },
{ label: REGION_TEXT['kr'], value: 'kr' },
{ label: REGION_TEXT['br'], value: 'br' },
{ label: REGION_TEXT['eune'], value: 'eune' },
{ label: REGION_TEXT['jp'], value: 'jp' },
{ label: REGION_TEXT['lan'], value: 'lan' },
{ label: REGION_TEXT['las'], value: 'las' },
{ label: REGION_TEXT['oce'], value: 'oce' },
{ label: REGION_TEXT['tr'], value: 'tr' },
{ label: REGION_TEXT['ru'], value: 'ru' },
{ label: REGION_TEXT['sg'], value: 'sg' },
{ label: REGION_TEXT['id'], value: 'id' },
{ label: REGION_TEXT['ph'], value: 'ph' },
{ label: REGION_TEXT['th'], value: 'th' },
{ label: REGION_TEXT['vn'], value: 'vn' },
{ label: REGION_TEXT['tw'], value: 'tw' },
{ label: REGION_TEXT['me'], value: 'me' }
]
const tierOptions = [
{ label: '全部段位', value: 'all' },
{ label: '黄金 -', value: 'ibsg' },
{ label: '黄金 +', value: 'gold_plus' },
{ label: '铂金 +', value: 'platinum_plus' },
{ label: '翡翠 +', value: 'emerald_plus' },
{ label: '钻石 +', value: 'diamond_plus' },
{ label: '大师', value: 'master' },
{ label: '大师 +', value: 'master_plus' },
{ label: '宗师', value: 'grandmaster' },
{ label: '王者', value: 'challenger' }
{ label: TIER_TEXT['all'], value: 'all' },
{ label: TIER_TEXT['ibsg'], value: 'ibsg' },
{ label: TIER_TEXT['gold_plus'], value: 'gold_plus' },
{ label: TIER_TEXT['platinum_plus'], value: 'platinum_plus' },
{ label: TIER_TEXT['emerald_plus'], value: 'emerald_plus' },
{ label: TIER_TEXT['diamond_plus'], value: 'diamond_plus' },
{ label: TIER_TEXT['master'], value: 'master' },
{ label: TIER_TEXT['master_plus'], value: 'master_plus' },
{ label: TIER_TEXT['grandmaster'], value: 'grandmaster' },
{ label: TIER_TEXT['challenger'], value: 'challenger' }
]
const versionOptions = computed(() => {
Expand Down Expand Up @@ -448,7 +449,7 @@ const automation = useStableComputed(() => {
watchDebounced(
automation,
(atm) => {
async (atm) => {
if (!atm) {
return
}
Expand Down Expand Up @@ -494,6 +495,8 @@ watchDebounced(
break
}
await loadAll()
// 排除 PVE 模式的英雄
if (atm.championId && !maybePveChampion(atm.championId)) {
handleToChampion(atm.championId)
Expand Down
Loading

0 comments on commit 5e2a7bc

Please sign in to comment.