mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-26 12:24:46 +01:00
Fix missing webmanifest in PWA for Android (#2051)
This commit is contained in:
parent
97a87b5b95
commit
c7392c89b5
@ -39,7 +39,7 @@
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="./<%= htmlWebpackPlugin.options.mainIcon %>.png">
|
||||
<link rel="alternate icon" href="./favicon.ico" type="image/x-icon">
|
||||
<link rel="manifest" id="the-manifest-placeholder" />
|
||||
<link rel="manifest" id="the-manifest-placeholder" href="./<%= htmlWebpackPlugin.options.manifest %>" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -5,11 +5,15 @@ import { DEBUG } from '../config';
|
||||
import { IS_MAC_OS } from './environment';
|
||||
|
||||
export default function updateWebmanifest() {
|
||||
if (!IS_MAC_OS) {
|
||||
return;
|
||||
}
|
||||
|
||||
const manifest = document.getElementById('the-manifest-placeholder');
|
||||
if (!manifest) {
|
||||
return;
|
||||
}
|
||||
|
||||
const url = `site${IS_MAC_OS ? '_apple' : ''}${DEBUG ? '_dev' : ''}.webmanifest`;
|
||||
const url = `site_apple${DEBUG ? '_dev' : ''}.webmanifest`;
|
||||
manifest.setAttribute('href', url);
|
||||
}
|
||||
|
@ -144,6 +144,7 @@ module.exports = (_env, { mode = 'production' }) => {
|
||||
appName: APP_ENV === 'production' ? 'Telegram Web' : 'Telegram Web Beta',
|
||||
appleIcon: APP_ENV === 'production' ? 'apple-touch-icon' : 'apple-touch-icon-dev',
|
||||
mainIcon: APP_ENV === 'production' ? 'icon-192x192' : 'icon-dev-192x192',
|
||||
manifest: APP_ENV === 'production' ? 'site.webmanifest' : 'site_dev.webmanifest',
|
||||
template: 'src/index.html',
|
||||
}),
|
||||
new MiniCssExtractPlugin({
|
||||
|
Loading…
Reference in New Issue
Block a user