CheckVersionState.ts 461 B

123456789101112
  1. import { LaunchContext, LaunchState, LaunchStateId } from './LaunchState';
  2. export class CheckVersionState implements LaunchState {
  3. readonly id = LaunchStateId.CheckVersion;
  4. async enter(context: LaunchContext): Promise<LaunchStateId> {
  5. const i18n = context.kernel.i18n;
  6. context.progress({ state: this.id, title: i18n.t('launch.check_app_version'), progress: 0 });
  7. await context.kernel.version.check();
  8. return LaunchStateId.HotUpdate;
  9. }
  10. }