+ Added a "reset to default" button for browser settings
This commit is contained in:
parent
1b9401cbfa
commit
b29b43de75
|
@ -197,6 +197,7 @@ Current log location: {1}`,
|
|||
'settings.browserOptionArgumentsHelp': 'Arguments are separated by spaces. Use %s to insert the URL.',
|
||||
'settings.browserOptionBrowse': 'Browse',
|
||||
'settings.browserOptionSave': 'Save',
|
||||
'settings.browserOptionReset': 'Reset to default',
|
||||
'fixLogs.action': 'Fix corrupted logs',
|
||||
'fixLogs.text': `There are a few reason log files can become corrupted - log files from old versions with bugs that have since been fixed or incomplete file operations caused by computer crashes are the most common.
|
||||
If one of your log files is corrupted, you may get an "Unknown Type" error when you log in or when you open a specific tab. You may also experience other issues.
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<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>This is an advanced setting. By changing this setting to an unsupported program (i.e. 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>
|
||||
|
@ -56,9 +56,13 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group col-12">
|
||||
<div class="row">
|
||||
<div class="row no-gutters">
|
||||
<div class="col-2">
|
||||
<button class="btn btn-primary" @click.prevent.stop="submit()">{{l('settings.browserOptionSave')}}</button>
|
||||
<button class="btn btn-primary" @click.prevent.stop="submit()">{{l('settings.browserOptionSave')}}</button>
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
<div class="col-4">
|
||||
<button class="btn btn-danger" style="float: right;" @click.prevent.stop="resetToDefault()">{{l('settings.browserOptionReset')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -160,6 +164,11 @@ export default class BrowserOption extends Vue {
|
|||
this.close();
|
||||
}
|
||||
|
||||
resetToDefault(): void {
|
||||
this.browserPath = '';
|
||||
this.browserArgs = '';
|
||||
}
|
||||
|
||||
browseForPath(): void {
|
||||
ipcRenderer.invoke('browser-option-browse').then((result) => {
|
||||
this.browserPath = result;
|
||||
|
|
|
@ -197,7 +197,6 @@ function openURLExternally(linkUrl: string): void {
|
|||
linkUrl = encodeURI(linkUrl);
|
||||
}
|
||||
|
||||
|
||||
if (!settings.browserArgs.includes('%s')) {
|
||||
// append %s to params if it is not already there
|
||||
settings.browserArgs += ' %s';
|
||||
|
@ -343,7 +342,7 @@ function showPatchNotes(): void {
|
|||
}
|
||||
|
||||
function openBrowserSettings(): electron.BrowserWindow | undefined {
|
||||
let desiredHeight = 500;
|
||||
let desiredHeight = 520;
|
||||
if(process.platform === 'darwin') {
|
||||
desiredHeight = 750;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue