feat: Prevent website behaviors in PWA
All checks were successful
Deploy Brew Application / deploy (push) Successful in 11s
All checks were successful
Deploy Brew Application / deploy (push) Successful in 11s
Merge #1 Reviewed-on: sortedcord/brew#1
This commit was merged in pull request #1.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/png" href="/brew_favicons/brew_64.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<meta name="theme-color" content="#2C1810" />
|
||||
<link rel="apple-touch-icon" href="/icon-192.png" />
|
||||
@@ -20,6 +20,11 @@
|
||||
}
|
||||
} catch (e) { }
|
||||
})();
|
||||
|
||||
// Prevent pinch-to-zoom gesture on iOS devices
|
||||
document.addEventListener('gesturestart', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
transition: background-color 0.2s ease, color 0.2s ease;
|
||||
touch-action: pan-x pan-y;
|
||||
overscroll-behavior-y: contain;
|
||||
}
|
||||
|
||||
html.dark {
|
||||
@@ -53,6 +55,8 @@
|
||||
margin: 0;
|
||||
background-color: #F3EDE4;
|
||||
transition: background-color 0.2s ease, color 0.2s ease;
|
||||
touch-action: pan-x pan-y;
|
||||
overscroll-behavior-y: contain;
|
||||
}
|
||||
|
||||
html.dark body {
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
const { execSync } = require('child_process');
|
||||
function getGitVersion() {
|
||||
try {
|
||||
try {
|
||||
execSync('git fetch --tags', { stdio: 'ignore' });
|
||||
} catch (e) {}
|
||||
|
||||
const raw = execSync('git describe --tags --always', { stdio: ['pipe', 'pipe', 'ignore'] })
|
||||
.toString()
|
||||
.trim();
|
||||
|
||||
// Check if it's just a commit hash (no dashes, just hex)
|
||||
if (/^[0-9a-f]{7,}$/.test(raw)) {
|
||||
return `v0.0.0-${raw}`;
|
||||
}
|
||||
|
||||
// It might be tag-commits-hash, e.g., v0.1.1-5-g4a9f6b6
|
||||
// Let's shorten it to v0.1.1-4a9f6b6 for a cleaner look, or just return as-is
|
||||
const match = raw.match(/^(.*)-\d+-g([0-9a-f]+)$/);
|
||||
if (match) {
|
||||
return `${match[1]}-${match[2]}`;
|
||||
}
|
||||
|
||||
return raw;
|
||||
} catch (e) {
|
||||
return 'dev';
|
||||
}
|
||||
}
|
||||
console.log(getGitVersion());
|
||||
Reference in New Issue
Block a user