-
Notifications
You must be signed in to change notification settings - Fork 11
Code
Paulo dos Santos edited this page Dec 14, 2017
·
6 revisions
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
import { showModal, hideModal } from '/imports/lib/utils.js'
showModal('showSeed') // will open the 'showSeed' modal
hideModal() // will hide any open modal
showModal('createNewWallet', {backdrop: 'static'}) // will open createNewWallet with the given options
showModal('editProfileInfo', { wrapperClass: 'wide'}) // to open a more "wide" modal(e.g. edit profile)
import {
showGlobalAlert, hideGlobalAlert
showModalAlert, hideModalAlert
} from '/imports/lib/utils.js'
showGlobalAlert('<strong>Your message here</strong>. Some text in here')
hideGlobalAlert()
showModalAlert('<strong>Your message here</strong>. Some text in here')
hideModalAlert()
showGlobalAlert('<strong>Your message here</strong>. Some text in here')
showModalAlert('<strong>Your message here</strong>. Some text in here')
showGlobalAlert('<strong>Your message here</strong>. Some text in here', 'success')
showModalAlert('<strong>Your message here</strong>. Some text in here', 'success')
showGlobalAlert('<strong>Your message here</strong>. Some text in here', 'warning')
showModalAlert('<strong>Your message here</strong>. Some text in here', 'warning')
showGlobalAlert('<strong>Your message here</strong>. Some text in here', 'error')
showModalAlert('<strong>Your message here</strong>. Some text in here', 'error')
showGlobalAlert('<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.
import { showLoader, hideLoader } from '/imports/lib/utils.js'
showLoader('Something is loading')
hideLoader()
let arrayPhrases = ['Your phrase one', 'Your phrase two', 'Your phrase three']
showLoader(arrayPhrases)
let phrases = ['Your phrase one', 'Your phrase two', 'Your phrase three']
let items = ['<strong>Your item</strong> here', 'Then you can add <strong>other item</strong> here', 'Another <strong>item</strong> here']
showLoader(phrases, items)