mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where default EOL in the query tool should be based on the OS. #7393
This commit is contained in:
parent
33c88ceb68
commit
d736f4266c
@ -736,3 +736,16 @@ export const memoizeTimeout = (fn, time) => new Proxy(fn, {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export function getPlatform() {
|
||||||
|
const platform = navigator.userAgent;
|
||||||
|
if (platform.includes('Win')) {
|
||||||
|
return 'Windows';
|
||||||
|
} else if (platform.includes('Mac')) {
|
||||||
|
return 'Mac';
|
||||||
|
} else if (platform.includes('Linux')) {
|
||||||
|
return 'Linux';
|
||||||
|
} else {
|
||||||
|
return 'Unknown';
|
||||||
|
}
|
||||||
|
}
|
@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
import gettext from 'sources/gettext';
|
import gettext from 'sources/gettext';
|
||||||
|
import { getPlatform } from '../../../../../static/js/utils';
|
||||||
|
|
||||||
export const QUERY_TOOL_EVENTS = {
|
export const QUERY_TOOL_EVENTS = {
|
||||||
TRIGGER_STOP_EXECUTION: 'TRIGGER_STOP_EXECUTION',
|
TRIGGER_STOP_EXECUTION: 'TRIGGER_STOP_EXECUTION',
|
||||||
@ -113,4 +114,4 @@ export const PANELS = {
|
|||||||
|
|
||||||
export const MAX_QUERY_LENGTH = 1000000;
|
export const MAX_QUERY_LENGTH = 1000000;
|
||||||
|
|
||||||
export const OS_EOL = navigator.platform === 'win32' ? 'crlf' : 'lf';
|
export const OS_EOL = getPlatform() === 'Windows' ? 'crlf' : 'lf';
|
||||||
|
Loading…
Reference in New Issue
Block a user