+ Added a warning re: browser setting

+ Added a mac-specific warning about an unresolved bug in MacOS
~ Adjusted settings window dimensions
This commit is contained in:
Greyhoof 2023-10-11 10:16:58 +02:00
parent 8ba7326b48
commit 040c1ca21d
2 changed files with 37 additions and 6 deletions

View File

@ -16,6 +16,21 @@
<div class="card bg-light" style="height:100%;width:100%;">
<div class="card-body row" style="height:100%;width:100%;">
<h4 class="card-title">{{l('settings.browserOptionTitle')}}</h4>
<div class="form-group col-12">
<div class="row">
<div class="col-12">
<div class="warning">
<h5>Danger Zone!</h5>
<div>This is an advanced setting. By changing this setting to an unsupported program (e.g. not a browser), you might not be able to open links from F-Chat anymore.</div>
<div v-if="isMac"><hr/>
<p>Mac User: As of writing, MacOS has a bug in how it handles opening links.</p>
<p>When your default browser is something other than Safari and you select Safari in this settings window, links might be opened twice.</p>
<p>Once in Safari and a second time in your default browser. This tends to happen when Safari is not running when clicking a link.</p></div>
</div>
</div>
</div>
</div>
<div class="form-group col-12">
<label class="control-label" for="browserPath">{{l('settings.browserOptionPath')}}</label>
<div class="row">
@ -83,6 +98,7 @@ export default class BrowserOption extends Vue {
hasCompletedUpgrades = false;
browserPath = '';
browserArgs = '';
isMac = process.platform === 'darwin';
get styling(): string {
try {
@ -197,6 +213,16 @@ export default class BrowserOption extends Vue {
}
}
.warning {
border: 1px solid var(--warning);
padding: 10px;
margin-bottom: 20px;
border-radius: 3px;
div {
margin-top: 10px;
}
}
.disableWindowsHighContrast, .disableWindowsHighContrast * {
forced-color-adjust: none;

View File

@ -341,17 +341,22 @@ function showPatchNotes(): void {
}
function openBrowserSettings(): electron.BrowserWindow | undefined {
let desiredHeight = 500;
if(process.platform === 'darwin') {
desiredHeight = 750;
}
const windowProperties: electron.BrowserWindowConstructorOptions = {
center: true,
show: false,
icon: process.platform === 'win32' ? winIcon : pngIcon,
frame: false,
width: 500,
height: 350,
minWidth: 500,
minHeight: 368,
maxWidth: 500,
maxHeight: 368,
width: 650,
height: desiredHeight,
minWidth: 650,
minHeight: desiredHeight,
maxWidth: 650,
maxHeight: desiredHeight,
maximizable: false,
webPreferences: {
webviewTag: true, nodeIntegration: true, nodeIntegrationInWorker: true, spellcheck: true,