chore(version): 0.8.24
This commit is contained in:
parent
28a27447a5
commit
a230ee2c69
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "CherryStudio",
|
||||
"version": "0.8.23",
|
||||
"version": "0.8.24",
|
||||
"private": true,
|
||||
"description": "A powerful AI assistant for producer.",
|
||||
"main": "./out/main/index.js",
|
||||
|
||||
@ -173,7 +173,7 @@ body[os='mac'] {
|
||||
#content-container {
|
||||
border-top-left-radius: 12px;
|
||||
border-left: 0.5px solid var(--color-border);
|
||||
box-shadow: -2px 0px 24px -4px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: -2px 0px 20px -4px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,9 @@ export default function useUpdateHandler() {
|
||||
const removers = [
|
||||
ipcRenderer.on('update-not-available', () => {
|
||||
dispatch(setUpdateState({ checking: false }))
|
||||
if (window.location.hash.includes('settings/about')) {
|
||||
window.message.success(t('settings.about.updateNotAvailable'))
|
||||
}
|
||||
}),
|
||||
ipcRenderer.on('update-available', (_, releaseInfo: UpdateInfo) => {
|
||||
dispatch(
|
||||
|
||||
@ -77,8 +77,8 @@ const Messages: FC<Props> = ({ assistant, topic, setActiveTopic }) => {
|
||||
const { updateTopic, addTopic } = useAssistant(assistant.id)
|
||||
const { showTopics, topicPosition, showAssistants, enableTopicNaming } = useSettings()
|
||||
|
||||
const INITIAL_MESSAGES_COUNT = 15
|
||||
const LOAD_MORE_COUNT = 15
|
||||
const INITIAL_MESSAGES_COUNT = 20
|
||||
const LOAD_MORE_COUNT = 20
|
||||
|
||||
messagesRef.current = messages
|
||||
|
||||
@ -158,6 +158,7 @@ const Messages: FC<Props> = ({ assistant, topic, setActiveTopic }) => {
|
||||
EventEmitter.on(EVENT_NAMES.AI_AUTO_RENAME, autoRenameTopic),
|
||||
EventEmitter.on(EVENT_NAMES.CLEAR_MESSAGES, () => {
|
||||
setMessages([])
|
||||
setDisplayMessages([])
|
||||
const defaultTopic = getDefaultTopic(assistant.id)
|
||||
updateTopic({ ...topic, name: defaultTopic.name, messages: [] })
|
||||
TopicManager.clearTopicMessages(topic.id)
|
||||
|
||||
@ -10,7 +10,7 @@ import { useSettings } from '@renderer/hooks/useSettings'
|
||||
import { useAppDispatch } from '@renderer/store'
|
||||
import { setUpdateState } from '@renderer/store/runtime'
|
||||
import { setManualUpdateCheck } from '@renderer/store/settings'
|
||||
import { runAsyncFunction } from '@renderer/utils'
|
||||
import { compareVersions, runAsyncFunction } from '@renderer/utils'
|
||||
import { Avatar, Button, Progress, Row, Switch, Tag } from 'antd'
|
||||
import { debounce } from 'lodash'
|
||||
import { FC, useEffect, useState } from 'react'
|
||||
@ -71,6 +71,8 @@ const AboutSettings: FC = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const hasNewVersion = update?.info?.version && version ? compareVersions(update.info.version, version) > 0 : false
|
||||
|
||||
useEffect(() => {
|
||||
runAsyncFunction(async () => {
|
||||
const appInfo = await window.api.getAppInfo()
|
||||
@ -133,7 +135,7 @@ const AboutSettings: FC = () => {
|
||||
<Switch value={manualUpdateCheck} onChange={(v) => dispatch(setManualUpdateCheck(v))} />
|
||||
</SettingRow>
|
||||
</SettingGroup>
|
||||
{update.info && (
|
||||
{hasNewVersion && update.info && (
|
||||
<SettingGroup theme={theme}>
|
||||
<SettingRow>
|
||||
<SettingRowTitle>
|
||||
@ -208,7 +210,9 @@ const AboutSettings: FC = () => {
|
||||
<SettingRowTitle>
|
||||
<TwitterOutlined />X
|
||||
</SettingRowTitle>
|
||||
<Button onClick={() => onOpenWebsite('https://x.com/kangfenmao')}>@kangfenmao</Button>
|
||||
<Button onClick={() => onOpenWebsite('https://x.com/kangfenmao')}>
|
||||
{t('settings.about.website.button')}
|
||||
</Button>
|
||||
</SettingRow>
|
||||
<SettingDivider />
|
||||
<SettingRow>
|
||||
@ -216,7 +220,9 @@ const AboutSettings: FC = () => {
|
||||
<SendOutlined />
|
||||
Telegram
|
||||
</SettingRowTitle>
|
||||
<Button onClick={() => onOpenWebsite('https://t.me/CherryStudioAI')}>@CherryStudioAI</Button>
|
||||
<Button onClick={() => onOpenWebsite('https://t.me/CherryStudioAI')}>
|
||||
{t('settings.about.website.button')}
|
||||
</Button>
|
||||
</SettingRow>
|
||||
</SettingGroup>
|
||||
</SettingContainer>
|
||||
|
||||
@ -363,4 +363,17 @@ export function sortByEnglishFirst(a: string, b: string) {
|
||||
return a.localeCompare(b)
|
||||
}
|
||||
|
||||
export const compareVersions = (v1: string, v2: string): number => {
|
||||
const v1Parts = v1.split('.').map(Number)
|
||||
const v2Parts = v2.split('.').map(Number)
|
||||
|
||||
for (let i = 0; i < Math.max(v1Parts.length, v2Parts.length); i++) {
|
||||
const v1Part = v1Parts[i] || 0
|
||||
const v2Part = v2Parts[i] || 0
|
||||
if (v1Part > v2Part) return 1
|
||||
if (v1Part < v2Part) return -1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
export { classNames }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user