Function crypto_screener::modules::about::about_view

source ·
pub fn about_view(ctx: &Context<Model>) -> Html
Expand description

Renders the “About” modal for the WBTek Crypto Screener application.

This modal provides an overview of the application, including usage instructions, project links, and the full MIT License. It also includes interactive functionality for closing the modal through a close button.

§Parameters

  • ctx: A reference to the Yew [Context] associated with the main application Model. This provides access to the component’s context, allowing interaction through messages, such as closing the modal by sending Msg::ToggleAbout.

§Returns

Returns an [Html] object, representing the full HTML structure of the “About” modal.

§Structure

The modal includes the following sections:

  • A close button (×), which uses ctx.link().callback() to emit a message that closes the modal when clicked.
  • Header: Displays the title “About WBTek Crypto Screener.”
  • Application Instructions: Details how users can interact with the table headers to sort data and click individual cells to highlight them.
  • Project Links: Provides links to the source code and project documentation, along with the WBTek homepage, each opening in a new tab.
  • MIT License: Displays the full text of the MIT License to clarify usage rights and permissions associated with the software.

§Example

// Render the "About" modal in the application using the context `ctx`.
let about_html = about_view(ctx);

§See Also

  • [Context]: Yew documentation on component context for managing component state and interactions.
  • [Html]: Yew’s HTML type for representing HTML in Rust.
  • Msg::ToggleAbout: Message variant used to toggle the “About” modal on and off.