How to use the solid-ui.widgets.errorMessageBlock function in solid-ui

To help you get started, we’ve selected a few solid-ui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github solid / solid-panes / src / profile / editProfilePane.source.ts View on Github external
heading('Edit your public profile')

        var profile = me.doc()
        if (store.any(subject, ns.solid('editableProfile'))) {
          // @@ TODO Remove the casting on next line
          editableProfile = store.any(
            subject,
            ns.solid('editableProfile')
          ) as NamedNode
          // @@ TODO Remove casting of store.updater
        } else if ((store.updater as any).editable(profile.uri, store)) {
          editableProfile = profile
        } else {
          statusArea.appendChild(
            widgets.errorMessageBlock(
              dom,
              `⚠️ Your profile ${profile} is not editable, so we cannot do much here.`,
              'straw'
            )
          )
          return
        }

        comment(`Everything you put here will be public.
     There will be other places to record private things..`)

        heading('Your contact information')

        main.appendChild(paneDiv(context, me, 'contact'))

        heading('People you know who have webids')
github solid / solid-panes / src / profile / profilePane.source.ts View on Github external
async function doRender (
      container: HTMLElement,
      subject: NamedNode | null,
      dom: HTMLDocument
    ) {
      if (!subject) throw new Error('subject missing')
      const profile = subject.doc()
      const otherProfiles = store.each(subject, ns.rdfs('seeAlso'), null, profile)
      if (otherProfiles.length > 0) {
        try {
          // @@ TODO Remove casting of store and store.fetcher.load
          await ((store as any).fetcher.load as any)(otherProfiles)
        } catch (err) {
          container.appendChild(widgets.errorMessageBlock(err))
        }
      }

      var backgroundColor =
        store.anyValue(
          subject,
          ns.solid('profileBackgroundColor'),
          null,
          subject.doc()
        ) || '#ffffff'
      // Todo: check format of color matches regexp and not too dark
      container.style.backgroundColor = backgroundColor // @@ Limit to pale?
      var highlightColor =
        store.anyValue(
          subject,
          ns.solid('profileHighlightColor', null, subject.doc())
github solid / solid-panes / src / profile / editProfilePane.ts View on Github external
heading('Edit your public profile')

        var profile = me.doc()
        if (store.any(subject, ns.solid('editableProfile'))) {
          // @@ TODO Remove the casting on next line
          editableProfile = store.any(
            subject,
            ns.solid('editableProfile')
          ) as NamedNode
          // @@ TODO Remove casting of store.updater
        } else if ((store.updater as any).editable(profile.uri, store)) {
          editableProfile = profile
        } else {
          statusArea.appendChild(
            widgets.errorMessageBlock(
              dom,
              `⚠️ Your profile ${profile} is not editable, so we cannot do much here.`,
              'straw'
            )
          )
          return
        }

        comment(`Everything you put here will be public.
     There will be other places to record private things..`)

        heading('Your contact information')

        main.appendChild(paneDiv(context, me, 'contact'))

        heading('People you know who have webids')
github solid / solid-panes / src / dashboard / trustedApplications / trustedApplicationsPane.ts View on Github external
(err: any) => {
      statusArea.appendChild(widgets.errorMessageBlock(dom, err))
    }
  )
github solid / solid-panes / src / pad / padPane.ts View on Github external
var complainIfBad = function (ok: boolean, message: string) {
      if (!ok) {
        div.appendChild(widgets.errorMessageBlock(dom, message, 'pink'))
      }
    }
github solid / solid-panes / src / dashboard / basicPreferences.source.ts View on Github external
function complainIfBad (ok: Boolean, mess: any) {
      if (ok) return
      container.appendChild(widgets.errorMessageBlock(dom, mess, '#fee'))
    }
github solid / solid-panes / src / profile / editProfilePane.source.ts View on Github external
function complainIfBad (ok: Boolean, mess: any) {
      if (ok) return
      div.appendChild(widgets.errorMessageBlock(dom, mess, '#fee'))
    }
github solid / solid-panes / src / profile / editProfilePane.source.ts View on Github external
(err: Error) => {
        statusArea.appendChild(widgets.errorMessageBlock(dom, err, '#fee'))
      }
    )
github solid / solid-panes / src / pad / padPane.source.ts View on Github external
var complainIfBad = function (ok: boolean, message: string) {
      if (!ok) {
        div.appendChild(widgets.errorMessageBlock(dom, message, 'pink'))
      }
    }