initial commit with charts and assistant chat
This commit is contained in:
20
web/src/stores/chart.ts
Normal file
20
web/src/stores/chart.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
|
||||
export interface ChartState {
|
||||
symbol: string
|
||||
start_time: number | null
|
||||
end_time: number | null
|
||||
interval: string
|
||||
}
|
||||
|
||||
export const useChartStore = defineStore('ChartStore', () => {
|
||||
const chart_state = ref<ChartState>({
|
||||
symbol: 'BINANCE:BTC/USDT',
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
interval: '15'
|
||||
})
|
||||
|
||||
return { chart_state }
|
||||
})
|
||||
12
web/src/stores/counter.ts
Normal file
12
web/src/stores/counter.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { ref, computed } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useCounterStore = defineStore('counter', () => {
|
||||
const count = ref(0)
|
||||
const doubleCount = computed(() => count.value * 2)
|
||||
function increment() {
|
||||
count.value++
|
||||
}
|
||||
|
||||
return { count, doubleCount, increment }
|
||||
})
|
||||
Reference in New Issue
Block a user