Skip to content

new option: CustomStyleSheet/CustomFavicon/EnableEdit#159

Merged
maikebing merged 3 commits intoIoTSharp:masterfrom
Bonnie2980:master
May 10, 2025
Merged

new option: CustomStyleSheet/CustomFavicon/EnableEdit#159
maikebing merged 3 commits intoIoTSharp:masterfrom
Bonnie2980:master

Conversation

@Bonnie2980
Copy link
Copy Markdown

No description provided.

@maikebing
Copy link
Copy Markdown
Member

If options. EnableEdit = true, click the "New" button on the "Job" "Trigger" page, and throw the following exception

HandlebarsDotNet.Compiler.HandlebarsUndefinedBindingException:“EnableEdit is undefined”

@maikebing maikebing requested a review from Copilot May 9, 2025 09:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces new configuration options—CustomStyleSheet, CustomFavicon, and EnableEdit—and integrates them into the UI rendering and authentication flow. Key changes include adding new Handlebars helpers, propagating the EnableEdit flag in multiple controllers and views, and updating sample projects to use custom static file middleware and configuration for assets.

Reviewed Changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/SilkierQuartz/Helpers/HandlebarsHelpers.cs Added Handlebars helpers for CustomStyleSheet and CustomFavicon.
src/SilkierQuartz/Controllers/*.cs Updated controllers to pass the EnableEdit option to views and models.
src/SilkierQuartz/Authorization/SilkierQuartzAuthenticationOptions.cs Modified authentication options to use instance properties instead of constants.
sample2/Program.cs & sample/Startup.cs Configured custom static files for the new CSS and favicon options and updated job registrations.
sample/Jobs/HelloJobAuto.cs Updated SilkierQuartz attribute parameters with additional grouping and description values.
Others Updated package versions and minor formatting fixes.
Comments suppressed due to low confidence (1)

sample/Jobs/HelloJobAuto.cs:11

  • The parameter name 'Desciption' appears to be a typo; consider renaming it to 'Description' for clarity and consistency.
[SilkierQuartz(5, Group = "example", Desciption = "this e sq test", TriggerDescription = "_hellojobauto", TriggerGroup = "SilkierQuartz")]

}
}

ViewBag.EnableEdit = EnableEdit;
Copy link

Copilot AI May 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The assignment 'ViewBag.EnableEdit = EnableEdit' is repeated in multiple controllers. Consider centralizing this logic in a base controller or helper method to reduce duplication.

Copilot uses AI. Check for mistakes.
@maikebing maikebing merged commit 4d61da0 into IoTSharp:master May 10, 2025
2 checks passed
maikebing added a commit that referenced this pull request May 10, 2025
…" "Trigger" page, and throw the following exception #159
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants