mirror of
https://github.com/unraid/api.git
synced 2026-01-03 06:59:50 -06:00
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Eli Bosley <ekbosley@gmail.com> - **CI/CD** - Updated GitHub Actions workflow to build Unraid UI Web Components. - Adjusted artifact naming and download configurations. - **Web Components** - Added new web components and registration mechanism. - Implemented toast notifications. - Enhanced UI component library. - **Notifications** - Added real-time notification subscription. - Created notification settings page. - Implemented notification toast system. - **API Improvements** - Refactored GraphQL schema loading. - Updated authentication and cookie handling. - Improved error logging and server initialization. - **Development Tools** - Updated ESLint configuration. - Enhanced import path management. - Added new development dependencies.
Unraid UI
A Vue 3 component library providing a set of reusable, accessible UI components for Unraid development.
Features
- ⚡️ Built with Vue 3 and TypeScript
- 🎭 Storybook documentation
- ✅ Tested components
- 🎪 Built on top of TailwindCSS and Shadcn/UI
Installation
Make sure you have the peer dependencies installed:
npm install vue@^3.3.0 tailwindcss@^3.0.0
Setup
1. Add CSS
Import the component library styles in your main entry file:
import "@unraid/ui/style.css";
2. Configure TailwindCSS
Add the following to your tailwind.config.js:
module.exports = {
content: [
// ... your content paths
"./node_modules/@unraid/ui/**/*.{js,vue,ts}",
],
theme: {
extend: {},
},
plugins: [require("tailwindcss-animate"), require("@tailwindcss/typography")],
};
Usage
<script setup lang="ts">
import { Button } from "@unraid/ui";
</script>
<template>
<Button variant="primary"> Click me </Button>
</template>
Development
Local Development
Install dependencies:
npm install
Start Storybook development server:
npm run storybook
This will start Storybook at http://localhost:6006
Building
npm run build
Testing
Run tests:
npm run test
Run tests with UI:
npm run test:ui
Generate coverage report:
npm run coverage
Type Checking
npm run typecheck
Scripts
dev: Start development serverbuild: Build for productionpreview: Preview production buildtest: Run teststest:ui: Run tests with UIcoverage: Generate test coverageclean: Remove build artifactstypecheck: Run type checkingstorybook: Start Storybook development serverbuild-storybook: Build Storybook for production