Compare commits
4
Commits
simple-player
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfe9880e47 | ||
|
|
822eb499e4 | ||
|
|
cc064d0ccf | ||
|
|
b204f968c6 |
No files matched your search
+1
-1
@@ -296,4 +296,4 @@ function openNow() {
|
||||
updateNow(); syncUI();
|
||||
}
|
||||
// Tell the page how tall the player is, so buttons that float at the bottom (Home, Ask) sit above it instead of covering it.
|
||||
{ const pe = $('#player'); if (pe && window.ResizeObserver) new ResizeObserver(() => document.documentElement.style.setProperty('--playerh', (pe.hidden ? 0 : pe.offsetHeight) + 'px')).observe(pe); }
|
||||
if (typeof ResizeObserver === 'function' && typeof document !== 'undefined') { const pe = document.getElementById('player'); if (pe) new ResizeObserver(() => document.documentElement.style.setProperty('--playerh', (pe.hidden ? 0 : pe.offsetHeight) + 'px')).observe(pe); }
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// App-shell cache only; Seafile/API traffic always goes to the network.
|
||||
const CACHE = 'hub-v86';
|
||||
const CACHE = 'hub-v87';
|
||||
const SHARE = 'hub-share'; // files shared into the app from other apps, held until the person picks a folder
|
||||
const SHELL = ['/icon.svg', '/manifest.webmanifest', '/icons/icon-192.png', '/icons/apple-touch-icon.png'];
|
||||
|
||||
|
||||
+2
-2
@@ -37,8 +37,8 @@ const users = require('../users'), push = require('../push');
|
||||
|
||||
// events: a local event starting in 10 minutes
|
||||
const soon = new Date(Date.now() + 10 * 60e3), pad = n => String(n).padStart(2, '0');
|
||||
const st = `${soon.getUTCFullYear()}-${pad(soon.getUTCMonth() + 1)}-${pad(soon.getUTCDate())}T${pad(soon.getUTCHours())}:${pad(soon.getUTCMinutes())}`;
|
||||
fs.writeFileSync(path.join(d, 'events.json'), JSON.stringify([{ uid: 'e1', fields: { title: 'Dentist', location: 'Main St', notes: '', allDay: false, start: st, end: st.replace(/T(\d\d)/, (m, h) => 'T' + pad((+h + 1) % 24)), tz: 'UTC', repeat: 'none' }, created: 1, updated: 1 }]));
|
||||
const utc = d => d.toISOString().slice(0, 16), st = utc(soon), en = utc(new Date(soon.getTime() + 36e5)); // (the end is built from the real time, so an event just before midnight still ends after it starts)
|
||||
fs.writeFileSync(path.join(d, 'events.json'), JSON.stringify([{ uid: 'e1', fields: { title: 'Dentist', location: 'Main St', notes: '', allDay: false, start: st, end: en, tz: 'UTC', repeat: 'none' }, created: 1, updated: 1 }]));
|
||||
writePush({ tasks: false }); sent.length = 0;
|
||||
await push.tick(new Date(Date.now() - 3 * 36e5), true);
|
||||
ok('an event hours away sends nothing', sent.length === 0, sent);
|
||||
|
||||
Reference in new issue
Block a user