add shenyan-app RN project + PWA push/noise updates
@@ -1,4 +1,11 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<rect width="32" height="32" fill="#000" rx="6"/>
|
||||
<text x="16" y="22" text-anchor="middle" fill="#fff" font-size="18" font-family="system-ui">E</text>
|
||||
</svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||
<circle cx="50" cy="50" r="22" fill="none" stroke="#fff" stroke-width="3"/>
|
||||
<line x1="50" y1="12" x2="50" y2="24" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
<line x1="50" y1="76" x2="50" y2="88" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
<line x1="12" y1="50" x2="24" y2="50" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
<line x1="76" y1="50" x2="88" y2="50" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
<line x1="23" y1="23" x2="32" y2="32" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
<line x1="68" y1="68" x2="77" y2="77" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
<line x1="23" y1="77" x2="32" y2="68" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
<line x1="68" y1="23" x2="77" y2="32" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 915 B |
|
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 842 B After Width: | Height: | Size: 12 KiB |
26
PWA/public/sw-push.js
Normal file
@@ -0,0 +1,26 @@
|
||||
self.addEventListener('push', function (event) {
|
||||
var data = {};
|
||||
try { data = event.data.json(); } catch (e) { data = { title: '沈晏', body: event.data ? event.data.text() : '' }; }
|
||||
event.waitUntil(
|
||||
self.registration.showNotification(data.title || '沈晏', {
|
||||
body: data.body || '',
|
||||
icon: '/icon-192.png',
|
||||
badge: '/icon-192.png',
|
||||
vibrate: [200, 100, 200],
|
||||
tag: 'shenyan-push',
|
||||
renotify: true,
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('notificationclick', function (event) {
|
||||
event.notification.close();
|
||||
event.waitUntil(
|
||||
clients.matchAll({ type: 'window', includeUncontrolled: true }).then(function (list) {
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
if (list[i].url && 'focus' in list[i]) return list[i].focus();
|
||||
}
|
||||
if (clients.openWindow) return clients.openWindow('/');
|
||||
})
|
||||
);
|
||||
});
|
||||
4
PWA/public/weather-cloudy.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||
<path d="M30 58 Q20 50 25 42 Q30 33 40 36 Q42 25 55 30 Q65 20 75 33 Q88 32 85 45 Q92 50 85 58 Q80 65 65 62 Q50 68 40 62 Z" fill="#fff" opacity="0.9"/>
|
||||
<path d="M35 55 Q30 50 32 45 Q38 42 42 46 Q44 38 52 42 Q58 34 65 42 Q72 40 70 48 Q75 52 70 56 Q65 60 55 57 Q45 60 38 57 Z" fill="none" stroke="#fff" stroke-width="2"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 392 B |
6
PWA/public/weather-fog.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||
<line x1="20" y1="55" x2="80" y2="55" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
<line x1="25" y1="45" x2="75" y2="45" stroke="#fff" stroke-width="3" stroke-linecap="round" opacity="0.8"/>
|
||||
<line x1="30" y1="65" x2="70" y2="65" stroke="#fff" stroke-width="3" stroke-linecap="round" opacity="0.6"/>
|
||||
<line x1="22" y1="75" x2="78" y2="75" stroke="#fff" stroke-width="2.5" stroke-linecap="round" opacity="0.4"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 497 B |
13
PWA/public/weather-partly-cloudy.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||
<circle cx="35" cy="40" r="18" fill="none" stroke="#fff" stroke-width="2.5"/>
|
||||
<line x1="35" y1="8" x2="35" y2="18" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/>
|
||||
<line x1="35" y1="62" x2="35" y2="72" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/>
|
||||
<line x1="3" y1="40" x2="13" y2="40" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/>
|
||||
<line x1="57" y1="40" x2="67" y2="40" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/>
|
||||
<line x1="12" y1="17" x2="19" y2="24" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/>
|
||||
<line x1="51" y1="56" x2="58" y2="63" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/>
|
||||
<line x1="12" y1="63" x2="19" y2="56" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/>
|
||||
<line x1="51" y1="17" x2="58" y2="24" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/>
|
||||
<path d="M55 55 Q65 45 75 55 Q85 58 80 68 Q75 75 60 72 Q50 70 55 55" fill="#fff" opacity="0.8"/>
|
||||
<path d="M58 68 Q65 63 72 68 Q75 72 70 75 Q62 78 58 75 Q55 72 58 68" fill="none" stroke="#fff" stroke-width="2"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
8
PWA/public/weather-rain.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||
<path d="M25 48 Q15 40 20 32 Q25 23 35 26 Q38 15 50 20 Q60 10 72 23 Q85 22 82 35 Q88 40 82 48 Q77 55 60 52 Q50 58 40 52 Z" fill="#fff" opacity="0.85"/>
|
||||
<line x1="30" y1="62" x2="24" y2="78" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/>
|
||||
<line x1="45" y1="60" x2="39" y2="76" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/>
|
||||
<line x1="60" y1="62" x2="54" y2="78" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/>
|
||||
<line x1="52" y1="72" x2="46" y2="88" stroke="#fff" stroke-width="2" stroke-linecap="round" opacity="0.6"/>
|
||||
<line x1="38" y1="70" x2="32" y2="86" stroke="#fff" stroke-width="2" stroke-linecap="round" opacity="0.6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 737 B |
12
PWA/public/weather-snow.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||
<path d="M25 45 Q15 37 20 29 Q25 20 35 23 Q38 12 50 17 Q60 7 72 20 Q85 19 82 32 Q88 37 82 45 Q77 52 60 49 Q50 55 40 49 Z" fill="#fff" opacity="0.8"/>
|
||||
<circle cx="30" cy="65" r="2.5" fill="#fff"/>
|
||||
<circle cx="42" cy="62" r="2.5" fill="#fff"/>
|
||||
<circle cx="54" cy="65" r="2.5" fill="#fff"/>
|
||||
<circle cx="66" cy="62" r="2.5" fill="#fff"/>
|
||||
<circle cx="36" cy="75" r="2" fill="#fff" opacity="0.6"/>
|
||||
<circle cx="50" cy="72" r="2" fill="#fff" opacity="0.6"/>
|
||||
<circle cx="62" cy="75" r="2" fill="#fff" opacity="0.6"/>
|
||||
<circle cx="44" cy="82" r="1.5" fill="#fff" opacity="0.4"/>
|
||||
<circle cx="56" cy="80" r="1.5" fill="#fff" opacity="0.4"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 717 B |
6
PWA/public/weather-storm.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||
<path d="M20 42 Q10 34 15 26 Q20 17 30 20 Q33 9 45 14 Q55 4 68 17 Q82 16 79 29 Q85 34 79 42 Q74 49 56 46 Q46 52 36 46 Z" fill="#fff" opacity="0.8"/>
|
||||
<polygon points="53,48 42,58 48,58 38,72 52,58 46,58" fill="#fff" stroke="#fff" stroke-width="1.5" stroke-linejoin="round"/>
|
||||
<line x1="32" y1="68" x2="26" y2="84" stroke="#fff" stroke-width="2" stroke-linecap="round" opacity="0.5"/>
|
||||
<line x1="68" y1="65" x2="62" y2="81" stroke="#fff" stroke-width="2" stroke-linecap="round" opacity="0.5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 567 B |
11
PWA/public/weather-sunny.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||
<circle cx="50" cy="50" r="22" fill="none" stroke="#fff" stroke-width="3"/>
|
||||
<line x1="50" y1="12" x2="50" y2="24" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
<line x1="50" y1="76" x2="50" y2="88" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
<line x1="12" y1="50" x2="24" y2="50" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
<line x1="76" y1="50" x2="88" y2="50" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
<line x1="23" y1="23" x2="32" y2="32" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
<line x1="68" y1="68" x2="77" y2="77" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
<line x1="23" y1="77" x2="32" y2="68" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
<line x1="68" y1="23" x2="77" y2="32" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 915 B |