Skip to content

Commit

Permalink
New logo integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Litarvan committed Feb 9, 2020
1 parent ef73156 commit 91ce0e0
Show file tree
Hide file tree
Showing 24 changed files with 125 additions and 92 deletions.
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<application
android:name=".Application"
android:label="Epilyon"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
Expand Down
Binary file added android/app/src/main/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions android/app/src/main/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="1768"
android:viewportHeight="1768">
<group android:translateX="622.735"
android:translateY="530.4">
<path
android:pathData="M119.61,630.6L484.75,630.6a37.77,37.77 0,0 1,37.78 37.77v1a37.77,37.77 0,0 1,-37.78 37.77h-447a37.77,37.77 0,0 1,-37.77 -37.77v-3.19a37.76,37.76 0,0 1,8.66 -24.07L226.08,379.21a37.77,37.77 0,0 0,0.54 -47.47L21.76,72.19a37.76,37.76 0,0 1,-8.12 -23.4v-11a37.77,37.77 0,0 1,37.77 -37.77L451.18,0.02a37.77,37.77 0,0 1,37.77 37.77h0a37.77,37.77 0,0 1,-37.77 37.77h-320v4.2L328.26,328.56a37.77,37.77 0,0 1,-0.52 47.55L119.61,627.45Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M140.604,543.149L140.604,543.149A38.23,38.225 129.66,0 1,135.576 489.321L415.255,151.967A38.23,38.225 129.66,0 1,469.082 146.932L469.082,146.932A38.23,38.225 129.66,0 1,474.11 200.76L194.431,538.114A38.23,38.225 129.66,0 1,140.604 543.149z"
android:fillColor="#ffffff"/>
</group>
</vector>
13 changes: 6 additions & 7 deletions android/app/src/main/res/drawable/launch_background.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<item android:drawable="@color/ic_launcher_background" />

<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
<item
android:gravity="center"
android:width="216dp"
android:height="216dp"
android:drawable="@drawable/ic_launcher_foreground"/>
</layer-list>
5 changes: 5 additions & 0 deletions android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions android/app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#027CFF</color>
</resources>
1 change: 1 addition & 0 deletions assets/icons/epilyon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import 'package:epilyon/firebase.dart';
import 'package:http/http.dart' as http;
import 'package:shared_preferences/shared_preferences.dart';

import 'package:epilyon/api_url.dart';
import 'package:epilyon/api.dart';
import 'package:epilyon/firebase.dart';

String _token = "";
User _user;
Expand Down
9 changes: 5 additions & 4 deletions lib/pages/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:url_launcher/url_launcher.dart';

import 'package:epilyon/main.dart';
Expand All @@ -39,9 +40,10 @@ class _AboutPageState extends State<AboutPage>
child: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.only(top: 50.0),
child: Text('Epilyon', style: TextStyle(fontSize: 52, fontWeight: FontWeight.w500),),
padding: const EdgeInsets.only(top: 45.0, bottom: 10.0),
child: SvgPicture.asset('assets/icons/epilyon.svg', width: 50.0,),
),
Text('Epilyon', style: TextStyle(fontSize: 52, fontWeight: FontWeight.w500),),
Text(VERSION, style: TextStyle(fontFamily: 'Lato2', fontSize: 22),),
Padding(
padding: const EdgeInsets.only(top: 10),
Expand All @@ -67,8 +69,7 @@ class _AboutPageState extends State<AboutPage>
"Matthieu (utybo)\n"
"Yann Michaux\n"
"Théo (Thelox), Thomas (Uxon)\n"
"Shika\n"
"Lamia, Marjolaine, et Patricia",
"Shika",
style: TextStyle(
fontSize: 18,
fontStyle: FontStyle.italic,
Expand Down
154 changes: 77 additions & 77 deletions lib/pages/ms_login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,105 +15,105 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import 'package:epilyon/pages/base.dart';
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

import 'package:epilyon/pages/main.dart';
import 'package:epilyon/pages/base.dart';
import 'package:epilyon/widgets/dialogs.dart';
import 'package:epilyon/data.dart';
import 'package:epilyon/auth.dart';
import 'package:epilyon/api_url.dart';

class MSLoginPage extends StatefulWidget
{
MSLoginPage({ Key key }) : super(key: key);
MSLoginPage({ Key key }) : super(key: key);

@override
_MSLoginPageState createState() => _MSLoginPageState();
@override
_MSLoginPageState createState() => _MSLoginPageState();
}

class _MSLoginPageState extends State<MSLoginPage>
{
BuildContext _dialogContext;

Future _onWebViewCreated(WebViewController controller) async
{
controller.loadUrl(API_URL + "/auth/login", headers: {
"Token": getToken()
});
BuildContext _dialogContext;

Future _onWebViewCreated(WebViewController controller) async
{
controller.loadUrl(API_URL + "/auth/login", headers: {
"Token": getToken()
});
}

void _onChannelMessage(BuildContext context, JavascriptMessage message)
{
if (message.message != 'Close') {
return;
}

void _onChannelMessage(BuildContext context, JavascriptMessage message)
{
if (message.message != 'Close') {
return;
}
showLoadingDialog(
context,
title: 'Chargement',
content: 'Lecture des données...',
onContextUpdate: (ctx) => _dialogContext = ctx
);

login().then((first) async {
if (first) {
Navigator.pop(_dialogContext);
showLoadingDialog(
context,
title: 'Chargement',
content: 'Lecture des données...',
title: 'Première connexion',
content: 'Récupération des informations...',
onContextUpdate: (ctx) => _dialogContext = ctx
);

login().then((first) async {
if (first) {
Navigator.pop(_dialogContext);
showLoadingDialog(
context,
title: 'Première connexion',
content: 'Récupération des informations...',
onContextUpdate: (ctx) => _dialogContext = ctx
);

await forceRefresh();
}

await fetchData();
}).then((_) {
if (_dialogContext == null) {
// TODO: Cancel login or prevent return
return;
}

Navigator.pop(_dialogContext);
pushMain(context);
}).catchError((e, trace) async {
if (_dialogContext == null) {
return;
}

await cancelLogin();

Navigator.pop(_dialogContext);
Navigator.pop(context);

print('Error during login/data fetching : ' + e.toString());
print(trace);

showErrorDialog(
context,
title: 'Erreur',
content: 'Impossible de se connecter au serveur : ' + e.toString()
);
});
}

@override
Widget build(BuildContext context)
{
return BasePage(
title: 'Connexion',
fixed: true,
child: WebView(
javascriptMode: JavascriptMode.unrestricted,
onWebViewCreated: _onWebViewCreated,
javascriptChannels: Set.from([JavascriptChannel(
name: "Epilyon",
onMessageReceived: (message) => _onChannelMessage(context, message)
)]),
),
);
}
await forceRefresh();
}

await fetchData();
}).then((_) {
if (_dialogContext == null) {
// TODO: Cancel login or prevent return
return;
}

Navigator.pop(_dialogContext);
pushMain(context);
}).catchError((e, trace) async {
if (_dialogContext == null) {
return;
}

await cancelLogin();

Navigator.pop(_dialogContext);
Navigator.pop(context);

print('Error during login/data fetching : ' + e.toString());
print(trace);

showErrorDialog(
context,
title: 'Erreur',
content: 'Impossible de se connecter au serveur : ' + e.toString()
);
});
}

@override
Widget build(BuildContext context)
{
return BasePage(
title: 'Connexion',
fixed: true,
child: WebView(
javascriptMode: JavascriptMode.unrestricted,
onWebViewCreated: _onWebViewCreated,
javascriptChannels: Set.from([JavascriptChannel(
name: "Epilyon",
onMessageReceived: (message) => _onChannelMessage(context, message)
)]),
),
);
}
}
4 changes: 2 additions & 2 deletions lib/pages/qcm/qcm_history.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import 'package:epilyon/pages/base.dart';
import 'package:epilyon/pages/qcm/qcm_result.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:intl/intl.dart';

import 'package:epilyon/widgets/card.dart';
import 'package:epilyon/data.dart';
import 'package:epilyon/pages/base.dart';
import 'package:epilyon/pages/qcm/qcm_result.dart';

class QCMHistoryPage extends StatefulWidget
{
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ flutter:
- assets/icons/check_box.svg
- assets/icons/done_all.svg
- assets/icons/edit.svg
- assets/icons/epilyon.svg
- assets/icons/event_note.svg
- assets/icons/first_page.svg
- assets/icons/format_list_bulleted.svg
Expand Down
1 change: 1 addition & 0 deletions resources/icon_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 91ce0e0

Please sign in to comment.