Fix dark theme for regexes admin page

This commit is contained in:
DariusIII
2025-10-10 22:21:50 +02:00
parent 8a416017c0
commit 1ef974a1d9
4 changed files with 128 additions and 128 deletions
@@ -4,27 +4,27 @@
<div class="max-w-full px-4 py-6">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-sm">
<!-- Header -->
<div class="px-6 py-4 border-b border-gray-200">
<div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700">
<div class="flex justify-between items-center">
<h1 class="text-2xl font-semibold text-gray-800">
<h1 class="text-2xl font-semibold text-gray-800 dark:text-gray-100">
<i class="fa fa-folder-open mr-2"></i>{{ $title ?? 'Category Regex List' }}
</h1>
<a href="{{ url('/admin/category-regexes-edit') }}" class="px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700">
<a href="{{ url('/admin/category-regexes-edit') }}" class="px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700 dark:hover:bg-blue-800">
<i class="fa fa-plus mr-2"></i>Add New Regex
</a>
</div>
</div>
<!-- Info Alert -->
<div class="px-6 py-4 bg-blue-50 border-b border-blue-100">
<div class="px-6 py-4 bg-blue-50 dark:bg-blue-900/20 border-b border-blue-100 dark:border-blue-800">
<div class="flex">
<div class="flex-shrink-0">
<i class="fa fa-info-circle text-blue-500 text-2xl"></i>
<i class="fa fa-info-circle text-blue-500 dark:text-blue-400 text-2xl"></i>
</div>
<div class="ml-3">
<p class="text-sm text-blue-700">
<p class="text-sm text-blue-700 dark:text-blue-300">
This page lists regular expressions used for categorizing releases.<br>
You can recategorize all releases by running <code class="bg-blue-100 px-2 py-1 rounded text-xs">misc/update/update_releases 6 true</code>
You can recategorize all releases by running <code class="bg-blue-100 dark:bg-blue-800 text-blue-800 dark:text-blue-200 px-2 py-1 rounded text-xs">misc/update/update_releases 6 true</code>
</p>
</div>
</div>
@@ -47,10 +47,10 @@
type="text"
name="group"
value="{{ $group }}"
class="pl-10 w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
class="pl-10 w-full px-4 py-2 border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-100 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
placeholder="Search a group...">
</div>
<button class="px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700" type="submit">
<button class="px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700 dark:hover:bg-blue-800" type="submit">
Search
</button>
</div>
@@ -61,70 +61,70 @@
@if($regex && count($regex) > 0)
<!-- Pagination Top -->
@if(method_exists($regex, 'links'))
<div class="px-6 py-3 border-b border-gray-200">
<div class="px-6 py-3 border-b border-gray-200 dark:border-gray-700">
{{ $regex->onEachSide(5)->links() }}
</div>
@endif
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
<thead class="bg-gray-50 dark:bg-gray-900">
<tr>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider w-20">ID</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Group</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Description</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Regex</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider w-24">Ordinal</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider w-24">Status</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider w-28">Category</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider w-28">Actions</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-20">ID</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Group</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Description</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Regex</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-24">Ordinal</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-24">Status</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-28">Category</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-28">Actions</th>
</tr>
</thead>
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200">
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">
@foreach($regex as $row)
<tr id="row-{{ $row->id }}" class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-semibold text-gray-900">{{ $row->id }}</td>
<tr id="row-{{ $row->id }}" class="hover:bg-gray-50 dark:hover:bg-gray-700">
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-semibold text-gray-900 dark:text-gray-100">{{ $row->id }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm">
<code class="bg-blue-50 text-blue-700 px-2 py-1 rounded text-xs">{{ $row->group_regex }}</code>
<code class="text-gray-800 dark:text-gray-100 px-2 py-1 rounded text-xs font-medium">{{ $row->group_regex }}</code>
</td>
<td class="px-6 py-4 text-sm text-gray-500">
<td class="px-6 py-4 text-sm text-gray-500 dark:text-gray-400">
<span class="inline-block max-w-[200px] truncate" title="{{ $row->description }}">
{{ $row->description }}
</span>
</td>
<td class="px-6 py-4 text-sm">
<div class="max-w-[200px] break-words">
<code class="bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded text-xs break-all" title="{{ htmlspecialchars($row->regex) }}">
<code class="bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200 px-2 py-1 rounded text-xs break-all" title="{{ htmlspecialchars($row->regex) }}">
{{ htmlspecialchars($row->regex) }}
</code>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-center text-sm text-gray-900">{{ $row->ordinal }}</td>
<td class="px-6 py-4 whitespace-nowrap text-center text-sm text-gray-900 dark:text-gray-100">{{ $row->ordinal }}</td>
<td class="px-6 py-4 whitespace-nowrap text-center">
@if($row->status == 1)
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300">
<i class="fa fa-check-circle mr-1"></i>Active
</span>
@else
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 dark:bg-red-900/30 text-red-800 dark:text-red-300">
<i class="fa fa-times-circle mr-1"></i>Disabled
</span>
@endif
</td>
<td class="px-6 py-4 whitespace-nowrap text-center">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 dark:bg-gray-800 text-gray-800">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200">
<i class="fa fa-folder-open mr-1"></i>{{ $row->categories_id }}
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-medium">
<div class="flex gap-2 justify-center">
<a href="{{ url('/admin/category_regexes-edit?id=' . $row->id) }}"
class="text-blue-600 dark:text-blue-400 hover:text-blue-900"
class="text-blue-600 dark:text-blue-400 hover:text-blue-900 dark:hover:text-blue-300"
title="Edit this regex">
<i class="fa fa-edit"></i>
</a>
<button type="button"
class="text-red-600 hover:text-red-900"
class="text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300"
onclick="confirmDelete({{ $row->id }})"
title="Delete this regex">
<i class="fa fa-trash"></i>
@@ -139,7 +139,7 @@
<!-- Pagination Bottom -->
@if(method_exists($regex, 'links'))
<div class="px-6 py-4 border-t border-gray-200">
<div class="px-6 py-4 border-t border-gray-200 dark:border-gray-700">
{{ $regex->onEachSide(5)->links() }}
</div>
@endif
@@ -155,9 +155,9 @@
@endif
<!-- Footer -->
<div class="px-6 py-4 border-t border-gray-200 dark:border-gray-700 bg-gray-50">
<div class="px-6 py-4 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900">
<div class="flex justify-between items-center">
<span class="text-sm text-gray-600">
<span class="text-sm text-gray-600 dark:text-gray-400">
@if($regex && method_exists($regex, 'total'))
Total entries: {{ $regex->total() }}
@elseif($regex)
@@ -4,12 +4,12 @@
<div class="container mx-auto px-4 py-6">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-sm">
<!-- Header -->
<div class="px-6 py-4 border-b border-gray-200">
<div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700">
<div class="flex justify-between items-center">
<h1 class="text-2xl font-semibold text-gray-800">
<h1 class="text-2xl font-semibold text-gray-800 dark:text-gray-100">
<i class="fa fa-edit mr-2"></i>{{ $title ?? 'Collection Regex Edit' }}
</h1>
<a href="{{ url('/admin/collection_regexes-list') }}" class="px-4 py-2 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200">
<a href="{{ url('/admin/collection_regexes-list') }}" class="px-4 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600">
<i class="fa fa-arrow-left mr-2"></i>Back to List
</a>
</div>
@@ -22,10 +22,10 @@
<!-- Error Message -->
@if($error)
<div class="mb-6 p-4 bg-red-50 border border-red-200 rounded-lg">
<div class="mb-6 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg">
<div class="flex">
<i class="fa fa-exclamation-triangle text-red-500 mr-3"></i>
<p class="text-red-800">{{ $error }}</p>
<i class="fa fa-exclamation-triangle text-red-500 dark:text-red-400 mr-3"></i>
<p class="text-red-800 dark:text-red-300">{{ $error }}</p>
</div>
</div>
@endif
@@ -42,14 +42,14 @@
<input type="text"
id="group_regex"
name="group_regex"
class="pl-10 w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
class="pl-10 w-full px-4 py-2 border border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
value="{{ htmlspecialchars($regex->group_regex ?? '') }}"
required>
</div>
<p class="mt-2 text-sm text-gray-500">
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">
Regex to match against a group or multiple groups. Delimiters are already added, and PCRE_CASELESS is added after for case insensitivity.<br>
Example of matching a single group: <code class="bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded">alt\.binaries\.example</code><br>
Example of matching multiple groups: <code class="bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded">alt\.binaries.*</code>
Example of matching a single group: <code class="bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200 px-2 py-1 rounded">alt\.binaries\.example</code><br>
Example of matching multiple groups: <code class="bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200 px-2 py-1 rounded">alt\.binaries.*</code>
</p>
</div>
@@ -64,14 +64,14 @@
</div>
<textarea id="regex"
name="regex"
class="pl-10 w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 font-mono text-sm"
class="pl-10 w-full px-4 py-2 border border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 font-mono text-sm"
rows="4"
required>{{ htmlspecialchars($regex->regex ?? '') }}</textarea>
</div>
<p class="mt-2 text-sm text-gray-500">
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">
Regex to use when grouping binaries into collections.<br>
The regex delimiters are not added, you MUST add them. See <a href="http://php.net/manual/en/regexp.reference.delimiters" target="_blank" class="text-blue-600 dark:text-blue-400 hover:text-blue-800">this</a> page.<br>
To make the regex case insensitive, add <code class="bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded">i</code> after the last delimiter.
The regex delimiters are not added, you MUST add them. See <a href="http://php.net/manual/en/regexp.reference.delimiters" target="_blank" class="text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300">this</a> page.<br>
To make the regex case insensitive, add <code class="bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200 px-2 py-1 rounded">i</code> after the last delimiter.
</p>
</div>
@@ -86,10 +86,10 @@
</div>
<textarea id="description"
name="description"
class="pl-10 w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
class="pl-10 w-full px-4 py-2 border border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
rows="3">{{ htmlspecialchars($regex->description ?? '') }}</textarea>
</div>
<p class="mt-2 text-sm text-gray-500">
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">
Description for this regex. You can include an example usenet subject this regex would match on.
</p>
</div>
@@ -106,12 +106,12 @@
<input type="number"
id="ordinal"
name="ordinal"
class="pl-10 w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
class="pl-10 w-full px-4 py-2 border border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
value="{{ $regex->ordinal ?? 0 }}"
min="0"
required>
</div>
<p class="mt-2 text-sm text-gray-500">
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">
The order to run this regex in. Must be a number, 0 or higher.<br>
If multiple regex have the same ordinal, MySQL will randomly sort them.
</p>
@@ -131,25 +131,25 @@
value="{{ $id }}"
class="w-4 h-4 text-blue-600 dark:text-blue-400 border-gray-300 dark:border-gray-600 focus:ring-blue-500"
{{ ($regex->status ?? 1) == $id ? 'checked' : '' }}>
<label for="status{{ $id }}" class="ml-3 text-sm text-gray-700">
<label for="status{{ $id }}" class="ml-3 text-sm text-gray-700 dark:text-gray-300">
{{ $status_names[$k] }}
</label>
</div>
@endforeach
</div>
<p class="mt-2 text-sm text-gray-500">
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">
Only active regex are used during the collection matching process.
</p>
</div>
</form>
<!-- Footer -->
<div class="px-6 py-4 border-t border-gray-200 dark:border-gray-700 bg-gray-50">
<div class="px-6 py-4 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900">
<div class="flex justify-between">
<a href="{{ url('/admin/collection_regexes-list') }}" class="px-4 py-2 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-300">
<a href="{{ url('/admin/collection_regexes-list') }}" class="px-4 py-2 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-300 dark:hover:bg-gray-600">
<i class="fa fa-times mr-2"></i>Cancel
</a>
<button type="submit" form="regexForm" class="px-4 py-2 bg-green-600 dark:bg-green-700 text-white rounded-lg hover:bg-green-700">
<button type="submit" form="regexForm" class="px-4 py-2 bg-green-600 dark:bg-green-700 text-white rounded-lg hover:bg-green-700 dark:hover:bg-green-800">
<i class="fa fa-save mr-2"></i>Save Changes
</button>
</div>
@@ -4,27 +4,27 @@
<div class="max-w-full px-4 py-6">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-sm">
<!-- Header -->
<div class="px-6 py-4 border-b border-gray-200">
<div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700">
<div class="flex justify-between items-center">
<h1 class="text-2xl font-semibold text-gray-800">
<h1 class="text-2xl font-semibold text-gray-800 dark:text-gray-100">
<i class="fa fa-layer-group mr-2"></i>{{ $title ?? 'Collection Regex List' }}
</h1>
<a href="{{ url('/admin/collection_regexes-edit') }}" class="px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700">
<a href="{{ url('/admin/collection_regexes-edit') }}" class="px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700 dark:hover:bg-blue-800">
<i class="fa fa-plus mr-2"></i>Add New Regex
</a>
</div>
</div>
<!-- Info Alert -->
<div class="px-6 py-4 bg-blue-50 border-b border-blue-100">
<div class="px-6 py-4 bg-blue-50 dark:bg-blue-900/20 border-b border-blue-100 dark:border-blue-800">
<div class="flex">
<div class="flex-shrink-0">
<i class="fa fa-info-circle text-blue-500 text-2xl"></i>
<i class="fa fa-info-circle text-blue-500 dark:text-blue-400 text-2xl"></i>
</div>
<div class="ml-3">
<p class="text-sm text-blue-700">
<p class="text-sm text-blue-700 dark:text-blue-300">
This page lists regular expressions used for grouping binaries into collections.<br>
You can test your regex patterns using the <a href="{{ url('/admin/collection_regexes-test') }}" class="font-semibold underline hover:text-blue-900">test feature</a>.
You can test your regex patterns using the <a href="{{ url('/admin/collection_regexes-test') }}" class="font-semibold underline hover:text-blue-900 dark:hover:text-blue-100">test feature</a>.
</p>
</div>
</div>
@@ -47,10 +47,10 @@
type="text"
name="group"
value="{{ $group }}"
class="pl-10 w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
class="pl-10 w-full px-4 py-2 border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-100 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
placeholder="Search a group...">
</div>
<button class="px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700" type="submit">
<button class="px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700 dark:hover:bg-blue-800" type="submit">
Search
</button>
</div>
@@ -61,51 +61,51 @@
@if($regex && count($regex) > 0)
<!-- Pagination Top -->
@if(method_exists($regex, 'links'))
<div class="px-6 py-3 border-b border-gray-200">
<div class="px-6 py-3 border-b border-gray-200 dark:border-gray-700">
{{ $regex->onEachSide(5)->links() }}
</div>
@endif
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
<thead class="bg-gray-50 dark:bg-gray-900">
<tr>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider w-20">ID</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Group</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Description</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Regex</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider w-24">Ordinal</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider w-24">Status</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider w-28">Actions</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-20">ID</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Group</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Description</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Regex</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-24">Ordinal</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-24">Status</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-28">Actions</th>
</tr>
</thead>
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200">
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">
@foreach($regex as $row)
<tr id="row-{{ $row->id }}" class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-semibold text-gray-900">{{ $row->id }}</td>
<tr id="row-{{ $row->id }}" class="hover:bg-gray-50 dark:hover:bg-gray-700">
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-semibold text-gray-900 dark:text-gray-100">{{ $row->id }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm">
<code class="bg-blue-50 text-blue-700 px-2 py-1 rounded text-xs">{{ $row->group_regex }}</code>
<code class="text-gray-800 dark:text-gray-100 px-2 py-1 rounded text-xs font-medium">{{ $row->group_regex }}</code>
</td>
<td class="px-6 py-4 text-sm text-gray-500">
<td class="px-6 py-4 text-sm text-gray-500 dark:text-gray-400">
<span class="inline-block max-w-[200px] truncate" title="{{ $row->description }}">
{{ $row->description }}
</span>
</td>
<td class="px-6 py-4 text-sm">
<div class="max-w-[200px] break-words">
<code class="bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded text-xs break-all" title="{{ htmlspecialchars($row->regex) }}">
<code class="bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200 px-2 py-1 rounded text-xs break-all" title="{{ htmlspecialchars($row->regex) }}">
{{ htmlspecialchars($row->regex) }}
</code>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-center text-sm text-gray-900">{{ $row->ordinal }}</td>
<td class="px-6 py-4 whitespace-nowrap text-center text-sm text-gray-900 dark:text-gray-100">{{ $row->ordinal }}</td>
<td class="px-6 py-4 whitespace-nowrap text-center">
@if($row->status == 1)
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300">
<i class="fa fa-check-circle mr-1"></i>Active
</span>
@else
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 dark:bg-red-900/30 text-red-800 dark:text-red-300">
<i class="fa fa-times-circle mr-1"></i>Disabled
</span>
@endif
@@ -113,12 +113,12 @@
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-medium">
<div class="flex gap-2 justify-center">
<a href="{{ url('/admin/collection_regexes-edit?id=' . $row->id) }}"
class="text-blue-600 dark:text-blue-400 hover:text-blue-900"
class="text-blue-600 dark:text-blue-400 hover:text-blue-900 dark:hover:text-blue-300"
title="Edit this regex">
<i class="fa fa-edit"></i>
</a>
<button type="button"
class="text-red-600 hover:text-red-900"
class="text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300"
onclick="confirmDelete({{ $row->id }})"
title="Delete this regex">
<i class="fa fa-trash"></i>
@@ -133,7 +133,7 @@
<!-- Pagination Bottom -->
@if(method_exists($regex, 'links'))
<div class="px-6 py-4 border-t border-gray-200">
<div class="px-6 py-4 border-t border-gray-200 dark:border-gray-700">
{{ $regex->onEachSide(5)->links() }}
</div>
@endif
@@ -149,9 +149,9 @@
@endif
<!-- Footer -->
<div class="px-6 py-4 border-t border-gray-200 dark:border-gray-700 bg-gray-50">
<div class="px-6 py-4 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900">
<div class="flex justify-between items-center">
<span class="text-sm text-gray-600">
<span class="text-sm text-gray-600 dark:text-gray-400">
@if($regex && method_exists($regex, 'total'))
Total entries: {{ $regex->total() }}
@elseif($regex)
@@ -161,7 +161,7 @@
@endif
</span>
<div class="flex gap-2">
<a href="{{ url('/admin/collection_regexes-test') }}" class="px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 text-sm">
<a href="{{ url('/admin/collection_regexes-test') }}" class="px-4 py-2 bg-purple-600 dark:bg-purple-700 text-white rounded-lg hover:bg-purple-700 dark:hover:bg-purple-800 text-sm">
<i class="fa fa-flask mr-2"></i>Test Regex
</a>
<a href="{{ url('/admin/collection_regexes-edit') }}" class="px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700 dark:hover:bg-blue-800 text-sm">
@@ -4,27 +4,27 @@
<div class="max-w-full px-4 py-6">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-sm">
<!-- Header -->
<div class="px-6 py-4 border-b border-gray-200">
<div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700">
<div class="flex justify-between items-center">
<h1 class="text-2xl font-semibold text-gray-800">
<h1 class="text-2xl font-semibold text-gray-800 dark:text-gray-100">
<i class="fa fa-tag mr-2"></i>{{ $title ?? 'Release Naming Regex List' }}
</h1>
<a href="{{ url('/admin/release_naming_regexes-edit') }}" class="px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700">
<a href="{{ url('/admin/release_naming_regexes-edit') }}" class="px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700 dark:hover:bg-blue-800">
<i class="fa fa-plus mr-2"></i>Add New Regex
</a>
</div>
</div>
<!-- Info Alert -->
<div class="px-6 py-4 bg-blue-50 border-b border-blue-100">
<div class="px-6 py-4 bg-blue-50 dark:bg-blue-900/20 border-b border-blue-100 dark:border-blue-800">
<div class="flex">
<div class="flex-shrink-0">
<i class="fa fa-info-circle text-blue-500 text-2xl"></i>
<i class="fa fa-info-circle text-blue-500 dark:text-blue-400 text-2xl"></i>
</div>
<div class="ml-3">
<p class="text-sm text-blue-700">
<p class="text-sm text-blue-700 dark:text-blue-300">
This page lists regular expressions used for renaming releases based on their names.<br>
You can test your regex patterns using the <a href="{{ url('/admin/release_naming_regexes-test') }}" class="font-semibold underline hover:text-blue-900">test feature</a>.
You can test your regex patterns using the <a href="{{ url('/admin/release_naming_regexes-test') }}" class="font-semibold underline hover:text-blue-900 dark:hover:text-blue-100">test feature</a>.
</p>
</div>
</div>
@@ -47,10 +47,10 @@
type="text"
name="group"
value="{{ $group }}"
class="pl-10 w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
class="pl-10 w-full px-4 py-2 border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-100 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
placeholder="Search a group...">
</div>
<button class="px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700" type="submit">
<button class="px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700 dark:hover:bg-blue-800" type="submit">
Search
</button>
</div>
@@ -61,51 +61,51 @@
@if($regex && count($regex) > 0)
<!-- Pagination Top -->
@if(method_exists($regex, 'links'))
<div class="px-6 py-3 border-b border-gray-200">
<div class="px-6 py-3 border-b border-gray-200 dark:border-gray-700">
{{ $regex->onEachSide(5)->links() }}
</div>
@endif
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
<thead class="bg-gray-50 dark:bg-gray-900">
<tr>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider w-20">ID</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Group</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Description</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Regex</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider w-24">Ordinal</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider w-24">Status</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider w-28">Actions</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-20">ID</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Group</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Description</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Regex</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-24">Ordinal</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-24">Status</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-28">Actions</th>
</tr>
</thead>
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200">
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">
@foreach($regex as $row)
<tr id="row-{{ $row->id }}" class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-semibold text-gray-900">{{ $row->id }}</td>
<tr id="row-{{ $row->id }}" class="hover:bg-gray-50 dark:hover:bg-gray-700">
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-semibold text-gray-900 dark:text-gray-100">{{ $row->id }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm">
<code class="bg-blue-50 text-blue-700 px-2 py-1 rounded text-xs">{{ $row->group_regex }}</code>
<code class="text-gray-800 dark:text-gray-100 px-2 py-1 rounded text-xs font-medium">{{ $row->group_regex }}</code>
</td>
<td class="px-6 py-4 text-sm text-gray-500">
<td class="px-6 py-4 text-sm text-gray-500 dark:text-gray-400">
<span class="inline-block max-w-[200px] truncate" title="{{ $row->description }}">
{{ $row->description }}
</span>
</td>
<td class="px-6 py-4 text-sm">
<div class="max-w-[200px] break-words">
<code class="bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded text-xs break-all" title="{{ htmlspecialchars($row->regex) }}">
<code class="bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200 px-2 py-1 rounded text-xs break-all" title="{{ htmlspecialchars($row->regex) }}">
{{ htmlspecialchars($row->regex) }}
</code>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-center text-sm text-gray-900">{{ $row->ordinal }}</td>
<td class="px-6 py-4 whitespace-nowrap text-center text-sm text-gray-900 dark:text-gray-100">{{ $row->ordinal }}</td>
<td class="px-6 py-4 whitespace-nowrap text-center">
@if($row->status == 1)
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300">
<i class="fa fa-check-circle mr-1"></i>Active
</span>
@else
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 dark:bg-red-900/30 text-red-800 dark:text-red-300">
<i class="fa fa-times-circle mr-1"></i>Disabled
</span>
@endif
@@ -113,12 +113,12 @@
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-medium">
<div class="flex gap-2 justify-center">
<a href="{{ url('/admin/release_naming_regexes-edit?id=' . $row->id) }}"
class="text-blue-600 dark:text-blue-400 hover:text-blue-900"
class="text-blue-600 dark:text-blue-400 hover:text-blue-900 dark:hover:text-blue-300"
title="Edit this regex">
<i class="fa fa-edit"></i>
</a>
<button type="button"
class="text-red-600 hover:text-red-900"
class="text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300"
onclick="confirmDelete({{ $row->id }})"
title="Delete this regex">
<i class="fa fa-trash"></i>
@@ -133,7 +133,7 @@
<!-- Pagination Bottom -->
@if(method_exists($regex, 'links'))
<div class="px-6 py-4 border-t border-gray-200">
<div class="px-6 py-4 border-t border-gray-200 dark:border-gray-700">
{{ $regex->onEachSide(5)->links() }}
</div>
@endif
@@ -141,17 +141,17 @@
<div class="px-6 py-12 text-center">
<i class="fa fa-exclamation-triangle text-gray-400 text-5xl mb-4"></i>
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-2">No regex patterns found</h3>
<p class="text-gray-500 mb-4">Try a different search term or add a new regex.</p>
<a href="{{ url('/admin/release_naming_regexes-edit') }}" class="inline-flex items-center px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700">
<p class="text-gray-500 dark:text-gray-400 mb-4">Try a different search term or add a new regex.</p>
<a href="{{ url('/admin/release_naming_regexes-edit') }}" class="inline-flex items-center px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700 dark:hover:bg-blue-800">
<i class="fa fa-plus mr-2"></i>Add New Regex
</a>
</div>
@endif
<!-- Footer -->
<div class="px-6 py-4 border-t border-gray-200 dark:border-gray-700 bg-gray-50">
<div class="px-6 py-4 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900">
<div class="flex justify-between items-center">
<span class="text-sm text-gray-600">
<span class="text-sm text-gray-600 dark:text-gray-400">
@if($regex && method_exists($regex, 'total'))
Total entries: {{ $regex->total() }}
@elseif($regex)
@@ -161,7 +161,7 @@
@endif
</span>
<div class="flex gap-2">
<a href="{{ url('/admin/release_naming_regexes-test') }}" class="px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 text-sm">
<a href="{{ url('/admin/release_naming_regexes-test') }}" class="px-4 py-2 bg-purple-600 dark:bg-purple-700 text-white rounded-lg hover:bg-purple-700 dark:hover:bg-purple-800 text-sm">
<i class="fa fa-flask mr-2"></i>Test Regex
</a>
<a href="{{ url('/admin/release_naming_regexes-edit') }}" class="px-4 py-2 bg-blue-600 dark:bg-blue-700 text-white rounded-lg hover:bg-blue-700 dark:hover:bg-blue-800 text-sm">