+ 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:
		
							parent
							
								
									8ba7326b48
								
							
						
					
					
						commit
						040c1ca21d
					
				@ -16,6 +16,21 @@
 | 
				
			|||||||
      <div class="card bg-light" style="height:100%;width:100%;">
 | 
					      <div class="card bg-light" style="height:100%;width:100%;">
 | 
				
			||||||
        <div class="card-body row" style="height:100%;width:100%;">
 | 
					        <div class="card-body row" style="height:100%;width:100%;">
 | 
				
			||||||
          <h4 class="card-title">{{l('settings.browserOptionTitle')}}</h4>
 | 
					          <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">
 | 
					          <div class="form-group col-12">
 | 
				
			||||||
            <label class="control-label" for="browserPath">{{l('settings.browserOptionPath')}}</label>
 | 
					            <label class="control-label" for="browserPath">{{l('settings.browserOptionPath')}}</label>
 | 
				
			||||||
            <div class="row">
 | 
					            <div class="row">
 | 
				
			||||||
@ -83,6 +98,7 @@ export default class BrowserOption extends Vue {
 | 
				
			|||||||
  hasCompletedUpgrades = false;
 | 
					  hasCompletedUpgrades = false;
 | 
				
			||||||
  browserPath = '';
 | 
					  browserPath = '';
 | 
				
			||||||
  browserArgs = '';
 | 
					  browserArgs = '';
 | 
				
			||||||
 | 
					  isMac = process.platform === 'darwin';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  get styling(): string {
 | 
					  get styling(): string {
 | 
				
			||||||
    try {
 | 
					    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 * {
 | 
					  .disableWindowsHighContrast, .disableWindowsHighContrast * {
 | 
				
			||||||
    forced-color-adjust: none;
 | 
					    forced-color-adjust: none;
 | 
				
			||||||
 | 
				
			|||||||
@ -341,17 +341,22 @@ function showPatchNotes(): void {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function openBrowserSettings(): electron.BrowserWindow | undefined {
 | 
					function openBrowserSettings(): electron.BrowserWindow | undefined {
 | 
				
			||||||
 | 
					    let desiredHeight = 500;
 | 
				
			||||||
 | 
					    if(process.platform === 'darwin') {
 | 
				
			||||||
 | 
					        desiredHeight = 750;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const windowProperties: electron.BrowserWindowConstructorOptions = {
 | 
					    const windowProperties: electron.BrowserWindowConstructorOptions = {
 | 
				
			||||||
        center: true,
 | 
					        center: true,
 | 
				
			||||||
        show: false,
 | 
					        show: false,
 | 
				
			||||||
        icon: process.platform === 'win32' ? winIcon : pngIcon,
 | 
					        icon: process.platform === 'win32' ? winIcon : pngIcon,
 | 
				
			||||||
        frame: false,
 | 
					        frame: false,
 | 
				
			||||||
        width: 500,
 | 
					        width: 650,
 | 
				
			||||||
        height: 350,
 | 
					        height: desiredHeight,
 | 
				
			||||||
        minWidth: 500,
 | 
					        minWidth: 650,
 | 
				
			||||||
        minHeight: 368,
 | 
					        minHeight: desiredHeight,
 | 
				
			||||||
        maxWidth: 500,
 | 
					        maxWidth: 650,
 | 
				
			||||||
        maxHeight: 368,
 | 
					        maxHeight: desiredHeight,
 | 
				
			||||||
        maximizable: false,
 | 
					        maximizable: false,
 | 
				
			||||||
        webPreferences: {
 | 
					        webPreferences: {
 | 
				
			||||||
            webviewTag: true, nodeIntegration: true, nodeIntegrationInWorker: true, spellcheck: true,
 | 
					            webviewTag: true, nodeIntegration: true, nodeIntegrationInWorker: true, spellcheck: true,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user