Fix Toggle All-Day clearing form bug

Co-authored-by: seanmorley15 <98704938+seanmorley15@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-09-18 12:06:11 +00:00
parent f6adccc4a1
commit 84b003ad9b
20 changed files with 14325 additions and 14307 deletions

View File

@@ -1,6 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
plugins: {
tailwindcss: {},
autoprefixer: {}
}
};

View File

@@ -230,11 +230,21 @@
bind:checked={allDay}
on:change={() => {
if (allDay) {
localStartDate = localStartDate ? localStartDate.split('T')[0] : '';
localEndDate = localEndDate ? localEndDate.split('T')[0] : '';
localStartDate =
localStartDate && localStartDate.includes('T')
? localStartDate.split('T')[0]
: localStartDate;
localEndDate =
localEndDate && localEndDate.includes('T')
? localEndDate.split('T')[0]
: localEndDate;
} else {
localStartDate = localStartDate + 'T00:00';
localEndDate = localEndDate + 'T23:59';
if (localStartDate && !localStartDate.includes('T')) {
localStartDate = localStartDate + 'T00:00';
}
if (localEndDate && !localEndDate.includes('T')) {
localEndDate = localEndDate + 'T23:59';
}
}
utcStartDate = updateUTCDate({
localDate: localStartDate,

View File

@@ -64,7 +64,7 @@
ja: '日本語',
ar: 'العربية',
'pt-br': 'Português (Brasil)',
'sk': 'Slovenský'
sk: 'Slovenský'
};
const submitLocaleChange = (event: Event) => {

View File

@@ -198,11 +198,19 @@
function handleAllDayToggle() {
if (allDay) {
localStartDate = localStartDate ? localStartDate.split('T')[0] : '';
localEndDate = localEndDate ? localEndDate.split('T')[0] : '';
localStartDate =
localStartDate && localStartDate.includes('T')
? localStartDate.split('T')[0]
: localStartDate;
localEndDate =
localEndDate && localEndDate.includes('T') ? localEndDate.split('T')[0] : localEndDate;
} else {
localStartDate = localStartDate + 'T00:00';
localEndDate = localEndDate + 'T23:59';
if (localStartDate && !localStartDate.includes('T')) {
localStartDate = localStartDate + 'T00:00';
}
if (localEndDate && !localEndDate.includes('T')) {
localEndDate = localEndDate + 'T23:59';
}
}
utcStartDate = updateUTCDate({

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

@@ -5,56 +5,56 @@ import { build, files, version } from '$service-worker';
const CACHE = `cache-${version}`;
const ASSETS = [
...build, // the app itself
...files // everything in `static`
...build, // the app itself
...files // everything in `static`
];
self.addEventListener('install', (event) => {
// Create a new cache and add all files to it
async function addFilesToCache() {
const cache = await caches.open(CACHE);
await cache.addAll(ASSETS);
}
event.waitUntil(addFilesToCache());
// Create a new cache and add all files to it
async function addFilesToCache() {
const cache = await caches.open(CACHE);
await cache.addAll(ASSETS);
}
event.waitUntil(addFilesToCache());
});
self.addEventListener('activate', (event) => {
// Remove previous cached data from disk
async function deleteOldCaches() {
for (const key of await caches.keys()) {
if (key !== CACHE) await caches.delete(key);
}
}
event.waitUntil(deleteOldCaches());
// Remove previous cached data from disk
async function deleteOldCaches() {
for (const key of await caches.keys()) {
if (key !== CACHE) await caches.delete(key);
}
}
event.waitUntil(deleteOldCaches());
});
self.addEventListener('fetch', (event) => {
// ignore POST requests, etc
if (event.request.method !== 'GET') return;
// ignore POST requests, etc
if (event.request.method !== 'GET') return;
async function respond() {
const url = new URL(event.request.url);
const cache = await caches.open(CACHE);
async function respond() {
const url = new URL(event.request.url);
const cache = await caches.open(CACHE);
// `build`/`files` can always be served from the cache
if (ASSETS.includes(url.pathname)) {
return cache.match(url.pathname);
}
// `build`/`files` can always be served from the cache
if (ASSETS.includes(url.pathname)) {
return cache.match(url.pathname);
}
// for everything else, try the network first, but
// fall back to the cache if we're offline
try {
const response = await fetch(event.request);
// for everything else, try the network first, but
// fall back to the cache if we're offline
try {
const response = await fetch(event.request);
if (response.status === 200) {
cache.put(event.request, response.clone());
}
if (response.status === 200) {
cache.put(event.request, response.clone());
}
return response;
} catch {
return cache.match(event.request);
}
}
return response;
} catch {
return cache.match(event.request);
}
}
event.respondWith(respond());
event.respondWith(respond());
});

View File

@@ -1,16 +1,16 @@
{
"short_name": "AdventureLog",
"name": "AdventureLog",
"start_url": "/dashboard",
"icons": [
{
"src": "adventurelog.svg",
"type": "image/svg+xml",
"sizes": "any"
}
],
"background_color": "#2a323c",
"display": "standalone",
"scope": "/",
"description": "Self-hostable travel tracker and trip planner."
}
"short_name": "AdventureLog",
"name": "AdventureLog",
"start_url": "/dashboard",
"icons": [
{
"src": "adventurelog.svg",
"type": "image/svg+xml",
"sizes": "any"
}
],
"background_color": "#2a323c",
"display": "standalone",
"scope": "/",
"description": "Self-hostable travel tracker and trip planner."
}