Sha256: dfe596d0d9f6c8d69357b8f5568cfc8accd18a23b7a88b72f3f1b9b429b6af2f

Contents?: true

Size: 539 Bytes

Versions: 6

Compression:

Stored size: 539 Bytes

Contents

<script type="text/javascript">
  var AppBridge = window['app-bridge'];

  var actions = AppBridge.actions;
  var Toast = actions.Toast;

  <% if flash[:notice] %>
    var notice = Toast.create(app, {
      message: "<%= flash[:notice] %>",
      duration: 5000
    });

    notice.dispatch(Toast.Action.SHOW);
  <% end %>

  <% if flash[:error] %>
    var notice = Toast.create(app, {
      message: "<%= flash[:error] %>",
      duration: 5000,
      isError: true,
    });

    notice.dispatch(Toast.Action.SHOW);
  <% end %>
</script>

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
sinatra-embedded-shopify-app-0.5.16 example/views/_flash_messages.erb
shopify-sinatra-app-1.1.1 example/views/_flash_messages.erb
shopify-sinatra-app-1.1.0 example/views/_flash_messages.erb
shopify-sinatra-app-1.0.1 example/views/_flash_messages.erb
shopify-sinatra-app-1.0.0 example/views/_flash_messages.erb
shopify-sinatra-app-0.12.0 example/views/_flash_messages.erb