Browse Source

Updated links to new server and changed proximo main screen sort order

keplyx 4 years ago
parent
commit
3f7f9551aa

+ 1
- 1
README.md View File

@@ -13,7 +13,7 @@ Ce dépot contient les source de cette application, modifiable par les étudiant
13 13
 
14 14
 Si vous voulez influencer le développement ? C'est très simple !
15 15
 
16
-Pas besoin de connaissance, il est possible d'aider simplement en proposant des améliorations ou en rapportant des bugs par mail (vergnet@etud.insa-toulouse.fr) ou sur [cette page](https://git.srv-falcon.etud.insa-toulouse.fr/vergnet/application-amicale/issues), en vous connectant avec vos login INSA.
16
+Pas besoin de connaissance, il est possible d'aider simplement en proposant des améliorations ou en rapportant des bugs par mail (vergnet@etud.insa-toulouse.fr) ou sur [cette page](https://git.etud.insa-toulouse.fr/vergnet/application-amicale/issues), en vous connectant avec vos login INSA.
17 17
 
18 18
 Si vous avez assez de connaissances et vous souhaitez proposer des modification dans le code, installez l'application sur votre machine, réalisez votre modification et créez une 'pull request'.
19 19
 

+ 4
- 4
screens/About/AboutScreen.js View File

@@ -15,7 +15,7 @@ import ThemeManager from "../../utils/ThemeManager";
15 15
 const links = {
16 16
     appstore: 'https://apps.apple.com/us/app/campus-amicale-insat/id1477722148',
17 17
     playstore: 'https://play.google.com/store/apps/details?id=fr.amicaleinsat.application',
18
-    git: 'https://git.srv-falcon.etud.insa-toulouse.fr/vergnet/application-amicale/src/branch/master/README.md',
18
+    git: 'https://git.etud.insa-toulouse.fr/vergnet/application-amicale/src/branch/master/README.md',
19 19
     bugsMail: 'mailto:vergnet@etud.insa-toulouse.fr?' +
20 20
         'subject=' +
21 21
         '[BUG] Application Amicale INSA Toulouse' +
@@ -25,9 +25,9 @@ const links = {
25 25
         'Nature du problème :\n\n\n' +
26 26
         'Étapes pour reproduire ce pb :\n\n\n\n' +
27 27
         'Stp corrige le pb, bien cordialement.',
28
-    bugsGit: 'https://git.srv-falcon.etud.insa-toulouse.fr/vergnet/application-amicale/issues',
29
-    changelog: 'https://git.srv-falcon.etud.insa-toulouse.fr/vergnet/application-amicale/src/branch/master/Changelog.md',
30
-    license: 'https://git.srv-falcon.etud.insa-toulouse.fr/vergnet/application-amicale/src/branch/master/LICENSE',
28
+    bugsGit: 'https://git.etud.insa-toulouse.fr/vergnet/application-amicale/issues',
29
+    changelog: 'https://git.etud.insa-toulouse.fr/vergnet/application-amicale/src/branch/master/Changelog.md',
30
+    license: 'https://git.etud.insa-toulouse.fr/vergnet/application-amicale/src/branch/master/LICENSE',
31 31
     authorMail: "mailto:vergnet@etud.insa-toulouse.fr?" +
32 32
         "subject=" +
33 33
         "Application Amicale INSA Toulouse" +

+ 1
- 1
screens/HomeScreen.js View File

@@ -14,7 +14,7 @@ import DashboardItem from "../components/DashboardItem";
14 14
 
15 15
 const ICON_AMICALE = require('../assets/amicale.png');
16 16
 const NAME_AMICALE = 'Amicale INSA Toulouse';
17
-const DATA_URL = "https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/dashboard/dashboard_data.json";
17
+const DATA_URL = "https://etud.insa-toulouse.fr/~amicale_app/dashboard/dashboard_data.json";
18 18
 
19 19
 const SECTIONS_ID = [
20 20
     'dashboard',

+ 17
- 3
screens/Proximo/ProximoMainScreen.js View File

@@ -9,7 +9,7 @@ import FetchedDataSectionList from "../../components/FetchedDataSectionList";
9 9
 import ThemeManager from "../../utils/ThemeManager";
10 10
 import Touchable from "react-native-platform-touchable";
11 11
 
12
-const DATA_URL = "https://srv-falcon.etud.insa-toulouse.fr/~proximo/data/stock-v2.json";
12
+const DATA_URL = "https://etud.insa-toulouse.fr/~proximo/data/stock-v2.json";
13 13
 
14 14
 
15 15
 /**
@@ -23,7 +23,21 @@ export default class ProximoMainScreen extends FetchedDataSectionList {
23 23
     }
24 24
 
25 25
     static sortFinalData(a: Object, b: Object) {
26
-        return a.type.id - b.type.id;
26
+        let str1 = a.type.name.toLowerCase();
27
+        let str2 = b.type.name.toLowerCase();
28
+
29
+        // Make 'All' category with id -1 stick to the top
30
+        if (a.type.id === -1)
31
+            return -1;
32
+        if (b.type.id === -1)
33
+            return 1;
34
+
35
+        // Sort others by name ascending
36
+        if (str1 < str2)
37
+            return -1;
38
+        if (str1 > str2)
39
+            return 1;
40
+        return 0;
27 41
     }
28 42
 
29 43
     getHeaderTranslation() {
@@ -63,7 +77,7 @@ export default class ProximoMainScreen extends FetchedDataSectionList {
63 77
             let articles = fetchedData.articles;
64 78
             finalData.push({
65 79
                 type: {
66
-                    id: "0",
80
+                    id: -1,
67 81
                     name: i18n.t('proximoScreen.all'),
68 82
                     icon: 'star'
69 83
                 },

+ 1
- 1
screens/Proxiwash/ProxiwashScreen.js View File

@@ -13,7 +13,7 @@ import Touchable from "react-native-platform-touchable";
13 13
 import AsyncStorageManager from "../../utils/AsyncStorageManager";
14 14
 import * as Expo from "expo";
15 15
 
16
-const DATA_URL = "https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/washinsa/washinsa.json";
16
+const DATA_URL = "https://etud.insa-toulouse.fr/~amicale_app/washinsa/washinsa.json";
17 17
 
18 18
 const MACHINE_STATES = {
19 19
     "TERMINE": "0",

+ 1
- 1
screens/SelfMenuScreen.js View File

@@ -7,7 +7,7 @@ import ThemeManager from "../utils/ThemeManager";
7 7
 import i18n from "i18n-js";
8 8
 import FetchedDataSectionList from "../components/FetchedDataSectionList";
9 9
 
10
-const DATA_URL = "https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/menu/menu_data.json";
10
+const DATA_URL = "https://etud.insa-toulouse.fr/~amicale_app/menu/menu_data.json";
11 11
 
12 12
 /**
13 13
  * Class defining the app's menu screen.

+ 2
- 2
screens/Websites/AvailableRoomScreen.js View File

@@ -12,8 +12,8 @@ type Props = {
12 12
 const ROOM_URL = 'http://planex.insa-toulouse.fr/salles.php';
13 13
 const PC_URL = 'http://planex.insa-toulouse.fr/sallesInfo.php';
14 14
 const BIB_URL = 'https://bibbox.insa-toulouse.fr/';
15
-const CUSTOM_CSS_GENERAL = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/custom_css/rooms/customMobile.css';
16
-const CUSTOM_CSS_Bib = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/custom_css/rooms/customBibMobile.css';
15
+const CUSTOM_CSS_GENERAL = 'https://etud.insa-toulouse.fr/~amicale_app/custom_css/rooms/customMobile.css';
16
+const CUSTOM_CSS_Bib = 'https://etud.insa-toulouse.fr/~amicale_app/custom_css/rooms/customBibMobile.css';
17 17
 
18 18
 /**
19 19
  * Class defining the app's planex screen.

+ 1
- 1
screens/Websites/BlueMindScreen.js View File

@@ -11,7 +11,7 @@ type Props = {
11 11
 
12 12
 const URL = 'https://etud-mel.insa-toulouse.fr/webmail/';
13 13
 
14
-const CUSTOM_CSS_GENERAL = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/custom_css/bluemind/customMobile.css';
14
+const CUSTOM_CSS_GENERAL = 'https://etud.insa-toulouse.fr/~amicale_app/custom_css/bluemind/customMobile.css';
15 15
 
16 16
 
17 17
 /**

+ 1
- 1
screens/Websites/ElusEtudScreen.js View File

@@ -8,7 +8,7 @@ type Props = {
8 8
 }
9 9
 
10 10
 
11
-const URL = 'https://srv-falcon.etud.insa-toulouse.fr/~eeinsat/';
11
+const URL = 'https://etud.insa-toulouse.fr/~eeinsat/';
12 12
 
13 13
 /**
14 14
  * Class defining the app's planex screen.

+ 2
- 2
screens/Websites/EntScreen.js View File

@@ -11,12 +11,12 @@ type Props = {
11 11
 
12 12
 const URL = 'https://ent.insa-toulouse.fr/';
13 13
 
14
-const CUSTOM_CSS_GENERAL = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/custom_css/ent/customMobile.css';
14
+const CUSTOM_CSS_GENERAL = 'https://etud.insa-toulouse.fr/~amicale_app/custom_css/ent/customMobile.css';
15 15
 
16 16
 // let stylesheet = document.createElement('link');
17 17
 // stylesheet.type = 'text/css';
18 18
 // stylesheet.rel = 'stylesheet';
19
-// stylesheet.href = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/custom_css/ent/customMobile.css';
19
+// stylesheet.href = 'https://etud.insa-toulouse.fr/~amicale_app/custom_css/ent/customMobile.css';
20 20
 // let mobileSpec = document.createElement('meta');
21 21
 // mobileSpec.name = 'viewport';
22 22
 // mobileSpec.content = 'width=device-width, initial-scale=1.0';

+ 2
- 2
screens/Websites/PlanexScreen.js View File

@@ -11,8 +11,8 @@ type Props = {
11 11
 
12 12
 const PLANEX_URL = 'http://planex.insa-toulouse.fr/';
13 13
 
14
-const CUSTOM_CSS_GENERAL = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/custom_css/planex/customMobile3.css';
15
-const CUSTOM_CSS_NIGHTMODE = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/custom_css/planex/customDark2.css';
14
+const CUSTOM_CSS_GENERAL = 'https://etud.insa-toulouse.fr/~amicale_app/custom_css/planex/customMobile3.css';
15
+const CUSTOM_CSS_NIGHTMODE = 'https://etud.insa-toulouse.fr/~amicale_app/custom_css/planex/customDark2.css';
16 16
 
17 17
 // // JS + JQuery functions used to remove alpha from events. Copy paste in browser console for quick testing
18 18
 // // Remove alpha from given Jquery node

+ 1
- 1
screens/Websites/WiketudScreen.js View File

@@ -8,7 +8,7 @@ type Props = {
8 8
 }
9 9
 
10 10
 
11
-const URL = 'https://www.etud.insa-toulouse.fr/wiketud';
11
+const URL = 'https://wiki.etud.insa-toulouse.fr/';
12 12
 
13 13
 /**
14 14
  * Class defining the app's planex screen.

+ 1
- 1
utils/NotificationsManager.js View File

@@ -6,7 +6,7 @@ import AsyncStorageManager from "./AsyncStorageManager";
6 6
 import LocaleManager from "./LocaleManager";
7 7
 import passwords from "../passwords";
8 8
 
9
-const EXPO_TOKEN_SERVER = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/expo_notifications/save_token.php';
9
+const EXPO_TOKEN_SERVER = 'https://etud.insa-toulouse.fr/~amicale_app/expo_notifications/save_token.php';
10 10
 
11 11
 /**
12 12
  * Static class used to manage notifications sent to the user

Loading…
Cancel
Save