Swiftpack.co - Package - nodes-vapor/flash

Flash ⚡️

Swift Version Vapor Version Circle CI codebeat badge codecov Readme Score GitHub license

This package is to ease using flash message between your views

image

Installation

Update your Package.swift file.

.package(url: "https://github.com/nodes-vapor/flash.git", from: "2.0.0-beta")

Getting started 🚀

TODO. While we make the docs, feel free to look at how Admin Panel uses this package.

Example of HTML

The below example uses the Vapor 3 Bootstrap package for generating the alert html.

<div class="alerts">
#flash() {
    #for(flash in all) {
        #bs:alert(flash.bootstrapType) {
            #(flash.message)
        }
    }
}
</div>

Add the Flash html to one file and embed it in rest of your views or through a base layout, e.g.: #embed("alerts").

🏆 Credits

This package is developed and maintained by the Vapor team at Nodes. The package owner for this project is Brett.

📄 License

This package is open-sourced software licensed under the MIT license

Github

link
Stars: 13
Help us keep the lights on

Dependencies

Releases

2.0.0-beta.2 - May 4, 2018

Fixed

  • Made the EventLoopFuture extension public (thanks @mcdappdev)

2.0.0-beta.1 - May 4, 2018

Changed

  • More or less everything. This release supports Vapor 3 🎉

1.0.0 - May 18, 2017

  • Vapor 2 released 🎉

1.0.0-beta.1 - Apr 27, 2017

  • Ready for Vapor 2

0.1.0 - Jan 4, 2017

  • Initial release