Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
expdsn | 7e68ebb505 | |
expdsn | 303e1166a8 | |
expdsn | 7b0e992c98 | |
expdsn | 3a40fa7a25 | |
expdsn | f20e662bfa | |
expdsn | db9089c799 |
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
|
@ -31,7 +31,7 @@ const router = useRouterStore()
|
|||
const layout = useLayoutStore()
|
||||
</script>
|
||||
<template>
|
||||
<!-- <ConfigProvider :locale="zhCN"> -->
|
||||
<ConfigProvider :locale="zhCN">
|
||||
<div class="fixed left-0 top-0 w-full h-screen style-root" @contextmenu.prevent>
|
||||
<Header />
|
||||
<Background
|
||||
|
@ -78,7 +78,7 @@ const layout = useLayoutStore()
|
|||
<BackupRecovery v-if="router.path === 'global-backup'"></BackupRecovery>
|
||||
</div>
|
||||
<ModalPgae />
|
||||
<!-- </ConfigProvider> -->
|
||||
</ConfigProvider>
|
||||
</template>
|
||||
|
||||
<style lang="less">
|
||||
|
|
|
@ -9,6 +9,8 @@ import useRouterStore from '@/useRouterStore'
|
|||
import useSearchStore from '@/layout/header/search/useSearchStore'
|
||||
import useLayoutStore from '@/layout/useLayoutStore'
|
||||
import { sendParent } from '@/utils/parent'
|
||||
import FoxImg from '~/fox.jpg'
|
||||
import clsx from 'clsx'
|
||||
|
||||
const stageStrList = [
|
||||
'dazhaohu',
|
||||
|
@ -122,7 +124,17 @@ export default defineComponent(() => {
|
|||
}
|
||||
)
|
||||
return () => (
|
||||
<>
|
||||
<img
|
||||
src={FoxImg}
|
||||
onClick={() => {
|
||||
run('aixin')
|
||||
sendParent(['openSide'])
|
||||
}}
|
||||
class={clsx('cursor-pointer fixed w-[40px] right-0 bottom-10 ', layout.isCompact ? 'block' : 'hidden')}
|
||||
></img>
|
||||
<canvas
|
||||
class={clsx(layout.isCompact ? 'hidden' : 'block')}
|
||||
ref={(el) => (container = el as any)}
|
||||
onMouseenter={() => {
|
||||
run('dianji')
|
||||
|
@ -132,5 +144,6 @@ export default defineComponent(() => {
|
|||
sendParent(['openSide'])
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
})
|
||||
|
|
|
@ -97,7 +97,6 @@ export const LinkItem = defineComponent({
|
|||
w: 1,
|
||||
h: 1
|
||||
})
|
||||
globalToast.success('添加成功')
|
||||
} else {
|
||||
layout.addBlock(
|
||||
{
|
||||
|
@ -118,6 +117,7 @@ export const LinkItem = defineComponent({
|
|||
layout.state.currentPage = addTo?.value
|
||||
}
|
||||
}
|
||||
globalToast.success('添加成功')
|
||||
}}
|
||||
>
|
||||
添加
|
||||
|
|
|
@ -5,6 +5,7 @@ import clsx from 'clsx'
|
|||
import { AddToToken } from './AdderPage'
|
||||
import { v4 as uuid } from 'uuid'
|
||||
import useAdderPageStore from './useAdderPageStore'
|
||||
import { globalToast } from '@/main'
|
||||
|
||||
export const WidgetItem = defineComponent({
|
||||
props: {
|
||||
|
@ -105,6 +106,8 @@ export const WidgetItem = defineComponent({
|
|||
},
|
||||
addTo?.value
|
||||
)
|
||||
globalToast.success('添加成功')
|
||||
|
||||
}}
|
||||
>
|
||||
添加
|
||||
|
|
|
@ -9,22 +9,28 @@ import { sendParent } from '@/utils/parent'
|
|||
export default defineComponent({
|
||||
setup() {
|
||||
const settings = useSettingsStore()
|
||||
const layout = useLayoutStore()
|
||||
watch(
|
||||
() => ({
|
||||
autoSearch: settings.state.autoUseAi === 'show',
|
||||
autoSearch: settings.state.autoUseAi === 'auto',
|
||||
showTabButton: settings.state.showPetOnTab,
|
||||
isSearch: settings.state.autoUseAi === ''
|
||||
ifSearch: settings.state.autoUseAi !== ''
|
||||
}),
|
||||
(val) => {
|
||||
|
||||
sendParent([
|
||||
'configAI',
|
||||
{
|
||||
autoSearch: val.autoSearch,
|
||||
showTabButton: val.showTabButton,
|
||||
isSearch: val.isSearch
|
||||
ifSearch: val.ifSearch
|
||||
}
|
||||
])
|
||||
console.log({
|
||||
autoSearch: val.autoSearch,
|
||||
showTabButton: val.showTabButton,
|
||||
ifSearch: val.ifSearch
|
||||
});
|
||||
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
|
@ -57,6 +63,21 @@ export default defineComponent({
|
|||
>
|
||||
功能开关
|
||||
</span>
|
||||
<SettingItem
|
||||
v-slots={{
|
||||
label: () => <div>侧边栏助手</div>
|
||||
}}
|
||||
desc="浏览其它网页时的侧边栏功能"
|
||||
noRoundedT
|
||||
>
|
||||
<Switch
|
||||
checked={settings.state.showPetOnTab}
|
||||
onUpdate:checked={(e) => {
|
||||
if (e) settings.state.showPetOnTab = true
|
||||
else settings.state.showPetOnTab = false
|
||||
}}
|
||||
/>
|
||||
</SettingItem>
|
||||
<SettingItem
|
||||
v-slots={{
|
||||
label: () => <div>标签页助手</div>
|
||||
|
@ -72,21 +93,7 @@ export default defineComponent({
|
|||
}}
|
||||
/>
|
||||
</SettingItem>
|
||||
<SettingItem
|
||||
v-slots={{
|
||||
label: () => <div>标签页助手</div>
|
||||
}}
|
||||
desc="fatfox标签页内的小助手"
|
||||
noRoundedT
|
||||
>
|
||||
<Switch
|
||||
checked={settings.state.showPetOnTab}
|
||||
onUpdate:checked={(e) => {
|
||||
if (e) settings.state.showPetOnTab = true
|
||||
else settings.state.showPetOnTab = false
|
||||
}}
|
||||
/>
|
||||
</SettingItem>
|
||||
|
||||
<span
|
||||
class={clsx(
|
||||
'text-[14px] font-bold my-2',
|
||||
|
@ -110,7 +117,7 @@ export default defineComponent({
|
|||
/>
|
||||
</SettingItem>
|
||||
|
||||
<div
|
||||
{/* <div
|
||||
class={clsx('flex w-full py-2 px-3 rounded-lg flex-col', {
|
||||
'bg-black/5': useLayoutStore().state.current !== 0,
|
||||
'bg-white/10': useLayoutStore().state.current === 0
|
||||
|
@ -125,14 +132,11 @@ export default defineComponent({
|
|||
desc="每次搜索直接询问fatfox"
|
||||
>
|
||||
<Radio
|
||||
checked={settings.state.autoUseAi === 'show'}
|
||||
checked={settings.state.autoUseAi === 'auto'}
|
||||
onClick={() => {
|
||||
settings.state.autoUseAi = 'show'
|
||||
}}
|
||||
onUpdate:checked={(e) => {
|
||||
if (e) settings.state.showSider = 'auto'
|
||||
else settings.state.showSider = 'show'
|
||||
settings.state.autoUseAi = 'auto'
|
||||
}}
|
||||
|
||||
/>
|
||||
</SettingItem>
|
||||
<SettingItem
|
||||
|
@ -143,13 +147,13 @@ export default defineComponent({
|
|||
desc="每次搜索,提示您进行手动查询"
|
||||
>
|
||||
<Radio
|
||||
checked={settings.state.autoUseAi === 'auto'}
|
||||
checked={settings.state.autoUseAi === 'show'}
|
||||
onClick={() => {
|
||||
settings.state.autoUseAi = 'auto'
|
||||
settings.state.autoUseAi = 'show'
|
||||
}}
|
||||
/>
|
||||
</SettingItem>
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -133,6 +133,8 @@ export default defineStore('user', () => {
|
|||
Object.assign(layout.state.content, remoteData.value.content)
|
||||
Object.assign(layout.state.dock, remoteData.value.dock)
|
||||
Object.assign(layout.state.dir, remoteData.value.dir)
|
||||
layout.state.current = remoteData.value.current
|
||||
layout.state.currentPage = remoteData.value.currentPage
|
||||
}
|
||||
const updateProfile = () => {
|
||||
request('PUT', '/api/profile', {
|
||||
|
|
|
@ -9,9 +9,10 @@ export function sendParent(
|
|||
{
|
||||
autoSearch: boolean
|
||||
showTabButton: boolean
|
||||
isSearch: boolean
|
||||
ifSearch: boolean
|
||||
}
|
||||
]
|
||||
| ['information', string]
|
||||
) {
|
||||
parent.window.postMessage(
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@ export default defineComponent(() => {
|
|||
'w-full bg-white/20 text-center rounded text-[14px] overflow-hidden text-ellipsis whitespace-nowrap'
|
||||
}
|
||||
>
|
||||
{store.state.list ? store.state.list.filter((val) => !val.isCompleted).pop()?.title : '无目标'}
|
||||
{store.state.list.length !== 0 ? store.state.list.filter((val) => !val.isCompleted).pop()?.title : '无目标'}
|
||||
</div>
|
||||
<span class={'text-[42px] mb-1'}>
|
||||
{store.state.beginTime < 0 ? '15:00' : formatSeconds(store.remainingTime)}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { sendParent } from "@/utils/parent";
|
||||
import { generateRandomString } from "@/utils/tool";
|
||||
import useTimeStore from "@/utils/useTimeStore";
|
||||
import dayjs from "dayjs";
|
||||
import { defineStore } from "pinia";
|
||||
|
@ -97,10 +99,13 @@ export default defineStore("work", () => {
|
|||
stopTomatoTime()
|
||||
|
||||
}
|
||||
// sendParent(['information', '恭喜你完成了一个番茄钟' + generateRandomString(4)])
|
||||
|
||||
if (remainingTime.value === 0) {
|
||||
state.timeList.push(
|
||||
dayjs().valueOf()
|
||||
)
|
||||
sendParent(['information', '恭喜你完成了一个番茄钟'])
|
||||
}
|
||||
})
|
||||
const openShowModel = ref<undefined | null | TomatoTarget>()
|
||||
|
|
Loading…
Reference in New Issue