Improved AF

This commit is contained in:
keplyx 2020-03-09 19:18:10 +01:00
parent c720600afd
commit 1bc0b31283
4 changed files with 17 additions and 30 deletions

View file

@ -201,7 +201,11 @@ export default class AboutScreen extends React.Component<Props, State> {
<Card.Title
title={appJson.expo.name}
subtitle={appJson.expo.version}
left={(props) => <Avatar.Image {...props} source={require('../../assets/android.icon.png')}/>}/>
left={(props) => <Avatar.Image
{...props}
source={require('../../assets/android.icon.png')}
style={{backgroundColor: 'transparent'}}
/>}/>
<Card.Content>
<FlatList
data={this.appData}

View file

@ -8,7 +8,6 @@ import WebDataManager from "../../utils/WebDataManager";
import PlanningEventManager from '../../utils/PlanningEventManager';
import {Avatar, Divider, List} from 'react-native-paper';
import CustomAgenda from "../../components/CustomAgenda";
import AprilFoolsManager from "../../utils/AprilFoolsManager";
LocaleConfig.locales['fr'] = {
monthNames: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
@ -210,8 +209,6 @@ export default class PlanningScreen extends React.Component<Props, State> {
this.pushEventInOrder(agendaItems, eventList[i], PlanningEventManager.getEventStartDate(eventList[i]));
}
}
if (AprilFoolsManager.getInstance().isAprilFoolsEnabled())
agendaItems["2020-04-01"].push(AprilFoolsManager.getFakeEvent());
this.setState({agendaItems: agendaItems})
}

View file

@ -24,27 +24,13 @@ export default class AprilFoolsManager {
AprilFoolsManager.instance;
}
static getFakeEvent() {
return {
category_id: 1,
club: "Coucou",
date_begin: "2020-04-01 20:30:00",
date_end: "2020-04-01 23:59:00",
description: "Trop génial",
id: "-1",
logo: null,
title: "Super event trop whoaou",
url: null
};
}
static getFakeMenuItem(menu: Object) {
if (menu[1]["dishes"].length >= 3) {
menu[1]["dishes"].splice(0, 0, {name: "Truc à la con"});
menu[1]["dishes"].splice(2, 0, {name: "Autre truc à la con"});
menu[1]["dishes"].splice(0, 0, {name: "Coq au vin"});
menu[1]["dishes"].splice(2, 0, {name: "Pave de loup"});
} else {
menu[1]["dishes"].push({name: "Truc à la con"});
menu[1]["dishes"].push({name: "Autre truc à la con"});
menu[1]["dishes"].push({name: "Coq au vin"});
menu[1]["dishes"].push({name: "Pave de loup"});
}
return menu;
}
@ -54,13 +40,13 @@ export default class AprilFoolsManager {
...currentTheme,
colors: {
...currentTheme.colors,
primary: '#bebe03',
accent: '#bebe03',
background: '#5b3e02',
tabBackground: "#5b3e02",
card: "#5b3e02",
surface: "#5b3e02",
dividerBackground: '#362201',
primary: '#00be45',
accent: '#00be45',
background: '#50005b',
tabBackground: "#50005b",
card: "#50005b",
surface: "#50005b",
dividerBackground: '#3e0047',
textDisabled: '#b9b9b9',
// Calendar/Agenda

View file

@ -120,7 +120,7 @@ export default class ThemeManager {
*/
static getCurrentTheme(): Object {
if (AprilFoolsManager.getInstance().isAprilFoolsEnabled())
return AprilFoolsManager.getAprilFoolsTheme(ThemeManager.getBaseTheme());
return AprilFoolsManager.getAprilFoolsTheme(ThemeManager.getDarkTheme());
else
return ThemeManager.getBaseTheme()
}