Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoguenet committed Mar 9, 2024
1 parent 147b179 commit 7e85236
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 27 deletions.
26 changes: 13 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions resources/views/admin/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@
<td class="whitespace-nowrap px-3 py-5 text-sm text-gray-500">{{ $nudge->created_at->format('m/d/Y') }}</td>
<td class="flex items-center space-x-5 relative whitespace-nowrap py-5 pl-3 pr-4 text-left text-sm font-medium sm:pr-0">
<a href="{{ route('admin.nudges.edit', $nudge) }}">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
<path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125" />
</svg>
</a>
@include('nudges.partials.delete-nudge-form', ['nudgeId' => $nudge->id])
<!-- Enabled: "bg-green-500", Not Enabled: "bg-gray-200" -->
<button x-data="toggles({{ $nudge->validated }})" @click="toggle({{ $nudge->id }})" type="button" :class="isToggled ? 'bg-green-500' : 'bg-gray-200'" class="relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2" role="switch" aria-checked="false">
<button x-data="toggles({{ $nudge->validated }})" @click="toggle({{ $nudge->id }})" type="button" :class="isToggled ? 'bg-green-500' : 'bg-gray-200'" class="relative inline-flex h-3 w-5 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2" role="switch" aria-checked="false">
<span class="sr-only">Use setting</span>
<!-- Enabled: "translate-x-5", Not Enabled: "translate-x-0" -->
<span aria-hidden="true" :class="isToggled ? 'translate-x-5' : 'translate-x-0'" class="pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"></span>
<span aria-hidden="true" :class="isToggled ? 'translate-x-2' : 'translate-x-0'" class="pointer-events-none inline-block size-2 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"></span>
</button>
</td>
</tr>
Expand Down
17 changes: 9 additions & 8 deletions resources/views/components/nudge.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</article>

<pre>
<x-torchlight-code language='php'>{!! $nudge->code !!}</x-torchlight-code>
</pre>
<x-torchlight-code language='php'>{!! $nudge->code !!}</x-torchlight-code>
</pre>

<div class="flex items-center justify-between">
<div class="flex items-center justify-center gap-1">
Expand All @@ -30,20 +30,21 @@
</svg>
@endauth
</div>
<div class="relative">
<div x-show="copySuccess" x-transition x-cloak role="tooltip" class="absolute right-0 z-10 inline-block px-2 py-1 text-xs text-white transition-opacity duration-300 bg-green-500 rounded-md shadow-sm">
<span>COPIED!</span>
</div>
<div class="flex items-center">
<svg x-show="copySuccess" x-cloak xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4 text-gray-500 transition ease-in-out duration-150 hover:text-green-500 focus:outline-none">
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" />
</svg>


<button @click="copy" class="focus:outline-none">
<button @click="copy" x-show="! copySuccess" x-cloak class="focus:outline-none">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4 text-gray-500 transition ease-in-out duration-150 hover:text-green-500">
<path stroke-linecap="round" stroke-linejoin="round" d="M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184" />
</svg>
</button>
</div>
</div>

<figcaption class="mt-6">
<figcaption>
<div class="mt-4 flex items-center justify-center space-x-3 text-base">
<div class="font-semibold text-gray-900">{{ $nudge->user->name }}</div>
<svg viewBox="0 0 2 2" width="3" height="3" aria-hidden="true" class="fill-gray-900">
Expand Down
6 changes: 3 additions & 3 deletions resources/views/nudges/partials/delete-nudge-form.blade.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<section class="space-y-6">
<x-danger-button x-data="" x-on:click.prevent="$dispatch('open-modal', 'confirm-nudge-deletion-{{ $nudgeId }}')">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
<button x-data="" x-on:click.prevent="$dispatch('open-modal', 'confirm-nudge-deletion-{{ $nudgeId }}')">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
</svg>
</x-danger-button>
</button>

<x-modal name="confirm-nudge-deletion-{{ $nudgeId }}" :show="$errors->nudgeDeletion->isNotEmpty()" focusable>
<form method="post" action="{{ route('nudges.destroy', $nudge) }}" class="p-6">
Expand Down

0 comments on commit 7e85236

Please sign in to comment.