Notifications: Started entity watch UI

This commit is contained in:
Dan Brown 2023-07-27 14:27:45 +01:00
parent ff2674c464
commit 730f539029
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
6 changed files with 84 additions and 1 deletions

View File

Before

Width:  |  Height:  |  Size: 335 B

After

Width:  |  Height:  |  Size: 335 B

View File

@ -681,6 +681,9 @@ ul.pagination {
&.wide { &.wide {
min-width: 220px; min-width: 220px;
} }
&.xl-limited {
width: 280px;
}
.text-muted { .text-muted {
color: #999; color: #999;
fill: #999; fill: #999;

View File

@ -365,6 +365,7 @@ li.checkbox-item, li.task-list-item {
} }
.break-text { .break-text {
white-space: normal;
word-wrap: break-word; word-wrap: break-word;
overflow-wrap: break-word; overflow-wrap: break-word;
} }

View File

@ -67,7 +67,7 @@
@stop @stop
@section('right') @section('right')
<div class="mb-xl"> <div class="mb-xl" style="z-index: 1000; opacity: 1;">
<h5>{{ trans('common.details') }}</h5> <h5>{{ trans('common.details') }}</h5>
<div class="blended-links"> <div class="blended-links">
@include('entities.meta', ['entity' => $book]) @include('entities.meta', ['entity' => $book])

View File

@ -68,4 +68,12 @@
</div> </div>
</a> </a>
@endif @endif
<div class="dropdown-container">
<div class="entity-meta-item">
@icon('watch')
<span>Watching with default preferences</span>
</div>
@include('entities.watch-controls', ['entity' => $entity])
</div>
</div> </div>

View File

@ -0,0 +1,71 @@
<form action="{{ $entity->getUrl('/') }}" method="GET">
{{-- {{ method_field('PUT') }}--}}
<ul class="dropdown-menu xl-limited anchor-left" style="display: block;">
<li>
<button name="level" value="default" class="icon-item">
<span class="text-pos pt-m">{!! request()->query('level') === 'default' ? icon('check-circle') : '' !!}</span>
<div class="break-text">
<div class="mb-xxs"><strong>Default Preferences</strong></div>
<div class="text-muted text-small">
Revert watching to just your default notification preferences.
</div>
</div>
</button>
</li>
<li><hr class="my-none"></li>
<li>
<button name="level" value="ignore" class="icon-item">
<span class="text-pos pt-m">{!! request()->query('level') === 'ignore' ? icon('check-circle') : '' !!}</span>
<div class="break-text">
<div class="mb-xxs"><strong>Ignore</strong></div>
<div class="text-muted text-small">
Ignore all notifications, including those from user-level preferences.
</div>
</div>
</button>
</li>
<li><hr class="my-none"></li>
<li>
<button name="level" value="new" class="icon-item">
<span class="text-pos pt-m">{!! request()->query('level') === 'new' ? icon('check-circle') : '' !!}</span>
<div class="break-text">
<div class="mb-xxs"><strong>New Pages</strong></div>
<div class="text-muted text-small">
Notify when any new page is created within this item.
</div>
</div>
</button>
</li>
<li><hr class="my-none"></li>
<li>
<button name="level" value="updates" class="icon-item">
<span class="text-pos pt-m">{!! request()->query('level') === 'updates' ? icon('check-circle') : '' !!}</span>
<div class="break-text">
<div class="mb-xxs"><strong>All Page Updates</strong></div>
<div class="text-muted text-small">
Notify upon all new pages and page changes.
</div>
</div>
</button>
</li>
<li><hr class="my-none"></li>
<li>
<button name="level" value="comments" class="icon-item">
<span class="text-pos pt-m">{!! request()->query('level') === 'comments' ? icon('check-circle') : '' !!}</span>
<div class="break-text">
<div class="mb-xxs"><strong>All Page Updates & Comments</strong></div>
<div class="text-muted text-small">
Notify upon all new pages, page changes and new comments.
</div>
</div>
</button>
</li>
<li><hr class="my-none"></li>
<li>
<div class="text-small text-muted px-l pb-xxs pt-xs">
<a href="{{ url('/preferences/notifications') }}" target="_blank">Change default notification preferences</a>
</div>
</li>
</ul>
</form>