khoogheem / flash

Flash messages between views ⚡️

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Flash messages between views ⚡️

License:MIT License


Languages

Language:Swift 100.0%