Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
aza547 committed Apr 21, 2024
1 parent 17326de commit a2577ed
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
### Fixed

## [5.2.2] - 2024-04-21
### Changed
- Video button styling.

### Fixed
- Fix a status icon bug.

## [5.2.1] - 2024-04-21
### Fixed
- Various search bar fixes.
Expand Down
2 changes: 1 addition & 1 deletion release/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "WarcraftRecorder",
"version": "5.2.1",
"version": "5.2.2",
"description": "A World of Warcraft screen recorder",
"main": "./dist/main/main.js",
"author": {
Expand Down
19 changes: 14 additions & 5 deletions src/main/Manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ export default class Manager {

private configMessage = '';

private reconfiguring = false;

/**
* Defined stages of configuration. They are named only for logging
* purposes. Each stage holds the current state of the stages config,
Expand Down Expand Up @@ -200,11 +202,6 @@ export default class Manager {
return;
}

this.mainWindow.webContents.send(
'updateRecStatus',
RecStatus.Reconfiguring
);

this.active = true;
await this.internalManage();

Expand Down Expand Up @@ -261,6 +258,8 @@ export default class Manager {
*/
private async internalManage() {
console.info('[Manager] Internal manage');
this.reconfiguring = true;
this.refreshStatus();

for (let i = 0; i < this.stages.length; i++) {
const stage = this.stages[i];
Expand All @@ -278,6 +277,7 @@ export default class Manager {
} catch (error) {
// If this stage isn't valid we won't go further, set the frontend
// stage to reflect what's wrong and drop out.
this.reconfiguring = false;
this.setConfigInvalid(String(error));
return;
}
Expand All @@ -299,6 +299,7 @@ export default class Manager {
}

// Update the frontend to reflect the valid config.
this.reconfiguring = false;
this.setConfigValid();
}

Expand All @@ -325,6 +326,14 @@ export default class Manager {
* place that this should be done from to avoid any status icon confusion.
*/
public refreshStatus() {
if (this.reconfiguring) {
this.mainWindow.webContents.send(
'updateRecStatus',
RecStatus.Reconfiguring
);
return;
}

if (!this.configValid) {
this.refreshRecStatus(
RecStatus.InvalidConfig,
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/GeneralSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ const GeneralSettings: React.FC<IProps> = (props: IProps) => {
{getBufferPathField()}
{getMaxStorageField()}

<Box sx={{ display: 'flex', flexDirection: 'row' }}>
<Box sx={{ display: 'flex', flexDirection: 'row', my: 2, }}>
{getCloudSwitch()}
{getCloudUploadSwitch()}
</Box>
Expand Down
9 changes: 6 additions & 3 deletions src/renderer/VideoButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,17 @@ const dialogButtonSx = {
};

const iconButtonSx = {
boxShadow: 1,
border: '1px ridge',
backgroundColor: 'dimgray',
border: '1px solid black',
boxShadow: 3,
borderRadius: '5px',
mx: '2px',
borderColor: 'rgba(0, 0, 0, 0.2)',
'& .MuiTouchRipple-root .MuiTouchRipple-child': {
borderRadius: '5px',
},
':hover': {
background: '#bb4420',
},
};

const ipc = window.electron.ipcRenderer;
Expand Down

0 comments on commit a2577ed

Please sign in to comment.