-
Notifications
You must be signed in to change notification settings - Fork 11
Code
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
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
- 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'.
-
globalAlert/modalAlert('<strong>Your message here</strong>. Some text in here')
-
globalAlert/modalAlert('<strong>Your message here</strong>. Some text in here', 'success')
-
globalAlert/modalAlert('<strong>Your message here</strong>. Some text in here', 'warning')
-
globalAlert/modalAlert('<strong>Your message here</strong>. Some text in here', 'error')
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-closealertto close the current alert.
