Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade the package #119

Merged
merged 29 commits into from
Feb 28, 2023
Merged

Upgrade the package #119

merged 29 commits into from
Feb 28, 2023

Conversation

mattesmohr
Copy link
Member

@mattesmohr mattesmohr commented Jan 10, 2023

This merge fixes the environment, adds new symbols and uses form validation.

Environment

The environment for HTMLKit will be now stored in the application storage of Vapor. This way, the environment stays cached.

Symbols

Symbol(system: "chart.pie")
Symbol(system: "clock")
Symbol(system: "envelope")
Symbol(system: "file")
Symbol(system: "folder")
Symbol(system: "house")
Symbol(system: "lock")
Symbol(system: "person")
Symbol(system: "photo")
Symbol(system: "text.aligncenter")
Symbol(system: "text.alignjustify")
Symbol(system: "text.alignleft")
Symbol(system: "text.alignright")

Form validation

Form(method: .post) {
   FieldLabel(for: "email") {
      "Email"
   }
   TextField(name: "email")
}
.onSubmit(perform: .validate("form", [Validator(field: "email"], rule: .value)])

To make the environment for htmlkit work, the manager needs to be cached in the application storage.
In a specific case the environment value didn't  get caught by the renderer.
@mattesmohr mattesmohr merged commit c811b23 into main Feb 28, 2023
@mattesmohr mattesmohr deleted the upgrade/htmlkit-3.0-2 branch February 28, 2023 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant