1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 21:39:40 +02:00
portainer/app/react/constants.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
277 B
TypeScript
Raw Normal View History

export const STACK_NAME_VALIDATION_REGEX = '^[-_a-z0-9]+$';
export const BROWSER_OS_PLATFORM = getOs();
function getOs() {
const { userAgent } = navigator;
if (userAgent.includes('Windows')) {
return 'win';
}
return userAgent.includes('Mac') ? 'mac' : 'lin';
}