feat: interface zoom control settings (#7255)

* feat: interface zoom control settings

* fix: allow zoom controls using shortcuts

* fix: maintain consitency in zoom shortcuts and ui interface

* fix: added min max to 50% and 150% for zoom

* fix: moved percentageToZoomLevel function in bruno-common

* chore: abstractions

---------

Co-authored-by: shubh-bruno <shubh-bruno@shubh-bruno.local>
This commit is contained in:
shubh-bruno
2026-02-23 16:32:34 +05:30
committed by GitHub
parent 04ef477f3b
commit 89bf2fbf44
8 changed files with 341 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
export { mockDataFunctions, timeBasedDynamicVars } from './utils/faker-functions';
export { default as interpolate, interpolateObject } from './interpolate';
export { percentageToZoomLevel } from './zoom';
export { default as isRequestTagsIncluded } from './tags';
export * as utils from './utils';

View File

@@ -0,0 +1,5 @@
// Convert percentage to zoom level (Electron uses logarithmic scale)
// Formula: percentage = 100 * 1.2^level
export const percentageToZoomLevel = (percentage: number): number => {
return Math.log(percentage / 100) / Math.log(1.2);
};