Skip to content
Snippets Groups Projects
Select Git revision
  • fb24d4244969713924d31f869bb974b6cfbbc00a
  • main default protected
  • renovate/lock-file-maintenance
  • demo protected
  • person-select-custom
  • dbp-translation-component
  • icon-set-mapping
  • port-i18next-parser
  • remove-sentry
  • favorites-and-recent-files
  • revert-6c632dc6
  • lit2
  • advertisement
  • wc-part
  • automagic
  • publish
  • wip-cleanup
  • demo-file-handling
18 results

notification

  • Clone with SSH
  • Clone with HTTPS
  • Christoph Reiter's avatar
    Reiter, Christoph authored
    Since they are no longer in separate repos we no longer need the
    gitlab CI config files.
    d72b5d5b
    History

    Notification Web Component

    GitLab Repository

    Usage

    <dbp-notification></dbp-notification>

    Attributes

    • lang (optional, default: de): set to de or en for German or English
      • example <dbp-notification lang="de" client-id="my-client-id"></dbp-notification>

    Sending notifications

    import { send } from './notification';
    
    send({
        "summary": "Item deleted",
        "body": "Item foo was deleted!",
        "type": "info",
        "timeout": 5,
    });

    Local development

    # get the source
    git clone git@gitlab.tugraz.at:dbp/web-components/Notification.git
    cd Notification
    git submodule update --init
    
    # install dependencies (make sure you have npm version 4+ installed, so symlinks to the git submodules are created automatically)
    npm install
    
    # constantly build dist/bundle.js and run a local web-server on port 8002 
    npm run watch-local
    
    # run tests
    npm test

    Jump to http://localhost:8002 and you should get a demo page.