@rpg-engine/long-bow 0.7.14 → 0.7.16
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/dist/components/Quests/QuestList.d.ts +3 -3
- package/dist/long-bow.cjs.development.js +10 -10
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +8 -8
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Quests/QuestList.tsx +8 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpg-engine/long-bow",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.16",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@capacitor/core": "^6.1.0",
|
|
86
86
|
"@rollup/plugin-image": "^2.1.1",
|
|
87
|
-
"@rpg-engine/shared": "^0.9.
|
|
87
|
+
"@rpg-engine/shared": "^0.9.65",
|
|
88
88
|
"dayjs": "^1.11.2",
|
|
89
89
|
"font-awesome": "^4.7.0",
|
|
90
90
|
"fs-extra": "^10.1.0",
|
|
@@ -21,17 +21,19 @@ export const QuestList: React.FC<IQuestListProps> = ({ quests, styles }) => {
|
|
|
21
21
|
<QuestCard key={i} style={styles?.card}>
|
|
22
22
|
<QuestItem>
|
|
23
23
|
<Label style={styles?.label}>Title:</Label>
|
|
24
|
-
<Value style={styles?.value}>
|
|
24
|
+
<Value style={styles?.value}>
|
|
25
|
+
{formatQuestText(quest.title)}
|
|
26
|
+
</Value>
|
|
25
27
|
</QuestItem>
|
|
26
28
|
<QuestItem>
|
|
27
29
|
<Label style={styles?.label}>Status:</Label>
|
|
28
30
|
<Value
|
|
29
31
|
style={{
|
|
30
32
|
...styles?.value,
|
|
31
|
-
color:
|
|
33
|
+
color: getQuestStatusColor(quest.status),
|
|
32
34
|
}}
|
|
33
35
|
>
|
|
34
|
-
{
|
|
36
|
+
{formatQuestStatus(quest.status) ?? 'Unknown'}
|
|
35
37
|
</Value>
|
|
36
38
|
</QuestItem>
|
|
37
39
|
<QuestItem>
|
|
@@ -96,7 +98,7 @@ const NoQuestContainer = styled.div`
|
|
|
96
98
|
}
|
|
97
99
|
`;
|
|
98
100
|
|
|
99
|
-
export const
|
|
101
|
+
export const formatQuestText = (text: string) => {
|
|
100
102
|
if (!text) return '';
|
|
101
103
|
return text
|
|
102
104
|
.split('-')
|
|
@@ -104,7 +106,7 @@ export const formatText = (text: string) => {
|
|
|
104
106
|
.join(' ');
|
|
105
107
|
};
|
|
106
108
|
|
|
107
|
-
export const
|
|
109
|
+
export const getQuestStatusColor = (status?: QuestStatus) => {
|
|
108
110
|
switch (status) {
|
|
109
111
|
case QuestStatus.Pending:
|
|
110
112
|
return uiColors.orange;
|
|
@@ -117,7 +119,7 @@ export const getStatusColor = (status?: QuestStatus) => {
|
|
|
117
119
|
}
|
|
118
120
|
};
|
|
119
121
|
|
|
120
|
-
export const
|
|
122
|
+
export const formatQuestStatus = (status?: QuestStatus) => {
|
|
121
123
|
if (!status) return '';
|
|
122
124
|
return status
|
|
123
125
|
.split(/(?=[A-Z])/)
|