Application Android et IOS pour l'amicale des élèves
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Update.js 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import i18n from "i18n-js";
  2. /**
  3. * Singleton used to manage update slides.
  4. * Must be a singleton because it uses translations.
  5. *
  6. * Change values in this class to change the update slide.
  7. * You will also need to update those translations:
  8. * <ul>
  9. * <li>intro.updateSlide.title</li>
  10. * <li>intro.updateSlide.text</li>
  11. * </ul>
  12. */
  13. export default class Update {
  14. // Increment the number to show the update slide
  15. static number = 5;
  16. // Change the icon to be displayed on the update slide
  17. static icon = 'surround-sound-2-0';
  18. static instance: Update | null = null;
  19. title: string;
  20. description: string;
  21. /**
  22. * Init translations
  23. */
  24. constructor() {
  25. this.title = i18n.t('intro.updateSlide.title');
  26. this.description = i18n.t('intro.updateSlide.text');
  27. }
  28. /**
  29. * Get this class instance or create one if none is found
  30. *
  31. * @returns {Update}
  32. */
  33. static getInstance(): Update {
  34. return Update.instance === null ?
  35. Update.instance = new Update() :
  36. Update.instance;
  37. }
  38. };