poi-plugin-quest-info-2 0.10.8 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/build/kcQuestsData/DATA_VERSION +1 -1
- package/build/kcQuestsData/index.ts +1 -1
- package/build/kcQuestsData/quests-scn.json +1 -1
- package/build/kcanotifyGamedata/DATA_VERSION +1 -1
- package/build/kcanotifyGamedata/index.ts +1 -1
- package/i18n/en-US.json +4 -0
- package/i18n/ja-JP.json +4 -0
- package/i18n/ko-KR.json +4 -0
- package/i18n/zh-CN.json +4 -0
- package/i18n/zh-TW.json +4 -0
- package/package.json +3 -3
- package/src/__tests__/kcanotifyData.spec.ts +1 -1
- package/src/__tests__/kcwikiData.spec.ts +1 -1
- package/src/components/QuestCard/index.tsx +66 -4
- package/src/components/QuestCard/styles.ts +18 -2
- package/src/components/QuestCard/utils.tsx +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ff326d93a76cbfef36a1f3c9b4a8e3be4ac50583
|
|
@@ -5262,7 +5262,7 @@
|
|
|
5262
5262
|
"933": {
|
|
5263
5263
|
"code": "B159",
|
|
5264
5264
|
"desc": "编成以「大淀」型轻巡或驱逐舰「丹阳」作为旗舰,另外包含驱逐舰 / 海防舰 3 艘的第一舰队,反复出击炼油厂地带沿岸、南西群岛防卫线、南西诸岛近海、巴士海峡!防卫海域!",
|
|
5265
|
-
"memo2": "大淀 / 丹阳旗舰 + 其他 3 艘及以上驱逐舰 + 其他分别出击 1-3、1-4、2-1、2-2 并分别取得 2 次 S?
|
|
5265
|
+
"memo2": "大淀 / 丹阳旗舰 + 其他 3 艘及以上驱逐舰 + 其他分别出击 1-3、1-4、2-1、2-2 并分别取得 2 次 S? 胜。雪风改二不可。",
|
|
5266
5266
|
"name": "【舰队司令部强化】舰队旗舰,出击!",
|
|
5267
5267
|
"pre": [
|
|
5268
5268
|
"D23"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2023121002
|
package/i18n/en-US.json
CHANGED
|
@@ -37,5 +37,9 @@
|
|
|
37
37
|
"Import data success": "Import data success",
|
|
38
38
|
"Copied data to clipboard": "Copied data to clipboard",
|
|
39
39
|
"Failed to export quest data! Please sync quest data first": "Failed to export quest data! Please sync quest data first",
|
|
40
|
+
"Search in wikiwiki": "Search in 艦これ 攻略 Wiki",
|
|
41
|
+
"Search in Kcwiki": "Search in Kcwiki",
|
|
42
|
+
"Search in KanColle Wiki": "Search in KanColle Wiki",
|
|
43
|
+
"Star project, support the author": "Star project, support the author",
|
|
40
44
|
"": ""
|
|
41
45
|
}
|
package/i18n/ja-JP.json
CHANGED
|
@@ -32,5 +32,9 @@
|
|
|
32
32
|
"Use Kcwiki data": "Kcwikiのデータを利用する(簡体字中国語のみ)",
|
|
33
33
|
"Requires": "開放条件",
|
|
34
34
|
"Unlocks": "ロック解除",
|
|
35
|
+
"Search in wikiwiki": "艦これ 攻略 Wikiでこのタスクを検索",
|
|
36
|
+
"Search in Kcwiki": "艦娘百科でこのタスクを検索",
|
|
37
|
+
"Search in KanColle Wiki": "KanColle Wikiでこのタスクを検索",
|
|
38
|
+
"Star project, support the author": "Starプロジェクト、著者をサポート",
|
|
35
39
|
"": ""
|
|
36
40
|
}
|
package/i18n/ko-KR.json
CHANGED
|
@@ -16,5 +16,9 @@
|
|
|
16
16
|
"Use Kcwiki data": "Kcwiki의 데이터 사용(중국어 간체만 해당)",
|
|
17
17
|
"Requires": "필요",
|
|
18
18
|
"Unlocks": "잠금 해제",
|
|
19
|
+
"Search in wikiwiki": "艦これ 攻略 Wiki에서 이 작업 검색",
|
|
20
|
+
"Search in Kcwiki": "艦娘百科에서 이 작업 검색",
|
|
21
|
+
"Search in KanColle Wiki": "KanColle Wiki에서 이 작업 검색",
|
|
22
|
+
"Star project, support the author": "스타 프로젝트, 작가 지원",
|
|
19
23
|
"": ""
|
|
20
24
|
}
|
package/i18n/zh-CN.json
CHANGED
|
@@ -32,5 +32,9 @@
|
|
|
32
32
|
"Use Kcwiki data": "使用 Kcwiki 的数据",
|
|
33
33
|
"Requires": "前置",
|
|
34
34
|
"Unlocks": "后置",
|
|
35
|
+
"Search in wikiwiki": "在 艦これ攻略Wiki 搜索该任务",
|
|
36
|
+
"Search in Kcwiki": "在 舰娘百科 搜索该任务",
|
|
37
|
+
"Search in KanColle Wiki": "在 英wiki 搜索该任务",
|
|
38
|
+
"Star project, support the author": "Star 项目,支持作者",
|
|
35
39
|
"": ""
|
|
36
40
|
}
|
package/i18n/zh-TW.json
CHANGED
|
@@ -32,5 +32,9 @@
|
|
|
32
32
|
"Use Kcwiki data": "使用 Kcwiki 的數據(僅限簡體中文)",
|
|
33
33
|
"Requires": "需要",
|
|
34
34
|
"Unlocks": "解鎖",
|
|
35
|
+
"Search in wikiwiki": "在 艦これ 攻略 Wiki 搜索該任務",
|
|
36
|
+
"Search in Kcwiki": "在 艦娘百科 搜索該任務",
|
|
37
|
+
"Search in KanColle Wiki": "在 KanColle Wiki 搜索該任務",
|
|
38
|
+
"Star project, support the author": "Star項目,支持作者",
|
|
35
39
|
"": ""
|
|
36
40
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "poi-plugin-quest-info-2",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "show quest info",
|
|
6
6
|
"homepage": "https://github.com/lawvs/poi-plugin-quest-2/",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@babel/preset-env": "^7.23.2",
|
|
49
49
|
"@babel/preset-react": "^7.22.15",
|
|
50
50
|
"@babel/preset-typescript": "^7.23.2",
|
|
51
|
-
"@blueprintjs/core": "^
|
|
51
|
+
"@blueprintjs/core": "^4.19.5",
|
|
52
52
|
"@changesets/cli": "^2.26.2",
|
|
53
53
|
"@storybook/addon-actions": "^7.5.2",
|
|
54
54
|
"@storybook/addon-essentials": "^7.5.2",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"i18next": "^19.8.5",
|
|
76
76
|
"jest": "^30.0.0-alpha.1",
|
|
77
77
|
"pangu": "^4.0.7",
|
|
78
|
-
"poi-asset-themes": "^4.
|
|
78
|
+
"poi-asset-themes": "^4.5.0",
|
|
79
79
|
"prettier": "^3.0.3",
|
|
80
80
|
"react": "^18.2.0",
|
|
81
81
|
"react-dom": "^18.2.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { version, QuestData } from '../../build/kcanotifyGamedata'
|
|
2
2
|
|
|
3
3
|
test('should Kcanotify Game data version correct', () => {
|
|
4
|
-
expect(version).toMatchInlineSnapshot(`"
|
|
4
|
+
expect(version).toMatchInlineSnapshot(`"2023121002"`)
|
|
5
5
|
})
|
|
6
6
|
|
|
7
7
|
test('should Kcanotify Game data keys correct', () => {
|
|
@@ -4,7 +4,7 @@ import newQuestData from '../../build/kcQuestsData/quests-scn-new.json'
|
|
|
4
4
|
describe('should version correct', () => {
|
|
5
5
|
test('should KcwikiQuestData Game data version correct', () => {
|
|
6
6
|
expect(version).toMatchInlineSnapshot(
|
|
7
|
-
`"
|
|
7
|
+
`"ff326d93a76cbfef36a1f3c9b4a8e3be4ac50583"`,
|
|
8
8
|
)
|
|
9
9
|
})
|
|
10
10
|
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Button,
|
|
3
|
+
Card,
|
|
4
|
+
Elevation,
|
|
5
|
+
H5,
|
|
6
|
+
Icon,
|
|
7
|
+
Menu,
|
|
8
|
+
MenuDivider,
|
|
9
|
+
MenuItem,
|
|
10
|
+
Popover,
|
|
11
|
+
} from '@blueprintjs/core'
|
|
12
|
+
import { IconNames } from '@blueprintjs/icons'
|
|
2
13
|
import React, { forwardRef } from 'react'
|
|
3
14
|
// https://github.com/bvaughn/react-highlight-words
|
|
4
15
|
import Highlighter from 'react-highlight-words'
|
|
@@ -18,8 +29,10 @@ import {
|
|
|
18
29
|
CardMedia,
|
|
19
30
|
CardTail,
|
|
20
31
|
FlexCard,
|
|
32
|
+
MoreButton,
|
|
21
33
|
SpanText,
|
|
22
34
|
TagsWrapper,
|
|
35
|
+
TailIconWrapper,
|
|
23
36
|
} from './styles'
|
|
24
37
|
import { questIconMap, questStatusMap } from './utils'
|
|
25
38
|
|
|
@@ -67,8 +80,7 @@ const CardAction = ({ gameId }: { gameId: number }) => {
|
|
|
67
80
|
|
|
68
81
|
export const QuestCard = forwardRef<
|
|
69
82
|
Card,
|
|
70
|
-
|
|
71
|
-
QuestCardProps & StyledComponentProps<typeof Card, any, {}, never>
|
|
83
|
+
QuestCardProps & StyledComponentProps<typeof Card, any, object, never>
|
|
72
84
|
>(({ gameId, code, name, desc, tip, tip2, ...props }, ref) => {
|
|
73
85
|
const status = useQuestStatus(gameId)
|
|
74
86
|
const headIcon = questIconMap[guessQuestCategory(code).type]
|
|
@@ -121,8 +133,58 @@ export const QuestCard = forwardRef<
|
|
|
121
133
|
</CardBody>
|
|
122
134
|
|
|
123
135
|
<CardTail>
|
|
124
|
-
<
|
|
136
|
+
<MoreOptions code={code} gameId={gameId} name={name} />
|
|
137
|
+
<TailIconWrapper>
|
|
138
|
+
<TailIcon />
|
|
139
|
+
</TailIconWrapper>
|
|
125
140
|
</CardTail>
|
|
126
141
|
</FlexCard>
|
|
127
142
|
)
|
|
128
143
|
})
|
|
144
|
+
|
|
145
|
+
export const MoreOptions = forwardRef<
|
|
146
|
+
Button,
|
|
147
|
+
Pick<QuestCardProps, 'code' | 'gameId' | 'name'>
|
|
148
|
+
>(({ code }, ref) => {
|
|
149
|
+
const { t } = usePluginTranslation()
|
|
150
|
+
|
|
151
|
+
const menu = (
|
|
152
|
+
<Menu>
|
|
153
|
+
<MenuItem
|
|
154
|
+
icon={IconNames.Anchor}
|
|
155
|
+
text={t('Search in Kcwiki')}
|
|
156
|
+
tagName="a"
|
|
157
|
+
href={`https://zh.kcwiki.cn/wiki/任务#:~:text=${code}`}
|
|
158
|
+
target="_blank"
|
|
159
|
+
/>
|
|
160
|
+
<MenuItem
|
|
161
|
+
icon={IconNames.Graph}
|
|
162
|
+
text={t('Search in wikiwiki')}
|
|
163
|
+
tagName="a"
|
|
164
|
+
href={`https://wikiwiki.jp/kancolle/任務#:~:text=${code}`}
|
|
165
|
+
target="_blank"
|
|
166
|
+
/>
|
|
167
|
+
<MenuItem
|
|
168
|
+
icon={IconNames.Map}
|
|
169
|
+
text={t('Search in KanColle Wiki')}
|
|
170
|
+
tagName="a"
|
|
171
|
+
href={`https://kancolle.fandom.com/wiki/Quests#:~:text=${code}`}
|
|
172
|
+
target="_blank"
|
|
173
|
+
/>
|
|
174
|
+
<MenuDivider />
|
|
175
|
+
<MenuItem
|
|
176
|
+
icon={IconNames.Heart}
|
|
177
|
+
labelElement={<Icon icon="share" />}
|
|
178
|
+
text={t('Star project, support the author')}
|
|
179
|
+
tagName="a"
|
|
180
|
+
href={`https://github.com/lawvs/poi-plugin-quest-2`}
|
|
181
|
+
target="_blank"
|
|
182
|
+
/>
|
|
183
|
+
</Menu>
|
|
184
|
+
)
|
|
185
|
+
return (
|
|
186
|
+
<Popover content={menu} fill={true} placement="bottom">
|
|
187
|
+
<MoreButton ref={ref} icon={IconNames.More} />
|
|
188
|
+
</Popover>
|
|
189
|
+
)
|
|
190
|
+
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Card } from '@blueprintjs/core'
|
|
1
|
+
import { Button, Card } from '@blueprintjs/core'
|
|
2
2
|
import styled from 'styled-components'
|
|
3
3
|
|
|
4
4
|
export const FlexCard = styled(Card)`
|
|
@@ -32,8 +32,9 @@ export const CardBody = styled.div`
|
|
|
32
32
|
`
|
|
33
33
|
|
|
34
34
|
export const CardTail = styled.div`
|
|
35
|
+
align-self: stretch;
|
|
35
36
|
display: flex;
|
|
36
|
-
|
|
37
|
+
flex-direction: column;
|
|
37
38
|
align-items: center;
|
|
38
39
|
|
|
39
40
|
img {
|
|
@@ -41,6 +42,21 @@ export const CardTail = styled.div`
|
|
|
41
42
|
}
|
|
42
43
|
`
|
|
43
44
|
|
|
45
|
+
export const MoreButton = styled(Button)`
|
|
46
|
+
opacity: 0;
|
|
47
|
+
|
|
48
|
+
${FlexCard}:hover & {
|
|
49
|
+
opacity: 1;
|
|
50
|
+
}
|
|
51
|
+
`
|
|
52
|
+
|
|
53
|
+
export const TailIconWrapper = styled.div`
|
|
54
|
+
flex: 1;
|
|
55
|
+
display: flex;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
align-items: center;
|
|
58
|
+
`
|
|
59
|
+
|
|
44
60
|
export const CardActionWrapper = styled.div`
|
|
45
61
|
display: flex;
|
|
46
62
|
flex-direction: column;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Icon, Tooltip } from '@blueprintjs/core'
|
|
1
|
+
import { Icon, IconSize, Tooltip } from '@blueprintjs/core'
|
|
2
2
|
import { IconNames } from '@blueprintjs/icons'
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import {
|
|
@@ -20,7 +20,7 @@ export const questStatusMap: Record<QUEST_STATUS, React.FC> = {
|
|
|
20
20
|
const { t } = usePluginTranslation()
|
|
21
21
|
return (
|
|
22
22
|
<Tooltip content={t('Locked', { number: '' })}>
|
|
23
|
-
<Icon icon={IconNames.LOCK}
|
|
23
|
+
<Icon icon={IconNames.LOCK} size={IconSize.LARGE}></Icon>
|
|
24
24
|
</Tooltip>
|
|
25
25
|
)
|
|
26
26
|
},
|
|
@@ -46,7 +46,7 @@ export const questStatusMap: Record<QUEST_STATUS, React.FC> = {
|
|
|
46
46
|
const { t } = usePluginTranslation()
|
|
47
47
|
return (
|
|
48
48
|
<Tooltip content={t('Already Completed', { number: '' })}>
|
|
49
|
-
<Icon icon={IconNames.TICK}
|
|
49
|
+
<Icon icon={IconNames.TICK} size={IconSize.LARGE}></Icon>
|
|
50
50
|
</Tooltip>
|
|
51
51
|
)
|
|
52
52
|
},
|
|
@@ -54,7 +54,7 @@ export const questStatusMap: Record<QUEST_STATUS, React.FC> = {
|
|
|
54
54
|
const { t } = usePluginTranslation()
|
|
55
55
|
return (
|
|
56
56
|
<Tooltip content={t('Unknown')}>
|
|
57
|
-
<Icon icon={IconNames.HELP}
|
|
57
|
+
<Icon icon={IconNames.HELP} size={IconSize.LARGE}></Icon>
|
|
58
58
|
</Tooltip>
|
|
59
59
|
)
|
|
60
60
|
},
|