* refactor: reset dbCheckboxes Signed-off-by: Stefan Dej <meteyou@gmail.com> * refactor: rework moonraker db reset Signed-off-by: Stefan Dej <meteyou@gmail.com> * feat: add function to create a mainsail db backup Signed-off-by: Stefan Dej <meteyou@gmail.com> * refactor: fix type of dbCheckboxes Signed-off-by: Stefan Dej <meteyou@gmail.com> * refactor: first restore test Signed-off-by: Stefan Dej <meteyou@gmail.com> * feat: restore db from json file Signed-off-by: Stefan Dej <meteyou@gmail.com> * refactor: rework gui store Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: rework gui store issues Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: rework gui store issues with extruder panel Signed-off-by: Stefan Dej <meteyou@gmail.com> * refactor: rename gui/macrogroups to gui/macros and move back to mainsail namespace Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: ignore simple hide macros settings in expert macro mode Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: init load bug Signed-off-by: Stefan Dej <meteyou@gmail.com> * refactor: rename gui/consolefilter to gui/console and move back to mainsail namespace and update gui/macros Signed-off-by: Stefan Dej <meteyou@gmail.com> * refactor: remove old function in gui/macros Signed-off-by: Stefan Dej <meteyou@gmail.com> * refactor: rework gui/presets Signed-off-by: Stefan Dej <meteyou@gmail.com> * refactor: rework gui/gcodehistory Signed-off-by: Stefan Dej <meteyou@gmail.com> * refactor: add all gui restart actions in gui restart action Signed-off-by: Stefan Dej <meteyou@gmail.com> * refactor: rework gui/remoteprinters Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: control store gets Signed-off-by: Stefan Dej <meteyou@gmail.com> * refactor: rework reset moonraker db in interface settings Signed-off-by: Stefan Dej <meteyou@gmail.com> * refactor: rework backup moonraker DB Signed-off-by: Stefan Dej <meteyou@gmail.com> * refactor: rework restore moonraker db Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: backup/restore moonraker db locale Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: backup/restore moonraker db locale, add tempchart Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: change tempchart settings wrong store path Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: add view locale to db backup/restore and delete old locale Signed-off-by: Stefan Dej <meteyou@gmail.com> * feat: use /config/.theme/default.json when reset moonraker db to fill in default values after reset Signed-off-by: Stefan Dej <meteyou@gmail.com> * feat: use /config/.theme/default.json when mainsail will be loaded the first time Signed-off-by: Stefan Dej <meteyou@gmail.com> * refactor: add description to backup dialog Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: save macrogroup update Signed-off-by: Stefan Dej <meteyou@gmail.com>
39 lines
1.3 KiB
TypeScript
39 lines
1.3 KiB
TypeScript
import { GetterTree } from 'vuex'
|
|
import {GuiConsoleState, GuiConsoleStateFilter} from '@/store/gui/console/types'
|
|
import {caseInsensitiveSort} from '@/plugins/helpers'
|
|
import {timelapseConsoleFilters} from '@/store/variables'
|
|
|
|
// eslint-disable-next-line
|
|
export const getters: GetterTree<GuiConsoleState, any> = {
|
|
|
|
getConsolefilters:(state) => {
|
|
const consolefilters: GuiConsoleStateFilter[] = []
|
|
|
|
Object.keys(state.consolefilters).forEach((id: string) => {
|
|
consolefilters.push({...state.consolefilters[id], id})
|
|
})
|
|
|
|
return caseInsensitiveSort(consolefilters, 'name')
|
|
},
|
|
|
|
getConsolefilterRules:(state, getters, rootState) => {
|
|
const output = []
|
|
|
|
if (rootState.gui.console.hideWaitTemperatures)
|
|
output.push('^(?:ok\\s+)?(B|C|T\\d*):')
|
|
|
|
if (rootState.gui.console.hideTlCommands)
|
|
timelapseConsoleFilters.forEach((rule: string) => { output.push(rule) })
|
|
|
|
Object.keys(state.consolefilters).forEach((id: string) => {
|
|
const filter = state.consolefilters[id]
|
|
if (filter.bool) {
|
|
filter.regex.split('\n').forEach((rule: string) => {
|
|
if (rule !== '') output.push(rule)
|
|
})
|
|
}
|
|
})
|
|
|
|
return output
|
|
},
|
|
} |