mirror of
https://github.com/Tony0410/readlater.git
synced 2026-05-24 22:01:41 +08:00
Initial commit: ReadLater v1.0
- Save articles via URL or bookmarklet - Clean dark reader with customizable fonts/sizing - Text-to-speech with browser + Kokoro support - Speed control up to 3x - Favorites and archive - SQLite database with Drizzle ORM - Docker deployment ready Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
49
src/lib/types.ts
Normal file
49
src/lib/types.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
export interface Article {
|
||||
id: string;
|
||||
url: string;
|
||||
title: string;
|
||||
author: string | null;
|
||||
siteName: string | null;
|
||||
excerpt: string | null;
|
||||
content: string;
|
||||
textContent: string;
|
||||
leadImage: string | null;
|
||||
wordCount: number;
|
||||
readingProgress: number;
|
||||
isFavorite: boolean;
|
||||
isArchived: boolean;
|
||||
tags: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
readAt: string | null;
|
||||
}
|
||||
|
||||
export interface ReaderSettings {
|
||||
fontSize: number; // 14-32
|
||||
fontFamily: "system" | "serif" | "sans" | "mono";
|
||||
lineHeight: number; // 1.4-2.2
|
||||
maxWidth: number; // 500-900
|
||||
theme: "dark" | "light" | "sepia";
|
||||
}
|
||||
|
||||
export interface TTSSettings {
|
||||
engine: "browser" | "kokoro";
|
||||
speed: number; // 0.5-3.0
|
||||
voice: string;
|
||||
kokoroUrl: string;
|
||||
}
|
||||
|
||||
export const defaultReaderSettings: ReaderSettings = {
|
||||
fontSize: 18,
|
||||
fontFamily: "serif",
|
||||
lineHeight: 1.8,
|
||||
maxWidth: 700,
|
||||
theme: "dark",
|
||||
};
|
||||
|
||||
export const defaultTTSSettings: TTSSettings = {
|
||||
engine: "browser",
|
||||
speed: 1.0,
|
||||
voice: "",
|
||||
kokoroUrl: "http://localhost:8880",
|
||||
};
|
||||
Reference in New Issue
Block a user