mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-24 12:05:16 +00:00
DashboardView - use proper Functions
This commit is contained in:
parent
739c79faf3
commit
0fb6dfc812
|
@ -166,10 +166,10 @@ const botStore = useBotStore();
|
||||||
const layoutStore = useLayoutStore();
|
const layoutStore = useLayoutStore();
|
||||||
const currentBreakpoint = ref('');
|
const currentBreakpoint = ref('');
|
||||||
|
|
||||||
const breakpointChanged = (newBreakpoint: string) => {
|
function breakpointChanged(newBreakpoint: string) {
|
||||||
// console.log('breakpoint:', newBreakpoint);
|
// console.log('breakpoint:', newBreakpoint);
|
||||||
currentBreakpoint.value = newBreakpoint;
|
currentBreakpoint.value = newBreakpoint;
|
||||||
};
|
}
|
||||||
const isResizableLayout = computed(() =>
|
const isResizableLayout = computed(() =>
|
||||||
['', 'sm', 'md', 'lg', 'xl'].includes(currentBreakpoint.value),
|
['', 'sm', 'md', 'lg', 'xl'].includes(currentBreakpoint.value),
|
||||||
);
|
);
|
||||||
|
@ -184,13 +184,13 @@ const gridLayoutData = computed((): GridItemData[] => {
|
||||||
return [...layoutStore.getDashboardLayoutSm];
|
return [...layoutStore.getDashboardLayoutSm];
|
||||||
});
|
});
|
||||||
|
|
||||||
const layoutUpdatedEvent = (newLayout) => {
|
function layoutUpdatedEvent(newLayout) {
|
||||||
if (isResizableLayout.value) {
|
if (isResizableLayout.value) {
|
||||||
console.log('newlayout', newLayout);
|
console.log('newlayout', newLayout);
|
||||||
console.log('saving dashboard');
|
console.log('saving dashboard');
|
||||||
layoutStore.dashboardLayout = newLayout;
|
layoutStore.dashboardLayout = newLayout;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
const gridLayoutDaily = computed((): GridItemData => {
|
const gridLayoutDaily = computed((): GridItemData => {
|
||||||
return findGridLayout(gridLayoutData.value, DashboardLayout.dailyChart);
|
return findGridLayout(gridLayoutData.value, DashboardLayout.dailyChart);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user