added permissions to settings
This commit is contained in:
parent
83f7073b18
commit
c31524977a
8 changed files with 121 additions and 83 deletions
|
|
@ -2,7 +2,7 @@
|
|||
<div class="flex flex-row justify-between items-center mx-2 sm:mx-0">
|
||||
<h1 class="text-2xl sm:text-3xl font-bold">{{$list->name}}</h1>
|
||||
|
||||
@can('update', $list)
|
||||
@can('delete', $list)
|
||||
<button type="button" wire:click="toggleSettings"
|
||||
class="hover:bg-blue-600 cursor-pointer text-white px-4 py-2 rounded">
|
||||
<i class="fas fa-cog text-2xl"></i>
|
||||
|
|
@ -30,11 +30,13 @@
|
|||
wire:keyup="filterMovies"/>
|
||||
</div>
|
||||
|
||||
@can("update", $list)
|
||||
<hr class="my-2 sm:my-0"/>
|
||||
<button wire:click="$dispatch('openSearch')"
|
||||
class="bg-green-500 text-white p-2 rounded">
|
||||
Add Movie
|
||||
</button>
|
||||
@endcan
|
||||
</div>
|
||||
@if(!$filteredMovies->isEmpty())
|
||||
<ul class="grid grid-cols-2 sm:grid-cols-4 gap-5">
|
||||
|
|
@ -65,7 +67,7 @@
|
|||
<div class="flex flex-row">
|
||||
<input type="text" wire:model.live="settingsForm.name" id="list-name"
|
||||
class="w-full p-2 rounded rounded-r-none bg-white"/>
|
||||
<button class="bg-green-400 p-2 rounded-r" type="submit" wire:click="saveSettings">Save
|
||||
<button class="bg-green-500 p-2 rounded-r" type="submit" wire:click="saveSettings">Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -78,15 +80,38 @@
|
|||
class="w-5 h-5 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500">
|
||||
</div>
|
||||
|
||||
<div class="p-5">
|
||||
|
||||
<div class="p-5 flex flex-col gap-5 hover:bg-gray-500 rounded">
|
||||
<span class="font-bold">Collaborators</span>
|
||||
<details class="hover:cursor-pointer bg-gray-500 p-5 rounded">
|
||||
<ul class="flex flex-col gap-2 py-2">
|
||||
<li><span class="font-bold">Viewer</span>: Can view the list, but cannot make any changes.</li>
|
||||
<li><span class="font-bold">Editor</span>: Can add/remove movies from the list.</li>
|
||||
<li><span class="font-bold">Admin</span>: Can make any changes to the list including deleting it. Can also invite other users to collaborate on this list.</li>
|
||||
</ul>
|
||||
|
||||
</details>
|
||||
<ul>
|
||||
<li>Bob</li>
|
||||
<li>Eddie</li>
|
||||
<li>Jane</li>
|
||||
<li class="flex justify-between ">
|
||||
<span>Bob</span>
|
||||
<select>
|
||||
<option value="view">Viewer</option>
|
||||
<option value="edit">Editor</option>
|
||||
<option value="admin">Admin</option>
|
||||
</select>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="p-5 flex flex-col gap-3 hover:bg-gray-500 rounded">
|
||||
<span class="font-bold">Invite collaborators</span>
|
||||
<span class="hover:cursor-pointer">Enter a comma separated list of emails.</span>
|
||||
<textarea class="bg-white rounded text-black p-2" placeholder="user1@example.com, user2@example.com, user3@example.com"></textarea>
|
||||
<button type="button" class="p-2 rounded bg-green-500">Send Invites</button>
|
||||
</div>
|
||||
|
||||
|
||||
@can('delete', $list)
|
||||
<div
|
||||
class="flex items-center justify-between bg-gray-700 hover:bg-gray-500 hover:opacity-85 p-5 rounded">
|
||||
<label for="delete_list" class="text-white cursor-pointer">Delete List</label>
|
||||
|
|
@ -99,6 +124,7 @@
|
|||
Delete List
|
||||
</button>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue