Skip to content

Commit

Permalink
feat: add support for klipper runtime warnings (#1809)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteyou authored Apr 5, 2024
1 parent 92cdbdd commit 98d9d8c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
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
2 changes: 2 additions & 0 deletions src/store/gui/notifications/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,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
2 changes: 1 addition & 1 deletion src/store/printer/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export interface PrinterStateKlipperConfigWarning {
message: string
option: string
section: string
type: 'deprecated_value' | 'deprecated_option'
type: 'deprecated_value' | 'deprecated_option' | 'runtime_warning'
value: string
}

Expand Down

0 comments on commit 98d9d8c

Please sign in to comment.