Skip to content

Commit

Permalink
Merge pull request #384 from AtkinsSJ/progress-dialogs
Browse files Browse the repository at this point in the history
refactor: Replace several existing progress dialogs with one configurable one
  • Loading branch information
KernelDeimos authored May 10, 2024
2 parents 17e08ca + edebbee commit 3992fe1
Show file tree
Hide file tree
Showing 43 changed files with 293 additions and 653 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class FileCacheService extends AdvancedBase {
const path = this._get_path(tracker.key);
console.log(`precache fetch key I guess?`, tracker.key);
const data = this.precache.get(tracker.key);
console.log(`path and data: ${path} ${data}`);
// console.log(`path and data: ${path} ${data}`);
await fs.promises.writeFile(path, data);
this.precache.delete(tracker.key);
tracker.phase = FileTracker.PHASE_DISK;
Expand Down
5 changes: 3 additions & 2 deletions src/UI/Components/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ export default class Button extends Component {
create_template ({ template }) {
if ( this.get('style') === 'link' ) {
$(template).html(/*html*/`
<button type="submit" class="link-button code-confirm-btn" style="margin-top:10px;" disabled>${
<button type="submit" class="link-button" style="margin-top:10px;" disabled>${
html_encode(this.get('label'))
}</button>
`);
return;
}
// TODO: Replace hack for 'small' with a better way to configure button classes.
$(template).html(/*html*/`
<button type="submit" class="button button-block button-${this.get('style')} code-confirm-btn" style="margin-top:10px;" disabled>${
<button type="submit" class="button ${this.get('style') !== 'small' ? 'button-block' : ''} button-${this.get('style')}" style="margin-top:10px;" disabled>${
html_encode(this.get('label'))
}</button>
`);
Expand Down
1 change: 1 addition & 0 deletions src/UI/UIWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -2086,6 +2086,7 @@ async function UIWindow(options) {
html: i18n('empty_trash'),
disabled: false,
onClick: async function(){
// TODO: Merge this with window.empty_trash()
const alert_resp = await UIAlert({
message: i18n('empty_trash_confirmation'),
buttons:[
Expand Down
81 changes: 0 additions & 81 deletions src/UI/UIWindowCopyProgress.js

This file was deleted.

70 changes: 0 additions & 70 deletions src/UI/UIWindowDownloadDirProg.js

This file was deleted.

81 changes: 0 additions & 81 deletions src/UI/UIWindowDownloadProgress.js

This file was deleted.

81 changes: 0 additions & 81 deletions src/UI/UIWindowMoveProgress.js

This file was deleted.

Loading

0 comments on commit 3992fe1

Please sign in to comment.