Fix manifest path

Fix Safari 304 Not Modified
This commit is contained in:
Eduard Kuzmenko 2021-06-14 17:18:51 +03:00
parent 14597933ba
commit 71d7d16b51
8 changed files with 34 additions and 27 deletions

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="mstile-70x70.png?v=jw3mK7G9Ry"/>
<square150x150logo src="mstile-150x150.png?v=jw3mK7G9Ry"/>
<square310x310logo src="mstile-310x310.png?v=jw3mK7G9Ry"/>
<wide310x150logo src="mstile-310x150.png?v=jw3mK7G9Ry"/>
<TileColor>#2d89ef</TileColor>
</tile>
</msapplication>
</browserconfig>

12
public/browserconfig.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="assets/img/mstile-70x70.png?v=jw3mK7G9Ry"/>
<square150x150logo src="assets/img/mstile-150x150.png?v=jw3mK7G9Ry"/>
<square310x310logo src="assets/img/mstile-310x310.png?v=jw3mK7G9Ry"/>
<wide310x150logo src="assets/img/mstile-310x150.png?v=jw3mK7G9Ry"/>
<TileColor>#2d89ef</TileColor>
</tile>
</msapplication>
</browserconfig>

View File

@ -5,47 +5,47 @@
"description": "Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.", "description": "Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.",
"icons": [ "icons": [
{ {
"src": "android-chrome-36x36.png?v=jw3mK7G9Ry", "src": "assets/img/android-chrome-36x36.png?v=jw3mK7G9Ry",
"sizes": "36x36", "sizes": "36x36",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "android-chrome-48x48.png?v=jw3mK7G9Ry", "src": "assets/img/android-chrome-48x48.png?v=jw3mK7G9Ry",
"sizes": "48x48", "sizes": "48x48",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "android-chrome-72x72.png?v=jw3mK7G9Ry", "src": "assets/img/android-chrome-72x72.png?v=jw3mK7G9Ry",
"sizes": "72x72", "sizes": "72x72",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "android-chrome-96x96.png?v=jw3mK7G9Ry", "src": "assets/img/android-chrome-96x96.png?v=jw3mK7G9Ry",
"sizes": "96x96", "sizes": "96x96",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "android-chrome-144x144.png?v=jw3mK7G9Ry", "src": "assets/img/android-chrome-144x144.png?v=jw3mK7G9Ry",
"sizes": "144x144", "sizes": "144x144",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "android-chrome-192x192.png?v=jw3mK7G9Ry", "src": "assets/img/android-chrome-192x192.png?v=jw3mK7G9Ry",
"sizes": "192x192", "sizes": "192x192",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "android-chrome-256x256.png?v=jw3mK7G9Ry", "src": "assets/img/android-chrome-256x256.png?v=jw3mK7G9Ry",
"sizes": "256x256", "sizes": "256x256",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "android-chrome-384x384.png?v=jw3mK7G9Ry", "src": "assets/img/android-chrome-384x384.png?v=jw3mK7G9Ry",
"sizes": "384x384", "sizes": "384x384",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "android-chrome-512x512.png?v=jw3mK7G9Ry", "src": "assets/img/android-chrome-512x512.png?v=jw3mK7G9Ry",
"sizes": "512x512", "sizes": "512x512",
"type": "image/png" "type": "image/png"
} }

View File

@ -178,7 +178,7 @@ export class AppSidebarLeft extends SidebarSlider {
icon: 'char w', icon: 'char w',
text: 'ChatList.Menu.SwitchTo.Webogram', text: 'ChatList.Menu.SwitchTo.Webogram',
onClick: () => { onClick: () => {
location.href = 'https://web.telegram.org/'; location.href = 'https://web.telegram.org/?legacy=1';
}, },
verify: () => App.isMainDomain verify: () => App.isMainDomain
}]; }];

View File

@ -13,7 +13,7 @@ const App = {
id: 1025907, id: 1025907,
hash: '452b0359b988148995f22ff0f4229750', hash: '452b0359b988148995f22ff0f4229750',
version: '0.5.6', version: '0.5.6',
langPackVersion: '0.2.1', langPackVersion: '0.2.2',
langPack: 'macos', langPack: 'macos',
langPackCode: 'en', langPackCode: 'en',
domains: [] as string[], domains: [] as string[],

View File

@ -13,14 +13,14 @@
<link rel="icon" type="image/png" sizes="32x32" href="assets/img/favicon-32x32.png?v=jw3mK7G9Ry"> <link rel="icon" type="image/png" sizes="32x32" href="assets/img/favicon-32x32.png?v=jw3mK7G9Ry">
<!--<link rel="icon" type="image/png" sizes="192x192" href="assets/img/android-chrome-192x192.png?v=jw3mK7G9Ry"> <!--<link rel="icon" type="image/png" sizes="192x192" href="assets/img/android-chrome-192x192.png?v=jw3mK7G9Ry">
<link rel="icon" type="image/png" sizes="16x16" href="assets/img/favicon-16x16.png?v=jw3mK7G9Ry">--> <link rel="icon" type="image/png" sizes="16x16" href="assets/img/favicon-16x16.png?v=jw3mK7G9Ry">-->
<link rel="manifest" href="assets/img/site.webmanifest?v=jw3mK7G9Ry"> <link rel="manifest" href="site.webmanifest?v=jw3mK7G9Ry">
<link rel="mask-icon" href="assets/img/safari-pinned-tab.svg?v=jw3mK7G9Ry" color="#3390ec"> <link rel="mask-icon" href="assets/img/safari-pinned-tab.svg?v=jw3mK7G9Ry" color="#3390ec">
<!--<link rel="shortcut icon" href="assets/img/favicon.ico?v=jw3mK7G9Ry">--> <!--<link rel="shortcut icon" href="assets/img/favicon.ico?v=jw3mK7G9Ry">-->
<meta name="apple-mobile-web-app-title" content="Telegram WebK"> <meta name="apple-mobile-web-app-title" content="Telegram WebK">
<meta name="application-name" content="Telegram WebK"> <meta name="application-name" content="Telegram WebK">
<meta name="msapplication-TileColor" content="#2d89ef"> <meta name="msapplication-TileColor" content="#2d89ef">
<meta name="msapplication-TileImage" content="assets/img/mstile-144x144.png?v=jw3mK7G9Ry"> <meta name="msapplication-TileImage" content="assets/img/mstile-144x144.png?v=jw3mK7G9Ry">
<meta name="msapplication-config" content="assets/img/browserconfig.xml?v=jw3mK7G9Ry"> <meta name="msapplication-config" content="browserconfig.xml?v=jw3mK7G9Ry">
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
<meta name="color-scheme" content="light"> <meta name="color-scheme" content="light">
{{# each htmlWebpackPlugin.files.css }} {{# each htmlWebpackPlugin.files.css }}

View File

@ -43,7 +43,7 @@ const lang = {
"Chat.Search.NoMessagesFound": "No messages found", "Chat.Search.NoMessagesFound": "No messages found",
"Chat.Search.PrivateSearch": "Private Search", "Chat.Search.PrivateSearch": "Private Search",
//"ChatList.Menu.Archived": "Archived", //"ChatList.Menu.Archived": "Archived",
"ChatList.Menu.SwitchTo.Webogram": "Switch to Webogram", "ChatList.Menu.SwitchTo.Webogram": "Switch to Old Version",
"ChatList.Menu.SwitchTo.Z": "Switch to Z version", "ChatList.Menu.SwitchTo.Z": "Switch to Z version",
"ConnectionStatus.ReconnectIn": "Reconnect in %ds, %s", "ConnectionStatus.ReconnectIn": "Reconnect in %ds, %s",
"ConnectionStatus.Reconnect": "reconnect", "ConnectionStatus.Reconnect": "reconnect",

View File

@ -63,9 +63,16 @@ async function requestCache(event: FetchEvent) {
return file; return file;
} }
const response = await fetch(event.request); let response = await fetch(event.request);
if(isCorrectResponse(response)) { if(isCorrectResponse(response)) {
cache.put(event.request, response.clone()); cache.put(event.request, response.clone());
} else if(response.status === 304) { // possible fix for 304 in Safari
const url = event.request.url.replace(/\?.+$/, '') + '?' + (Math.random() * 100000 | 0);
const request = new Request(url);
response = await fetch(request);
if(isCorrectResponse(response)) {
cache.put(request, response.clone());
}
} }
return response; return response;