forked from vergnet/application-amicale
Improve constants to match linter
This commit is contained in:
parent
aa992d20b2
commit
7ac62b99f4
3 changed files with 69 additions and 73 deletions
|
@ -1,13 +1,13 @@
|
||||||
export default {
|
export default {
|
||||||
websites: {
|
websites: {
|
||||||
AMICALE: "https://www.amicale-insat.fr/",
|
AMICALE: 'https://www.amicale-insat.fr/',
|
||||||
AVAILABLE_ROOMS: "http://planex.insa-toulouse.fr/salles.php",
|
AVAILABLE_ROOMS: 'http://planex.insa-toulouse.fr/salles.php',
|
||||||
BIB: "https://bibbox.insa-toulouse.fr/",
|
BIB: 'https://bibbox.insa-toulouse.fr/',
|
||||||
BLUEMIND: "https://etud-mel.insa-toulouse.fr/webmail/",
|
BLUEMIND: 'https://etud-mel.insa-toulouse.fr/webmail/',
|
||||||
ELUS_ETUDIANTS: "https://etud.insa-toulouse.fr/~eeinsat/",
|
ELUS_ETUDIANTS: 'https://etud.insa-toulouse.fr/~eeinsat/',
|
||||||
ENT: "https://ent.insa-toulouse.fr/",
|
ENT: 'https://ent.insa-toulouse.fr/',
|
||||||
INSA_ACCOUNT: "https://moncompte.insa-toulouse.fr/",
|
INSA_ACCOUNT: 'https://moncompte.insa-toulouse.fr/',
|
||||||
TUTOR_INSA: "https://www.etud.insa-toulouse.fr/~tutorinsa/",
|
TUTOR_INSA: 'https://www.etud.insa-toulouse.fr/~tutorinsa/',
|
||||||
WIKETUD: "https://wiki.etud.insa-toulouse.fr/",
|
WIKETUD: 'https://wiki.etud.insa-toulouse.fr/',
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
export default {
|
export default {
|
||||||
machineStates: {
|
machineStates: {
|
||||||
"AVAILABLE": 0,
|
AVAILABLE: 0,
|
||||||
"RUNNING": 1,
|
RUNNING: 1,
|
||||||
"RUNNING_NOT_STARTED": 2,
|
RUNNING_NOT_STARTED: 2,
|
||||||
"FINISHED": 3,
|
FINISHED: 3,
|
||||||
"UNAVAILABLE": 4,
|
UNAVAILABLE: 4,
|
||||||
"ERROR": 5,
|
ERROR: 5,
|
||||||
"UNKNOWN": 6,
|
UNKNOWN: 6,
|
||||||
},
|
},
|
||||||
stateIcons: {
|
stateIcons: {
|
||||||
0: 'radiobox-blank',
|
0: 'radiobox-blank',
|
||||||
1: 'progress-check',
|
1: 'progress-check',
|
||||||
2: 'alert-circle-outline',
|
2: 'alert-circle-outline',
|
||||||
3: 'check-circle',
|
3: 'check-circle',
|
||||||
4: 'alert-octagram-outline',
|
4: 'alert-octagram-outline',
|
||||||
5: 'alert',
|
5: 'alert',
|
||||||
6: 'help-circle-outline',
|
6: 'help-circle-outline',
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import i18n from "i18n-js";
|
import i18n from 'i18n-js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Singleton used to manage update slides.
|
* Singleton used to manage update slides.
|
||||||
|
@ -14,51 +14,47 @@ import i18n from "i18n-js";
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
export default class Update {
|
export default class Update {
|
||||||
|
// Increment the number to show the update slide
|
||||||
|
static number = 6;
|
||||||
|
|
||||||
// Increment the number to show the update slide
|
// Change the number of slides to display
|
||||||
static number = 6;
|
static slidesNumber = 4;
|
||||||
// Change the number of slides to display
|
|
||||||
static slidesNumber = 4;
|
|
||||||
// Change the icons to be displayed on the update slide
|
|
||||||
static iconList = [
|
|
||||||
'star',
|
|
||||||
'clock',
|
|
||||||
'qrcode-scan',
|
|
||||||
'account',
|
|
||||||
];
|
|
||||||
static colorsList = [
|
|
||||||
['#e01928', '#be1522'],
|
|
||||||
['#7c33ec', '#5e11d1'],
|
|
||||||
['#337aec', '#114ed1'],
|
|
||||||
['#e01928', '#be1522'],
|
|
||||||
]
|
|
||||||
|
|
||||||
static instance: Update | null = null;
|
// Change the icons to be displayed on the update slide
|
||||||
|
static iconList = ['star', 'clock', 'qrcode-scan', 'account'];
|
||||||
|
|
||||||
titleList: Array<string>;
|
static colorsList = [
|
||||||
descriptionList: Array<string>;
|
['#e01928', '#be1522'],
|
||||||
|
['#7c33ec', '#5e11d1'],
|
||||||
|
['#337aec', '#114ed1'],
|
||||||
|
['#e01928', '#be1522'],
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
static instance: Update | null = null;
|
||||||
* Init translations
|
|
||||||
*/
|
titleList: Array<string>;
|
||||||
constructor() {
|
|
||||||
this.titleList = [];
|
descriptionList: Array<string>;
|
||||||
this.descriptionList = [];
|
|
||||||
for (let i = 0; i < Update.slidesNumber; i++) {
|
/**
|
||||||
this.titleList.push(i18n.t('intro.updateSlide' + i + '.title'))
|
* Init translations
|
||||||
this.descriptionList.push(i18n.t('intro.updateSlide' + i + '.text'))
|
*/
|
||||||
}
|
constructor() {
|
||||||
|
this.titleList = [];
|
||||||
|
this.descriptionList = [];
|
||||||
|
for (let i = 0; i < Update.slidesNumber; i += 1) {
|
||||||
|
this.titleList.push(i18n.t(`intro.updateSlide${i}.title`));
|
||||||
|
this.descriptionList.push(i18n.t(`intro.updateSlide${i}.text`));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get this class instance or create one if none is found
|
* Get this class instance or create one if none is found
|
||||||
*
|
*
|
||||||
* @returns {Update}
|
* @returns {Update}
|
||||||
*/
|
*/
|
||||||
static getInstance(): Update {
|
static getInstance(): Update {
|
||||||
return Update.instance === null ?
|
if (Update.instance == null) Update.instance = new Update();
|
||||||
Update.instance = new Update() :
|
return Update.instance;
|
||||||
Update.instance;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
|
||||||
|
|
Loading…
Reference in a new issue