Skip to content
Snippets Groups Projects
Commit b193a970 authored by Jeremy Guiselin's avatar Jeremy Guiselin
Browse files

Remains purchase, score, etc...

parent 13d61f27
Branches
No related tags found
No related merge requests found
Showing
with 550 additions and 186 deletions
...@@ -5,6 +5,8 @@ node_modules/ ...@@ -5,6 +5,8 @@ node_modules/
platforms/ platforms/
plugins/ plugins/
www/lib www/lib
www/css
www/dist
resources/android resources/android
resources/ios resources/ios
.idea/ .idea/
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
"ionic": "1.3.1", "ionic": "1.3.1",
"ngCordova": "*", "ngCordova": "*",
"angular-translate": "^2.13.1", "angular-translate": "^2.13.1",
"angular-translate-loader-static-files": "^2.13.1" "angular-translate-loader-static-files": "^2.13.1",
"ionic-img-cache": "^1.1.1"
}, },
"devDependencies": { "devDependencies": {
"platform.js": "platform#^1.3.1", "platform.js": "platform#^1.3.1",
......
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.jeremyguiselin.betskills" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="com.jeremyguiselin.betskills" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>betskills</name> <name>Betskills</name>
<description> <description>
An Ionic Framework and Cordova project. Betskills app to see predictions of football and tennis games.
</description> </description>
<author email="hi@betskills.com" href="http://ionicframework.com/"> <author email="contact@betskills.com" href="">
Betskills team Betskills team
</author> </author>
<content src="index.html"/> <content src="index.html"/>
...@@ -23,68 +23,74 @@ ...@@ -23,68 +23,74 @@
<feature name="StatusBar"> <feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar"/> <param name="ios-package" onload="true" value="CDVStatusBar"/>
</feature> </feature>
<plugin name="cordova-plugin-device" spec="~1.1.2"/>
<plugin name="cordova-plugin-console" spec="~1.0.3"/> <plugin name="cordova-plugin-console" spec="~1.0.3"/>
<plugin name="cordova-plugin-whitelist" spec="~1.2.2"/> <plugin name="cordova-plugin-whitelist" spec="~1.2.2"/>
<plugin name="cordova-plugin-splashscreen" spec="~3.2.2"/> <plugin name="cordova-plugin-splashscreen" spec="~3.2.2"/>
<plugin name="cordova-plugin-statusbar" spec="~2.1.3"/> <plugin name="cordova-plugin-statusbar" spec="~2.1.3"/>
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/> <plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
<plugin name="cordova-plugin-firebase" spec="~0.1.17"/> <plugin name="cordova-plugin-firebase" spec="~0.1.18"/>
<plugin name="cordova-plugin-device" spec="~1.1.3"/>
<plugin name="cordova-plugin-file-transfer" spec="~1.6.1"/>
<plugin name="cordova-plugin-inapppurchase" spec="~1.1.0"/>
<platform name="ios"> <platform name="ios">
<preference name="FadeSplashScreen" value="false"/> <preference name="FadeSplashScreen" value="false"/>
<preference name="FadeSplashScreenDuration" value="1000"/> <preference name="FadeSplashScreenDuration" value="1000"/>
<splash src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" height="1136"/> <preference name="iosPersistentFileLocation" value="Library"/>
<splash src="resources/ios/splash/Default-667h.png" width="750" height="1334"/> <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640"/>
<splash src="resources/ios/splash/Default-736h.png" width="1242" height="2208"/> <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750"/>
<splash src="resources/ios/splash/Default-Landscape-736h.png" width="2208" height="1242"/> <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242"/>
<splash src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" height="1536"/> <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208"/>
<splash src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" height="768"/> <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048"/>
<splash src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" height="2048"/> <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024"/>
<splash src="resources/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/> <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536"/>
<splash src="resources/ios/splash/Default@2x~iphone.png" width="640" height="960"/> <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768"/>
<splash src="resources/ios/splash/Default~iphone.png" width="320" height="480"/> <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640"/>
<icon src="resources/ios/icon/icon.png" width="57" height="57"/> <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320"/>
<icon src="resources/ios/icon/icon@2x.png" width="114" height="114"/> <icon height="57" src="resources/ios/icon/icon.png" width="57"/>
<icon src="resources/ios/icon/icon-40.png" width="40" height="40"/> <icon height="114" src="resources/ios/icon/icon@2x.png" width="114"/>
<icon src="resources/ios/icon/icon-40@2x.png" width="80" height="80"/> <icon height="40" src="resources/ios/icon/icon-40.png" width="40"/>
<icon src="resources/ios/icon/icon-40@3x.png" width="120" height="120"/> <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80"/>
<icon src="resources/ios/icon/icon-50.png" width="50" height="50"/> <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120"/>
<icon src="resources/ios/icon/icon-50@2x.png" width="100" height="100"/> <icon height="50" src="resources/ios/icon/icon-50.png" width="50"/>
<icon src="resources/ios/icon/icon-60.png" width="60" height="60"/> <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100"/>
<icon src="resources/ios/icon/icon-60@2x.png" width="120" height="120"/> <icon height="60" src="resources/ios/icon/icon-60.png" width="60"/>
<icon src="resources/ios/icon/icon-60@3x.png" width="180" height="180"/> <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120"/>
<icon src="resources/ios/icon/icon-72.png" width="72" height="72"/> <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180"/>
<icon src="resources/ios/icon/icon-72@2x.png" width="144" height="144"/> <icon height="72" src="resources/ios/icon/icon-72.png" width="72"/>
<icon src="resources/ios/icon/icon-76.png" width="76" height="76"/> <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144"/>
<icon src="resources/ios/icon/icon-76@2x.png" width="152" height="152"/> <icon height="76" src="resources/ios/icon/icon-76.png" width="76"/>
<icon src="resources/ios/icon/icon-83.5@2x.png" width="167" height="167"/> <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152"/>
<icon src="resources/ios/icon/icon-small.png" width="29" height="29"/> <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167"/>
<icon src="resources/ios/icon/icon-small@2x.png" width="58" height="58"/> <icon height="29" src="resources/ios/icon/icon-small.png" width="29"/>
<icon src="resources/ios/icon/icon-small@3x.png" width="87" height="87"/> <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58"/>
<icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87"/>
</platform> </platform>
<platform name="android"> <platform name="android">
<preference name="android-minSdkVersion" value="22"/> <preference name="android-minSdkVersion" value="22"/>
<preference name="android-targetSdkVersion" value="22"/> <preference name="android-targetSdkVersion" value="22"/>
<preference name="SplashMaintainAspectRatio" value="true"/> <preference name="SplashMaintainAspectRatio" value="true"/>
<preference name="SplashShowOnlyFirstTime" value="false"/> <preference name="SplashShowOnlyFirstTime" value="false"/>
<splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/> <preference name="AndroidPersistentFileLocation" value="Compatibility"/>
<splash src="resources/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/> <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png"/>
<splash src="resources/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/> <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png"/>
<splash src="resources/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/> <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png"/>
<splash src="resources/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/> <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png"/>
<splash src="resources/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/> <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png"/>
<splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/> <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png"/>
<splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/> <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png"/>
<splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/> <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png"/>
<splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/> <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png"/>
<splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/> <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png"/>
<splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/> <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png"/>
<icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/> <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png"/>
<icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/> <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png"/>
<icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/> <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png"/>
<icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/> <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png"/>
<icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/> <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png"/>
<icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/> <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png"/>
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png"/>
<access origin="cdvfile://*"/>
<allow-intent href="cdvfile://*"/>
</platform> </platform>
<icon src="resources/android/icon/drawable-xhdpi-icon.png"/> <icon src="resources/android/icon/drawable-xhdpi-icon.png"/>
</widget> </widget>
\ No newline at end of file
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
"description": "betskills: An Ionic project", "description": "betskills: An Ionic project",
"dependencies": { "dependencies": {
"gulp": "^3.5.6", "gulp": "^3.5.6",
"gulp-sass": "^2.0.4",
"gulp-concat": "^2.2.0", "gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0", "gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0" "gulp-rename": "^1.2.0",
"gulp-sass": "^2.0.4"
}, },
"devDependencies": { "devDependencies": {
"bower": "^1.3.3", "bower": "^1.3.3",
......
...@@ -15,3 +15,13 @@ ...@@ -15,3 +15,13 @@
color: #000; color: #000;
border-color: #000; border-color: #000;
} }
.spinner svg {
width: 19% !important;
height: 85px !important;
fill: transparent !important;
}
.loading-container .loading {
background-color: transparent !important;
}
...@@ -10,7 +10,7 @@ ion-header-bar.bar.bar-header { ...@@ -10,7 +10,7 @@ ion-header-bar.bar.bar-header {
border-bottom: 1px solid $bar-border; border-bottom: 1px solid $bar-border;
div { div {
font-size: 35px; font-size: 35px !important;
font-family: "OspDin"; font-family: "OspDin";
} }
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
font-family: "SF-UI-Display"; font-family: "SF-UI-Display";
font-size: 17px; font-size: 17px;
color: $blackColor; color: $blackColor;
text-align: left; text-align: justify;
padding: 0 10px; padding: 0 10px;
} }
} }
...@@ -32,18 +32,22 @@ ...@@ -32,18 +32,22 @@
width: 33%; width: 33%;
color: #7F7F7E; color: #7F7F7E;
font-family: "OspDin"; font-family: "OspDin";
font-size: 40px; font-size: 30px;
color: #000; color: #000;
.percent { .percent {
font-family: "Impact"; font-family: "Impact";
font-size: 33px; font-size: 28px;
} }
} }
.main-prediction { .main-prediction {
color: $greenColor; color: $greenColor;
} }
.second-prediction {
color: $orangeColor;
}
} }
.title { .title {
......
...@@ -30,3 +30,4 @@ $blackColor: black; ...@@ -30,3 +30,4 @@ $blackColor: black;
$darkGreyColor: #4c4b4b; $darkGreyColor: #4c4b4b;
$whiteColor: #fff; $whiteColor: #fff;
$greenColor: #15AC72; $greenColor: #15AC72;
$orangeColor: #eb7c38;
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
<!-- project js --> <!-- project js -->
<script src="dist/templates.js"></script> <script src="dist/templates.js"></script>
<script src="dist/project.js"></script> <script src="dist/project.js"></script>
</head> </head>
<body ng-app="starter"> <body ng-app="starter">
<ion-nav-bar></ion-nav-bar> <ion-nav-bar></ion-nav-bar>
......
...@@ -6,13 +6,19 @@ ...@@ -6,13 +6,19 @@
"info_title_1": "How to stay connected ?", "info_title_1": "How to stay connected ?",
"info_title_2": "What is Betskills ?", "info_title_2": "What is Betskills ?",
"info_title_3": "How to use Betskills ?", "info_title_3": "How to use Betskills ?",
"info_title_4": "General terms of use", "who_we_are_1": "Betskills aims at combining mathematics and statistical analysis with sport. Our team has developed a powerful algorithm which analyses data from previous games. We are currently focused on Football and Tennis.",
"who_we_are": "But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?", "who_we_are_2": "Regarding football, we provide 6 major European championships per week but also Champions League, a selection of Europa League games and some « exotic » championships or international major tournaments (World Cup, Euro…) during summer.",
"how_to_use": "But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?", "who_we_are_3": "For Tennis, we provide Grand Slams and all the ATP Masters 1000.",
"legal_terms": "But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?", "who_we_are_4": "Our statistics are updated up to 24 hours after the last game.",
"facebook_link": "https://www.facebook.com/betskillsuk", "who_we_are_5": "A dozen of parameters are taken into account to proceed our calculations regarding soccer’s outcomes as home/away forms, goals scored/conceded, possession, free kicks... For tennis, we analyse data such as 1st/2nd serve %, winning forehands and backhands, surface, winning returns…",
"how_to_use_1": "We will never provide any winner or draw for any games. Our job is mainly focused on giving tips to our users on the possible game’s outcomes.",
"how_to_use_2": "In order to increase your chances of winning, we advise our users to favour « draw no bet » and double chance ( the 2 highest percentages). Also, we do not suggest you to make combinations of multiple games.",
"how_to_use_3": "When a 2 green ticks are displayed, it means that our prediction was accurate (the final score matches with the highest percentage.",
"how_to_use_4": "When a orange tick is displayed, it means that our prediction was accurate in double chance (the final score matches with the 2 highest percentages).",
"how_to_use_5": "When a red cross is displayed, it means the final score matches with the lowest percentage.",
"facebook_link": "https://facebook.com/betskillsuk",
"twitter_link": "https://twitter.com/betskills", "twitter_link": "https://twitter.com/betskills",
"instagram_link": "https://www.instagram.com/betskills", "instagram_link": "https://instagram.com/betskills",
"daily_predictions": "Daily Predictions", "daily_predictions": "Daily Predictions",
"all_predictions": "All the predictions", "all_predictions": "All the predictions",
"unlock": "Unlock", "unlock": "Unlock",
...@@ -22,13 +28,19 @@ ...@@ -22,13 +28,19 @@
"info_title_1": "Comment resté connecté ?", "info_title_1": "Comment resté connecté ?",
"info_title_2": "Qui sommes-nous ?", "info_title_2": "Qui sommes-nous ?",
"info_title_3": "Comment utiliser Betskills ?", "info_title_3": "Comment utiliser Betskills ?",
"info_title_4": "Conditions générales d'utilisation", "who_we_are_1": "Betskills a pour vocation d’allier les mathématiques et l’analyse statistique au sport. Nous avons développé un algorithme mathématique complexe qui analyse les données des dernières rencontres sportives. Notre activité se concentre principalement aujourd’hui sur le football ainsi que le tennis.",
"who_we_are": "Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression. Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500, quand un peintre anonyme assembla ensemble des morceaux de texte pour réaliser un livre spécimen de polices de texte. Il n'a pas fait que survivre cinq siècles, mais s'est aussi adapté à la bureautique informatique, sans que son contenu n'en soit modifié. Il a été popularisé dans les années 1960 grâce à la vente de feuilles Letraset contenant des passages du Lorem Ipsum, et, plus récemment, par son inclusion dans des applications de mise en page de texte, comme Aldus PageMaker.", "who_we_are_2": "Pour le football, nous proposons, chaque week-end et au minimum, 6 championnats majeurs Européens. Mais également l’intégralité de la Ligue des champions, une sélection en Europa League ainsi que certains championnats « exotiques » ou des compétitions internationales majeures (Coupe du monde, Euro…) pendant l’été.",
"how_to_use": "Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression. Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500, quand un peintre anonyme assembla ensemble des morceaux de texte pour réaliser un livre spécimen de polices de texte. Il n'a pas fait que survivre cinq siècles, mais s'est aussi adapté à la bureautique informatique, sans que son contenu n'en soit modifié. Il a été popularisé dans les années 1960 grâce à la vente de feuilles Letraset contenant des passages du Lorem Ipsum, et, plus récemment, par son inclusion dans des applications de mise en page de texte, comme Aldus PageMaker.", "who_we_are_3": "Pour le Tennis, nous couvrons l’ensemble des grands chelems ainsi que les ATP masters 1000.",
"legal_terms": "Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression. Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500, quand un peintre anonyme assembla ensemble des morceaux de texte pour réaliser un livre spécimen de polices de texte. Il n'a pas fait que survivre cinq siècles, mais s'est aussi adapté à la bureautique informatique, sans que son contenu n'en soit modifié. Il a été popularisé dans les années 1960 grâce à la vente de feuilles Letraset contenant des passages du Lorem Ipsum, et, plus récemment, par son inclusion dans des applications de mise en page de texte, comme Aldus PageMaker.", "who_we_are_4": "Nos statistiques sont mises à jours au maximum 24h après la dernière rencontre du championnat ou de la journée.",
"facebook_link": "https://www.facebook.com/betskillsfrance", "who_we_are_5": "Notre algorithme prend en compte une douzaine de paramètres pour le football (comme la forme domicile/exterieur, les buts marqués, les buts encaissés, la possession, les coups de pied arrêtés…) et l’ensemble des paramètres disponibles pour le tennis (% de service 1ere et 2eme balles, coups droits gagnants, revers gagnants, la surface, % de retours gagnants…).",
"how_to_use_1": "Nous ne communiquons jamais sur le possible vainqueur d’une rencontre. Nous nous efforçons cependant de conseiller et d’éclairer au maximum nos utilisateurs sur le possible dénouement d’un match. Notre activité s’oriente sur du conseil et de la prédiction plutôt que sur du pronostique.",
"how_to_use_2": "Nous conseillons à l’ensemble de nos utilisateurs de privilégier le « draw no bet » ou la double chance qui consiste à prendre en compte les 2 pourcentages les plus élevés (1 ou N, 2 ou N ou 1 et 1 ou 2). Nous déconseillons également de combiner un trop grand nombre de matchs.",
"how_to_use_3": "Lorsque qu’une rencontre est marquée de 2 ticks verts, cela signifie que notre prédiction est validée (le score finale concorde avec le pourcentage le plus élevé).",
"how_to_use_4": "Lorsqu’une rencontre est marquée d’un tick orange, cela signifie que notre prédiction est validée en double chance (le score finale concorde avec le 2ème pourcentage le plus élevé).",
"how_to_use_5": "Lorsqu’une rencontre est marquée d’une croix rouge, cela signifie que le score concorde avec le pourcentage le plus faible.",
"facebook_link": "https://facebook.com/betskillsfrance",
"twitter_link": "https://twitter.com/betskills_fr", "twitter_link": "https://twitter.com/betskills_fr",
"instagram_link": "https://www.instagram.com/betskills_fr", "instagram_link": "https://instagram.com/betskills_fr",
"daily_predictions": "Prédictions gratuites", "daily_predictions": "Prédictions gratuites",
"all_predictions": "Toutes les prédictions", "all_predictions": "Toutes les prédictions",
"unlock": "Dévérouiller", "unlock": "Dévérouiller",
...@@ -39,8 +51,9 @@ ...@@ -39,8 +51,9 @@
/** /**
* @ngInject * @ngInject
*/ */
function setupRun($ionicPlatform) { function setupRun($ionicPlatform, NotificationService) {
$ionicPlatform.ready(function () { $ionicPlatform.ready(function () {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs) // for form inputs)
if (window.cordova && window.cordova.plugins.Keyboard) { if (window.cordova && window.cordova.plugins.Keyboard) {
...@@ -51,6 +64,10 @@ ...@@ -51,6 +64,10 @@
StatusBar.styleDefault(); StatusBar.styleDefault();
} }
}); });
ionic.Platform.ready(function () {
NotificationService.registerDevice();
});
} }
function nativeScrolling($ionicConfigProvider) { function nativeScrolling($ionicConfigProvider) {
...@@ -78,10 +95,18 @@ ...@@ -78,10 +95,18 @@
'templatescache', 'templatescache',
'ngCordova', 'ngCordova',
'Config', 'Config',
'pascalprecht.translate' 'pascalprecht.translate',
'ionicImgCache'
]) ])
.run(setupRun) .run(setupRun)
.config(setupRoutes) .config(setupRoutes)
.config(function(ionicImgCacheProvider) {
// Enable imgCache debugging.
ionicImgCacheProvider.debug(true);
// Set storage size quota to 100 MB.
ionicImgCacheProvider.quota(100);
})
.config(function($ionicConfigProvider, $stateProvider, .config(function($ionicConfigProvider, $stateProvider,
$urlRouterProvider, $translateProvider) { $urlRouterProvider, $translateProvider) {
$ionicConfigProvider.views.maxCache(5); $ionicConfigProvider.views.maxCache(5);
...@@ -90,7 +115,11 @@ ...@@ -90,7 +115,11 @@
Object.keys(translations).forEach(function (key) { Object.keys(translations).forEach(function (key) {
$translateProvider.translations(key, translations[key]); $translateProvider.translations(key, translations[key]);
}); });
$translateProvider.preferredLanguage('fr'); var locale = window.navigator.language.split('-')[0];
if (locale !== 'fr' && locale !== 'en') {
locale = 'en';
}
$translateProvider.use(locale);
$translateProvider.useSanitizeValueStrategy('escape'); $translateProvider.useSanitizeValueStrategy('escape');
}) })
......
...@@ -4,15 +4,16 @@ ...@@ -4,15 +4,16 @@
(function (angular){ (function (angular){
"use strict"; "use strict";
angular.module('Config')
.constant("constantConfig", { var module = angular.module('Config');
module.constant("constantConfig", {
"apiClient": "betskills", "apiClient": "betskills",
"appStaging": "development", "appStaging": "production",
"apiUrl": "http://betskills.dev/api/", "apiUrl": "http://backend.betskills.com/api/",
"imgUrl": "http://betskills.dev/img/application/" "imgUrl": "http://backend.betskills.com/img/application/"
}); });
angular.module('Config') module.constant("notificationConfig",{
.constant("notificationConfig",{
'core': { 'core': {
'app_id': 'com.jeremyguiselin.betskills' 'app_id': 'com.jeremyguiselin.betskills'
}, },
...@@ -29,5 +30,28 @@ ...@@ -29,5 +30,28 @@
} }
} }
}); });
module.constant('purchaseConfig', {
'tennis': [
'tennis',
'tennis-full-1',
'tennis-full-2',
'tennis-full-3',
'tennis-full-4',
'tennis-full-5'
],
'football': [
'ligue-1',
'premiere-league',
'bundesliga',
'liga-bbva',
'liga-nos',
'serie-a',
'champions-league',
'football-full-3',
'football-full-4',
'football-full-5',
'football-full-6'
]
})
})(angular); })(angular);
(function (angular) {
"use strict";
/**
* @ngdoc service
* @name starter.NotificationService
*
* @description
*
* A service for receive notifications and register device.
*
* @ngInject
*/
function NotificationService($http, constantConfig) {
var service = {
registerDevice: function () {
var locale = window.navigator.language.split('-')[0];
if (locale !== 'fr' && locale !== 'en' ) {
locale = 'en';
}
ionic.Platform.ready(function () {
var deviceData = {};
if (window.cordova) {
var device = ionic.Platform.device();
deviceData = device;
var tokenAlreadyCreated = false;
window.FirebasePlugin.getToken(function (token) {
deviceData = Object.assign(device, {'locale': locale, 'token': token});
tokenAlreadyCreated = true;
}, function (error) {
});
if (!tokenAlreadyCreated) {
window.FirebasePlugin.onTokenRefresh(function (token) {
deviceData = Object.assign(device, {'locale': locale, 'token': token});
}, function (error) {
});
}
} else {
//Mock deviceData
deviceData = {
platform: 'Android',
version: '6.0.1',
model: 'AquarisE5',
uuid: '7f4a6a40e5c87157',
locale: locale,
token: 'cNgyx3ZgOX4:APA91bF5eigDuJLjj8wI8SC4l5KIHATuxi-2G5whpWI1n1jWpWWwRAwbEXec4fQ2S7HW8EdUPaREXJ5fVd_TZV8rZq_eIJIEhEadeH9wpsbYmUUM7E8H8Y0Qst9KmBuHWodCFFJPJ0vh'
}
}
$http.post(constantConfig.apiUrl + 'devices/register', deviceData)
.then(function successCallback() {
}, function errorCallback() {
});
});
}
};
return service;
}
angular.module('starter')
.service('NotificationService', NotificationService)
;
})(angular);
(function (angular) {
"use strict";
/**
* @ngdoc service
* @name starter.PurchaseService
*
* @description
*
* A service for purchasing products
*
* @ngInject
*/
function PurchaseService($http, $cordovaToast, constantConfig, purchaseConfig) {
var service = {
getProducts: function (sport) {
if (window.cordova) {
var products = [];
inAppPurchase
.getProducts(purchaseConfig[sport])
.then(function (storeProducts) {
products = storeProducts;
})
.catch(function (err) {
$cordovaToast
.showLongBottom(err)
.then(function(success) {
// success
}, function (error) {
console.log(error);
});
});
}
return [];
}
};
return service;
}
angular.module('starter')
.service('PurchaseService', PurchaseService)
;
})(angular);
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
/** /**
* @ngdoc controller * @ngdoc controller
* @name ChoiceController * @name FootballController
* *
* @description * @description
* Controller for the choice of sport page. * Controller for the football page.
* *
* @ngInject * @ngInject
*/ */
...@@ -18,17 +18,82 @@ ...@@ -18,17 +18,82 @@
$ionicHistory, $ionicHistory,
$scope, $scope,
$http, $http,
$q,
$ionicLoading,
constantConfig constantConfig
) { ) {
/**
Static variables
**/
var deregistrationCallbackList = []; var deregistrationCallbackList = [];
/**
End Controller variables
**/
/**
Scope variables
**/
$scope.pictureUrl = constantConfig.imgUrl;
$scope.locale = window.navigator.language.split('-')[0];
$scope.selected = [];
$scope.price = 0;
/**
End Scope variables
**/
/**
Scope functions
**/
$scope.isBought = function (id) {
return null;
}
$scope.isSelected = function (league) {
return $scope.selected.indexOf(league) !== -1;
}
$scope.select = function (league) {
if ($scope.isBought(league.id) === null) {
if ($scope.selected.indexOf(league) !== -1) {
$scope.selected.splice($scope.selected.indexOf(league), 1);
} else {
$scope.selected.push(league);
}
}
}
$scope.getPredictionClass = function (prediction, value) {
var percentages = [prediction.prediction_win_first, prediction.prediction_win_second, prediction.prediction_draw];
percentages.sort();
if (percentages.indexOf(value) === 2) {
return "main-prediction";
} else if (percentages.indexOf(value) === 1) {
return "second-prediction";
}
return '';
}
/**
End Scope functions
**/
/**
Scope events
**/
deregistrationCallbackList.push( deregistrationCallbackList.push(
$scope.$on('$ionicView.afterEnter', function(){ $scope.$on('$ionicView.afterEnter', function(){
$ionicHistory.clearHistory(); $ionicHistory.clearHistory();
}) })
); );
// cleanup
$scope.$on('$destroy', function(){ $scope.$on('$destroy', function(){
angular.forEach(deregistrationCallbackList, function(deregistrationCallback){ angular.forEach(deregistrationCallbackList, function(deregistrationCallback){
deregistrationCallback(); deregistrationCallback();
...@@ -36,38 +101,28 @@ ...@@ -36,38 +101,28 @@
deregistrationCallbackList = null; deregistrationCallbackList = null;
}); });
var deviceData = {};
ionic.Platform.ready(function () { $scope.$on("$ionicView.beforeEnter", function(event, data){
if (window.cordova) { $ionicLoading.show({
var device = ionic.Platform.device(); template: '<ion-spinner icon="ripple" class="spinner-assertive"></ion-spinner>',
window.FirebasePlugin.getToken(function (token) { animation: 'fade-in',
deviceData = Object.assign(device, {'token': token}); showBackdrop: true,
}, function (error) {
$scope.deviceData = error;
});
window.FirebasePlugin.onTokenRefresh(function (token) {
deviceData = Object.assign(device, {'token': token});
}, function (error) {
$scope.deviceData = error;
}); });
} else {
//Mock deviceData var freePredictionsPromise = $http.get(constantConfig.apiUrl + 'predictions/football/free');
deviceData = { var leaguesPromise = $http.get(constantConfig.apiUrl + 'leagues/football');
platform: 'Android',
version: '6.0.1', $q.all([freePredictionsPromise, leaguesPromise]).then(function (data) {
model: 'AquarisE5', $scope.freePredictions = data[0]['data'];
uuid: '7f4a6a40e5c87158', $scope.leagues = data[1]['data'];
token: 'cNgyx3ZgOX4:APA91bF5eigDuJLjj8wI8SC4l5KIHATuxi-2G5whpWI1n1jWpWWwRAwbEXec4fQ2S7HW8EdUPaREXJ5fVd_TZV8rZq_eIJIEhEadeH9wpsbYmUUM7E8H8Y0Qst9KmBuHWodCFFJPJ0vh' }).finally(function () {
} $ionicLoading.hide();
}
$http.post(constantConfig.apiUrl + 'devices/register', deviceData)
.then(function successCallback() {
$state.go('tabs.football');
}, function errorCallback() {
}); });
}); });
/**
End Scope event
**/
} }
angular.module('starter') angular.module('starter')
......
<ion-view cache-view="false" title="Football"> <ion-view cache-view="true" title="Football">
<ion-nav-buttons side="right"> <ion-nav-buttons side="right">
<img ui-sref="info" class="info-icon" src="img/info.png" alt="info"> <img ui-sref="info" class="info-icon" src="img/info.png" alt="info">
</ion-nav-buttons> </ion-nav-buttons>
<ion-content class="has-header"> <ion-content class="has-header">
<h1>Football</h1> <div ng-include src="'partials/sport-index.html'"></div>
</ion-content> </ion-content>
</ion-view> </ion-view>
<ion-view cache-view="false" title="Info"> <ion-view cache-view="true" can-swipe-back="true" title="Info">
<ion-nav-buttons side="left"> <ion-nav-buttons side="left">
<img class="info-icon" ng-click="myGoBack()" src="img/back.png" alt=""> <img class="info-icon" ng-click="myGoBack()" src="img/back.png" alt="">
</ion-nav-buttons> </ion-nav-buttons>
<ion-content class="has-header info"> <ion-content class="has-header info">
<h3 class="title-section" translate="info_title_1"></h3> <h3 class="title-section" translate="info_title_1"></h3>
<div class="social-networks"> <div class="social-networks">
<a target="_system" href='{{"instagram_link"|translate}}'> <a ng-href='{{"instagram_link"|translate}}' onclick="window.open(this.href, '_system', 'location=yes'); return false;">
<img src="img/instagram.png"> <img src="img/instagram.png">
<p>Instagram</p> <p>Instagram</p>
</a> </a>
<a target="_system" href='{{"facebook_link"|translate}}'> <a ng-href='{{"facebook_link"|translate}}' onclick="window.open(this.href, '_system', 'location=yes'); return false;">
<img src="img/facebook.png"> <img src="img/facebook.png">
<p>Facebook</p> <p>Facebook</p>
</a> </a>
<a target="_system" href='{{"twitter_link"|translate}}'> <a ng-href='{{"twitter_link"|translate}}' onclick="window.open(this.href, '_system', 'location=yes'); return false;">
<img src="img/twitter.png"> <img src="img/twitter.png">
<p>Twitter</p> <p>Twitter</p>
</a> </a>
</div> </div>
<h3 class="title-section" translate="info_title_2"></h3> <h3 class="title-section" translate="info_title_2"></h3>
<p class="content" translate="who_we_are"></p> <p class="content" translate="who_we_are_1"></p>
<p class="content" translate="who_we_are_2"></p>
<p class="content" translate="who_we_are_3"></p>
<p class="content" translate="who_we_are_4"></p>
<p class="content" translate="who_we_are_5"></p>
<h3 class="title-section" translate="info_title_3"></h3> <h3 class="title-section" translate="info_title_3"></h3>
<p class="content" translate="how_to_use"></p> <p class="content" translate="how_to_use_1"></p>
<h3 class="title-section" translate="info_title_4"></h3> <p class="content" translate="how_to_use_2"></p>
<p class="content" translate="legal_terms"></p> <p class="content" translate="how_to_use_3"></p>
<p class="content" translate="how_to_use_4"></p>
<p class="content" translate="how_to_use_5"></p>
</ion-content> </ion-content>
</ion-view> </ion-view>
...@@ -18,20 +18,45 @@ ...@@ -18,20 +18,45 @@
constantConfig, constantConfig,
$ionicHistory, $ionicHistory,
$scope, $scope,
$ionicLoading,
$http $http
) { ) {
/**
Scope variables
**/
$scope.locale = window.navigator.language.split('-')[0];
/**
End Scope variables
**/
/**
Controller variables
**/
this.status = []; this.status = [];
/**
End Controller variables
**/
/**
Static variables
**/
var self = this; var self = this;
var deregistrationCallbackList = []; var deregistrationCallbackList = [];
var uuid = window.cordova ? ionic.Platform.device().uuid : '7f4a6a40e5c87157';
var uuid = ''; /**
End Static variables
**/
if (window.cordova) { /**
uuid = ionic.Platform.device().uuid; Controller functions
} else { **/
uuid = '7f4a6a40e5c87158';
}
this.findNotificationStatus = function(id) { this.findNotificationStatus = function(id) {
var notificationStatus = 'read'; var notificationStatus = 'read';
...@@ -43,6 +68,14 @@ ...@@ -43,6 +68,14 @@
return notificationStatus; return notificationStatus;
}; };
/**
End Controller functions
**/
/**
Scope events
**/
deregistrationCallbackList.push( deregistrationCallbackList.push(
$scope.$on('$ionicView.afterEnter', function(){ $scope.$on('$ionicView.afterEnter', function(){
$ionicHistory.clearHistory(); $ionicHistory.clearHistory();
...@@ -60,6 +93,12 @@ ...@@ -60,6 +93,12 @@
deregistrationCallbackList = null; deregistrationCallbackList = null;
}); });
$scope.$on("$ionicView.beforeEnter", function(event, data){
$ionicLoading.show({
template: '<ion-spinner icon="ripple" class="spinner-assertive"></ion-spinner>',
animation: 'fade-in',
showBackdrop: true,
});
$http $http
.get(constantConfig.apiUrl + 'notifications/' + uuid) .get(constantConfig.apiUrl + 'notifications/' + uuid)
.then(function successCallback(response) { .then(function successCallback(response) {
...@@ -67,7 +106,14 @@ ...@@ -67,7 +106,14 @@
$scope.notifications = response['data']['notifications']; $scope.notifications = response['data']['notifications'];
}, function errorCallback() { }, function errorCallback() {
$scope.notifications = []; $scope.notifications = [];
}).finally(function () {
$ionicLoading.hide();
});
}); });
/**
End Scope events
**/
} }
angular.module('starter') angular.module('starter')
......
<ion-view cache-view="false" title="Notifications"> <ion-view cache-view="true" title="Notifications">
<ion-nav-buttons side="right"> <ion-nav-buttons side="right">
<img ui-sref="info" class="info-icon" src="img/info.png" alt="info"> <img ui-sref="info" class="info-icon" src="img/info.png" alt="info">
</ion-nav-buttons> </ion-nav-buttons>
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
<ion-item ng-repeat="notification in notifications" class="notification-item"> <ion-item ng-repeat="notification in notifications" class="notification-item">
<div class="title"> <div class="title">
<div ng-hide="notificationCtrl.findNotificationStatus(notification.id) == 'read'" class="green-circle"></div> <div ng-hide="notificationCtrl.findNotificationStatus(notification.id) == 'read'" class="green-circle"></div>
{{ notification.title }} {{ locale === 'fr' ? notification.french_title : notification.english_title }}
</div> </div>
<div class="date">{{notification.date | date: 'shortDate'}}</div> <div class="date">{{locale === 'fr' ? (notification.date | date: "dd/MM/yy") : (notification.date | date: "MM/dd/yy")}}</div>
<div class="content">{{ notification.content}}</div> <div class="content">{{ locale === 'fr' ? notification.french_content : notification.english_content}}</div>
</ion-item> </ion-item>
</ion-list> </ion-list>
</ion-content> </ion-content>
......
...@@ -18,49 +18,45 @@ ...@@ -18,49 +18,45 @@
$ionicHistory, $ionicHistory,
$scope, $scope,
$http, $http,
$q,
$ionicLoading,
PurchaseService,
constantConfig constantConfig
) { ) {
/**
Static variables
**/
var deregistrationCallbackList = []; var deregistrationCallbackList = [];
var products = PurchaseService.getProducts('tennis');
deregistrationCallbackList.push( /**
$scope.$on('$ionicView.afterEnter', function(){ End Controller variables
$ionicHistory.clearHistory(); **/
})
);
// cleanup /**
$scope.$on('$destroy', function(){ Scope variables
angular.forEach(deregistrationCallbackList, function(deregistrationCallback){ **/
deregistrationCallback();
});
deregistrationCallbackList = null;
});
$scope.pictureUrl = constantConfig.imgUrl; $scope.pictureUrl = constantConfig.imgUrl;
$scope.locale = window.navigator.language.split('-')[0];
$scope.selected = [];
$scope.price = 0;
$scope.predictionsNumber = 0;
$http /**
.get(constantConfig.apiUrl + 'predictions/tennis/free') End Scope variables
.then(function successCallback(response) { **/
$scope.freePredictions = response['data'];
}, function errorCallback() {
$scope.freePredictions = [];
});
$http /**
.get(constantConfig.apiUrl + 'leagues/tennis') Scope functions
.then(function successCallback(response) { **/
$scope.leagues = response['data'];
}, function errorCallback() {
$scope.leagues = [];
});
$scope.isBought = function (id) { $scope.isBought = function (id) {
return null; return null;
} }
$scope.selected = [];
$scope.price = 0;
$scope.isSelected = function (league) { $scope.isSelected = function (league) {
return $scope.selected.indexOf(league) !== -1; return $scope.selected.indexOf(league) !== -1;
} }
...@@ -69,11 +65,82 @@ ...@@ -69,11 +65,82 @@
if ($scope.isBought(league.id) === null) { if ($scope.isBought(league.id) === null) {
if ($scope.selected.indexOf(league) !== -1) { if ($scope.selected.indexOf(league) !== -1) {
$scope.selected.splice($scope.selected.indexOf(league), 1); $scope.selected.splice($scope.selected.indexOf(league), 1);
$scope.predictionsNumber -= league.predictionsNumber;
} else { } else {
$scope.selected.push(league); $scope.selected.push(league);
$scope.predictionsNumber += league.predictionsNumber;
}
}
}
$scope.getPredictionClass = function (prediction, value) {
var percentages = [
prediction.prediction_win_first,
prediction.prediction_win_second,
prediction.prediction_draw
];
percentages.sort();
if (percentages.indexOf(value) === 1) {
return "main-prediction";
}
return '';
} }
$scope.buyContent = function () {
var selectedPack = '';
if ($scope.selected.length === 1) {
selectedPack = 'tennis';
} else if($scope.selected.length > 1) {
selectedPack = 'tennis-full-'+ $scope.selected.length;
} }
} }
/**
End Scope functions
**/
/**
Scope events
**/
deregistrationCallbackList.push(
$scope.$on('$ionicView.afterEnter', function(){
$ionicHistory.clearHistory();
})
);
$scope.$on('$destroy', function(){
angular.forEach(deregistrationCallbackList, function(deregistrationCallback){
deregistrationCallback();
});
deregistrationCallbackList = null;
});
$scope.$on("$ionicView.beforeEnter", function(event, data){
$ionicLoading.show({
template: '<ion-spinner icon="ripple" class="spinner-assertive"></ion-spinner>',
animation: 'fade-in',
showBackdrop: true,
});
var freePredictionsPromise = $http.get(constantConfig.apiUrl + 'predictions/tennis/free');
var leaguesPromise = $http.get(constantConfig.apiUrl + 'leagues/tennis');
$q.all([freePredictionsPromise, leaguesPromise]).then(function (data) {
$scope.freePredictions = data[0]['data'];
$scope.leagues = data[1]['data'];
}).finally(function () {
$ionicLoading.hide();
});
});
/**
End Scope event
**/
} }
angular.module('starter') angular.module('starter')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment