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

feat: add support for klipper runtime warnings #1809

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"DeprecatedOptionHeadline": "Deprecated Klipper Option",
"DeprecatedValue": "Value '{value}' in option '{option}' in section '{section}' is deprecated and will be removed in a future release.",
"DeprecatedValueHeadline": "Deprecated Klipper Value",
"KlipperRuntimeWarning": "Klipper runtime warning",
"KlipperWarning": "Klipper warning"
},
"MoonrakerWarnings": {
Expand Down
4 changes: 4 additions & 0 deletions src/store/gui/notifications/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ export const getters: GetterTree<GuiNotificationState, any> = {
if (warnings.length) {
const date = rootState.server.system_boot_at ?? new Date()

window.console.log(warnings)
meteyou marked this conversation as resolved.
Show resolved Hide resolved

// get all dismissed klipper warnings and convert it to a string[]
const warningsDismisses = rootGetters['gui/notifications/getDismissByCategory']('klipperWarning').map(
(dismiss: GuiNotificationStateDismissEntry) => {
Expand All @@ -293,6 +295,8 @@ export const getters: GetterTree<GuiNotificationState, any> = {
} else if (warning.type === 'deprecated_option') {
title = i18n.t('App.Notifications.KlipperWarnings.DeprecatedOptionHeadline').toString()
description = i18n.t('App.Notifications.KlipperWarnings.DeprecatedOption', warning).toString()
} else if (warning.type === 'runtime_warning') {
title = i18n.t('App.Notifications.KlipperWarnings.KlipperRuntimeWarning').toString()
}

// generate url to mainsail docs to fix this warning
Expand Down
Loading