chore: lint fixes and PR comments
This commit is contained in:
parent
a9a4e5d5e0
commit
9040408d71
@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
"pastebar-app-ui": patch
|
'pastebar-app-ui': patch
|
||||||
---
|
---
|
||||||
|
|
||||||
Added persistent note icons for clips with descriptions
|
Added persistent note icons for clips with descriptions
|
||||||
|
|
||||||
|
30
.github/workflows/build-test.yml
vendored
30
.github/workflows/build-test.yml
vendored
@ -1,5 +1,5 @@
|
|||||||
name: Build Test and Version Bump
|
name: Build Test and Version Bump
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
# push:
|
# push:
|
||||||
# branches: [ "main" ]
|
# branches: [ "main" ]
|
||||||
@ -29,40 +29,40 @@ jobs:
|
|||||||
echo "changes_detected=false" >> $GITHUB_ENV
|
echo "changes_detected=false" >> $GITHUB_ENV
|
||||||
echo "CHANGESET UPDATE NOT DETECTED"
|
echo "CHANGESET UPDATE NOT DETECTED"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
CHANGES_DETECTED: ${{ env.changes_detected }}
|
CHANGES_DETECTED: ${{ env.changes_detected }}
|
||||||
|
|
||||||
run: |
|
run: |
|
||||||
if [ "${CHANGES_DETECTED}" != "true" ]; then
|
if [ "${CHANGES_DETECTED}" != "true" ]; then
|
||||||
echo "No changesets detected. Skipping version bump and PR creation."
|
echo "No changesets detected. Skipping version bump and PR creation."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git config user.name github-actions
|
git config user.name github-actions
|
||||||
git config user.email github-actions@github.com
|
git config user.email github-actions@github.com
|
||||||
|
|
||||||
# Create a new branch
|
# Create a new branch
|
||||||
git checkout -b version-bump-${{ github.sha }}
|
git checkout -b version-bump-${{ github.sha }}
|
||||||
|
|
||||||
# Run version bump
|
# Run version bump
|
||||||
npm run version
|
npm run version
|
||||||
|
|
||||||
# Check if there are changes to commit
|
# Check if there are changes to commit
|
||||||
if [ -z "$(git status --porcelain)" ]; then
|
if [ -z "$(git status --porcelain)" ]; then
|
||||||
echo "No changes to commit after version bump. Exiting."
|
echo "No changes to commit after version bump. Exiting."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Commit changes
|
# Commit changes
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Version bump, changelog update"
|
git commit -m "Version bump, changelog update"
|
||||||
|
|
||||||
# Push the branch
|
# Push the branch
|
||||||
git push origin version-bump-${{ github.sha }}
|
git push origin version-bump-${{ github.sha }}
|
||||||
|
|
||||||
# Create Pull Request
|
# Create Pull Request
|
||||||
gh pr create --title "Version Bump and Changelog Update" --body "Automated version bump, changelog update, and package-lock.json synchronization" --base main --head version-bump-${{ github.sha }}
|
gh pr create --title "Version Bump and Changelog Update" --body "Automated version bump, changelog update, and package-lock.json synchronization" --base main --head version-bump-${{ github.sha }}
|
||||||
|
|
||||||
@ -71,23 +71,23 @@ jobs:
|
|||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
node-version: lts/*
|
||||||
|
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
targets: aarch64-apple-darwin
|
targets: aarch64-apple-darwin
|
||||||
|
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Build Tauri App
|
- name: Build Tauri App
|
||||||
uses: tauri-apps/tauri-action@v0
|
uses: tauri-apps/tauri-action@v0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
args: "--target aarch64-apple-darwin --bundles app"
|
args: '--target aarch64-apple-darwin --bundles app'
|
||||||
|
21
.github/workflows/claude-code-review.yml
vendored
21
.github/workflows/claude-code-review.yml
vendored
@ -17,14 +17,14 @@ jobs:
|
|||||||
# github.event.pull_request.user.login == 'external-contributor' ||
|
# github.event.pull_request.user.login == 'external-contributor' ||
|
||||||
# github.event.pull_request.user.login == 'new-developer' ||
|
# github.event.pull_request.user.login == 'new-developer' ||
|
||||||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
|
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pull-requests: read
|
pull-requests: read
|
||||||
issues: read
|
issues: read
|
||||||
id-token: write
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -36,10 +36,10 @@ jobs:
|
|||||||
uses: anthropics/claude-code-action@beta
|
uses: anthropics/claude-code-action@beta
|
||||||
with:
|
with:
|
||||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
|
|
||||||
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
|
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
|
||||||
# model: "claude-opus-4-20250514"
|
# model: "claude-opus-4-20250514"
|
||||||
|
|
||||||
# Direct prompt for automated review (no @claude mention needed)
|
# Direct prompt for automated review (no @claude mention needed)
|
||||||
direct_prompt: |
|
direct_prompt: |
|
||||||
Please review this pull request and provide feedback on:
|
Please review this pull request and provide feedback on:
|
||||||
@ -48,9 +48,9 @@ jobs:
|
|||||||
- Performance considerations
|
- Performance considerations
|
||||||
- Security concerns
|
- Security concerns
|
||||||
- Test coverage
|
- Test coverage
|
||||||
|
|
||||||
Be constructive and helpful in your feedback.
|
Be constructive and helpful in your feedback.
|
||||||
|
|
||||||
# Optional: Customize review based on file types
|
# Optional: Customize review based on file types
|
||||||
# direct_prompt: |
|
# direct_prompt: |
|
||||||
# Review this PR focusing on:
|
# Review this PR focusing on:
|
||||||
@ -58,18 +58,17 @@ jobs:
|
|||||||
# - For API endpoints: Security, input validation, and error handling
|
# - For API endpoints: Security, input validation, and error handling
|
||||||
# - For React components: Performance, accessibility, and best practices
|
# - For React components: Performance, accessibility, and best practices
|
||||||
# - For tests: Coverage, edge cases, and test quality
|
# - For tests: Coverage, edge cases, and test quality
|
||||||
|
|
||||||
# Optional: Different prompts for different authors
|
# Optional: Different prompts for different authors
|
||||||
# direct_prompt: |
|
# direct_prompt: |
|
||||||
# ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
|
# ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
|
||||||
# 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' ||
|
# 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' ||
|
||||||
# 'Please provide a thorough code review focusing on our coding standards and best practices.' }}
|
# 'Please provide a thorough code review focusing on our coding standards and best practices.' }}
|
||||||
|
|
||||||
# Optional: Add specific tools for running tests or linting
|
# Optional: Add specific tools for running tests or linting
|
||||||
# allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)"
|
# allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)"
|
||||||
|
|
||||||
# Optional: Skip review for certain conditions
|
# Optional: Skip review for certain conditions
|
||||||
# if: |
|
# if: |
|
||||||
# !contains(github.event.pull_request.title, '[skip-review]') &&
|
# !contains(github.event.pull_request.title, '[skip-review]') &&
|
||||||
# !contains(github.event.pull_request.title, '[WIP]')
|
# !contains(github.event.pull_request.title, '[WIP]')
|
||||||
|
|
||||||
|
13
.github/workflows/claude.yml
vendored
13
.github/workflows/claude.yml
vendored
@ -34,26 +34,25 @@ jobs:
|
|||||||
uses: anthropics/claude-code-action@beta
|
uses: anthropics/claude-code-action@beta
|
||||||
with:
|
with:
|
||||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
|
|
||||||
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
|
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
|
||||||
# model: "claude-opus-4-20250514"
|
# model: "claude-opus-4-20250514"
|
||||||
|
|
||||||
# Optional: Customize the trigger phrase (default: @claude)
|
# Optional: Customize the trigger phrase (default: @claude)
|
||||||
# trigger_phrase: "/claude"
|
# trigger_phrase: "/claude"
|
||||||
|
|
||||||
# Optional: Trigger when specific user is assigned to an issue
|
# Optional: Trigger when specific user is assigned to an issue
|
||||||
# assignee_trigger: "claude-bot"
|
# assignee_trigger: "claude-bot"
|
||||||
|
|
||||||
# Optional: Allow Claude to run specific commands
|
# Optional: Allow Claude to run specific commands
|
||||||
# allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)"
|
# allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)"
|
||||||
|
|
||||||
# Optional: Add custom instructions for Claude to customize its behavior for your project
|
# Optional: Add custom instructions for Claude to customize its behavior for your project
|
||||||
# custom_instructions: |
|
# custom_instructions: |
|
||||||
# Follow our coding standards
|
# Follow our coding standards
|
||||||
# Ensure all new code has tests
|
# Ensure all new code has tests
|
||||||
# Use TypeScript for new files
|
# Use TypeScript for new files
|
||||||
|
|
||||||
# Optional: Custom environment variables for Claude
|
# Optional: Custom environment variables for Claude
|
||||||
# claude_env: |
|
# claude_env: |
|
||||||
# NODE_ENV: test
|
# NODE_ENV: test
|
||||||
|
|
||||||
|
28
CLAUDE.md
28
CLAUDE.md
@ -7,6 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|||||||
PasteBar is a cross-platform clipboard manager built with Tauri (Rust + TypeScript/React). It provides unlimited clipboard history, custom clip management, collections, and advanced features like programming language detection and web scraping.
|
PasteBar is a cross-platform clipboard manager built with Tauri (Rust + TypeScript/React). It provides unlimited clipboard history, custom clip management, collections, and advanced features like programming language detection and web scraping.
|
||||||
|
|
||||||
**Technology Stack:**
|
**Technology Stack:**
|
||||||
|
|
||||||
- **Backend**: Rust with Tauri framework, Diesel ORM (SQLite), Reqwest, Serde, Tokio
|
- **Backend**: Rust with Tauri framework, Diesel ORM (SQLite), Reqwest, Serde, Tokio
|
||||||
- **Frontend**: TypeScript, React, React Query, Vite, TailwindCSS, Jotai, Zustand
|
- **Frontend**: TypeScript, React, React Query, Vite, TailwindCSS, Jotai, Zustand
|
||||||
- **Platforms**: macOS and Windows (including Apple Silicon M1, Intel, AMD, and ARM)
|
- **Platforms**: macOS and Windows (including Apple Silicon M1, Intel, AMD, and ARM)
|
||||||
@ -14,12 +15,15 @@ PasteBar is a cross-platform clipboard manager built with Tauri (Rust + TypeScri
|
|||||||
## Development Commands
|
## Development Commands
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
First install the Diesel CLI:
|
First install the Diesel CLI:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cargo install diesel_cli --no-default-features --features sqlite
|
cargo install diesel_cli --no-default-features --features sqlite
|
||||||
```
|
```
|
||||||
|
|
||||||
### Main Development Commands
|
### Main Development Commands
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Development (starts both frontend and backend in dev mode)
|
# Development (starts both frontend and backend in dev mode)
|
||||||
npm start
|
npm start
|
||||||
@ -48,7 +52,9 @@ npm run version:sync
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Frontend Development (packages/pastebar-app-ui/)
|
### Frontend Development (packages/pastebar-app-ui/)
|
||||||
|
|
||||||
The frontend is a workspace package that builds separately:
|
The frontend is a workspace package that builds separately:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd packages/pastebar-app-ui
|
cd packages/pastebar-app-ui
|
||||||
npm run dev # Development server on port 4422
|
npm run dev # Development server on port 4422
|
||||||
@ -56,6 +62,7 @@ npm run build # Build to dist-ui/
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Rust/Tauri Development (src-tauri/)
|
### Rust/Tauri Development (src-tauri/)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd src-tauri
|
cd src-tauri
|
||||||
cargo run --no-default-features # Development mode
|
cargo run --no-default-features # Development mode
|
||||||
@ -67,6 +74,7 @@ cargo build --release # Production build
|
|||||||
### High-Level Structure
|
### High-Level Structure
|
||||||
|
|
||||||
**Tauri Architecture**: The app uses Tauri's hybrid architecture where:
|
**Tauri Architecture**: The app uses Tauri's hybrid architecture where:
|
||||||
|
|
||||||
- Rust backend handles core functionality (clipboard monitoring, database operations, system integration)
|
- Rust backend handles core functionality (clipboard monitoring, database operations, system integration)
|
||||||
- TypeScript/React frontend provides the UI
|
- TypeScript/React frontend provides the UI
|
||||||
- Communication happens via Tauri commands and events
|
- Communication happens via Tauri commands and events
|
||||||
@ -74,17 +82,20 @@ cargo build --release # Production build
|
|||||||
**Core Components:**
|
**Core Components:**
|
||||||
|
|
||||||
1. **Clipboard Monitoring** (`src-tauri/src/clipboard/mod.rs`)
|
1. **Clipboard Monitoring** (`src-tauri/src/clipboard/mod.rs`)
|
||||||
|
|
||||||
- Real-time clipboard monitoring using `clipboard-master`
|
- Real-time clipboard monitoring using `clipboard-master`
|
||||||
- Automatic image capture and text processing
|
- Automatic image capture and text processing
|
||||||
- Language detection for code snippets
|
- Language detection for code snippets
|
||||||
- Configurable exclusion lists and masking
|
- Configurable exclusion lists and masking
|
||||||
|
|
||||||
2. **Database Layer** (`src-tauri/src/db.rs` + Diesel)
|
2. **Database Layer** (`src-tauri/src/db.rs` + Diesel)
|
||||||
|
|
||||||
- SQLite database with migrations in `migrations/`
|
- SQLite database with migrations in `migrations/`
|
||||||
- Custom data location support with path transformation
|
- Custom data location support with path transformation
|
||||||
- Connection pooling with r2d2
|
- Connection pooling with r2d2
|
||||||
|
|
||||||
3. **System Integration** (`src-tauri/src/main.rs`)
|
3. **System Integration** (`src-tauri/src/main.rs`)
|
||||||
|
|
||||||
- System tray menu with dynamic content
|
- System tray menu with dynamic content
|
||||||
- Global hotkeys and window management
|
- Global hotkeys and window management
|
||||||
- Platform-specific features (macOS accessibility, Windows compatibility)
|
- Platform-specific features (macOS accessibility, Windows compatibility)
|
||||||
@ -96,17 +107,20 @@ cargo build --release # Production build
|
|||||||
|
|
||||||
### Key Patterns
|
### Key Patterns
|
||||||
|
|
||||||
**Path Transformation System**:
|
**Path Transformation System**:
|
||||||
|
|
||||||
- Images are stored with `{{base_folder}}` placeholders for relative paths
|
- Images are stored with `{{base_folder}}` placeholders for relative paths
|
||||||
- `to_relative_image_path()` and `to_absolute_image_path()` handle conversion
|
- `to_relative_image_path()` and `to_absolute_image_path()` handle conversion
|
||||||
- Enables custom database locations without breaking image references
|
- Enables custom database locations without breaking image references
|
||||||
|
|
||||||
**Event-Driven Communication**:
|
**Event-Driven Communication**:
|
||||||
|
|
||||||
- Tauri events for real-time updates between backend and frontend
|
- Tauri events for real-time updates between backend and frontend
|
||||||
- Settings synchronization across multiple windows
|
- Settings synchronization across multiple windows
|
||||||
- Menu rebuilding on state changes
|
- Menu rebuilding on state changes
|
||||||
|
|
||||||
**Multi-Window Architecture**:
|
**Multi-Window Architecture**:
|
||||||
|
|
||||||
- Main window (primary interface)
|
- Main window (primary interface)
|
||||||
- History window (clipboard history view)
|
- History window (clipboard history view)
|
||||||
- QuickPaste window (contextual paste menu)
|
- QuickPaste window (contextual paste menu)
|
||||||
@ -114,8 +128,9 @@ cargo build --release # Production build
|
|||||||
### Database Schema
|
### Database Schema
|
||||||
|
|
||||||
Main entities:
|
Main entities:
|
||||||
|
|
||||||
- `items` - Custom clips and menu items
|
- `items` - Custom clips and menu items
|
||||||
- `clipboard_history` - Automatic clipboard captures
|
- `clipboard_history` - Automatic clipboard captures
|
||||||
- `collections` - Organization containers
|
- `collections` - Organization containers
|
||||||
- `tabs` - Sub-organization within collections
|
- `tabs` - Sub-organization within collections
|
||||||
- `link_metadata` - Web scraping and link preview data
|
- `link_metadata` - Web scraping and link preview data
|
||||||
@ -150,35 +165,42 @@ src-tauri/src/
|
|||||||
## Important Development Notes
|
## Important Development Notes
|
||||||
|
|
||||||
### Settings Management
|
### Settings Management
|
||||||
|
|
||||||
- Settings are stored as generic key-value pairs in the database
|
- Settings are stored as generic key-value pairs in the database
|
||||||
- Frontend uses `settingsStore.ts` with automatic synchronization
|
- Frontend uses `settingsStore.ts` with automatic synchronization
|
||||||
- Use `updateSetting()` function and include `invoke('build_system_menu')` for settings that affect the system tray
|
- Use `updateSetting()` function and include `invoke('build_system_menu')` for settings that affect the system tray
|
||||||
|
|
||||||
### Custom Data Locations
|
### Custom Data Locations
|
||||||
|
|
||||||
- The app supports custom database locations via user settings
|
- The app supports custom database locations via user settings
|
||||||
- All file operations must use `get_data_dir()`, `get_clip_images_dir()`, etc.
|
- All file operations must use `get_data_dir()`, `get_clip_images_dir()`, etc.
|
||||||
- Path transformation ensures image references work across location changes
|
- Path transformation ensures image references work across location changes
|
||||||
|
|
||||||
### Image Handling
|
### Image Handling
|
||||||
|
|
||||||
- Images are stored in both thumbnail and full resolution
|
- Images are stored in both thumbnail and full resolution
|
||||||
- Use path transformation helpers when storing/retrieving image paths
|
- Use path transformation helpers when storing/retrieving image paths
|
||||||
- Images support relative paths with `{{base_folder}}` placeholders
|
- Images support relative paths with `{{base_folder}}` placeholders
|
||||||
|
|
||||||
### Internationalization
|
### Internationalization
|
||||||
|
|
||||||
- Backend translations in `src-tauri/src/services/translations/translations.yaml`
|
- Backend translations in `src-tauri/src/services/translations/translations.yaml`
|
||||||
- Frontend translations in `packages/pastebar-app-ui/src/locales/lang/`
|
- Frontend translations in `packages/pastebar-app-ui/src/locales/lang/`
|
||||||
- Use `t()` function in React components and `Translations::get()` in Rust
|
- Use `t()` function in React components and `Translations::get()` in Rust
|
||||||
|
|
||||||
### Debug Logging
|
### Debug Logging
|
||||||
|
|
||||||
- Use `debug_output(|| { println!("message") })` in Rust for debug-only logging
|
- Use `debug_output(|| { println!("message") })` in Rust for debug-only logging
|
||||||
- Debug messages only appear in debug builds, keeping release builds clean
|
- Debug messages only appear in debug builds, keeping release builds clean
|
||||||
|
|
||||||
### System Tray Menu
|
### System Tray Menu
|
||||||
|
|
||||||
- Dynamic menu built from database items and settings
|
- Dynamic menu built from database items and settings
|
||||||
- Rebuild required when items or relevant settings change
|
- Rebuild required when items or relevant settings change
|
||||||
- Use `invoke('build_system_menu')` after operations that affect menu content
|
- Use `invoke('build_system_menu')` after operations that affect menu content
|
||||||
|
|
||||||
### Database Migrations
|
### Database Migrations
|
||||||
|
|
||||||
- Use Diesel migrations for schema changes
|
- Use Diesel migrations for schema changes
|
||||||
- Place migration files in `migrations/` directory
|
- Place migration files in `migrations/` directory
|
||||||
- Run migrations with `npm run diesel:migration:run`
|
- Run migrations with `npm run diesel:migration:run`
|
||||||
|
13
README.md
13
README.md
@ -1,13 +1,12 @@
|
|||||||
# PasteBar - Limitless, Free Clipboard Manager for Mac and Windows.
|
# PasteBar - Limitless, Free Clipboard Manager for Mac and Windows.
|
||||||
|
|
||||||
<a href="https://www.pastebar.app"><img width="1144" alt="Screenshot 2024-07-25 at 14 11 09" src="https://github.com/user-attachments/assets/ce861bdb-d7df-4944-885e-12d37177e56d"></a>
|
<a href="https://www.pastebar.app"><img width="1144" alt="Screenshot 2024-07-25 at 14 11 09" src="https://github.com/user-attachments/assets/ce861bdb-d7df-4944-885e-12d37177e56d"></a>
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Effortless Management Of Everything You Copy and Paste. Free and open-source.
|
Effortless Management Of Everything You Copy and Paste. Free and open-source.
|
||||||
|
|
||||||
Key features are:
|
Key features are:
|
||||||
|
|
||||||
- Unlimited clipboard history
|
- Unlimited clipboard history
|
||||||
- Searchable copy history
|
- Searchable copy history
|
||||||
@ -30,8 +29,9 @@ Key features are:
|
|||||||
https://www.pastebar.app
|
https://www.pastebar.app
|
||||||
|
|
||||||
### Stack
|
### Stack
|
||||||
* **Rust**: Tauri Apps, Diesel ORM, Reqwest, Anyhow, Serde, Tokio.
|
|
||||||
* **Javascript**: Typescript, React, React Query, Vite, TailwindCSS, Signals, Jotai, Zustand.
|
- **Rust**: Tauri Apps, Diesel ORM, Reqwest, Anyhow, Serde, Tokio.
|
||||||
|
- **Javascript**: Typescript, React, React Query, Vite, TailwindCSS, Signals, Jotai, Zustand.
|
||||||
|
|
||||||
# Build Local PasteBar App
|
# Build Local PasteBar App
|
||||||
|
|
||||||
@ -43,6 +43,7 @@ $ npm run build
|
|||||||
# Development Start
|
# Development Start
|
||||||
|
|
||||||
After cloning run:
|
After cloning run:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cargo install diesel_cli --no-default-features --features sqlite
|
$ cargo install diesel_cli --no-default-features --features sqlite
|
||||||
```
|
```
|
||||||
@ -51,5 +52,3 @@ $ cargo install diesel_cli --no-default-features --features sqlite
|
|||||||
$ npm install
|
$ npm install
|
||||||
$ npm start
|
$ npm start
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,65 +4,66 @@ This document outlines the plan to implement the feature allowing users to speci
|
|||||||
|
|
||||||
## 1. Goals
|
## 1. Goals
|
||||||
|
|
||||||
* Allow users to specify a custom parent directory for application data via the settings UI.
|
- Allow users to specify a custom parent directory for application data via the settings UI.
|
||||||
* The application will create and manage a `pastebar-data` subdirectory within the user-specified location.
|
- The application will create and manage a `pastebar-data` subdirectory within the user-specified location.
|
||||||
* This `pastebar-data` directory will contain the database file (`pastebar-db.data`), the `clip-images` folder, and the `clipboard-images` folder.
|
- This `pastebar-data` directory will contain the database file (`pastebar-db.data`), the `clip-images` folder, and the `clipboard-images` folder.
|
||||||
* Provide options to either **move** the existing data, **copy** it, or **use the new location without moving/copying**.
|
- Provide options to either **move** the existing data, **copy** it, or **use the new location without moving/copying**.
|
||||||
* Ensure the application uses the data from the new location after a restart.
|
- Ensure the application uses the data from the new location after a restart.
|
||||||
* Handle potential errors gracefully and inform the user.
|
- Handle potential errors gracefully and inform the user.
|
||||||
* Update the application state and backend configuration accordingly.
|
- Update the application state and backend configuration accordingly.
|
||||||
|
|
||||||
## 2. Backend (Rust - `src-tauri`)
|
## 2. Backend (Rust - `src-tauri`)
|
||||||
|
|
||||||
### 2.1. Configuration (`user_settings_service.rs`)
|
### 2.1. Configuration (`user_settings_service.rs`)
|
||||||
|
|
||||||
* The `UserConfig` struct's `custom_db_path: Option<String>` will now be repurposed to store the path to the **user-selected parent directory**. The application logic will handle appending the `/pastebar-data/` segment. This requires no change to the struct itself, only to how the path is interpreted.
|
- The `UserConfig` struct's `custom_db_path: Option<String>` will now be repurposed to store the path to the **user-selected parent directory**. The application logic will handle appending the `/pastebar-data/` segment. This requires no change to the struct itself, only to how the path is interpreted.
|
||||||
|
|
||||||
### 2.2. Path Logic (`db.rs` and new helpers)
|
### 2.2. Path Logic (`db.rs` and new helpers)
|
||||||
|
|
||||||
* We will introduce new helper functions to consistently resolve data paths, whether default or custom.
|
- We will introduce new helper functions to consistently resolve data paths, whether default or custom.
|
||||||
* `get_data_dir() -> PathBuf`: This will be the core helper. It checks for a `custom_db_path` in the settings.
|
- `get_data_dir() -> PathBuf`: This will be the core helper. It checks for a `custom_db_path` in the settings.
|
||||||
* If present, it returns `PathBuf::from(custom_path)`.
|
- If present, it returns `PathBuf::from(custom_path)`.
|
||||||
* If `None`, it returns the default application data directory.
|
- If `None`, it returns the default application data directory.
|
||||||
* `get_db_path()`: This function will be refactored to use `get_data_dir().join("pastebar-db.data")`.
|
- `get_db_path()`: This function will be refactored to use `get_data_dir().join("pastebar-db.data")`.
|
||||||
* `get_clip_images_dir()`: A new helper that returns `get_data_dir().join("clip-images")`.
|
- `get_clip_images_dir()`: A new helper that returns `get_data_dir().join("clip-images")`.
|
||||||
* `get_clipboard_images_dir()`: A new helper that returns `get_data_dir().join("clipboard-images")`.
|
- `get_clipboard_images_dir()`: A new helper that returns `get_data_dir().join("clipboard-images")`.
|
||||||
|
|
||||||
### 2.3. New & Updated Tauri Commands (`user_settings_command.rs`)
|
### 2.3. New & Updated Tauri Commands (`user_settings_command.rs`)
|
||||||
|
|
||||||
* **`cmd_validate_custom_db_path(path: String) -> Result<bool, String>`**
|
- **`cmd_validate_custom_db_path(path: String) -> Result<bool, String>`**
|
||||||
* **No change in purpose.** This command will still check if the user-selected directory is valid and writable.
|
- **No change in purpose.** This command will still check if the user-selected directory is valid and writable.
|
||||||
* **`cmd_check_custom_data_path(path: String) -> Result<PathStatus, String>`**
|
- **`cmd_check_custom_data_path(path: String) -> Result<PathStatus, String>`**
|
||||||
* A new command to check the status of a selected directory. It returns one of the following statuses: `Empty`, `NotEmpty`, `IsPastebarDataAndNotEmpty`.
|
- A new command to check the status of a selected directory. It returns one of the following statuses: `Empty`, `NotEmpty`, `IsPastebarDataAndNotEmpty`.
|
||||||
* **`cmd_set_and_relocate_data(new_parent_dir_path: String, operation: String) -> Result<String, String>`** (renamed from `set_and_relocate_db`)
|
- **`cmd_set_and_relocate_data(new_parent_dir_path: String, operation: String) -> Result<String, String>`** (renamed from `set_and_relocate_db`)
|
||||||
* `new_parent_dir_path`: The new directory path selected by the user.
|
|
||||||
* `operation`: Either "move", "copy", or "none".
|
|
||||||
* **Updated Steps:**
|
|
||||||
1. Get the source paths:
|
|
||||||
* Current DB file path.
|
|
||||||
* Current `clip-images` directory path.
|
|
||||||
* Current `clipboard-images` directory path.
|
|
||||||
2. Define the new data directory: `let new_data_dir = Path::new(&new_parent_dir_path);`
|
|
||||||
3. Create the new data directory: `fs::create_dir_all(&new_data_dir)`.
|
|
||||||
4. Perform file/directory operations for each item (DB file, `clip-images` dir, `clipboard-images` dir):
|
|
||||||
* If "move": `fs::rename(source, destination)`.
|
|
||||||
* If "copy": `fs::copy` for the file, and a recursive copy function for the directories.
|
|
||||||
* If "none", do nothing.
|
|
||||||
* Handle cases where source items might not exist (e.g., `clip-images` folder hasn't been created yet) by skipping them gracefully.
|
|
||||||
5. If successful, call `user_settings_service::set_custom_db_path(&new_parent_dir_path)`.
|
|
||||||
6. Return a success or error message.
|
|
||||||
|
|
||||||
* **`cmd_revert_to_default_data_location() -> Result<String, String>`** (renamed and simplified)
|
- `new_parent_dir_path`: The new directory path selected by the user.
|
||||||
* **Updated Steps:**
|
- `operation`: Either "move", "copy", or "none".
|
||||||
1. Call `user_settings_service::remove_custom_db_path()` to clear the custom data path setting.
|
- **Updated Steps:**
|
||||||
2. Return a success message indicating the setting has been removed.
|
1. Get the source paths:
|
||||||
|
- Current DB file path.
|
||||||
|
- Current `clip-images` directory path.
|
||||||
|
- Current `clipboard-images` directory path.
|
||||||
|
2. Define the new data directory: `let new_data_dir = Path::new(&new_parent_dir_path);`
|
||||||
|
3. Create the new data directory: `fs::create_dir_all(&new_data_dir)`.
|
||||||
|
4. Perform file/directory operations for each item (DB file, `clip-images` dir, `clipboard-images` dir):
|
||||||
|
- If "move": `fs::rename(source, destination)`.
|
||||||
|
- If "copy": `fs::copy` for the file, and a recursive copy function for the directories.
|
||||||
|
- If "none", do nothing.
|
||||||
|
- Handle cases where source items might not exist (e.g., `clip-images` folder hasn't been created yet) by skipping them gracefully.
|
||||||
|
5. If successful, call `user_settings_service::set_custom_db_path(&new_parent_dir_path)`.
|
||||||
|
6. Return a success or error message.
|
||||||
|
|
||||||
|
- **`cmd_revert_to_default_data_location() -> Result<String, String>`** (renamed and simplified)
|
||||||
|
- **Updated Steps:**
|
||||||
|
1. Call `user_settings_service::remove_custom_db_path()` to clear the custom data path setting.
|
||||||
|
2. Return a success message indicating the setting has been removed.
|
||||||
|
|
||||||
## 3. Frontend (React)
|
## 3. Frontend (React)
|
||||||
|
|
||||||
* The UI has been updated to refer to "Custom Application Data Location" instead of "Custom Database Location".
|
- The UI has been updated to refer to "Custom Application Data Location" instead of "Custom Database Location".
|
||||||
* A third radio button option, "Use new location", has been added.
|
- A third radio button option, "Use new location", has been added.
|
||||||
* The `handleBrowse` function now calls the `cmd_check_custom_data_path` command to analyze the selected directory and prompts the user accordingly.
|
- The `handleBrowse` function now calls the `cmd_check_custom_data_path` command to analyze the selected directory and prompts the user accordingly.
|
||||||
* The `settingsStore.ts` has been updated to support the "none" operation.
|
- The `settingsStore.ts` has been updated to support the "none" operation.
|
||||||
|
|
||||||
## 4. User Interaction Flow (Mermaid Diagram)
|
## 4. User Interaction Flow (Mermaid Diagram)
|
||||||
|
|
||||||
@ -109,23 +110,23 @@ graph TD
|
|||||||
|
|
||||||
The following changes have been implemented:
|
The following changes have been implemented:
|
||||||
|
|
||||||
* **`packages/pastebar-app-ui/src/pages/settings/UserPreferences.tsx`**:
|
- **`packages/pastebar-app-ui/src/pages/settings/UserPreferences.tsx`**:
|
||||||
* Renamed "Custom Database Location" to "Custom Application Data Location".
|
- Renamed "Custom Database Location" to "Custom Application Data Location".
|
||||||
* Added a third radio button for the "Use new location" option.
|
- Added a third radio button for the "Use new location" option.
|
||||||
* Updated the `handleBrowse` function to call the new `cmd_check_custom_data_path` command and handle the different path statuses with user prompts.
|
- Updated the `handleBrowse` function to call the new `cmd_check_custom_data_path` command and handle the different path statuses with user prompts.
|
||||||
* **`packages/pastebar-app-ui/src/store/settingsStore.ts`**:
|
- **`packages/pastebar-app-ui/src/store/settingsStore.ts`**:
|
||||||
* Updated the `applyCustomDbPath` function to accept the "none" operation.
|
- Updated the `applyCustomDbPath` function to accept the "none" operation.
|
||||||
* Updated the `revertToDefaultDbPath` function to call the renamed backend command.
|
- Updated the `revertToDefaultDbPath` function to call the renamed backend command.
|
||||||
* **`src-tauri/src/commands/user_settings_command.rs`**:
|
- **`src-tauri/src/commands/user_settings_command.rs`**:
|
||||||
* Added the `cmd_check_custom_data_path` command.
|
- Added the `cmd_check_custom_data_path` command.
|
||||||
* Renamed `cmd_set_and_relocate_db` to `cmd_set_and_relocate_data` and updated its logic to handle the "none" operation and the new data directory structure.
|
- Renamed `cmd_set_and_relocate_db` to `cmd_set_and_relocate_data` and updated its logic to handle the "none" operation and the new data directory structure.
|
||||||
* Renamed `cmd_revert_to_default_db_location` to `cmd_revert_to_default_data_location` and updated its logic.
|
- Renamed `cmd_revert_to_default_db_location` to `cmd_revert_to_default_data_location` and updated its logic.
|
||||||
* **`src-tauri/src/db.rs`**:
|
- **`src-tauri/src/db.rs`**:
|
||||||
* Refactored the `get_data_dir` function to no longer automatically append `pastebar-data`.
|
- Refactored the `get_data_dir` function to no longer automatically append `pastebar-data`.
|
||||||
* Added `get_clip_images_dir` and `get_clipboard_images_dir` helper functions.
|
- Added `get_clip_images_dir` and `get_clipboard_images_dir` helper functions.
|
||||||
* **`src-tauri/src/main.rs`**:
|
- **`src-tauri/src/main.rs`**:
|
||||||
* Registered the new and renamed commands in the `invoke_handler`.
|
- Registered the new and renamed commands in the `invoke_handler`.
|
||||||
* **`src-tauri/Cargo.toml`**:
|
- **`src-tauri/Cargo.toml`**:
|
||||||
* Added the `fs_extra` dependency for recursive directory copying.
|
- Added the `fs_extra` dependency for recursive directory copying.
|
||||||
* **`src-tauri/src/services/items_service.rs`** and **`src-tauri/src/services/history_service.rs`**:
|
- **`src-tauri/src/services/items_service.rs`** and **`src-tauri/src/services/history_service.rs`**:
|
||||||
* Updated to use the new `get_clip_images_dir` and `get_clipboard_images_dir` helper functions.
|
- Updated to use the new `get_clip_images_dir` and `get_clipboard_images_dir` helper functions.
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
* parse reads markdown source at s and converts it to HTML.
|
* parse reads markdown source at s and converts it to HTML.
|
||||||
* When output is a byte array, it will be a reference.
|
* When output is a byte array, it will be a reference.
|
||||||
*/
|
*/
|
||||||
export function parse(s :Source, o? :ParseOptions & { bytes? :never|false }) :string
|
export function parse(s: Source, o?: ParseOptions & { bytes?: never | false }): string
|
||||||
export function parse(s :Source, o? :ParseOptions & { bytes :true }) :Uint8Array
|
export function parse(s: Source, o?: ParseOptions & { bytes: true }): Uint8Array
|
||||||
|
|
||||||
/** Markdown source code can be provided as a JavaScript string or UTF8 encoded data */
|
/** Markdown source code can be provided as a JavaScript string or UTF8 encoded data */
|
||||||
type Source = string | ArrayLike<number>
|
type Source = string | ArrayLike<number>
|
||||||
@ -11,10 +11,10 @@ type Source = string | ArrayLike<number>
|
|||||||
/** Options for the parse function */
|
/** Options for the parse function */
|
||||||
export interface ParseOptions {
|
export interface ParseOptions {
|
||||||
/** Customize parsing. Defaults to ParseFlags.DEFAULT */
|
/** Customize parsing. Defaults to ParseFlags.DEFAULT */
|
||||||
parseFlags? :ParseFlags
|
parseFlags?: ParseFlags
|
||||||
|
|
||||||
/** Select output format. Defaults to "html" */
|
/** Select output format. Defaults to "html" */
|
||||||
format? : "html" | "xhtml"
|
format?: 'html' | 'xhtml'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bytes=true causes parse() to return the result as a Uint8Array instead of a string.
|
* bytes=true causes parse() to return the result as a Uint8Array instead of a string.
|
||||||
@ -26,10 +26,10 @@ export interface ParseOptions {
|
|||||||
* This only provides a performance benefit when you never need to convert the output
|
* This only provides a performance benefit when you never need to convert the output
|
||||||
* to a string. In most cases you're better off leaving this unset or false.
|
* to a string. In most cases you're better off leaving this unset or false.
|
||||||
*/
|
*/
|
||||||
bytes? :boolean
|
bytes?: boolean
|
||||||
|
|
||||||
/** Allow "javascript:" in links */
|
/** Allow "javascript:" in links */
|
||||||
allowJSURIs? :boolean
|
allowJSURIs?: boolean
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional callback which if provided is called for each code block.
|
* Optional callback which if provided is called for each code block.
|
||||||
@ -44,34 +44,37 @@ export interface ParseOptions {
|
|||||||
* Note that use of this callback has an adverse impact on performance as it casues
|
* Note that use of this callback has an adverse impact on performance as it casues
|
||||||
* calls and data to be bridged between WASM and JS on every invocation.
|
* calls and data to be bridged between WASM and JS on every invocation.
|
||||||
*/
|
*/
|
||||||
onCodeBlock? :(langname :string, body :UTF8Bytes) => Uint8Array|string|null|undefined
|
onCodeBlock?: (
|
||||||
|
langname: string,
|
||||||
|
body: UTF8Bytes
|
||||||
|
) => Uint8Array | string | null | undefined
|
||||||
|
|
||||||
/** @depreceated use "bytes" instead (v1.1.1) */
|
/** @depreceated use "bytes" instead (v1.1.1) */
|
||||||
asMemoryView? :boolean
|
asMemoryView?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
/** UTF8Bytes is a Uint8Array representing UTF8 text */
|
/** UTF8Bytes is a Uint8Array representing UTF8 text */
|
||||||
export interface UTF8Bytes extends Uint8Array {
|
export interface UTF8Bytes extends Uint8Array {
|
||||||
/** toString returns a UTF8 decoded string (lazily decoded and cached) */
|
/** toString returns a UTF8 decoded string (lazily decoded and cached) */
|
||||||
toString() :string
|
toString(): string
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Flags that customize Markdown parsing */
|
/** Flags that customize Markdown parsing */
|
||||||
export enum ParseFlags {
|
export enum ParseFlags {
|
||||||
/** In TEXT, collapse non-trivial whitespace into single ' ' */ COLLAPSE_WHITESPACE,
|
/** In TEXT, collapse non-trivial whitespace into single ' ' */ COLLAPSE_WHITESPACE,
|
||||||
/** Enable $ and $$ containing LaTeX equations. */ LATEX_MATH_SPANS,
|
/** Enable $ and $$ containing LaTeX equations. */ LATEX_MATH_SPANS,
|
||||||
/** Disable raw HTML blocks. */ NO_HTML_BLOCKS,
|
/** Disable raw HTML blocks. */ NO_HTML_BLOCKS,
|
||||||
/** Disable raw HTML (inline). */ NO_HTML_SPANS,
|
/** Disable raw HTML (inline). */ NO_HTML_SPANS,
|
||||||
/** Disable indented code blocks. (Only fenced code works.) */ NO_INDENTED_CODE_BLOCKS,
|
/** Disable indented code blocks. (Only fenced code works.) */ NO_INDENTED_CODE_BLOCKS,
|
||||||
/** Do not require space in ATX headers ( ###header ) */ PERMISSIVE_ATX_HEADERS,
|
/** Do not require space in ATX headers ( ###header ) */ PERMISSIVE_ATX_HEADERS,
|
||||||
/** Recognize e-mails as links even without <...> */ PERMISSIVE_EMAIL_AUTO_LINKS,
|
/** Recognize e-mails as links even without <...> */ PERMISSIVE_EMAIL_AUTO_LINKS,
|
||||||
/** Recognize URLs as links even without <...> */ PERMISSIVE_URL_AUTO_LINKS,
|
/** Recognize URLs as links even without <...> */ PERMISSIVE_URL_AUTO_LINKS,
|
||||||
/** Enable WWW autolinks (without proto; just 'www.') */ PERMISSIVE_WWW_AUTOLINKS,
|
/** Enable WWW autolinks (without proto; just 'www.') */ PERMISSIVE_WWW_AUTOLINKS,
|
||||||
/** Enable strikethrough extension. */ STRIKETHROUGH,
|
/** Enable strikethrough extension. */ STRIKETHROUGH,
|
||||||
/** Enable tables extension. */ TABLES,
|
/** Enable tables extension. */ TABLES,
|
||||||
/** Enable task list extension. */ TASK_LISTS,
|
/** Enable task list extension. */ TASK_LISTS,
|
||||||
/** Enable wiki links extension. */ WIKI_LINKS,
|
/** Enable wiki links extension. */ WIKI_LINKS,
|
||||||
/** Enable underline extension (disables '_' for emphasis) */ UNDERLINE,
|
/** Enable underline extension (disables '_' for emphasis) */ UNDERLINE,
|
||||||
|
|
||||||
/** Default flags are:
|
/** Default flags are:
|
||||||
* COLLAPSE_WHITESPACE |
|
* COLLAPSE_WHITESPACE |
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,85 +1,86 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>PasteBar Drop Zone</title>
|
<title>PasteBar Drop Zone</title>
|
||||||
<style>
|
<style>
|
||||||
body, html {
|
body,
|
||||||
margin: 0;
|
html {
|
||||||
padding: 0;
|
margin: 0;
|
||||||
height: 100%;
|
padding: 0;
|
||||||
font-family: Arial, sans-serif;
|
height: 100%;
|
||||||
}
|
font-family: Arial, sans-serif;
|
||||||
|
|
||||||
body {
|
|
||||||
overscroll-behavior: none;
|
|
||||||
overflow: hidden;
|
|
||||||
user-select: none;
|
|
||||||
font-family:
|
|
||||||
Inter,
|
|
||||||
-apple-system,
|
|
||||||
BlinkMacSystemFont,
|
|
||||||
'Segoe UI',
|
|
||||||
'Roboto',
|
|
||||||
'Oxygen',
|
|
||||||
'Ubuntu',
|
|
||||||
'Cantarell',
|
|
||||||
'Fira Sans',
|
|
||||||
'Droid Sans',
|
|
||||||
'Helvetica Neue',
|
|
||||||
sans-serif;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
font-feature-settings:
|
|
||||||
'rlig' 1,
|
|
||||||
'calt' 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drop-zone.hover {
|
|
||||||
background-color: #e0e0e0; /* Light gray background when hovering */
|
|
||||||
border-color: #0088cc; /* Change border color */
|
|
||||||
color: #0088cc; /* Change text color */
|
|
||||||
}
|
|
||||||
|
|
||||||
.drop-zone {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin: 12px;
|
|
||||||
padding: 12px;
|
|
||||||
border: 2px dashed #cccccc;
|
|
||||||
border-radius: 12px;
|
|
||||||
height: calc(100% - 24px);
|
|
||||||
width: calc(100% - 24px);
|
|
||||||
text-align: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
color: #555555;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drop-zone-text {
|
|
||||||
font-size: 24px;
|
|
||||||
pointer-events: none;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="drop-zone" id="droptarget">
|
|
||||||
<div class="drop-zone-text">Drag and drop image file here</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
const target = document.getElementById("droptarget");
|
|
||||||
target.addEventListener("dragenter", (event) => {
|
|
||||||
if (event.target.classList.contains("drop-zone")) {
|
|
||||||
target.classList.add("hover");
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
target.addEventListener("dragleave", (event) => {
|
body {
|
||||||
target.classList.remove("hover");
|
overscroll-behavior: none;
|
||||||
});
|
overflow: hidden;
|
||||||
</script>
|
user-select: none;
|
||||||
</body>
|
font-family:
|
||||||
|
Inter,
|
||||||
|
-apple-system,
|
||||||
|
BlinkMacSystemFont,
|
||||||
|
'Segoe UI',
|
||||||
|
'Roboto',
|
||||||
|
'Oxygen',
|
||||||
|
'Ubuntu',
|
||||||
|
'Cantarell',
|
||||||
|
'Fira Sans',
|
||||||
|
'Droid Sans',
|
||||||
|
'Helvetica Neue',
|
||||||
|
sans-serif;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
font-feature-settings:
|
||||||
|
'rlig' 1,
|
||||||
|
'calt' 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drop-zone.hover {
|
||||||
|
background-color: #e0e0e0; /* Light gray background when hovering */
|
||||||
|
border-color: #0088cc; /* Change border color */
|
||||||
|
color: #0088cc; /* Change text color */
|
||||||
|
}
|
||||||
|
|
||||||
|
.drop-zone {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 12px;
|
||||||
|
padding: 12px;
|
||||||
|
border: 2px dashed #cccccc;
|
||||||
|
border-radius: 12px;
|
||||||
|
height: calc(100% - 24px);
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: #555555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drop-zone-text {
|
||||||
|
font-size: 24px;
|
||||||
|
pointer-events: none;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="drop-zone" id="droptarget">
|
||||||
|
<div class="drop-zone-text">Drag and drop image file here</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const target = document.getElementById('droptarget')
|
||||||
|
target.addEventListener('dragenter', event => {
|
||||||
|
if (event.target.classList.contains('drop-zone')) {
|
||||||
|
target.classList.add('hover')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
target.addEventListener('dragleave', event => {
|
||||||
|
target.classList.remove('hover')
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,85 +1,86 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>PasteBar Drop Zone</title>
|
<title>PasteBar Drop Zone</title>
|
||||||
<style>
|
<style>
|
||||||
body, html {
|
body,
|
||||||
margin: 0;
|
html {
|
||||||
padding: 0;
|
margin: 0;
|
||||||
height: 100%;
|
padding: 0;
|
||||||
font-family: Arial, sans-serif;
|
height: 100%;
|
||||||
}
|
font-family: Arial, sans-serif;
|
||||||
|
|
||||||
body {
|
|
||||||
overscroll-behavior: none;
|
|
||||||
overflow: hidden;
|
|
||||||
user-select: none;
|
|
||||||
font-family:
|
|
||||||
Inter,
|
|
||||||
-apple-system,
|
|
||||||
BlinkMacSystemFont,
|
|
||||||
'Segoe UI',
|
|
||||||
'Roboto',
|
|
||||||
'Oxygen',
|
|
||||||
'Ubuntu',
|
|
||||||
'Cantarell',
|
|
||||||
'Fira Sans',
|
|
||||||
'Droid Sans',
|
|
||||||
'Helvetica Neue',
|
|
||||||
sans-serif;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
font-feature-settings:
|
|
||||||
'rlig' 1,
|
|
||||||
'calt' 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drop-zone.hover {
|
|
||||||
background-color: #e0e0e0; /* Light gray background when hovering */
|
|
||||||
border-color: #0088cc; /* Change border color */
|
|
||||||
color: #0088cc; /* Change text color */
|
|
||||||
}
|
|
||||||
|
|
||||||
.drop-zone {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin: 12px;
|
|
||||||
padding: 12px;
|
|
||||||
border: 2px dashed #cccccc;
|
|
||||||
border-radius: 12px;
|
|
||||||
height: calc(100% - 24px);
|
|
||||||
width: calc(100% - 24px);
|
|
||||||
text-align: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
color: #555555;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drop-zone-text {
|
|
||||||
font-size: 24px;
|
|
||||||
pointer-events: none;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="drop-zone" id="droptarget">
|
|
||||||
<div class="drop-zone-text">Drag and drop an app, file or folder</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
const target = document.getElementById("droptarget");
|
|
||||||
target.addEventListener("dragenter", (event) => {
|
|
||||||
if (event.target.classList.contains("drop-zone")) {
|
|
||||||
target.classList.add("hover");
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
target.addEventListener("dragleave", (event) => {
|
body {
|
||||||
target.classList.remove("hover");
|
overscroll-behavior: none;
|
||||||
});
|
overflow: hidden;
|
||||||
</script>
|
user-select: none;
|
||||||
</body>
|
font-family:
|
||||||
|
Inter,
|
||||||
|
-apple-system,
|
||||||
|
BlinkMacSystemFont,
|
||||||
|
'Segoe UI',
|
||||||
|
'Roboto',
|
||||||
|
'Oxygen',
|
||||||
|
'Ubuntu',
|
||||||
|
'Cantarell',
|
||||||
|
'Fira Sans',
|
||||||
|
'Droid Sans',
|
||||||
|
'Helvetica Neue',
|
||||||
|
sans-serif;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
font-feature-settings:
|
||||||
|
'rlig' 1,
|
||||||
|
'calt' 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drop-zone.hover {
|
||||||
|
background-color: #e0e0e0; /* Light gray background when hovering */
|
||||||
|
border-color: #0088cc; /* Change border color */
|
||||||
|
color: #0088cc; /* Change text color */
|
||||||
|
}
|
||||||
|
|
||||||
|
.drop-zone {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 12px;
|
||||||
|
padding: 12px;
|
||||||
|
border: 2px dashed #cccccc;
|
||||||
|
border-radius: 12px;
|
||||||
|
height: calc(100% - 24px);
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: #555555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drop-zone-text {
|
||||||
|
font-size: 24px;
|
||||||
|
pointer-events: none;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="drop-zone" id="droptarget">
|
||||||
|
<div class="drop-zone-text">Drag and drop an app, file or folder</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const target = document.getElementById('droptarget')
|
||||||
|
target.addEventListener('dragenter', event => {
|
||||||
|
if (event.target.classList.contains('drop-zone')) {
|
||||||
|
target.classList.add('hover')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
target.addEventListener('dragleave', event => {
|
||||||
|
target.classList.remove('hover')
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,40 +1,76 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<!-- react-debugger, run on dev: npx react-devtools -->
|
<!-- react-debugger, run on dev: npx react-devtools -->
|
||||||
<!-- <script src="http://localhost:8097"></script> -->
|
<!-- <script src="http://localhost:8097"></script> -->
|
||||||
<link rel="preload" href="src/assets/TwemojiCountryFlags.woff2" as="font" type="font/woff2" crossorigin />
|
<link
|
||||||
<link rel="preload" href="src/assets/Inter-Regular.woff2" as="font" type="font/woff2" crossorigin />
|
rel="preload"
|
||||||
<link rel="preload" href="src/assets/Inter-Medium.woff2" as="font" type="font/woff2" crossorigin />
|
href="src/assets/TwemojiCountryFlags.woff2"
|
||||||
<link rel="preload" href="src/assets/Inter-SemiBold.woff2" as="font" type="font/woff2" crossorigin />
|
as="font"
|
||||||
<link rel="preload" href="src/assets/SourceCodePro-Regular.otf.woff2" as="font" type="font/woff2" crossorigin />
|
type="font/woff2"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="src/assets/Inter-Regular.woff2"
|
||||||
|
as="font"
|
||||||
|
type="font/woff2"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="src/assets/Inter-Medium.woff2"
|
||||||
|
as="font"
|
||||||
|
type="font/woff2"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="src/assets/Inter-SemiBold.woff2"
|
||||||
|
as="font"
|
||||||
|
type="font/woff2"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="src/assets/SourceCodePro-Regular.otf.woff2"
|
||||||
|
as="font"
|
||||||
|
type="font/woff2"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<script defer async data-domain="app.pastebar.app" src="https://stats.pastebar.app/js/script.tagged-events.local.js"></script>
|
<script
|
||||||
|
defer
|
||||||
|
async
|
||||||
|
data-domain="app.pastebar.app"
|
||||||
|
src="https://stats.pastebar.app/js/script.tagged-events.local.js"
|
||||||
|
></script>
|
||||||
<title>PasteBar App</title>
|
<title>PasteBar App</title>
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-transparent">
|
<body class="bg-transparent">
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script>
|
<script>
|
||||||
window.isHistoryWindow = true;
|
window.isHistoryWindow = true
|
||||||
window.isMainWindow = false;
|
window.isMainWindow = false
|
||||||
</script>
|
</script>
|
||||||
<script type="module" src="src/main.tsx"></script>
|
<script type="module" src="src/main.tsx"></script>
|
||||||
<script>
|
<script>
|
||||||
function handleDrop(e) {
|
function handleDrop(e) {
|
||||||
e = e || event;
|
e = e || event
|
||||||
|
|
||||||
var isWindows = navigator.platform.indexOf('Win') > -1;
|
var isWindows = navigator.platform.indexOf('Win') > -1
|
||||||
var isDropZone = e.target.classList.contains('drop-zone');
|
var isDropZone = e.target.classList.contains('drop-zone')
|
||||||
var isNotInputOrTextarea = e.target.tagName !== "INPUT" && e.target.tagName !== "TEXTAREA";
|
var isNotInputOrTextarea =
|
||||||
|
e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA'
|
||||||
|
|
||||||
if ((isWindows || isNotInputOrTextarea) && !isDropZone) {
|
if ((isWindows || isNotInputOrTextarea) && !isDropZone) {
|
||||||
e.preventDefault();
|
e.preventDefault()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("dragover", handleDrop, false);
|
window.addEventListener('dragover', handleDrop, false)
|
||||||
window.addEventListener("drop", handleDrop, false);
|
window.addEventListener('drop', handleDrop, false)
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,41 +1,77 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<!-- react-debugger, run on dev: npx react-devtools -->
|
<!-- react-debugger, run on dev: npx react-devtools -->
|
||||||
<!-- <script src="http://localhost:8097"></script> -->
|
<!-- <script src="http://localhost:8097"></script> -->
|
||||||
<link rel="preload" href="src/assets/TwemojiCountryFlags.woff2" as="font" type="font/woff2" crossorigin />
|
<link
|
||||||
<link rel="preload" href="src/assets/Inter-Regular.woff2" as="font" type="font/woff2" crossorigin />
|
rel="preload"
|
||||||
<link rel="preload" href="src/assets/Inter-Medium.woff2" as="font" type="font/woff2" crossorigin />
|
href="src/assets/TwemojiCountryFlags.woff2"
|
||||||
<link rel="preload" href="src/assets/Inter-SemiBold.woff2" as="font" type="font/woff2" crossorigin />
|
as="font"
|
||||||
<link rel="preload" href="src/assets/SourceCodePro-Regular.otf.woff2" as="font" type="font/woff2" crossorigin />
|
type="font/woff2"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="src/assets/Inter-Regular.woff2"
|
||||||
|
as="font"
|
||||||
|
type="font/woff2"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="src/assets/Inter-Medium.woff2"
|
||||||
|
as="font"
|
||||||
|
type="font/woff2"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="src/assets/Inter-SemiBold.woff2"
|
||||||
|
as="font"
|
||||||
|
type="font/woff2"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="src/assets/SourceCodePro-Regular.otf.woff2"
|
||||||
|
as="font"
|
||||||
|
type="font/woff2"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<script defer async data-domain="app.pastebar.app" src="https://stats.pastebar.app/js/script.tagged-events.local.js"></script>
|
<script
|
||||||
|
defer
|
||||||
|
async
|
||||||
|
data-domain="app.pastebar.app"
|
||||||
|
src="https://stats.pastebar.app/js/script.tagged-events.local.js"
|
||||||
|
></script>
|
||||||
<title>PasteBar App</title>
|
<title>PasteBar App</title>
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-transparent">
|
<body class="bg-transparent">
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script>
|
<script>
|
||||||
window.isMainWindow = true;
|
window.isMainWindow = true
|
||||||
window.isHistoryWindow = false;
|
window.isHistoryWindow = false
|
||||||
</script>
|
</script>
|
||||||
<script type="module" src="src/main.tsx"></script>
|
<script type="module" src="src/main.tsx"></script>
|
||||||
<script src="assets/markdown/markdown.js" async></script>
|
<script src="assets/markdown/markdown.js" async></script>
|
||||||
<script>
|
<script>
|
||||||
function handleDrop(e) {
|
function handleDrop(e) {
|
||||||
e = e || event;
|
e = e || event
|
||||||
|
|
||||||
var isWindows = navigator.platform.indexOf('Win') > -1;
|
var isWindows = navigator.platform.indexOf('Win') > -1
|
||||||
var isDropZone = e.target.classList.contains('drop-zone');
|
var isDropZone = e.target.classList.contains('drop-zone')
|
||||||
var isNotInputOrTextarea = e.target.tagName !== "INPUT" && e.target.tagName !== "TEXTAREA";
|
var isNotInputOrTextarea =
|
||||||
|
e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA'
|
||||||
|
|
||||||
if ((isWindows || isNotInputOrTextarea) && !isDropZone) {
|
if ((isWindows || isNotInputOrTextarea) && !isDropZone) {
|
||||||
e.preventDefault();
|
e.preventDefault()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("dragover", handleDrop, false);
|
window.addEventListener('dragover', handleDrop, false)
|
||||||
window.addEventListener("drop", handleDrop, false);
|
window.addEventListener('drop', handleDrop, false)
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,28 +1,34 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<!-- react-debugger, run on dev: npx react-devtools -->
|
<!-- react-debugger, run on dev: npx react-devtools -->
|
||||||
<!-- <script src="http://localhost:8097"></script> -->
|
<!-- <script src="http://localhost:8097"></script> -->
|
||||||
<link rel="preload" href="src/assets/SourceCodePro-Regular.otf.woff2" as="font" type="font/woff2" crossorigin />
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="src/assets/SourceCodePro-Regular.otf.woff2"
|
||||||
|
as="font"
|
||||||
|
type="font/woff2"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>PasteBar App</title>
|
<title>PasteBar App</title>
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-transparent">
|
<body class="bg-transparent">
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script>
|
<script>
|
||||||
window.isHistoryWindow = false;
|
window.isHistoryWindow = false
|
||||||
window.isQuickPasteWindow = true;
|
window.isQuickPasteWindow = true
|
||||||
window.isMainWindow = false;
|
window.isMainWindow = false
|
||||||
</script>
|
</script>
|
||||||
<script type="module" src="src/quickpaste-main.tsx"></script>
|
<script type="module" src="src/quickpaste-main.tsx"></script>
|
||||||
<script>
|
<script>
|
||||||
function handleDrop(e) {
|
function handleDrop(e) {
|
||||||
e.preventDefault();
|
e.preventDefault()
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("dragover", handleDrop, false);
|
window.addEventListener('dragover', handleDrop, false)
|
||||||
window.addEventListener("drop", handleDrop, false);
|
window.addEventListener('drop', handleDrop, false)
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -6,4 +6,4 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "^18.2.0"
|
"react": "^18.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,55 +1,51 @@
|
|||||||
function cartesian(array) {
|
function cartesian(array) {
|
||||||
function* cartesian(head, ...tail) {
|
function* cartesian(head, ...tail) {
|
||||||
let remainder = tail.length ? cartesian(...tail) : [[]]
|
let remainder = tail.length ? cartesian(...tail) : [[]]
|
||||||
for (let r of remainder) for (let h of head) yield [h, ...r]
|
for (let r of remainder) for (let h of head) yield [h, ...r]
|
||||||
}
|
}
|
||||||
|
|
||||||
return [...cartesian(...array)]
|
return [...cartesian(...array)]
|
||||||
}
|
}
|
||||||
|
|
||||||
function deepKeys(object, separator = '.', prefix = '') {
|
function deepKeys(object, separator = '.', prefix = '') {
|
||||||
return Object.keys(object).reduce((result, key) => {
|
return Object.keys(object).reduce((result, key) => {
|
||||||
if (Array.isArray(object[key])) {
|
if (Array.isArray(object[key])) {
|
||||||
return [...result, prefix + key];
|
return [...result, prefix + key]
|
||||||
} else if (typeof object[key] === 'object' && object[key] !== null) {
|
} else if (typeof object[key] === 'object' && object[key] !== null) {
|
||||||
return [...result, ...deepKeys(object[key], separator, prefix + key + separator)];
|
return [...result, ...deepKeys(object[key], separator, prefix + key + separator)]
|
||||||
}
|
}
|
||||||
|
|
||||||
return [...result, prefix + key];
|
return [...result, prefix + key]
|
||||||
}, []);
|
}, [])
|
||||||
}
|
}
|
||||||
|
|
||||||
const extractTokens = pattern =>
|
const extractTokens = pattern => pattern.split(/(?={[^}]+})|(?<={[^}]+})/)
|
||||||
pattern.split(/(?={[^}]+})|(?<={[^}]+})/)
|
|
||||||
|
|
||||||
const expandTokens = theme => tokens => {
|
const expandTokens = theme => tokens => {
|
||||||
return tokens.map(token => {
|
return tokens.map(token => {
|
||||||
if(token.startsWith('{')) {
|
if (token.startsWith('{')) {
|
||||||
const cleanToken = token.replace(/{|}/g, '')
|
const cleanToken = token.replace(/{|}/g, '')
|
||||||
if(cleanToken.includes('.')) {
|
if (cleanToken.includes('.')) {
|
||||||
const color = cleanToken.split('.')[1]
|
const color = cleanToken.split('.')[1]
|
||||||
const colorToken = {
|
const colorToken = {
|
||||||
[color]: theme(cleanToken, {})
|
[color]: theme(cleanToken, {}),
|
||||||
}
|
|
||||||
return deepKeys(colorToken, '-')
|
|
||||||
}
|
|
||||||
return deepKeys(theme(cleanToken, {}), '-')
|
|
||||||
} else {
|
|
||||||
return [token]
|
|
||||||
}
|
}
|
||||||
})
|
return deepKeys(colorToken, '-')
|
||||||
|
}
|
||||||
|
return deepKeys(theme(cleanToken, {}), '-')
|
||||||
|
} else {
|
||||||
|
return [token]
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const mapToClasses = expanded =>
|
const mapToClasses = expanded =>
|
||||||
expanded.map(values =>
|
expanded.map(values => values.join('').replace('-DEFAULT', ''))
|
||||||
values.join('').replace('-DEFAULT', ''))
|
|
||||||
|
|
||||||
module.exports = theme => patterns => {
|
module.exports = theme => patterns => {
|
||||||
return patterns // ["text-{gray}", …]
|
return patterns // ["text-{gray}", …]
|
||||||
.map(extractTokens) // [["text", "{gray}"], …]
|
.map(extractTokens) // [["text", "{gray}"], …]
|
||||||
.map(expandTokens(theme)) // [[["text"], ["gray-100", "gray-200",…]], …]
|
.map(expandTokens(theme)) // [[["text"], ["gray-100", "gray-200",…]], …]
|
||||||
.map(cartesian) // [[["text", "gray-100"], ["text", "gray-200"], …], …]
|
.map(cartesian) // [[["text", "gray-100"], ["text", "gray-200"], …], …]
|
||||||
.flatMap(mapToClasses) // ["text-gray-100", "text-gray-200",…]
|
.flatMap(mapToClasses) // ["text-gray-100", "text-gray-200",…]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,7 +190,8 @@ function App() {
|
|||||||
settings.isShowDisabledCollectionsOnNavBarMenu?.valueBool,
|
settings.isShowDisabledCollectionsOnNavBarMenu?.valueBool,
|
||||||
userSelectedLanguage: settings.userSelectedLanguage?.valueText,
|
userSelectedLanguage: settings.userSelectedLanguage?.valueText,
|
||||||
isNoteIconsEnabled: settings.isNoteIconsEnabled?.valueBool ?? true,
|
isNoteIconsEnabled: settings.isNoteIconsEnabled?.valueBool ?? true,
|
||||||
defaultNoteIconType: settings.defaultNoteIconType?.valueText ?? 'MessageSquareText',
|
defaultNoteIconType:
|
||||||
|
settings.defaultNoteIconType?.valueText ?? 'MessageSquareText',
|
||||||
isAppReady: true,
|
isAppReady: true,
|
||||||
})
|
})
|
||||||
settingsStore.initConstants({
|
settingsStore.initConstants({
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { ReactDatePickerCustomHeaderProps } from "react-datepicker"
|
import { ReactDatePickerCustomHeaderProps } from 'react-datepicker'
|
||||||
import NativeSelect from "../../molecules/native-select"
|
|
||||||
import { getYearRange, monthNames } from "./utils"
|
import NativeSelect from '../../molecules/native-select'
|
||||||
|
import { getYearRange, monthNames } from './utils'
|
||||||
|
|
||||||
const CustomHeader = ({
|
const CustomHeader = ({
|
||||||
date,
|
date,
|
||||||
@ -16,9 +17,9 @@ const CustomHeader = ({
|
|||||||
<div className="flex flex-1 items-center justify-end gap-3">
|
<div className="flex flex-1 items-center justify-end gap-3">
|
||||||
<NativeSelect
|
<NativeSelect
|
||||||
defaultValue={monthName}
|
defaultValue={monthName}
|
||||||
onValueChange={(v) => changeMonth(monthNames.indexOf(v))}
|
onValueChange={v => changeMonth(monthNames.indexOf(v))}
|
||||||
>
|
>
|
||||||
{monthNames.map((month) => (
|
{monthNames.map(month => (
|
||||||
<NativeSelect.Item key={month} value={month}>
|
<NativeSelect.Item key={month} value={month}>
|
||||||
{month}
|
{month}
|
||||||
</NativeSelect.Item>
|
</NativeSelect.Item>
|
||||||
@ -28,9 +29,9 @@ const CustomHeader = ({
|
|||||||
<div className="flex flex-1 items-center justify-start gap-3">
|
<div className="flex flex-1 items-center justify-start gap-3">
|
||||||
<NativeSelect
|
<NativeSelect
|
||||||
defaultValue={year.toString()}
|
defaultValue={year.toString()}
|
||||||
onValueChange={(v) => changeYear(parseInt(v, 10))}
|
onValueChange={v => changeYear(parseInt(v, 10))}
|
||||||
>
|
>
|
||||||
{getYearRange().map((year) => (
|
{getYearRange().map(year => (
|
||||||
<NativeSelect.Item key={year} value={year.toString()}>
|
<NativeSelect.Item key={year} value={year.toString()}>
|
||||||
{year.toString()}
|
{year.toString()}
|
||||||
</NativeSelect.Item>
|
</NativeSelect.Item>
|
||||||
|
@ -10,16 +10,16 @@ export const getYearRange = (step = 20) =>
|
|||||||
range(new Date().getFullYear() - step, new Date().getFullYear() + step)
|
range(new Date().getFullYear() - step, new Date().getFullYear() + step)
|
||||||
|
|
||||||
export const monthNames = [
|
export const monthNames = [
|
||||||
"January",
|
'January',
|
||||||
"February",
|
'February',
|
||||||
"March",
|
'March',
|
||||||
"April",
|
'April',
|
||||||
"May",
|
'May',
|
||||||
"June",
|
'June',
|
||||||
"July",
|
'July',
|
||||||
"August",
|
'August',
|
||||||
"September",
|
'September',
|
||||||
"October",
|
'October',
|
||||||
"November",
|
'November',
|
||||||
"December",
|
'December',
|
||||||
]
|
]
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const AdjustmentsIcon: React.FC<IconProps> = ({
|
const AdjustmentsIcon: React.FC<IconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const ArrowDownIcon: React.FC<IconProps> = ({
|
const ArrowDownIcon: React.FC<IconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const ArrowLeftIcon: React.FC<IconProps> = ({
|
const ArrowLeftIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
@ -15,12 +16,7 @@ const ArrowLeftIcon: React.FC<IconProps> = ({
|
|||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
{...attributes}
|
{...attributes}
|
||||||
>
|
>
|
||||||
<path
|
<path d="M3.75 10H16.875" stroke={color} strokeWidth="1.5" strokeLinecap="round" />
|
||||||
d="M3.75 10H16.875"
|
|
||||||
stroke={color}
|
|
||||||
strokeWidth="1.5"
|
|
||||||
strokeLinecap="round"
|
|
||||||
/>
|
|
||||||
<path
|
<path
|
||||||
d="M8.125 5L3.125 10L8.125 15"
|
d="M8.125 5L3.125 10L8.125 15"
|
||||||
stroke={color}
|
stroke={color}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const ArrowRightIcon: React.FC<IconProps> = ({
|
const ArrowRightIcon: React.FC<IconProps> = ({
|
||||||
size = "16",
|
size = '16',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const ArrowTopRightIcon: React.FC<IconProps> = ({
|
const ArrowTopRightIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const ArrowUpIcon: React.FC<IconProps> = ({
|
const ArrowUpIcon: React.FC<IconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const BackIcon: React.FC<IconProps> = ({
|
const BackIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const BackspaceIcon: React.FC<IconProps> = ({
|
const BackspaceIcon: React.FC<IconProps> = ({
|
||||||
size = "16",
|
size = '16',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const BellIcon: React.FC<IconProps> = ({
|
const BellIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
type IBellNotiIconProps = IconProps & {
|
type IBellNotiIconProps = IconProps & {
|
||||||
accentColor?: string
|
accentColor?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const BellNotiIcon: React.FC<IBellNotiIconProps> = ({
|
const BellNotiIcon: React.FC<IBellNotiIconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
accentColor = "#F43F5E",
|
accentColor = '#F43F5E',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const BellOffIcon: React.FC<IconProps> = ({
|
const BellOffIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const IconBuildingTax: React.FC<IconProps> = ({
|
const IconBuildingTax: React.FC<IconProps> = ({
|
||||||
size = "20px",
|
size = '20px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const BuildingsIcon: React.FC<IconProps> = ({
|
const BuildingsIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const CalendarIcon: React.FC<IconProps> = ({
|
const CalendarIcon: React.FC<IconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const CancelIcon: React.FC<IconProps> = ({
|
const CancelIcon: React.FC<IconProps> = ({
|
||||||
size = "16",
|
size = '16',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const CartIcon: React.FC<IconProps> = ({
|
const CartIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const CashIcon: React.FC<IconProps> = ({
|
const CashIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
|
|
||||||
import IconProps from "./types/icon-type"
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const ChannelsIcon: React.FC<IconProps> = ({
|
const ChannelsIcon: React.FC<IconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const CheckCircleFillIcon: React.FC<IconProps> = ({
|
const CheckCircleFillIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const CheckCircleIcon: React.FC<IconProps> = ({
|
const CheckCircleIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const CheckIcon: React.FC<IconProps> = ({
|
const CheckIcon: React.FC<IconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const ChevronDownIcon: React.FC<IconProps> = ({
|
const ChevronDownIcon: React.FC<IconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const ChevronLeftIcon: React.FC<IconProps> = ({
|
const ChevronLeftIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const ChevronRightIcon: React.FC<IconProps> = ({
|
const ChevronRightIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const ChevronUpIcon: React.FC<IconProps> = ({
|
const ChevronUpIcon: React.FC<IconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import IconProps from "../types/icon-type"
|
import React from 'react'
|
||||||
import React from "react"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const CircleQuarterSolid: React.FC<IconProps> = ({
|
const CircleQuarterSolid: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const ClipboardCopyIcon: React.FC<IconProps> = ({
|
const ClipboardCopyIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const ClockIcon: React.FC<IconProps> = ({
|
const ClockIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const CoinsIcon: React.FC<IconProps> = ({
|
const CoinsIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const CornerDownRightIcon: React.FC<IconProps> = ({
|
const CornerDownRightIcon: React.FC<IconProps> = ({
|
||||||
size = "16",
|
size = '16',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const CrossIcon: React.FC<IconProps> = ({
|
const CrossIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const CrosshairIcon: React.FC<IconProps> = ({
|
const CrosshairIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const CustomerIcon: React.FC<IconProps> = ({
|
const CustomerIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const DetailsIcon: React.FC<IconProps> = ({
|
const DetailsIcon: React.FC<IconProps> = ({
|
||||||
size = "16",
|
size = '16',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const DiscordIcon: React.FC<IconProps> = ({
|
const DiscordIcon: React.FC<IconProps> = ({
|
||||||
size = "16",
|
size = '16',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const DollarSignIcon: React.FC<IconProps> = ({
|
const DollarSignIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
|
||||||
const DownLeftIcon: React.FC<IconProps> = ({
|
import IconProps from '../types/icon-type'
|
||||||
size = "16",
|
|
||||||
color = "#9CA3AF",
|
const DownLeftIcon: React.FC<IconProps> = ({ size = '16', color = '#9CA3AF' }) => {
|
||||||
}) => {
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
width={size}
|
width={size}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import { FC } from "react"
|
import { FC } from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
|
||||||
const DownloadIcon: FC<IconProps> = (props) => {
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
|
const DownloadIcon: FC<IconProps> = props => {
|
||||||
const { fill, size, ...attributes } = props
|
const { fill, size, ...attributes } = props
|
||||||
const line = fill || "#111827"
|
const line = fill || '#111827'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const DuplicateIcon: React.FC<IconProps> = ({
|
const DuplicateIcon: React.FC<IconProps> = ({
|
||||||
size = "20px",
|
size = '20px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const EditIcon: React.FC<IconProps> = ({
|
const EditIcon: React.FC<IconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const EditIcon: React.FC<IconProps> = ({
|
const EditIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import IconProps from "../types/icon-type"
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const EllipsisVerticalIcon = ({
|
const EllipsisVerticalIcon = ({
|
||||||
size = 20,
|
size = 20,
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}: IconProps) => {
|
}: IconProps) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const ExportIcon: React.FC<IconProps> = ({
|
const ExportIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const EyeIcon: React.FC<IconProps> = ({
|
const EyeIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const EyeOffIcon: React.FC<IconProps> = ({
|
const EyeOffIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const FastDeliveryIcon: React.FC<IconProps> = ({
|
const FastDeliveryIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import { FC } from "react"
|
import { FC } from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
|
||||||
const FileIcon: FC<IconProps> = (props) => {
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
|
const FileIcon: FC<IconProps> = props => {
|
||||||
const { fill, size, ...attributes } = props
|
const { fill, size, ...attributes } = props
|
||||||
const line = fill || "#2DD4BF"
|
const line = fill || '#2DD4BF'
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
width={size || 20}
|
width={size || 20}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const FolderOpenIcon: React.FC<IconProps> = ({
|
const FolderOpenIcon: React.FC<IconProps> = ({
|
||||||
size = "20px",
|
size = '20px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const GearIcon: React.FC<IconProps> = ({
|
const GearIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const GiftIcon: React.FC<IconProps> = ({
|
const GiftIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const GripIcon: React.FC<IconProps> = ({
|
const GripIcon: React.FC<IconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const HappyIcon: React.FC<IconProps> = ({
|
const HappyIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const HelpCircleIcon: React.FC<IconProps> = ({
|
const HelpCircleIcon: React.FC<IconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const ImagePlaceholderIcon: React.FC<IconProps> = ({
|
const ImagePlaceholderIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const InfoIcon: React.FC<IconProps> = ({
|
const InfoIcon: React.FC<IconProps> = ({
|
||||||
size = "16",
|
size = '16',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
|
|
||||||
import IconProps from "./types/icon-type"
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const KeyIcon: React.FC<IconProps> = ({
|
const KeyIcon: React.FC<IconProps> = ({
|
||||||
size = "32px",
|
size = '32px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const ListArrowIcon: React.FC<IconProps> = ({
|
const ListArrowIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const ListIcon: React.FC<IconProps> = ({
|
const ListIcon: React.FC<IconProps> = ({
|
||||||
size = "20px",
|
size = '20px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const LockIcon: React.FC<IconProps> = ({
|
const LockIcon: React.FC<IconProps> = ({
|
||||||
size = "16",
|
size = '16',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const SignOutIcon: React.FC<IconProps> = ({
|
const SignOutIcon: React.FC<IconProps> = ({
|
||||||
size = "16",
|
size = '16',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const LongArrowRightIcon: React.FC<IconProps> = ({
|
const LongArrowRightIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
const width = +size * 2
|
const width = +size * 2
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const MailIcon: React.FC<IconProps> = ({
|
const MailIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const MapPinIcon: React.FC<IconProps> = ({
|
const MapPinIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const PackageIcon: React.FC<IconProps> = ({
|
const PackageIcon: React.FC<IconProps> = ({
|
||||||
size = "16",
|
size = '16',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const PercentIcon: React.FC<IconProps> = ({
|
const PercentIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const PlusIcon: React.FC<IconProps> = ({
|
const PlusIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const PointerIcon: React.FC<IconProps> = ({
|
const PointerIcon: React.FC<IconProps> = ({
|
||||||
size = "16",
|
size = '16',
|
||||||
color = "#9CA3AF",
|
color = '#9CA3AF',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const PublishIcon: React.FC<IconProps> = ({
|
const PublishIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const RefreshIcon: React.FC<IconProps> = ({
|
const RefreshIcon: React.FC<IconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const RefundIcon: React.FC<IconProps> = ({
|
const RefundIcon: React.FC<IconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const ReorderIcon: React.FC<IconProps> = ({
|
const ReorderIcon: React.FC<IconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const SadFaceIcon: React.FC<IconProps> = ({
|
const SadFaceIcon: React.FC<IconProps> = ({
|
||||||
size = "20",
|
size = '20',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const SaleIcon: React.FC<IconProps> = ({
|
const SaleIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const SearchIcon: React.FC<IconProps> = ({
|
const SearchIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const SendIcon: React.FC<IconProps> = ({
|
const SendIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const SidedMouthFaceIcon: React.FC<IconProps> = ({
|
const SidedMouthFaceIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
import clsx from "clsx"
|
import React from 'react'
|
||||||
import React from "react"
|
import clsx from 'clsx'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
type SortingIconProps = {
|
type SortingIconProps = {
|
||||||
ascendingColor?: string
|
ascendingColor?: string
|
||||||
descendingColor?: string
|
descendingColor?: string
|
||||||
isSorted?: "asc" | "desc" | false
|
isSorted?: 'asc' | 'desc' | false
|
||||||
} & IconProps
|
} & IconProps
|
||||||
|
|
||||||
const SortingIcon: React.FC<SortingIconProps> = ({
|
const SortingIcon: React.FC<SortingIconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
ascendingColor,
|
ascendingColor,
|
||||||
descendingColor,
|
descendingColor,
|
||||||
isSorted = false,
|
isSorted = false,
|
||||||
@ -28,8 +29,8 @@ const SortingIcon: React.FC<SortingIconProps> = ({
|
|||||||
<path
|
<path
|
||||||
d="M4.66602 10L7.99935 13.3333L11.3327 10"
|
d="M4.66602 10L7.99935 13.3333L11.3327 10"
|
||||||
className={clsx({
|
className={clsx({
|
||||||
"stroke-grey-40": isSorted !== "desc",
|
'stroke-grey-40': isSorted !== 'desc',
|
||||||
"stroke-current": isSorted === "desc",
|
'stroke-current': isSorted === 'desc',
|
||||||
})}
|
})}
|
||||||
stroke={descendingColor || color}
|
stroke={descendingColor || color}
|
||||||
strokeWidth="1.5"
|
strokeWidth="1.5"
|
||||||
@ -40,8 +41,8 @@ const SortingIcon: React.FC<SortingIconProps> = ({
|
|||||||
d="M4.66602 6.00008L7.99935 2.66675L11.3327 6.00008"
|
d="M4.66602 6.00008L7.99935 2.66675L11.3327 6.00008"
|
||||||
stroke={ascendingColor || color}
|
stroke={ascendingColor || color}
|
||||||
className={clsx({
|
className={clsx({
|
||||||
"stroke-grey-40": isSorted !== "asc",
|
'stroke-grey-40': isSorted !== 'asc',
|
||||||
"stroke-current": isSorted === "asc",
|
'stroke-current': isSorted === 'asc',
|
||||||
})}
|
})}
|
||||||
strokeWidth="1.5"
|
strokeWidth="1.5"
|
||||||
strokeLinecap="round"
|
strokeLinecap="round"
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const SparklesIcon: React.FC<IconProps> = ({
|
const SparklesIcon: React.FC<IconProps> = ({
|
||||||
size = "24",
|
size = '24',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "./types/icon-type"
|
|
||||||
|
import IconProps from './types/icon-type'
|
||||||
|
|
||||||
const StopIcon: React.FC<IconProps> = ({
|
const StopIcon: React.FC<IconProps> = ({
|
||||||
size = "20px",
|
size = '20px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
const SwatchIcon: React.FC<IconProps> = ({
|
const SwatchIcon: React.FC<IconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "currentColor",
|
color = 'currentColor',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
import React from "react"
|
import React from 'react'
|
||||||
import IconProps from "../types/icon-type"
|
|
||||||
|
import IconProps from '../types/icon-type'
|
||||||
|
|
||||||
type TagDotIconProps = IconProps & {
|
type TagDotIconProps = IconProps & {
|
||||||
outerColor: string
|
outerColor: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const TagDotIcon: React.FC<TagDotIconProps> = ({
|
const TagDotIcon: React.FC<TagDotIconProps> = ({
|
||||||
size = "24px",
|
size = '24px',
|
||||||
color = "#E5484D",
|
color = '#E5484D',
|
||||||
outerColor = "transparent",
|
outerColor = 'transparent',
|
||||||
...attributes
|
...attributes
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user