-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat:Detect new upgrade on launch #2769
feat:Detect new upgrade on launch #2769
Conversation
a01bf42
to
ce02797
Compare
ce02797
to
c7f2544
Compare
It will open a dialog like that if there is no update when I open the setting page. @JeffreyMa597 And if there is no update when I open Neuron, but after a while, there exists an update version, when I click exception.movOn the other hand, do we only check once when we open Neuron or should we check for updates every some intervals? @Danie0918 |
packages/neuron-ui/src/components/GeneralSetting/generalSetting.module.scss
Outdated
Show resolved
Hide resolved
@@ -135,7 +135,9 @@ const GeneralSetting = ({ updater }: GeneralSettingProps) => { | |||
const [showLangDialog, setShowLangDialog] = useState(false) | |||
const [searchParams] = useSearchParams() | |||
const [errorMsg, setErrorMsg] = useState('') | |||
const [dialogType, setDialogType] = useState<'' | 'checking' | 'updating' | 'updated'>('') | |||
const [dialogType, setDialogType] = useState<'' | 'checking' | 'checked' | 'updating' | 'updated'>('') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new type checked
can be avoided by const isChecked = !!updater.version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new type
checked
can be avoided byconst isChecked = !!updater.version
In the logic of the function handleUpdate
, there needs to a key to open our installation dialog, and on the other hand, we don't want the installation dialog to open as soon as we enter the page.
I would suggest checking new updates daily because some may keep Neuron open if it synchronizes slowly. The case may be rare but the cost is low |
Yes, it is true that there may be users who keep Neuron open. So here we need to add a daily check in addition to the open check, how about we set it to UTC+0 check? |
f1dbee4
to
a31fcff
Compare
/package Packaging for test is done in 5554741165. @JeffreyMa597 |
a31fcff
to
b24f87d
Compare
If we check it at UTC+0, we should check whether the current is UTC+0 every period of time. How about checking it every period of time? |
OK, set up a 24-hour check. |
Close with #2783 |
What problem does this PR solve?
As title.
2023-07-12.17.38.46.mov
Ref: Magickbase/neuron-public-issues#139
Check List
Test
e2e Test