Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
austinkregel committed Jun 9, 2024
1 parent 344e8c9 commit ce03aed
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 23 deletions.
10 changes: 0 additions & 10 deletions app/Http/Controllers/MessageController.php

This file was deleted.

2 changes: 1 addition & 1 deletion app/Http/Controllers/Spork/MessageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function show($thread)
$query->orderBy('originated_at');
}, 'participants' => function ($query) {
$query->where('name', 'not like', '%bridge bot%');
}])
}, 'messages.toPerson', 'messages.fromPerson'])
->orderByDesc('updated_at')
->findOrFail($thread),
]);
Expand Down
7 changes: 1 addition & 6 deletions app/Http/Middleware/HandleInertiaRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,7 @@ public function share(Request $request): array
'conversation_page',
request('conversation_page')
) : null,
'unread_email_count' => $request->user() ?
$request->user()->messages()
->where('messages.type', 'email')
->where('seen', false)
->count()
: 0,
'unread_email_count' => 0,
'notifications' => $request->user()?->notifications ?? [],
]);
}
Expand Down
9 changes: 8 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ includes:
- vendor/larastan/larastan/extension.neon

parameters:

excludePaths:
- resources/
- storage/
- vendor/
- docker/
paths:
- app/
- database/
- tests/
- routes/

# Level 9 is the highest level
level: 5
2 changes: 1 addition & 1 deletion resources/js/Layouts/AppLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const logout = () => {
<div class="flex flex-1 gap-x-4 self-stretch lg:gap-x-6">
<Search />
<div class="flex items-center gap-x-4 lg:gap-x-6">
<Link href="/-/postal" class="-m-2.5 p-2.5 text-stone-400 hover:text-stone-500 relative">
<Link :href="route('notifications')" class="-m-2.5 p-2.5 text-stone-400 hover:text-stone-500 relative">
<span class="sr-only">View notifications</span>
<BellIcon class="h-6 w-6" aria-hidden="true" />
<span class="bg-red-500 absolute top-0 right-0 rounded-full text-xs text-white py-0.5 px-1">
Expand Down
6 changes: 3 additions & 3 deletions resources/js/Pages/Postal/Thread.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@
</div>
<section class="flex-grow bg-gray-300 dark:bg-zinc-900">
<article class="px-4 mt-4 text-stone-500 dark:text-stone-200 leading-7 tracking-wider gap-1 flex flex-col">
<div v-for="message in thread.messages" class="flex" :class="message.is_user ? 'justify-end' : 'justify-start'">
<div v-for="message in thread.messages" class="flex flex-col" :class="message.is_user ? 'justify-end' : 'justify-start'">
<div class="-my-1 text-xxs text-black dark:text-stone-400">{{message?.from_person?.name}}</div>
<div
:class="[message.is_user ? 'text-right bg-blue-600': 'text-left bg-green-500']"
class="px-4 py-2 flex rounded-lg shadow"

class="px-2 py-1 flex rounded-lg shadow"
>
<div v-if="message.html_message" v-html="message.html_message"></div>
<div v-else v-text="message.message"></div>
Expand Down
2 changes: 1 addition & 1 deletion routes/pages/spork.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
Route::get('/dashboard', Controllers\Spork\DashboardController::class)->name('dashboard');
Route::get('/search', [Controllers\SearchController::class, 'index'])->name('search');
Route::get('/search/{index}', [Controllers\SearchController::class, 'show'])->name('search.show');
Route::get('/notifications', fn () => Inertia::render('Notifications'));
Route::get('/notifications', fn () => Inertia::render('Notifications'))->name('notifications');

Route::get('/rss-feed', fn () => Inertia::render('RssFeeds/Index', [
'feeds' => \App\Models\Article::query()->latest('last_modified')
Expand Down
3 changes: 3 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export default {
fontFamily: {
sans: ['Figtree', ...defaultTheme.fontFamily.sans],
},
fontSize: {
xxs: '0.65rem',
}
},
},

Expand Down

0 comments on commit ce03aed

Please sign in to comment.