diff --git a/README.md b/README.md index ec77173..8c16ba8 100644 --- a/README.md +++ b/README.md @@ -1 +1,46 @@ -All AI writen \ No newline at end of file +All AI written + +# CatsOfMastodonGo Admin Dashboard v2 + +A modern, lightweight admin dashboard for reviewing media content, built with HTML, CSS, JavaScript, Alpine.js, and Tailwind CSS. + +## Live Demo + +A live demo of the project is available at: [cat.monasef.ir](https://cat.monasef.ir) + +## Features + +- Password-based authentication +- Gitea OAuth integration +- Media queue system with preloading +- Approval/rejection workflow for media content +- Responsive design for desktop and mobile +- Modern UI with smooth transitions + +## Tech Stack + +- HTML5 +- CSS3 (with Tailwind CSS) +- JavaScript (with Alpine.js for state management) +- HTMX (for enhanced interactivity) + +## Development Setup + +1. Install dependencies: `pnpm install` +2. Start development server: `pnpm run dev` +3. The application will be available at: `http://localhost:8080/admin/` + +## Production Build + +1. Build for production: `pnpm run build` +2. The built files will be in the `dist` directory + +## API Integration + +The application integrates with the backend API at the following endpoints: +- `POST /admin/api/login` - Authenticate with password +- `GET /admin/api/login/oauth/gitea` - Initiate Gitea OAuth flow +- `POST /admin/api/login/oauth/gitea/final` - Complete Gitea OAuth flow +- `GET /admin/api/getmedia` - Get next media item to review +- `POST /admin/api/approve` - Approve a media item +- `POST /admin/api/reject` - Reject a media item \ No newline at end of file diff --git a/components.json b/components.json deleted file mode 100644 index f29e3f1..0000000 --- a/components.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "https://ui.shadcn.com/schema.json", - "style": "default", - "rsc": false, - "tsx": true, - "tailwind": { - "config": "tailwind.config.ts", - "css": "src/index.css", - "baseColor": "slate", - "cssVariables": true, - "prefix": "" - }, - "aliases": { - "components": "@/components", - "utils": "@/lib/utils", - "ui": "@/components/ui", - "lib": "@/lib", - "hooks": "@/hooks" - } -} \ No newline at end of file diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..cda30f7 --- /dev/null +++ b/css/style.css @@ -0,0 +1,23 @@ +/* Additional custom styles if needed */ +[x-cloak] { display: none !important; } + +/* Ensure body takes full height */ +body { + margin: 0; + padding: 0; +} + +/* Loading spinner animation */ +.animate-spin { + animation: spin 1s linear infinite; +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + +/* Object fit for images */ +.object-contain { + object-fit: contain; +} \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js deleted file mode 100644 index e67846f..0000000 --- a/eslint.config.js +++ /dev/null @@ -1,29 +0,0 @@ -import js from "@eslint/js"; -import globals from "globals"; -import reactHooks from "eslint-plugin-react-hooks"; -import reactRefresh from "eslint-plugin-react-refresh"; -import tseslint from "typescript-eslint"; - -export default tseslint.config( - { ignores: ["dist"] }, - { - extends: [js.configs.recommended, ...tseslint.configs.recommended], - files: ["**/*.{ts,tsx}"], - languageOptions: { - ecmaVersion: 2020, - globals: globals.browser, - }, - plugins: { - "react-hooks": reactHooks, - "react-refresh": reactRefresh, - }, - rules: { - ...reactHooks.configs.recommended.rules, - "react-refresh/only-export-components": [ - "warn", - { allowConstantExport: true }, - ], - "@typescript-eslint/no-unused-vars": "off", - }, - } -); diff --git a/index.html b/index.html index b6f5c11..8ea36c2 100644 --- a/index.html +++ b/index.html @@ -1,24 +1,301 @@ - -
+ -Loading media...
+Media ID:
+Post ID:
++ more item(s) pre-loaded +
+No media available for review
+ +