Auto-fix formatting issues
This commit is contained in:
15
bin/cli.ts
vendored
15
bin/cli.ts
vendored
@@ -188,10 +188,7 @@ program
|
|||||||
.hideHelp(),
|
.hideHelp(),
|
||||||
)
|
)
|
||||||
.addOption(
|
.addOption(
|
||||||
new Option(
|
new Option('--zoom <number>', 'Initial page zoom level (50-200)')
|
||||||
'--zoom <number>',
|
|
||||||
'Initial page zoom level (50-200)',
|
|
||||||
)
|
|
||||||
.default(DEFAULT.zoom)
|
.default(DEFAULT.zoom)
|
||||||
.argParser((value) => {
|
.argParser((value) => {
|
||||||
const zoom = parseInt(value);
|
const zoom = parseInt(value);
|
||||||
@@ -203,19 +200,13 @@ program
|
|||||||
.hideHelp(),
|
.hideHelp(),
|
||||||
)
|
)
|
||||||
.addOption(
|
.addOption(
|
||||||
new Option(
|
new Option('--min-width <number>', 'Minimum window width')
|
||||||
'--min-width <number>',
|
|
||||||
'Minimum window width',
|
|
||||||
)
|
|
||||||
.default(DEFAULT.minWidth)
|
.default(DEFAULT.minWidth)
|
||||||
.argParser(validateNumberInput)
|
.argParser(validateNumberInput)
|
||||||
.hideHelp(),
|
.hideHelp(),
|
||||||
)
|
)
|
||||||
.addOption(
|
.addOption(
|
||||||
new Option(
|
new Option('--min-height <number>', 'Minimum window height')
|
||||||
'--min-height <number>',
|
|
||||||
'Minimum window height',
|
|
||||||
)
|
|
||||||
.default(DEFAULT.minHeight)
|
.default(DEFAULT.minHeight)
|
||||||
.argParser(validateNumberInput)
|
.argParser(validateNumberInput)
|
||||||
.hideHelp(),
|
.hideHelp(),
|
||||||
|
|||||||
@@ -65,8 +65,16 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
|
|||||||
.incognito(window_config.incognito);
|
.incognito(window_config.incognito);
|
||||||
|
|
||||||
if window_config.min_width > 0.0 || window_config.min_height > 0.0 {
|
if window_config.min_width > 0.0 || window_config.min_height > 0.0 {
|
||||||
let min_w = if window_config.min_width > 0.0 { window_config.min_width } else { window_config.width };
|
let min_w = if window_config.min_width > 0.0 {
|
||||||
let min_h = if window_config.min_height > 0.0 { window_config.min_height } else { window_config.height };
|
window_config.min_width
|
||||||
|
} else {
|
||||||
|
window_config.width
|
||||||
|
};
|
||||||
|
let min_h = if window_config.min_height > 0.0 {
|
||||||
|
window_config.min_height
|
||||||
|
} else {
|
||||||
|
window_config.height
|
||||||
|
};
|
||||||
window_builder = window_builder.min_inner_size(min_w, min_h);
|
window_builder = window_builder.min_inner_size(min_w, min_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user