diff --git a/web/app/components/plugins/plugin-detail-panel/detail-header.tsx b/web/app/components/plugins/plugin-detail-panel/detail-header.tsx index 4d4f3905e9..a1017629aa 100644 --- a/web/app/components/plugins/plugin-detail-panel/detail-header.tsx +++ b/web/app/components/plugins/plugin-detail-panel/detail-header.tsx @@ -36,10 +36,11 @@ import { useInvalidateAllToolProviders } from '@/service/use-tools' import { API_PREFIX } from '@/config' import cn from '@/utils/classnames' import { AutoUpdateLine } from '../../base/icons/src/vender/system' -import { timeOfDayToDayjs } from '../reference-setting-modal/auto-update-setting/utils' +import { convertUTCDaySecondsToLocalSeconds, timeOfDayToDayjs } from '../reference-setting-modal/auto-update-setting/utils' import { getMarketplaceUrl } from '@/utils/var' import useReferenceSetting from '../plugin-page/use-reference-setting' import { AUTO_UPDATE_MODE } from '../reference-setting-modal/auto-update-setting/types' +import { useAppContext } from '@/context/app-context' const i18nPrefix = 'plugin.action' @@ -55,6 +56,8 @@ const DetailHeader = ({ onUpdate, }: Props) => { const { t } = useTranslation() + const { userProfile: { timezone } } = useAppContext() + const { theme } = useTheme() const locale = useGetLanguage() const { checkForUpdates, fetchReleases } = useGitHubReleases() @@ -225,7 +228,7 @@ const DetailHeader = ({ /> {/* Auto update info */} {isAutoUpgradeEnabled && ( - + {/* add a a div to fix tooltip hover not show problem */}
diff --git a/web/app/components/plugins/reference-setting-modal/auto-update-setting/index.tsx b/web/app/components/plugins/reference-setting-modal/auto-update-setting/index.tsx index 49eeba0ec6..3a8d148c34 100644 --- a/web/app/components/plugins/reference-setting-modal/auto-update-setting/index.tsx +++ b/web/app/components/plugins/reference-setting-modal/auto-update-setting/index.tsx @@ -8,7 +8,8 @@ import { useTranslation } from 'react-i18next' import TimePicker from '@/app/components/base/date-and-time-picker/time-picker' import OptionCard from '@/app/components/workflow/nodes/_base/components/option-card' import PluginsPicker from './plugins-picker' -import { dayjsToTimeOfDay, timeOfDayToDayjs } from './utils' +import { convertLocalSecondsToUTCDaySeconds, convertUTCDaySecondsToLocalSeconds, dayjsToTimeOfDay, timeOfDayToDayjs } from './utils' +import { useAppContext } from '@/context/app-context' const i18nPrefix = 'plugin.autoUpdate' @@ -22,6 +23,8 @@ const AutoUpdateSetting: FC = ({ onChange, }) => { const { t } = useTranslation() + const { userProfile: { timezone } } = useAppContext() + const { strategy_setting, upgrade_time_of_day, @@ -97,9 +100,10 @@ const AutoUpdateSetting: FC = ({