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.
44 lines
1.5 KiB
44 lines
1.5 KiB
import * as riot from 'riot'
|
|
|
|
import TinyLoading from '@tiny-components/loading/src/loading.riot'
|
|
import TinySidebarFormHeader from './forms/header.riot'
|
|
import TinySidebarFormFooter from './forms/footer.riot'
|
|
import TinyNotification from '@tiny-components/notification/src/notification.riot'
|
|
import TinyConfirm from '@tiny-components/confirm/src/confirm.riot'
|
|
|
|
import FieldError from '@tiny-components/validator/src/fieldError.riot'
|
|
|
|
import potatoAppsView from './views/apps.riot'
|
|
import potatoFieldTags from './components/fields/tags.riot'
|
|
import potatoCloseButton from './components/closeButton.riot'
|
|
|
|
// register & mount riot component
|
|
riot.register('field-error', FieldError)
|
|
|
|
riot.register('tiny-loading', TinyLoading)
|
|
riot.register('tiny-sidebar-form-header', TinySidebarFormHeader)
|
|
riot.register('tiny-sidebar-form-footer', TinySidebarFormFooter)
|
|
riot.register('tiny-notification', TinyNotification)
|
|
riot.register('tiny-confirm', TinyConfirm)
|
|
|
|
riot.register('potato-field-tags', potatoFieldTags)
|
|
riot.register('potato-apps-view', potatoAppsView)
|
|
riot.register('potato-close-button', potatoCloseButton)
|
|
|
|
riot.mount('potato-apps-view')
|
|
riot.mount('tiny-notification')
|
|
riot.mount('tiny-confirm')
|
|
|
|
// workaround to prevent a stack overflow
|
|
window._arrayBufferToBase64 = function _arrayBufferToBase64(buffer) {
|
|
var binary = '';
|
|
|
|
var bytes = new Uint8Array(buffer);
|
|
var len = bytes.byteLength;
|
|
|
|
for (var i = 0; i < len; i++) {
|
|
binary += String.fromCharCode(bytes[i]);
|
|
}
|
|
|
|
return window.btoa(binary);
|
|
} |