Remove unneeded files

This commit is contained in:
DariusIII
2025-10-16 21:38:45 +02:00
parent 3a106bea09
commit 562c3a4b77
4 changed files with 0 additions and 751 deletions
-126
View File
@@ -1,126 +0,0 @@
# Admin Views Reorganization Summary
## Overview
All admin area views have been successfully organized into logical subfolders within `resources/views/admin/`.
## Folder Structure Created
### New Subfolders:
- **movies/** - Movie management views
- **music/** - Music management views
- **games/** - Game management views
- **users/** - User management views
- **roles/** - Role management views
- **groups/** - Newsgroup management views
- **categories/** - Category management views
- **releases/** - Release management views
- **regexes/** - All regex management views
- **blacklist/** - Binary blacklist views
- **content/** - Content management views
- **site/** - Site settings and statistics views
### Existing Subfolders (unchanged):
- **anidb/** - AniDB views (already organized)
- **books/** - Book views (already organized)
- **comments/** - Comment views (already organized)
- **console/** - Console views (already organized)
- **invitations/** - Invitation views (already organized)
- **predb/** - PreDB views (already organized)
- **shows/** - TV shows views (already organized)
## Files Moved and Renamed
### Movies (movies/)
- movie-list.blade.php → movies/index.blade.php
- movie-edit.blade.php → movies/edit.blade.php
- movie-add.blade.php → movies/add.blade.php
### Music (music/)
- music-list.blade.php → music/index.blade.php
- music-edit.blade.php → music/edit.blade.php
### Games (games/)
- game-list.blade.php → games/index.blade.php
- game-edit.blade.php → games/edit.blade.php
### Users (users/)
- user-list.blade.php → users/index.blade.php
- user-edit.blade.php → users/edit.blade.php
- deleted-users.blade.php → users/deleted.blade.php
### Roles (roles/)
- role-list.blade.php → roles/index.blade.php
- role-edit.blade.php → roles/edit.blade.php
- role-add.blade.php → roles/add.blade.php
### Groups (groups/)
- group-list.blade.php → groups/index.blade.php
- group-edit.blade.php → groups/edit.blade.php
- group-bulk.blade.php → groups/bulk.blade.php
### Categories (categories/)
- category-list.blade.php → categories/index.blade.php
- category-edit.blade.php → categories/edit.blade.php
### Releases (releases/)
- release-list.blade.php → releases/index.blade.php
- release-edit.blade.php → releases/edit.blade.php
- failrel-list.blade.php → releases/failed.blade.php
### Regexes (regexes/)
- release-naming-regexes-list.blade.php → regexes/release-naming-list.blade.php
- release-naming-regexes-edit.blade.php → regexes/release-naming-edit.blade.php
- release-naming-regexes-test.blade.php → regexes/release-naming-test.blade.php
- collection-regexes-list.blade.php → regexes/collection-list.blade.php
- collection-regexes-edit.blade.php → regexes/collection-edit.blade.php
- collection-regexes-test.blade.php → regexes/collection-test.blade.php
- category-regexes-list.blade.php → regexes/category-list.blade.php
- category-regexes-edit.blade.php → regexes/category-edit.blade.php
### Blacklist (blacklist/)
- binaryblacklist-list.blade.php → blacklist/index.blade.php
- binaryblacklist-edit.blade.php → blacklist/edit.blade.php
### Content (content/)
- content-list.blade.php → content/index.blade.php
- content-add.blade.php → content/add.blade.php
### Site (site/)
- site-edit.blade.php → site/edit.blade.php
- site-stats.blade.php → site/stats.blade.php
- tmux-edit.blade.php → site/tmux-edit.blade.php
## Controllers Updated
All admin controllers have been updated to use the new view paths:
1. **AdminMovieController.php** - Updated to use `admin.movies.*` views
2. **AdminMusicController.php** - Updated to use `admin.music.*` views
3. **AdminGameController.php** - Updated to use `admin.games.*` views
4. **AdminUserController.php** - Updated to use `admin.users.*` views
5. **AdminRoleController.php** - Updated to use `admin.roles.*` views
6. **AdminGroupController.php** - Updated to use `admin.groups.*` views
7. **AdminCategoryController.php** - Updated to use `admin.categories.*` views
8. **AdminReleasesController.php** - Updated to use `admin.releases.*` views
9. **AdminFailedReleasesController.php** - Updated to use `admin.releases.failed` view
10. **AdminReleaseNamingRegexesController.php** - Updated to use `admin.regexes.release-naming-*` views
11. **AdminCollectionRegexesController.php** - Updated to use `admin.regexes.collection-*` views
12. **AdminCategoryRegexesController.php** - Updated to use `admin.regexes.category-*` views
13. **AdminBlacklistController.php** - Updated to use `admin.blacklist.*` views
14. **AdminContentController.php** - Updated to use `admin.content.*` views
15. **AdminSiteController.php** - Updated to use `admin.site.*` views
16. **AdminTmuxController.php** - Updated to use `admin.site.tmux-edit` view
17. **DeletedUsersController.php** - Updated to use `admin.users.deleted` view
## Benefits
1. **Better Organization** - Related views are now grouped together logically
2. **Easier Navigation** - Developers can quickly find views by feature area
3. **Consistent Structure** - All admin views follow the same organizational pattern
4. **Maintainability** - Future additions can follow the established pattern
5. **Naming Convention** - Index views use `index.blade.php` for consistency
## No Breaking Changes
All controller references have been updated, so the application should work seamlessly with the new structure. The views that were already organized (anidb, books, comments, console, invitations, predb, shows) remain unchanged.
-221
View File
@@ -1,221 +0,0 @@
# Authentication System Upgrade - Complete
## ✅ Successfully Upgraded All Authentication Components
### Controllers Updated
#### 1. **LoginController** (`app/Http/Controllers/Auth/LoginController.php`)
**Changed:**
- Removed Smarty template rendering from `showLoginForm()` method
- Now returns Blade view: `view('auth.login')`
- Maintains all existing authentication logic (2FA, remember me, account verification, etc.)
**Before:**
```php
public function showLoginForm()
{
$theme = 'Gentele';
$meta_title = 'Login';
// ...Smarty code...
return app('smarty.view')->display($theme.'/login.tpl');
}
```
**After:**
```php
public function showLoginForm()
{
return view('auth.login');
}
```
#### 2. **ForgotPasswordController** (`app/Http/Controllers/Auth/ForgotPasswordController.php`)
**Changed:**
- Converted `showLinkRequestForm()` from void return to view return
- Replaced all Smarty assignments with Blade view responses
- Proper error handling with `withErrors()` and success messages with `with('status')`
- Maintains reCAPTCHA validation
- Maintains API key and email-based password reset
**Key Improvements:**
- Returns `view('auth.passwords.email')` with appropriate errors or success status
- Better error handling and user feedback
- Cleaner, more Laravel-standard code
#### 3. **ResetPasswordController** (`app/Http/Controllers/Auth/ResetPasswordController.php`)
**Changed:**
- Updated `reset()` method to return redirects instead of void
- Added `showResetForm()` method to display password reset form
- Replaced Smarty rendering with Blade views
- Better redirect flow with session messages
**Key Improvements:**
- Returns `view('auth.passwords.reset')` for reset form
- Redirects to login with success message after password reset
- Proper error handling with redirects
#### 4. **RegisterController** ✅
- Already using Blade views (no changes needed)
### Blade Templates Created
#### 1. **Login Page** (`resources/views/auth/login.blade.php`)
- Modern gradient background (blue to indigo)
- Icon-enhanced input fields (user icon, lock icon)
- Username/Email field (flexible authentication)
- Password field with toggle visibility option
- Remember me checkbox
- Forgot password link
- reCAPTCHA support (when enabled)
- Session message display with auto-hide
- Links to register and home
- Fully responsive design
#### 2. **Register Page** (`resources/views/auth/register.blade.php`)
- Matching design with login page
- Username, email, password, and confirmation fields
- Terms and conditions checkbox
- reCAPTCHA support
- Password strength hints
- Field validation with inline errors
- Link back to login
#### 3. **Forgot Password** (`resources/views/auth/passwords/email.blade.php`)
- Simple, clean design
- Email input field
- Success message when reset link sent
- Error message display
- Links to login and register
#### 4. **Reset Password** (`resources/views/auth/passwords/reset.blade.php`)
- Secure password reset form
- Pre-filled email (read-only)
- New password and confirmation fields
- Password requirements hint
- Token handling
#### 5. **Guest Layout** (`resources/views/layouts/guest.blade.php`)
- Updated to support all auth pages
- Includes Font Awesome icons
- Proper asset loading
- Stack support for page-specific scripts
## 🎨 Design Features
### Visual Design
- **Gradient backgrounds** - Professional blue to indigo gradient
- **Card-based layout** - Clean, modern card design with shadows
- **Icon integration** - Font Awesome icons throughout
- **Smooth transitions** - Hover effects and animations
- **Consistent spacing** - TailwindCSS utility classes
### User Experience
- **Clear error messages** - With icons and proper styling
- **Success notifications** - Auto-hide after 5 seconds
- **Input validation** - Real-time feedback
- **Mobile responsive** - Works on all screen sizes
- **Loading states** - Proper button states
### Security Features
- ✅ CSRF protection
- ✅ reCAPTCHA integration ready
- ✅ Password confirmation
- ✅ Secure token handling
- ✅ Rate limiting (existing)
- ✅ 2FA support (existing)
- ✅ Account verification (existing)
## 🚀 Testing Your Upgraded Authentication
### URLs to Test:
1. **Login:** `http://yoursite/login`
2. **Register:** `http://yoursite/register`
3. **Forgot Password:** `http://yoursite/password/reset`
4. **Reset Password:** `http://yoursite/password/reset/{token}`
### Features to Test:
- ✅ Login with username
- ✅ Login with email
- ✅ Remember me functionality
- ✅ Forgot password flow
- ✅ Password reset via email
- ✅ Registration
- ✅ Form validation
- ✅ Error messages
- ✅ Success messages
- ✅ Responsive design (mobile/tablet/desktop)
- ✅ reCAPTCHA (if enabled)
## 📝 What Was Preserved
All existing functionality remains intact:
- 2FA authentication flow
- Trusted device cookies
- Rate limiting (3 attempts per 2 minutes)
- Account verification
- Soft-deleted account handling
- Email and API key password reset
- User role and permission assignment
- Remember me functionality
- Session management
- Logout from other devices
## 🔧 Technical Details
### Dependencies
- **TailwindCSS** - For styling
- **Font Awesome** - For icons
- **Laravel Blade** - For templating
- **Existing auth packages** - All maintained
### File Changes Summary
```
Modified:
- app/Http/Controllers/Auth/LoginController.php
- app/Http/Controllers/Auth/ForgotPasswordController.php
- app/Http/Controllers/Auth/ResetPasswordController.php
- resources/views/layouts/guest.blade.php
Created:
- resources/views/auth/login.blade.php (replaced old version)
- resources/views/auth/register.blade.php (replaced old version)
- resources/views/auth/passwords/email.blade.php (replaced old version)
- resources/views/auth/passwords/reset.blade.php (replaced old version)
```
## ✨ Benefits
1. **Modern UI/UX** - Professional, modern design
2. **Better Performance** - Blade compiles to PHP (faster than Smarty)
3. **Laravel Standard** - Uses native Laravel templating
4. **Maintainability** - Easier to maintain and update
5. **Better IDE Support** - Better autocomplete and debugging
6. **Mobile Friendly** - Responsive design out of the box
7. **Accessibility** - Proper ARIA labels and semantic HTML
## 🎯 Next Steps
The authentication system is now fully upgraded and ready to use! All controllers and views are using Blade + TailwindCSS.
To complete the full migration:
1. Test all authentication flows thoroughly
2. Clear application caches: `php artisan view:clear && php artisan cache:clear`
3. Compile assets: `npm run build`
4. Continue migrating remaining non-auth controllers
## 📊 Migration Progress
**Authentication System:** ✅ 100% Complete
- Login: ✅ Done
- Register: ✅ Done
- Forgot Password: ✅ Done
- Reset Password: ✅ Done
- Controllers: ✅ All updated
- Views: ✅ All created
**Overall Application Migration:**
- Authentication: ✅ Complete (4/4 controllers)
- Browse: ✅ Complete (BrowseController)
- Details: ✅ Complete (DetailsController)
- Remaining: ⏳ In Progress (~40+ controllers)
-198
View File
@@ -1,198 +0,0 @@
# Blade + TailwindCSS Migration - Quick Start
## Migration Status
**Completed:**
- BasePageController updated to use Blade views
- Main and Admin layouts created with TailwindCSS
- Blade partials created (header, sidebar, footer, admin menu)
- BrowseController migrated to Blade
- DetailsController migrated to Blade
- Browse, Details, Search, and Admin Dashboard views created
- Migration helper script created
**Remaining Work:**
- Migrate remaining 40+ controllers
- Convert 100+ Smarty templates to Blade
- Update all AJAX endpoints
- Test thoroughly
## Quick Start
### 1. Install Dependencies (if needed)
```bash
npm install
```
### 2. Compile Assets
```bash
npm run build
# or for development with hot reload:
npm run dev
```
### 3. Clear Caches
```bash
php artisan view:clear
php artisan cache:clear
php artisan config:clear
```
### 4. Test the Migrated Pages
Visit these URLs to see the new Blade templates in action:
- Browse: `/browse/All`
- Details: `/details/{guid}`
- Admin Dashboard: `/admin`
- Search: `/search`
## File Structure
```
resources/views/
├── layouts/
│ ├── main.blade.php # Main user-facing layout
│ ├── admin.blade.php # Admin panel layout
│ └── app.blade.php # Auth layout (existing)
├── partials/
│ ├── header-menu.blade.php # Top navigation
│ ├── sidebar.blade.php # Left sidebar
│ ├── footer.blade.php # Footer
│ └── admin-menu.blade.php # Admin sidebar
├── browse/
│ └── index.blade.php # Browse releases page
├── details/
│ └── index.blade.php # Release details page
├── search/
│ └── index.blade.php # Search page
├── home/
│ └── index.blade.php # Homepage
└── admin/
└── dashboard.blade.php # Admin dashboard
```
## Migration Helper Tool
Use the included migration script to help convert Smarty templates:
```bash
php migrate-templates.php resources/views/themes/Gentele/browse.tpl
```
This will:
- Convert Smarty syntax to Blade syntax
- Suggest the output filename
- Show a preview before saving
- Create necessary directories
## Controller Migration Pattern
**Before (Smarty):**
```php
public function index(Request $request)
{
$this->setPreferences();
$data = SomeModel::all();
$this->smarty->assign('data', $data);
$this->smarty->assign('meta_title', 'Page Title');
$content = $this->smarty->fetch('template.tpl');
$this->smarty->assign(compact('content', 'meta_title'));
$this->pagerender();
}
```
**After (Blade):**
```php
public function index(Request $request)
{
$this->setPreferences();
$data = SomeModel::all();
$this->viewData = array_merge($this->viewData, [
'data' => $data,
'meta_title' => 'Page Title',
]);
return view('module.index', $this->viewData);
}
```
## TailwindCSS Classes
Common Bootstrap to Tailwind conversions:
| Bootstrap | TailwindCSS |
|-----------|-------------|
| `container` | `container mx-auto px-4` |
| `row` | `grid grid-cols-12` or `flex` |
| `col-md-6` | `md:col-span-6` or `md:w-1/2` |
| `btn btn-primary` | `px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700` |
| `card` | `bg-white rounded-lg shadow-sm` |
| `d-flex justify-content-between` | `flex justify-between` |
| `mb-3` | `mb-3` (same) |
| `text-center` | `text-center` (same) |
## Next Controllers to Migrate
Priority order for remaining migrations:
1. **SearchController** - High traffic page
2. **MovieController** - Popular feature
3. **SeriesController** - Popular feature
4. **ProfileController** - User management
5. **Admin Controllers** - Admin functionality
For each controller:
1. Update the controller method to use `$this->viewData` and `return view()`
2. Create corresponding `.blade.php` file
3. Convert Smarty syntax to Blade
4. Update CSS from Bootstrap to TailwindCSS
5. Test thoroughly
## Testing Checklist
- [ ] Browse pages load correctly
- [ ] Release details show all information
- [ ] Search functionality works
- [ ] User authentication works
- [ ] Admin panel is accessible
- [ ] Forms submit properly
- [ ] AJAX endpoints work
- [ ] Responsive design on mobile
- [ ] No console errors
- [ ] All images/assets load
## Common Issues & Solutions
**Issue:** Views not updating
```bash
php artisan view:clear
```
**Issue:** CSS not applying
```bash
npm run build
php artisan cache:clear
```
**Issue:** Routes not working
```bash
php artisan route:clear
php artisan config:clear
```
## Resources
- [Laravel Blade Docs](https://laravel.com/docs/blade)
- [TailwindCSS Docs](https://tailwindcss.com/docs)
- [MIGRATION_GUIDE.md](MIGRATION_GUIDE.md) - Detailed migration guide
## Notes
- All new views extend either `layouts.main` or `layouts.admin`
- Use `@auth` / `@guest` for authentication checks
- Use `@can()` for permission checks
- TailwindCSS is configured to scan all blade files
- Vite handles asset compilation
-206
View File
@@ -1,206 +0,0 @@
# Dark Mode Implementation Guide
## Overview
This document outlines the comprehensive dark/light mode implementation added to the NNTmux application.
## What Was Implemented
### 1. Core Dark Mode Setup
#### Tailwind Configuration (`tailwind.config.js`)
- Enabled class-based dark mode strategy
- This allows toggling dark mode by adding/removing the `dark` class from the `<html>` element
#### Main Layout (`resources/views/layouts/main.blade.php`)
- Added inline script to prevent flash of unstyled content (FOUC)
- Theme preference is stored in localStorage
- Dark mode toggle button added to bottom-left corner (sun/moon icons)
- Updated all base colors to support dark variants
### 2. Dark Mode Toggle Features
- **Toggle Button**: Fixed position button in bottom-left corner
- **Icons**: Sun icon for light mode, moon icon for dark mode
- **Persistence**: Theme preference saved to localStorage
- **Auto-load**: Theme applied before page render to prevent flashing
### 3. Components Updated
#### Admin Area (`resources/views/layouts/admin.blade.php`)
- Admin layout with dark mode initialization
- Admin sidebar navigation
- Top header bar with logout and "Back to Site" links
- Success/error alert messages
- Dark mode toggle button (shared with main site)
#### Admin Menu (`resources/views/partials/admin-menu.blade.php`)
- All menu items and submenu items
- Consistent hover states
- Accordion-style menu sections
#### Admin Dashboard (`resources/views/admin/dashboard.blade.php`)
- Statistics cards with icons
- System status section
- All badges and indicators
#### Admin User List (`resources/views/admin/user-list.blade.php`)
- Page header with action buttons
- Search/filter form with inputs and selects
- Data table (headers and rows)
- User status badges (verified, role)
- Action buttons (edit, verify, delete)
#### Browse Index Page (`resources/views/browse/index.blade.php`)
- Breadcrumb navigation
- Toolbar and action buttons
- Data table (headers and rows)
- Badges and status indicators
- Modals (Preview, Media Info, File List)
- Dynamically generated content in JavaScript functions
#### Header Menu (`resources/views/partials/header-menu.blade.php`)
- Navigation bar
- Dropdown menus
- Menu items and hover states
#### Footer (`resources/views/partials/footer.blade.php`)
- Background and borders
- Text colors and links
- Social media icons
#### Main Layout Components
- Sidebar
- Main content area
- Success/error alert messages
- Mobile sidebar toggle
### 4. CSS Updates (`resources/css/app.css`)
All button classes now support dark mode:
- `.btn-primary` - Blue buttons
- `.btn-secondary` - Gray buttons
- `.btn-success` - Green buttons
- `.btn-danger` - Red buttons
- `.btn-warning` - Yellow buttons
- `.btn-info` - Cyan buttons
### 5. Color Scheme
#### Light Mode
- Background: Gray-50
- Cards: White
- Text: Gray-700 to Gray-900
- Borders: Gray-200
#### Dark Mode
- Background: Gray-900
- Cards: Gray-800
- Text: Gray-100 to Gray-300
- Borders: Gray-700
## How to Use
### For End Users
1. Look for the theme toggle button in the bottom-left corner of the screen
2. Click to switch between light and dark modes
3. Your preference will be saved automatically
### For Developers
#### Adding Dark Mode to New Templates
When creating new templates, use Tailwind's dark mode variant:
```blade
<!-- Basic example -->
<div class="bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100">
Content here
</div>
<!-- Buttons -->
<button class="bg-blue-600 dark:bg-blue-700 hover:bg-blue-700 dark:hover:bg-blue-800">
Click me
</button>
<!-- Borders -->
<div class="border-gray-200 dark:border-gray-700">
Content
</div>
```
#### Common Dark Mode Patterns
**Cards/Containers:**
```blade
<div class="bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700">
```
**Text:**
```blade
<p class="text-gray-700 dark:text-gray-300">
<h1 class="text-gray-900 dark:text-gray-100">
```
**Links:**
```blade
<a href="#" class="text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300">
```
**Backgrounds (subtle):**
```blade
<div class="bg-gray-50 dark:bg-gray-900">
<div class="bg-gray-100 dark:bg-gray-800">
```
#### JavaScript Dynamic Content
When generating HTML dynamically in JavaScript, include dark mode classes:
```javascript
html += `<div class="bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100">
${content}
</div>`;
```
## Browser Compatibility
- All modern browsers (Chrome, Firefox, Safari, Edge)
- Internet Explorer: Not supported (uses Tailwind CSS v3)
## Testing Checklist
- [ ] Toggle button works on all pages
- [ ] Theme preference persists after page reload
- [ ] No flash of unstyled content on page load
- [ ] All modals display correctly in both modes
- [ ] Dynamically loaded content respects current theme
- [ ] Forms and inputs are readable in both modes
- [ ] All badges and status indicators are visible
## Remaining Templates to Update
The following templates may need dark mode support if they haven't been updated yet:
- `resources/views/home/*`
- `resources/views/search/*`
- `resources/views/details/*`
- `resources/views/series/*`
- `resources/views/movies/*`
- `resources/views/profile/*`
- `resources/views/auth/*`
**Admin templates** have been fully updated with dark mode support. Additional admin pages will inherit the dark mode styles from the admin layout and common patterns.
To update remaining admin pages (like release-list, group-list, etc.), follow the same pattern used in user-list.blade.php.
## Performance Considerations
- The inline script in the head prevents FOUC with minimal overhead
- localStorage is fast and doesn't require server requests
- CSS transitions are smooth (200ms duration)
## Future Enhancements
- [ ] Add system preference detection (prefers-color-scheme)
- [ ] Add auto-switch based on time of day
- [ ] Add custom color themes beyond light/dark
- [ ] Add user preference storage in database for logged-in users
## Support
If you encounter any issues with dark mode, check:
1. Browser console for JavaScript errors
2. localStorage is enabled in browser
3. Tailwind CSS is properly compiled
4. The `dark` class is being toggled on the `<html>` element