Tweak logging and round up Contacts and Feeds lists for UI consistency

This commit is contained in:
Bruno Bernardino
2024-03-16 21:09:38 +00:00
parent a5cafdddca
commit b81710a720
3 changed files with 8 additions and 8 deletions

View File

@@ -271,9 +271,9 @@ export default function Contacts({ initialContacts, page, contactsCount, search
</section> </section>
<section class='mx-auto max-w-7xl my-8'> <section class='mx-auto max-w-7xl my-8'>
<table class='w-full border-collapse bg-slate-700 text-left text-sm text-slate-500 shadow-sm'> <table class='w-full border-collapse bg-gray-900 text-left text-sm text-slate-500 shadow-sm rounded-t-md'>
<thead class='bg-gray-900'> <thead>
<tr> <tr class='border-b border-slate-600'>
<th scope='col' class='px-6 py-4 font-medium text-white'>First Name</th> <th scope='col' class='px-6 py-4 font-medium text-white'>First Name</th>
<th scope='col' class='px-6 py-4 font-medium text-white'>Last Name</th> <th scope='col' class='px-6 py-4 font-medium text-white'>Last Name</th>
<th scope='col' class='px-6 py-4 font-medium text-white w-20'></th> <th scope='col' class='px-6 py-4 font-medium text-white w-20'></th>
@@ -281,7 +281,7 @@ export default function Contacts({ initialContacts, page, contactsCount, search
</thead> </thead>
<tbody class='divide-y divide-slate-600 border-t border-slate-600'> <tbody class='divide-y divide-slate-600 border-t border-slate-600'>
{contacts.value.map((contact) => ( {contacts.value.map((contact) => (
<tr class='hover:bg-slate-600 group'> <tr class='bg-slate-700 hover:bg-slate-600 group'>
<td class='flex gap-3 px-6 py-4 font-normal text-white'> <td class='flex gap-3 px-6 py-4 font-normal text-white'>
<a href={`/contacts/${contact.id}`}>{contact.first_name}</a> <a href={`/contacts/${contact.id}`}>{contact.first_name}</a>
</td> </td>

View File

@@ -283,8 +283,8 @@ export default function Feeds({ initialFeeds }: FeedsProps) {
</section> </section>
<section class='mx-auto max-w-7xl my-8'> <section class='mx-auto max-w-7xl my-8'>
<table class='w-full border-collapse bg-slate-700 text-left text-sm text-slate-500 shadow-sm'> <table class='w-full border-collapse bg-gray-900 text-left text-sm text-slate-500 shadow-sm rounded-t-md'>
<thead class='bg-gray-900'> <thead>
<tr> <tr>
<th scope='col' class='px-6 py-4 font-medium text-white'>Title & URL</th> <th scope='col' class='px-6 py-4 font-medium text-white'>Title & URL</th>
<th scope='col' class='px-6 py-4 font-medium text-white'>Last Crawl</th> <th scope='col' class='px-6 py-4 font-medium text-white'>Last Crawl</th>
@@ -294,7 +294,7 @@ export default function Feeds({ initialFeeds }: FeedsProps) {
</thead> </thead>
<tbody class='divide-y divide-slate-600 border-t border-slate-600'> <tbody class='divide-y divide-slate-600 border-t border-slate-600'>
{feeds.value.map((newsFeed) => ( {feeds.value.map((newsFeed) => (
<tr class='hover:bg-slate-600 group'> <tr class='bg-slate-700 hover:bg-slate-600 group'>
<td class='flex gap-3 px-6 py-4 font-normal text-white'> <td class='flex gap-3 px-6 py-4 font-normal text-white'>
<div class='text-sm'> <div class='text-sm'>
<div class='font-medium text-white'>{newsFeed.extra.title || 'N/A'}</div> <div class='font-medium text-white'>{newsFeed.extra.title || 'N/A'}</div>

View File

@@ -60,7 +60,7 @@ export const handler = [
async function handleLogging(request: Request, context: FreshContext<FreshContextState>) { async function handleLogging(request: Request, context: FreshContext<FreshContextState>) {
const response = await context.next(); const response = await context.next();
console.info(`${new Date().toISOString()} - ${request.method} ${request.url} [${response.status}]`); console.info(`${new Date().toISOString()} - [${response.status}] ${request.method} ${request.url}`);
if (request.url.includes('/dav/')) { if (request.url.includes('/dav/')) {
console.info(`Request`, request.headers); console.info(`Request`, request.headers);
console.info((await request.clone().text()) || '<No Body>'); console.info((await request.clone().text()) || '<No Body>');