forked from vergnet/application-amicale
Improved AF
This commit is contained in:
parent
c720600afd
commit
1bc0b31283
4 changed files with 17 additions and 30 deletions
|
@ -201,7 +201,11 @@ export default class AboutScreen extends React.Component<Props, State> {
|
||||||
<Card.Title
|
<Card.Title
|
||||||
title={appJson.expo.name}
|
title={appJson.expo.name}
|
||||||
subtitle={appJson.expo.version}
|
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>
|
<Card.Content>
|
||||||
<FlatList
|
<FlatList
|
||||||
data={this.appData}
|
data={this.appData}
|
||||||
|
|
|
@ -8,7 +8,6 @@ import WebDataManager from "../../utils/WebDataManager";
|
||||||
import PlanningEventManager from '../../utils/PlanningEventManager';
|
import PlanningEventManager from '../../utils/PlanningEventManager';
|
||||||
import {Avatar, Divider, List} from 'react-native-paper';
|
import {Avatar, Divider, List} from 'react-native-paper';
|
||||||
import CustomAgenda from "../../components/CustomAgenda";
|
import CustomAgenda from "../../components/CustomAgenda";
|
||||||
import AprilFoolsManager from "../../utils/AprilFoolsManager";
|
|
||||||
|
|
||||||
LocaleConfig.locales['fr'] = {
|
LocaleConfig.locales['fr'] = {
|
||||||
monthNames: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
|
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]));
|
this.pushEventInOrder(agendaItems, eventList[i], PlanningEventManager.getEventStartDate(eventList[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (AprilFoolsManager.getInstance().isAprilFoolsEnabled())
|
|
||||||
agendaItems["2020-04-01"].push(AprilFoolsManager.getFakeEvent());
|
|
||||||
this.setState({agendaItems: agendaItems})
|
this.setState({agendaItems: agendaItems})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,27 +24,13 @@ export default class AprilFoolsManager {
|
||||||
AprilFoolsManager.instance;
|
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) {
|
static getFakeMenuItem(menu: Object) {
|
||||||
if (menu[1]["dishes"].length >= 3) {
|
if (menu[1]["dishes"].length >= 3) {
|
||||||
menu[1]["dishes"].splice(0, 0, {name: "Truc à la con"});
|
menu[1]["dishes"].splice(0, 0, {name: "Coq au vin"});
|
||||||
menu[1]["dishes"].splice(2, 0, {name: "Autre truc à la con"});
|
menu[1]["dishes"].splice(2, 0, {name: "Pave de loup"});
|
||||||
} else {
|
} else {
|
||||||
menu[1]["dishes"].push({name: "Truc à la con"});
|
menu[1]["dishes"].push({name: "Coq au vin"});
|
||||||
menu[1]["dishes"].push({name: "Autre truc à la con"});
|
menu[1]["dishes"].push({name: "Pave de loup"});
|
||||||
}
|
}
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
@ -54,13 +40,13 @@ export default class AprilFoolsManager {
|
||||||
...currentTheme,
|
...currentTheme,
|
||||||
colors: {
|
colors: {
|
||||||
...currentTheme.colors,
|
...currentTheme.colors,
|
||||||
primary: '#bebe03',
|
primary: '#00be45',
|
||||||
accent: '#bebe03',
|
accent: '#00be45',
|
||||||
background: '#5b3e02',
|
background: '#50005b',
|
||||||
tabBackground: "#5b3e02",
|
tabBackground: "#50005b",
|
||||||
card: "#5b3e02",
|
card: "#50005b",
|
||||||
surface: "#5b3e02",
|
surface: "#50005b",
|
||||||
dividerBackground: '#362201',
|
dividerBackground: '#3e0047',
|
||||||
textDisabled: '#b9b9b9',
|
textDisabled: '#b9b9b9',
|
||||||
|
|
||||||
// Calendar/Agenda
|
// Calendar/Agenda
|
||||||
|
|
|
@ -120,7 +120,7 @@ export default class ThemeManager {
|
||||||
*/
|
*/
|
||||||
static getCurrentTheme(): Object {
|
static getCurrentTheme(): Object {
|
||||||
if (AprilFoolsManager.getInstance().isAprilFoolsEnabled())
|
if (AprilFoolsManager.getInstance().isAprilFoolsEnabled())
|
||||||
return AprilFoolsManager.getAprilFoolsTheme(ThemeManager.getBaseTheme());
|
return AprilFoolsManager.getAprilFoolsTheme(ThemeManager.getDarkTheme());
|
||||||
else
|
else
|
||||||
return ThemeManager.getBaseTheme()
|
return ThemeManager.getBaseTheme()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue