Skip to content
Jelle edited this page Nov 8, 2017 · 6 revisions

Some documentation for developers

The idea is that these pages will contain useful information for developers on the Paratii player. At the moment, it is just a start.

The place to start out in any case is the README file

Modals

Usage:

import { showModal, hideModal } from '/imports/lib/utils.js'
showModal('showSeed') // will open the 'showSeed' modal 
showModal('createNewWallet', {backdrop: 'static'}) // will open createNewWallet with the given options
hideModal() // will hide any open modal

Warnings and alerts

  • To call global alerts use the import { globalAlert } from '/imports/lib/utils.js'.
  • To call alerts inside the modal use the import { modalAlert } from '/imports/lib/utils.js'.

styles

  • globalAlert/modalAlert('<strong>Your message here</strong>. Some text in here') image

  • globalAlert/modalAlert('<strong>Your message here</strong>. Some text in here', 'success') image

  • globalAlert/modalAlert('<strong>Your message here</strong>. Some text in here', 'warning') image

  • globalAlert/modalAlert('<strong>Your message here</strong>. Some text in here', 'error') image

options

globalAlert('<strong>globalAlert</strong> and <strong>modalAlert</strong> You can <a href="/profile">go to a page</a> or <a href="/profile" data-showmodal="confirmLogout">open a modal</a> or <a href="/profile" data-showmodal="confirmLogout" data-closealert>open a modal and close the alert</a>', 'error')

  • href="/page" works fine;
  • data-showmodal="modaltemplate" on a to open a modal;
  • data-closealert to close the current alert.

image

Clone this wiki locally