Skip to content

Commit

Permalink
Merge pull request #1164 from jumpserver/pr@dev@perf_bar_loading
Browse files Browse the repository at this point in the history
perf: Added a disabling effect to the progress bar when clicked
  • Loading branch information
ZhaoJiSen authored Sep 18, 2024
2 parents 5b24c2d + ca4afb0 commit 3995f9a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
10 changes: 8 additions & 2 deletions src/app/elements/replay/guacamole/guacamole.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,14 @@ export class ElementReplayGuacamoleComponent implements OnInit, OnChanges {
}

runFrom() {
this.recording.seek(this.percent, () =>
this.playerRef.className = ''
const sliderElement = document.getElementById('position-slider') as HTMLInputElement;

sliderElement.disabled = true;

this.recording.seek(this.percent, () => {
this.playerRef.className = '';
sliderElement.disabled = false;
}
);

// Seek is in progress
Expand Down
8 changes: 4 additions & 4 deletions src/app/elements/replay/parts/parts.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Replay } from '@app/model';
import {HttpService, I18nService, LogService} from '@app/services';
import { HttpService, I18nService, LogService } from '@app/services';
import { TranslateService } from '@ngx-translate/core';
import {Component, Input, OnInit} from '@angular/core';
import { Component, Input, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import {MatDialog} from '@angular/material/dialog';
import { MatDialog } from '@angular/material/dialog';
import { ChangeDetectorRef } from '@angular/core';

export interface Section extends Replay {
Expand Down Expand Up @@ -111,7 +111,7 @@ export class ElementsPartsComponent implements OnInit {
result += currentLang === 'zh-CN' ? `${hours} 小时 ` : `${hours} hour `;
}
if (minutes > 0) {
result += currentLang === 'zh-CN' ? `${minutes} 分钟 ` : `${minutes} min `;
result += currentLang === 'zh-CN' ? `${minutes} ` : `${minutes} min `;
}
if (remainingSeconds > 0 || (!hours && !minutes)) {
result += currentLang === 'zh-CN' ? `${remainingSeconds} 秒` : `${remainingSeconds} s`;
Expand Down

0 comments on commit 3995f9a

Please sign in to comment.