Skip to content

Commit 59ce0c2

Browse files
committed
Frank Version 1.5.1221
1 parent a1bacad commit 59ce0c2

File tree

21 files changed

+176
-117
lines changed

21 files changed

+176
-117
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"name": "frank",
33
"author": "Java_S",
44
"private": true,
5-
"version": "0.0.0",
5+
"version": "1.5.1221",
66
"type": "module",
77
"scripts": {
88
"dev": "node ./scripts/debug && vite",
9-
"build": "vue-tsc --noEmit && vite build && node ./scripts/pack",
9+
"build": "vite build && node ./scripts/pack",
1010
"preview": "vite preview",
1111
"pretty": "prettier --write \"src/**/*.ts\""
1212
},

public/manifest.json

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,23 @@
11
{
22
"type": "WebApp",
33
"meta": {
4-
"name": "Sample App",
5-
"author": "Cube",
4+
"name": "Frank",
5+
"author": "Java_S",
66
"icon": "icon.png",
7-
"window_icon": "icon.ico"
7+
"window_icon": "icon.ico",
8+
"version": "1.5.1221",
9+
"display_name": "Frank",
10+
"description": "A bran-new League of Legends assistant software, Powered By Cube"
811
},
912
"data": {
1013
"game_in_hotkeys": {
11-
"show_main": {
12-
"title": "显示隐藏主窗口",
13-
"default": "CTRL+TAB",
14+
"show_matchHistory": {
15+
"title": "显示隐藏战绩历史窗口",
16+
"default": "SHIFT+TAB",
1417
"passthrough": false
15-
},
16-
"show_maim_osr": {
17-
"title": "显示隐藏主窗口",
18-
"default": "`",
19-
"passthrough": false,
20-
"hold": true
21-
}
22-
},
23-
24-
"launcher_hotkeys": {
25-
"show_main": {
26-
"title": "显示隐藏主窗口",
27-
"default": "CTRL+[",
28-
"passthrough": false
29-
},
30-
"show_maim_osr": {
31-
"title": "显示隐藏主窗口",
32-
"default": "`",
33-
"passthrough": false,
34-
"hold": true
3518
}
3619
},
20+
"launcher_hotkeys": {},
3721
"start_window": "background",
3822
"windows": {
3923
"main": {
@@ -49,17 +33,17 @@
4933
"background": {
5034
"file": "src/pages/background/index.html",
5135
"is_background_page": true,
52-
"open_dev_tools": false
36+
"open_dev_tools": true
5337
},
5438
"queryMatch": {
55-
"file": "src/pages/main/#/querymatch",
39+
"file": "src/pages/main/index.html/#/querymatch",
5640
"frame": false,
5741
"width": 1166,
5842
"height": 650,
5943
"resizable": false
6044
},
6145
"assist": {
62-
"file": "src/pages/main/#/assist",
46+
"file": "src/pages/main/index.html/#/assist",
6347
"show": false,
6448
"frame": false,
6549
"resizable": false,
@@ -68,7 +52,7 @@
6852
"show_in_taskbar": false
6953
},
7054
"matchHistory": {
71-
"file": "src/pages/main/#/matchHistory",
55+
"file": "src/pages/main/index.html/#/matchHistory",
7256
"frame": false,
7357
"width": 1024,
7458
"height": 576,

scripts/debug.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const manifest = JSON.parse(readFileSync(path.resolve(__dirname, '../public/mani
88

99
Object.values(manifest.data.windows).forEach((w) => {
1010
w.debug_url = 'http://localhost:5173';
11-
w.open_dev_tools = false;
11+
w.file = w.file.replace('index.html/#/','#/')
1212
});
1313

1414
try {

src/assets/cube/cube1.png

64.4 KB
Loading

src/assets/cube/cube2.png

52.5 KB
Loading

src/assets/cube/cube3.png

45.3 KB
Loading

src/pages/background/background.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import '../main/utils/tray.ts'
22
import { GameFlow } from '../main/utils/gameFlow'
33

4-
cube.extensions.on('launch-triggered', (s) => {
4+
cube.extensions.on('launch-triggered', async (s) => {
5+
const currentScreen = (await cube.utils.getPrimaryDisplay()).size
56
cube.windows.obtainDeclaredWindow('main')
6-
cube.windows.obtainDeclaredWindow('assist')
7+
cube.windows.obtainDeclaredWindow('assist',{x:currentScreen.width -320,y:(currentScreen.height -770)/2})
78
})
89

910
const gameFlow = new GameFlow()
11+
gameFlow.initGameInWindow()
1012

1113
cube.games.launchers.events.on('update-info', async (classId, info) => {
1214
if (info.category === 'game_flow') {
@@ -16,12 +18,12 @@ cube.games.launchers.events.on('update-info', async (classId, info) => {
1618
gameFlow.autoPickBanChamp()
1719
} else if (info.value === 'GameStart') {
1820
// 选择英雄结束后,发送消息给渲染进程, 让渲染进程获取到敌方召唤师信息
19-
gameFlow.queryEnemyInfo()
21+
gameFlow.showOrHideAssist(false,'query-enemy-summoner')
2022
} else if (info.value === 'PreEndOfGame') {
2123
// 游戏结束后,根据用户设置判断是否弹出拉黑召唤师的抽屉
2224
gameFlow.isShowBlack()
2325
} else if (info.value === 'ReadyCheck') {
24-
// 自动结束对局
26+
// 自动接收对局
2527
gameFlow.autoAcceptGame()
2628
}
2729
}
@@ -61,3 +63,4 @@ cube.games.launchers.on('stopped', (classId) => {
6163
cube.extensions.relaunch()
6264
}
6365
})
66+

src/pages/main/lcu/matchHistoryLcu.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,11 @@ export const getSummonerNickName = async (enemyIdList?:any) => {
9494

9595
// 查询敌方召唤师ID
9696
export const queryEnemySummonerId= async () => {
97+
// todo test
9798
const mactchSession = await invokeLcu('get','/lol-gameflow/v1/session')
99+
const curSummoner = await queryLoaclSummoner()
98100
let enemyId = []
99-
if (mactchSession.gameData.teamOne.find(async (i:any) =>i.accountId === await queryLoaclSummoner() )){
101+
if (mactchSession.gameData.teamOne.find((i:any) =>i.accountId === curSummoner )){
100102
var enemyInfo = mactchSession.gameData.teamTwo
101103
}else{
102104
var enemyInfo = mactchSession.gameData.teamOne

src/pages/main/resources/champList.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ export const champDict = {
159159
'876': {'champId': '876', 'label': '含羞蓓蕾', 'alias': 'Lillia', 'title': '莉莉娅'},
160160
'887': {'champId': '887', 'label': '灵罗娃娃', 'alias': 'Gwen', 'title': '格温'},
161161
'888': {'champId': '888', 'label': '炼金男爵', 'alias': 'Renata', 'title': '烈娜塔 · 戈拉斯克'},
162-
'895': {'champId': '895', 'label': '不羁之悦', 'alias': 'Nilah', 'title': '尼菈'}
162+
'895': {'champId': '895', 'label': '不羁之悦', 'alias': 'Nilah', 'title': '尼菈'},
163+
'897': {'champId': '897', 'label': '纳祖芒荣耀', 'alias': 'KSante', 'title': '奎桑提'}
163164
}
164165
export const optionsChampion = [
165166
{
@@ -646,6 +647,10 @@ export const optionsChampion = [
646647
{
647648
'value': '895',
648649
'label': '不羁之悦'
650+
},
651+
{
652+
'value': '897',
653+
'label': '纳祖芒荣耀'
649654
}
650655
]
651656
export const mapNameFromUrl = {
@@ -810,5 +815,6 @@ export const mapNameFromUrl = {
810815
'Lillia': {'label': '含羞蓓蕾', 'name': '莉莉娅'},
811816
'Gwen': {'label': '灵罗娃娃', 'name': '格温'},
812817
'Renata': {'label': '炼金男爵', 'name': '烈娜塔 · 戈拉斯克'},
813-
'Nilah': {'label': '不羁之悦', 'name': '尼菈'}
818+
'Nilah': {'label': '不羁之悦', 'name': '尼菈'},
819+
'KSante': {'label': '纳祖芒荣耀', 'name': '奎桑提'}
814820
}

src/pages/main/utils/config.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@
2121
'trash': '操作抽象',
2222
},
2323
'champRankOption': {
24-
'tier': 200,
24+
'tier': 2,
2525
'lane': 'mid'
2626
},
2727
'isSwitchBlacklist': true,
28-
'blacklist': {},
29-
'runeType': '国服数据',
30-
'isAutoDeleteWGProcess': false,
31-
'is101': true
28+
'runeType': '韩服数据',
29+
'isGameInWindow': true,
30+
'is101': false
3231
}
3332
if (localStorage.getItem('config')===null){
3433
localStorage.setItem('config',JSON.stringify(config))

0 commit comments

Comments
 (0)