Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ You are a specialized assistant for developers working on Stretchly, a break-tim
- Maintain accessibility standards in UI components
- Keep performance in mind, especially for background processes
- Consider Chrome compatibility only, as Electron is built on Chromium
- Use `npm run lint` to check for style issues

## Code Organization
- Respect the existing project structure
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- advanced option to show custom message in Preferences
- advanced option to hide location of Preferences file in Debug info
- advanced option to disable app update features
- advanced option to hide Strict Mode preferences section

### Changed
- remove flags in Welcome window
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,11 @@ This might be useful for corporate installations.
#### Hide location of preferences file in Debug info
If you want to hide location of preferences file in Debug info, set `hidePreferencesFileLocation` to `true`.

This might be useful for corporate installations.

#### Hide Strict Mode preferences
If you want to hide Strict Mode preferences section from the Preferences window, set `hideStrictModePreferences` to `true`.

This might be useful for corporate installations.

## Contributor Preferences
Expand Down
7 changes: 7 additions & 0 deletions app/preferences-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ window.onload = async (e) => {
document.querySelector('#checkNewVersion').closest('div').classList.add('hidden')
}

if (settings.hideStrictModePreferences) {
document.querySelectorAll('[data-strict-mode]').forEach(element => {
element.classList.add('hidden')
})
document.querySelector('#enablePostponeLong').closest('div').style.marginBottom = '56px'
Copy link

Copilot AI Sep 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic number '56px' should be replaced with a CSS class or a named constant to improve maintainability and make the spacing intention clearer.

Suggested change
document.querySelector('#enablePostponeLong').closest('div').style.marginBottom = '56px'
document.querySelector('#enablePostponeLong').closest('div').classList.add('mb-56px')

Copilot uses AI. Check for mistakes.
}

new HtmlTranslate(document).translate()
setWindowHeight()
setTimeout(() => { eventsAttached = true }, 500)
Expand Down
10 changes: 5 additions & 5 deletions app/preferences.html
Original file line number Diff line number Diff line change
Expand Up @@ -257,22 +257,22 @@
<input type="checkbox" value="breakPostpone" id="enablePostponeLong">
<label data-i18next="preferences.schedule.enablePostponeLong" for="enablePostponeLong"></label>
</div>
<div>
<div data-strict-mode>
<hr />
</div>
<div>
<div data-strict-mode>
<span data-i18next="preferences.schedule.strictMode">
</span>
</div>
<div>
<div data-strict-mode>
<p data-i18next="preferences.schedule.strictModeInfo">
</p>
</div>
<div>
<div data-strict-mode>
<input type="checkbox" value="microbreakStrictMode" id="enableStrictMini">
<label data-i18next="preferences.schedule.enableStrictMini" for="enableStrictMini"></label>
</div>
<div>
<div data-strict-mode>
<input type="checkbox" value="breakStrictMode" id="enableStrictLong">
<label data-i18next="preferences.schedule.enableStrictLong" for="enableStrictLong"></label>
</div>
Expand Down
3 changes: 2 additions & 1 deletion app/utils/defaultSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,6 @@ export default {
showTrayMenuInStrictMode: false,
customPreferencesMessage: '',
disableAppUpdateFeatures: false,
hidePreferencesFileLocation: false
hidePreferencesFileLocation: false,
hideStrictModePreferences: false
}
Loading