|
@@ -160,6 +160,7 @@ function PlanexScreen(props: Props) {
|
160
|
160
|
| {
|
161
|
161
|
title: string | React.ReactElement;
|
162
|
162
|
message: string | React.ReactElement;
|
|
163
|
+ color: string;
|
163
|
164
|
}
|
164
|
165
|
>();
|
165
|
166
|
const [injectJS, setInjectJS] = useState('');
|
|
@@ -269,7 +270,7 @@ function PlanexScreen(props: Props) {
|
269
|
270
|
if (startString != null && endString != null) {
|
270
|
271
|
msg += `${startString} - ${endString}`;
|
271
|
272
|
}
|
272
|
|
- showDialog(data.title, msg);
|
|
273
|
+ showDialog(data.title, msg, data.color);
|
273
|
274
|
};
|
274
|
275
|
|
275
|
276
|
/**
|
|
@@ -278,7 +279,8 @@ function PlanexScreen(props: Props) {
|
278
|
279
|
* @param title The dialog's title
|
279
|
280
|
* @param message The message to show
|
280
|
281
|
*/
|
281
|
|
- const showDialog = (title: string, message: string) => {
|
|
282
|
+ const showDialog = (title: string, message: string, color?: string) => {
|
|
283
|
+ const finalColor = color ? color : theme.colors.surface;
|
282
|
284
|
setDialogContent({
|
283
|
285
|
title: (
|
284
|
286
|
<Autolink
|
|
@@ -292,6 +294,7 @@ function PlanexScreen(props: Props) {
|
292
|
294
|
/>
|
293
|
295
|
),
|
294
|
296
|
message: message,
|
|
297
|
+ color: finalColor,
|
295
|
298
|
});
|
296
|
299
|
};
|
297
|
300
|
|
|
@@ -329,8 +332,6 @@ function PlanexScreen(props: Props) {
|
329
|
332
|
* @param groupID The current group selected
|
330
|
333
|
*/
|
331
|
334
|
const generateInjectedJS = (group: PlanexGroupType | undefined) => {
|
332
|
|
- console.log(group);
|
333
|
|
-
|
334
|
335
|
let customInjectedJS = `$(document).ready(function() {
|
335
|
336
|
${OBSERVE_MUTATIONS_INJECTED}
|
336
|
337
|
${INJECT_STYLE}
|
|
@@ -386,6 +387,11 @@ function PlanexScreen(props: Props) {
|
386
|
387
|
onDismiss={hideDialog}
|
387
|
388
|
title={dialogContent ? dialogContent.title : ''}
|
388
|
389
|
message={dialogContent ? dialogContent.message : ''}
|
|
390
|
+ style={
|
|
391
|
+ dialogContent
|
|
392
|
+ ? { borderColor: dialogContent.color, borderWidth: 2 }
|
|
393
|
+ : undefined
|
|
394
|
+ }
|
389
|
395
|
/>
|
390
|
396
|
<AnimatedBottomBar
|
391
|
397
|
navigation={navigation}
|