Merge remote-tracking branch 'origin/tomato'

This commit is contained in:
plightfield 2024-11-04 14:36:43 +08:00
commit 38c07cb9ce
1 changed files with 44 additions and 25 deletions

View File

@ -1,30 +1,49 @@
import { defineStore } from "pinia"; import { defineStore } from 'pinia'
import { reactive, ref } from "vue"; import { computed, reactive, ref, watch } from 'vue'
export type TomatoTarget = { export type TomatoTarget = {
id: string; id: string
finishTime: number; finishTime: number
remindTime: number | null; remindTime: number | null
title: string; title: string
isCompleted: boolean; isCompleted: boolean
} }
export type TomatoTime = { export type TomatoTime = {
date: number; date: number
finishTime: number; finishTime: number
} }
export const musicList = [
export default defineStore("work", () => { {
const state = reactive({ name: 'A Part of Us',
list: [] as TomatoTarget[], music: 'https://newfatfox.oss-cn-beijing.aliyuncs.com/admin/music/aPartOfUs.mp3'
timeList: [] as TomatoTime[] },
{
}) name: 'a signal rose',
const openShowModel = ref<undefined | null | TomatoTarget>() music: 'https://newfatfox.oss-cn-beijing.aliyuncs.com/admin/music/AsignalRose.mp3'
const openFullscreen = ref(false) },
return { {
state, name: 'a thousand lifetimes',
openShowModel, music: 'https://newfatfox.oss-cn-beijing.aliyuncs.com/admin/music/aThousandLifetimes.mp3'
openFullscreen },
} {
name: 'A Very Brady Special',
music: 'https://newfatfox.oss-cn-beijing.aliyuncs.com/admin/music/AVeryBradySpecial.mp3'
},
{
name: 'A Wonderful Story',
music: 'https://newfatfox.oss-cn-beijing.aliyuncs.com/admin/music/AWonderfulStore.mp3'
}
]
export default defineStore('work', () => {
const state = reactive({
list: [] as TomatoTarget[],
timeList: [] as TomatoTime[]
})
const openShowModel = ref<undefined | null | TomatoTarget>()
const openFullscreen = ref(false)
return {
state,
openShowModel,
openFullscreen
}
}) })