This commit is contained in:
afkarxyz committed 2025-12-20 12:12:11 +07:00
1 parent 2f51a118e4
commit de402efe6b
20 files changed
+1554 -488

No files matched your search

+34 -14
View File
@@ -27,17 +27,19 @@ type AccountDB struct {
// AccountListItem represents a simplified account for listing
type AccountListItem struct {
ID int64 `json:"id"`
Username string `json:"username"`
Name string `json:"name"`
ProfileImage string `json:"profile_image"`
TotalMedia int `json:"total_media"`
LastFetched string `json:"last_fetched"`
GroupName string `json:"group_name"`
GroupColor string `json:"group_color"`
MediaType string `json:"media_type"`
Cursor string `json:"cursor"`
Completed bool `json:"completed"`
ID int64 `json:"id"`
Username string `json:"username"`
Name string `json:"name"`
ProfileImage string `json:"profile_image"`
TotalMedia int `json:"total_media"`
LastFetched string `json:"last_fetched"`
GroupName string `json:"group_name"`
GroupColor string `json:"group_color"`
MediaType string `json:"media_type"`
Cursor string `json:"cursor"`
Completed bool `json:"completed"`
FollowersCount int `json:"followers_count"`
StatusesCount int `json:"statuses_count"`
}
var db *sql.DB
@@ -161,7 +163,8 @@ func GetAllAccounts() ([]AccountListItem, error) {
SELECT id, username, name, profile_image, total_media, last_fetched,
COALESCE(group_name, '') as group_name, COALESCE(group_color, '') as group_color,
COALESCE(media_type, 'all') as media_type,
COALESCE(cursor, '') as cursor, COALESCE(completed, 1) as completed
COALESCE(cursor, '') as cursor, COALESCE(completed, 1) as completed,
COALESCE(response_json, '') as response_json
FROM accounts
ORDER BY group_name ASC, last_fetched DESC
`)
@@ -175,11 +178,28 @@ func GetAllAccounts() ([]AccountListItem, error) {
var acc AccountListItem
var lastFetched time.Time
var completedInt int
if err := rows.Scan(&acc.ID, &acc.Username, &acc.Name, &acc.ProfileImage, &acc.TotalMedia, &lastFetched, &acc.GroupName, &acc.GroupColor, &acc.MediaType, &acc.Cursor, &completedInt); err != nil {
var responseJSON string
if err := rows.Scan(&acc.ID, &acc.Username, &acc.Name, &acc.ProfileImage, &acc.TotalMedia, &lastFetched, &acc.GroupName, &acc.GroupColor, &acc.MediaType, &acc.Cursor, &completedInt, &responseJSON); err != nil {
continue
}
acc.LastFetched = lastFetched.Format("2006-01-02 15:04")
acc.Completed = completedInt == 1
// Extract followers_count and statuses_count from response_json
if responseJSON != "" {
var parsed map[string]interface{}
if err := json.Unmarshal([]byte(responseJSON), &parsed); err == nil {
if accountInfo, ok := parsed["account_info"].(map[string]interface{}); ok {
if followers, ok := accountInfo["followers_count"].(float64); ok {
acc.FollowersCount = int(followers)
}
if statuses, ok := accountInfo["statuses_count"].(float64); ok {
acc.StatusesCount = int(statuses)
}
}
}
}
accounts = append(accounts, acc)
}
@@ -241,7 +261,6 @@ func ClearAllAccounts() error {
return err
}
// GetAccountByID returns a specific account by ID
func GetAccountByID(id int64) (*AccountDB, error) {
if db == nil {
@@ -284,6 +303,7 @@ func DeleteAccount(id int64) error {
_, err := db.Exec("DELETE FROM accounts WHERE id = ?", id)
return err
}
// LegacyMediaEntry represents media entry in old format
type LegacyMediaEntry struct {
TweetID string `json:"tweet_id"`
+3 -1
View File
@@ -18,5 +18,7 @@
"lib": "@/lib",
"hooks": "@/hooks"
},
"registries": {}
"registries": {
"@lucide-animated": "https://lucide-animated.com/r/{name}.json"
}
}
+4 -6
View File
@@ -12,23 +12,21 @@
"postinstall": "node scripts/generate-icon.js"
},
"dependencies": {
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-context-menu": "^2.2.16",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-progress": "^1.1.8",
"@radix-ui/react-radio-group": "^1.3.8",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-switch": "^1.2.6",
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/react-tooltip": "^1.2.8",
"@tailwindcss/vite": "^4.1.18",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.561.0",
"lucide-react": "^0.562.0",
"motion": "^12.23.26",
"next-themes": "^0.4.6",
"react": "^19.2.3",
"react-dom": "^19.2.3",
@@ -38,13 +36,13 @@
},
"devDependencies": {
"@eslint/js": "^9.39.2",
"@types/node": "^25.0.2",
"@types/node": "^25.0.3",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.1.2",
"eslint": "^9.39.2",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.4.25",
"eslint-plugin-react-refresh": "^0.4.26",
"globals": "^16.5.0",
"sharp": "^0.34.5",
"tw-animate-css": "^1.4.0",
+1 -1
View File
@@ -1 +1 @@
fac81d3fc08563d82c20da44a49a8efa
93300717a79529efe3943af0fda63408
+204 -272
View File
@@ -8,9 +8,6 @@ importers:
.:
dependencies:
'@radix-ui/react-accordion':
specifier: ^1.2.12
version: 1.2.12(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-checkbox':
specifier: ^1.3.3
version: 1.3.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
@@ -29,9 +26,6 @@ importers:
'@radix-ui/react-progress':
specifier: ^1.1.8
version: 1.1.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-radio-group':
specifier: ^1.3.8
version: 1.3.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-select':
specifier: ^2.2.6
version: 2.2.6(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
@@ -41,15 +35,12 @@ importers:
'@radix-ui/react-switch':
specifier: ^1.2.6
version: 1.2.6(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-tabs':
specifier: ^1.1.13
version: 1.1.13(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-tooltip':
specifier: ^1.2.8
version: 1.2.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@tailwindcss/vite':
specifier: ^4.1.18
version: 4.1.18(vite@7.3.0(@types/node@25.0.2)(jiti@2.6.1)(lightningcss@1.30.2))
version: 4.1.18(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(lightningcss@1.30.2))
class-variance-authority:
specifier: ^0.7.1
version: 0.7.1
@@ -57,8 +48,11 @@ importers:
specifier: ^2.1.1
version: 2.1.1
lucide-react:
specifier: ^0.561.0
version: 0.561.0(react@19.2.3)
specifier: ^0.562.0
version: 0.562.0(react@19.2.3)
motion:
specifier: ^12.23.26
version: 12.23.26(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
next-themes:
specifier: ^0.4.6
version: 0.4.6(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
@@ -82,8 +76,8 @@ importers:
specifier: ^9.39.2
version: 9.39.2
'@types/node':
specifier: ^25.0.2
version: 25.0.2
specifier: ^25.0.3
version: 25.0.3
'@types/react':
specifier: ^19.2.7
version: 19.2.7
@@ -92,7 +86,7 @@ importers:
version: 19.2.3(@types/react@19.2.7)
'@vitejs/plugin-react':
specifier: ^5.1.2
version: 5.1.2(vite@7.3.0(@types/node@25.0.2)(jiti@2.6.1)(lightningcss@1.30.2))
version: 5.1.2(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(lightningcss@1.30.2))
eslint:
specifier: ^9.39.2
version: 9.39.2(jiti@2.6.1)
@@ -100,8 +94,8 @@ importers:
specifier: ^7.0.1
version: 7.0.1(eslint@9.39.2(jiti@2.6.1))
eslint-plugin-react-refresh:
specifier: ^0.4.25
version: 0.4.25(eslint@9.39.2(jiti@2.6.1))
specifier: ^0.4.26
version: 0.4.26(eslint@9.39.2(jiti@2.6.1))
globals:
specifier: ^16.5.0
version: 16.5.0
@@ -119,7 +113,7 @@ importers:
version: 8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
vite:
specifier: ^7.3.0
version: 7.3.0(@types/node@25.0.2)(jiti@2.6.1)(lightningcss@1.30.2)
version: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(lightningcss@1.30.2)
packages:
@@ -209,158 +203,158 @@ packages:
'@emnapi/runtime@1.7.1':
resolution: {integrity: sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==}
'@esbuild/aix-ppc64@0.27.1':
resolution: {integrity: sha512-HHB50pdsBX6k47S4u5g/CaLjqS3qwaOVE5ILsq64jyzgMhLuCuZ8rGzM9yhsAjfjkbgUPMzZEPa7DAp7yz6vuA==}
'@esbuild/aix-ppc64@0.27.2':
resolution: {integrity: sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==}
engines: {node: '>=18'}
cpu: [ppc64]
os: [aix]
'@esbuild/android-arm64@0.27.1':
resolution: {integrity: sha512-45fuKmAJpxnQWixOGCrS+ro4Uvb4Re9+UTieUY2f8AEc+t7d4AaZ6eUJ3Hva7dtrxAAWHtlEFsXFMAgNnGU9uQ==}
'@esbuild/android-arm64@0.27.2':
resolution: {integrity: sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==}
engines: {node: '>=18'}
cpu: [arm64]
os: [android]
'@esbuild/android-arm@0.27.1':
resolution: {integrity: sha512-kFqa6/UcaTbGm/NncN9kzVOODjhZW8e+FRdSeypWe6j33gzclHtwlANs26JrupOntlcWmB0u8+8HZo8s7thHvg==}
'@esbuild/android-arm@0.27.2':
resolution: {integrity: sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==}
engines: {node: '>=18'}
cpu: [arm]
os: [android]
'@esbuild/android-x64@0.27.1':
resolution: {integrity: sha512-LBEpOz0BsgMEeHgenf5aqmn/lLNTFXVfoWMUox8CtWWYK9X4jmQzWjoGoNb8lmAYml/tQ/Ysvm8q7szu7BoxRQ==}
'@esbuild/android-x64@0.27.2':
resolution: {integrity: sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==}
engines: {node: '>=18'}
cpu: [x64]
os: [android]
'@esbuild/darwin-arm64@0.27.1':
resolution: {integrity: sha512-veg7fL8eMSCVKL7IW4pxb54QERtedFDfY/ASrumK/SbFsXnRazxY4YykN/THYqFnFwJ0aVjiUrVG2PwcdAEqQQ==}
'@esbuild/darwin-arm64@0.27.2':
resolution: {integrity: sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [darwin]
'@esbuild/darwin-x64@0.27.1':
resolution: {integrity: sha512-+3ELd+nTzhfWb07Vol7EZ+5PTbJ/u74nC6iv4/lwIU99Ip5uuY6QoIf0Hn4m2HoV0qcnRivN3KSqc+FyCHjoVQ==}
'@esbuild/darwin-x64@0.27.2':
resolution: {integrity: sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==}
engines: {node: '>=18'}
cpu: [x64]
os: [darwin]
'@esbuild/freebsd-arm64@0.27.1':
resolution: {integrity: sha512-/8Rfgns4XD9XOSXlzUDepG8PX+AVWHliYlUkFI3K3GB6tqbdjYqdhcb4BKRd7C0BhZSoaCxhv8kTcBrcZWP+xg==}
'@esbuild/freebsd-arm64@0.27.2':
resolution: {integrity: sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==}
engines: {node: '>=18'}
cpu: [arm64]
os: [freebsd]
'@esbuild/freebsd-x64@0.27.1':
resolution: {integrity: sha512-GITpD8dK9C+r+5yRT/UKVT36h/DQLOHdwGVwwoHidlnA168oD3uxA878XloXebK4Ul3gDBBIvEdL7go9gCUFzQ==}
'@esbuild/freebsd-x64@0.27.2':
resolution: {integrity: sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==}
engines: {node: '>=18'}
cpu: [x64]
os: [freebsd]
'@esbuild/linux-arm64@0.27.1':
resolution: {integrity: sha512-W9//kCrh/6in9rWIBdKaMtuTTzNj6jSeG/haWBADqLLa9P8O5YSRDzgD5y9QBok4AYlzS6ARHifAb75V6G670Q==}
'@esbuild/linux-arm64@0.27.2':
resolution: {integrity: sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==}
engines: {node: '>=18'}
cpu: [arm64]
os: [linux]
'@esbuild/linux-arm@0.27.1':
resolution: {integrity: sha512-ieMID0JRZY/ZeCrsFQ3Y3NlHNCqIhTprJfDgSB3/lv5jJZ8FX3hqPyXWhe+gvS5ARMBJ242PM+VNz/ctNj//eA==}
'@esbuild/linux-arm@0.27.2':
resolution: {integrity: sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==}
engines: {node: '>=18'}
cpu: [arm]
os: [linux]
'@esbuild/linux-ia32@0.27.1':
resolution: {integrity: sha512-VIUV4z8GD8rtSVMfAj1aXFahsi/+tcoXXNYmXgzISL+KB381vbSTNdeZHHHIYqFyXcoEhu9n5cT+05tRv13rlw==}
'@esbuild/linux-ia32@0.27.2':
resolution: {integrity: sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==}
engines: {node: '>=18'}
cpu: [ia32]
os: [linux]
'@esbuild/linux-loong64@0.27.1':
resolution: {integrity: sha512-l4rfiiJRN7sTNI//ff65zJ9z8U+k6zcCg0LALU5iEWzY+a1mVZ8iWC1k5EsNKThZ7XCQ6YWtsZ8EWYm7r1UEsg==}
'@esbuild/linux-loong64@0.27.2':
resolution: {integrity: sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==}
engines: {node: '>=18'}
cpu: [loong64]
os: [linux]
'@esbuild/linux-mips64el@0.27.1':
resolution: {integrity: sha512-U0bEuAOLvO/DWFdygTHWY8C067FXz+UbzKgxYhXC0fDieFa0kDIra1FAhsAARRJbvEyso8aAqvPdNxzWuStBnA==}
'@esbuild/linux-mips64el@0.27.2':
resolution: {integrity: sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==}
engines: {node: '>=18'}
cpu: [mips64el]
os: [linux]
'@esbuild/linux-ppc64@0.27.1':
resolution: {integrity: sha512-NzdQ/Xwu6vPSf/GkdmRNsOfIeSGnh7muundsWItmBsVpMoNPVpM61qNzAVY3pZ1glzzAxLR40UyYM23eaDDbYQ==}
'@esbuild/linux-ppc64@0.27.2':
resolution: {integrity: sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==}
engines: {node: '>=18'}
cpu: [ppc64]
os: [linux]
'@esbuild/linux-riscv64@0.27.1':
resolution: {integrity: sha512-7zlw8p3IApcsN7mFw0O1Z1PyEk6PlKMu18roImfl3iQHTnr/yAfYv6s4hXPidbDoI2Q0pW+5xeoM4eTCC0UdrQ==}
'@esbuild/linux-riscv64@0.27.2':
resolution: {integrity: sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==}
engines: {node: '>=18'}
cpu: [riscv64]
os: [linux]
'@esbuild/linux-s390x@0.27.1':
resolution: {integrity: sha512-cGj5wli+G+nkVQdZo3+7FDKC25Uh4ZVwOAK6A06Hsvgr8WqBBuOy/1s+PUEd/6Je+vjfm6stX0kmib5b/O2Ykw==}
'@esbuild/linux-s390x@0.27.2':
resolution: {integrity: sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==}
engines: {node: '>=18'}
cpu: [s390x]
os: [linux]
'@esbuild/linux-x64@0.27.1':
resolution: {integrity: sha512-z3H/HYI9MM0HTv3hQZ81f+AKb+yEoCRlUby1F80vbQ5XdzEMyY/9iNlAmhqiBKw4MJXwfgsh7ERGEOhrM1niMA==}
'@esbuild/linux-x64@0.27.2':
resolution: {integrity: sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==}
engines: {node: '>=18'}
cpu: [x64]
os: [linux]
'@esbuild/netbsd-arm64@0.27.1':
resolution: {integrity: sha512-wzC24DxAvk8Em01YmVXyjl96Mr+ecTPyOuADAvjGg+fyBpGmxmcr2E5ttf7Im8D0sXZihpxzO1isus8MdjMCXQ==}
'@esbuild/netbsd-arm64@0.27.2':
resolution: {integrity: sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==}
engines: {node: '>=18'}
cpu: [arm64]
os: [netbsd]
'@esbuild/netbsd-x64@0.27.1':
resolution: {integrity: sha512-1YQ8ybGi2yIXswu6eNzJsrYIGFpnlzEWRl6iR5gMgmsrR0FcNoV1m9k9sc3PuP5rUBLshOZylc9nqSgymI+TYg==}
'@esbuild/netbsd-x64@0.27.2':
resolution: {integrity: sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==}
engines: {node: '>=18'}
cpu: [x64]
os: [netbsd]
'@esbuild/openbsd-arm64@0.27.1':
resolution: {integrity: sha512-5Z+DzLCrq5wmU7RDaMDe2DVXMRm2tTDvX2KU14JJVBN2CT/qov7XVix85QoJqHltpvAOZUAc3ndU56HSMWrv8g==}
'@esbuild/openbsd-arm64@0.27.2':
resolution: {integrity: sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==}
engines: {node: '>=18'}
cpu: [arm64]
os: [openbsd]
'@esbuild/openbsd-x64@0.27.1':
resolution: {integrity: sha512-Q73ENzIdPF5jap4wqLtsfh8YbYSZ8Q0wnxplOlZUOyZy7B4ZKW8DXGWgTCZmF8VWD7Tciwv5F4NsRf6vYlZtqg==}
'@esbuild/openbsd-x64@0.27.2':
resolution: {integrity: sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==}
engines: {node: '>=18'}
cpu: [x64]
os: [openbsd]
'@esbuild/openharmony-arm64@0.27.1':
resolution: {integrity: sha512-ajbHrGM/XiK+sXM0JzEbJAen+0E+JMQZ2l4RR4VFwvV9JEERx+oxtgkpoKv1SevhjavK2z2ReHk32pjzktWbGg==}
'@esbuild/openharmony-arm64@0.27.2':
resolution: {integrity: sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==}
engines: {node: '>=18'}
cpu: [arm64]
os: [openharmony]
'@esbuild/sunos-x64@0.27.1':
resolution: {integrity: sha512-IPUW+y4VIjuDVn+OMzHc5FV4GubIwPnsz6ubkvN8cuhEqH81NovB53IUlrlBkPMEPxvNnf79MGBoz8rZ2iW8HA==}
'@esbuild/sunos-x64@0.27.2':
resolution: {integrity: sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==}
engines: {node: '>=18'}
cpu: [x64]
os: [sunos]
'@esbuild/win32-arm64@0.27.1':
resolution: {integrity: sha512-RIVRWiljWA6CdVu8zkWcRmGP7iRRIIwvhDKem8UMBjPql2TXM5PkDVvvrzMtj1V+WFPB4K7zkIGM7VzRtFkjdg==}
'@esbuild/win32-arm64@0.27.2':
resolution: {integrity: sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [win32]
'@esbuild/win32-ia32@0.27.1':
resolution: {integrity: sha512-2BR5M8CPbptC1AK5JbJT1fWrHLvejwZidKx3UMSF0ecHMa+smhi16drIrCEggkgviBwLYd5nwrFLSl5Kho96RQ==}
'@esbuild/win32-ia32@0.27.2':
resolution: {integrity: sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==}
engines: {node: '>=18'}
cpu: [ia32]
os: [win32]
'@esbuild/win32-x64@0.27.1':
resolution: {integrity: sha512-d5X6RMYv6taIymSk8JBP+nxv8DQAMY6A51GPgusqLdK9wBz5wWIXy1KjTck6HnjE9hqJzJRdk+1p/t5soSbCtw==}
'@esbuild/win32-x64@0.27.2':
resolution: {integrity: sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==}
engines: {node: '>=18'}
cpu: [x64]
os: [win32]
@@ -593,19 +587,6 @@ packages:
'@radix-ui/primitive@1.1.3':
resolution: {integrity: sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==}
'@radix-ui/react-accordion@1.2.12':
resolution: {integrity: sha512-T4nygeh9YE9dLRPhAHSeOZi7HBXo+0kYIPJXayZfvWOWA0+n3dESrZbjfDPUABkUNym6Hd+f2IR113To8D2GPA==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@types/react-dom':
optional: true
'@radix-ui/react-arrow@1.1.7':
resolution: {integrity: sha512-F+M1tLhO+mlQaOWspE8Wstg+z6PwxwRd8oQ8IXceWz92kfAmalTRf0EjrouQeo7QssEPfCn05B4Ihs1K9WQ/7w==}
peerDependencies:
@@ -632,19 +613,6 @@ packages:
'@types/react-dom':
optional: true
'@radix-ui/react-collapsible@1.1.12':
resolution: {integrity: sha512-Uu+mSh4agx2ib1uIGPP4/CKNULyajb3p92LsVXmH2EHVMTfZWpll88XJ0j4W0z3f8NK1eYl1+Mf/szHPmcHzyA==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@types/react-dom':
optional: true
'@radix-ui/react-collection@1.1.7':
resolution: {integrity: sha512-Fh9rGN0MoI4ZFUNyfFVNU4y9LUz93u9/0K+yLgA2bwRojxM8JU1DyvvMBabnZPBgMWREAJvU2jjVzq+LrFUglw==}
peerDependencies:
@@ -881,19 +849,6 @@ packages:
'@types/react-dom':
optional: true
'@radix-ui/react-radio-group@1.3.8':
resolution: {integrity: sha512-VBKYIYImA5zsxACdisNQ3BjCBfmbGH3kQlnFVqlWU4tXwjy7cGX8ta80BcrO+WJXIn5iBylEH3K6ZTlee//lgQ==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@types/react-dom':
optional: true
'@radix-ui/react-roving-focus@1.1.11':
resolution: {integrity: sha512-7A6S9jSgm/S+7MdtNDSb+IU859vQqJ/QAtcYQcfFC6W8RS4IxIZDldLR0xqCFZ6DCyrQLjLPsxtTNch5jVA4lA==}
peerDependencies:
@@ -951,19 +906,6 @@ packages:
'@types/react-dom':
optional: true
'@radix-ui/react-tabs@1.1.13':
resolution: {integrity: sha512-7xdcatg7/U+7+Udyoj2zodtI9H/IIopqo+YOIcZOq1nJwXWBZ9p8xiu5llXlekDbZkca79a/fozEYQXIA4sW6A==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@types/react-dom':
optional: true
'@radix-ui/react-tooltip@1.2.8':
resolution: {integrity: sha512-tY7sVt1yL9ozIxvmbtN5qtmH2krXcBCfjEiCgKGLqunJHvgvZG2Pcl2oQ3kbcZARb1BGEHdkLzcYGO8ynVlieg==}
peerDependencies:
@@ -1286,8 +1228,8 @@ packages:
'@types/json-schema@7.0.15':
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
'@types/node@25.0.2':
resolution: {integrity: sha512-gWEkeiyYE4vqjON/+Obqcoeffmk0NF15WSBwSs7zwVA2bAbTaE0SJ7P0WNGoJn8uE7fiaV5a7dKYIJriEqOrmA==}
'@types/node@25.0.3':
resolution: {integrity: sha512-W609buLVRVmeW693xKfzHeIV6nJGGz98uCPfeXI1ELMLXVeKYZ9m15fAMSaUPBHYLGFsVRcMmSCksQOrZV9BYA==}
'@types/react-dom@19.2.3':
resolution: {integrity: sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==}
@@ -1389,8 +1331,8 @@ packages:
balanced-match@1.0.2:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
baseline-browser-mapping@2.9.7:
resolution: {integrity: sha512-k9xFKplee6KIio3IDbwj+uaCLpqzOwakOgmqzPezM0sFJlFKcg30vk2wOiAJtkTSfx0SSQDSe8q+mWA/fSH5Zg==}
baseline-browser-mapping@2.9.11:
resolution: {integrity: sha512-Sg0xJUNDU1sJNGdfGWhVHX0kkZ+HWcvmVymJbj6NSgZZmW/8S9Y2HQ5euytnIgakgxN6papOAWiwDo1ctFDcoQ==}
hasBin: true
brace-expansion@1.1.12:
@@ -1408,8 +1350,8 @@ packages:
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
engines: {node: '>=6'}
caniuse-lite@1.0.30001760:
resolution: {integrity: sha512-7AAMPcueWELt1p3mi13HR/LHH0TJLT11cnwDJEs3xA4+CK/PLKeO9Kl1oru24htkyUKtkGCvAx4ohB0Ttry8Dw==}
caniuse-lite@1.0.30001761:
resolution: {integrity: sha512-JF9ptu1vP2coz98+5051jZ4PwQgd2ni8A+gYSN7EA7dPKIMf0pDlSUxhdmVOaV3/fYK5uWBkgSXJaRLr4+3A6g==}
chalk@4.1.2:
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
@@ -1468,8 +1410,8 @@ packages:
resolution: {integrity: sha512-LgQMM4WXU3QI+SYgEc2liRgznaD5ojbmY3sb8LxyguVkIg5FxdpTkvk72te2R38/TGKxH634oLxXRGY6d7AP+Q==}
engines: {node: '>=10.13.0'}
esbuild@0.27.1:
resolution: {integrity: sha512-yY35KZckJJuVVPXpvjgxiCuVEJT67F6zDeVTv4rizyPrfGBUpZQsvmxnN+C371c2esD/hNMjj4tpBhuueLN7aA==}
esbuild@0.27.2:
resolution: {integrity: sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==}
engines: {node: '>=18'}
hasBin: true
@@ -1487,8 +1429,8 @@ packages:
peerDependencies:
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0
eslint-plugin-react-refresh@0.4.25:
resolution: {integrity: sha512-dRUD2LOdEqI4zXHqbQ442blQAzdSuShAaiSq5Vtyy6LT08YUf0oOjBDo4VPx0dCPgiPWh1WB4dtbLOd0kOlDPQ==}
eslint-plugin-react-refresh@0.4.26:
resolution: {integrity: sha512-1RETEylht2O6FM/MvgnyvT+8K21wLqDNg4qD51Zj3guhjt433XbnnkVttHMyaVyAFD03QSV4LPS5iE3VQmO7XQ==}
peerDependencies:
eslint: '>=8.40'
@@ -1567,6 +1509,20 @@ packages:
flatted@3.3.3:
resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==}
framer-motion@12.23.26:
resolution: {integrity: sha512-cPcIhgR42xBn1Uj+PzOyheMtZ73H927+uWPDVhUMqxy8UHt6Okavb6xIz9J/phFUHUj0OncR6UvMfJTXoc/LKA==}
peerDependencies:
'@emotion/is-prop-valid': '*'
react: ^18.0.0 || ^19.0.0
react-dom: ^18.0.0 || ^19.0.0
peerDependenciesMeta:
'@emotion/is-prop-valid':
optional: true
react:
optional: true
react-dom:
optional: true
fsevents@2.3.3:
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@@ -1749,8 +1705,8 @@ packages:
lru-cache@5.1.1:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
lucide-react@0.561.0:
resolution: {integrity: sha512-Y59gMY38tl4/i0qewcqohPdEbieBy7SovpBL9IFebhc2mDd8x4PZSOsiFRkpPcOq6bj1r/mjH/Rk73gSlIJP2A==}
lucide-react@0.562.0:
resolution: {integrity: sha512-82hOAu7y0dbVuFfmO4bYF1XEwYk/mEbM5E+b1jgci/udUBEE/R7LF5Ip0CCEmXe8AybRM8L+04eP+LGZeDvkiw==}
peerDependencies:
react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
@@ -1764,6 +1720,26 @@ packages:
resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}
engines: {node: '>=16 || 14 >=14.17'}
motion-dom@12.23.23:
resolution: {integrity: sha512-n5yolOs0TQQBRUFImrRfs/+6X4p3Q4n1dUEqt/H58Vx7OW6RF+foWEgmTVDhIWJIMXOuNNL0apKH2S16en9eiA==}
motion-utils@12.23.6:
resolution: {integrity: sha512-eAWoPgr4eFEOFfg2WjIsMoqJTW6Z8MTUCgn/GZ3VRpClWBdnbjryiA3ZSNLyxCTmCQx4RmYX6jX1iWHbenUPNQ==}
motion@12.23.26:
resolution: {integrity: sha512-Ll8XhVxY8LXMVYTCfme27WH2GjBrCIzY4+ndr5QKxsK+YwCtOi2B/oBi5jcIbik5doXuWT/4KKDOVAZJkeY5VQ==}
peerDependencies:
'@emotion/is-prop-valid': '*'
react: ^18.0.0 || ^19.0.0
react-dom: ^18.0.0 || ^19.0.0
peerDependenciesMeta:
'@emotion/is-prop-valid':
optional: true
react:
optional: true
react-dom:
optional: true
ms@2.1.3:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
@@ -1966,8 +1942,8 @@ packages:
undici-types@7.16.0:
resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==}
update-browserslist-db@1.2.2:
resolution: {integrity: sha512-E85pfNzMQ9jpKkA7+TJAi4TJN+tBCuWh5rUcS/sv6cFi+1q9LYDwDI5dpUL0u/73EElyQ8d3TEaeW4sPedBqYA==}
update-browserslist-db@1.2.3:
resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==}
hasBin: true
peerDependencies:
browserslist: '>= 4.21.0'
@@ -2179,82 +2155,82 @@ snapshots:
tslib: 2.8.1
optional: true
'@esbuild/aix-ppc64@0.27.1':
'@esbuild/aix-ppc64@0.27.2':
optional: true
'@esbuild/android-arm64@0.27.1':
'@esbuild/android-arm64@0.27.2':
optional: true
'@esbuild/android-arm@0.27.1':
'@esbuild/android-arm@0.27.2':
optional: true
'@esbuild/android-x64@0.27.1':
'@esbuild/android-x64@0.27.2':
optional: true
'@esbuild/darwin-arm64@0.27.1':
'@esbuild/darwin-arm64@0.27.2':
optional: true
'@esbuild/darwin-x64@0.27.1':
'@esbuild/darwin-x64@0.27.2':
optional: true
'@esbuild/freebsd-arm64@0.27.1':
'@esbuild/freebsd-arm64@0.27.2':
optional: true
'@esbuild/freebsd-x64@0.27.1':
'@esbuild/freebsd-x64@0.27.2':
optional: true
'@esbuild/linux-arm64@0.27.1':
'@esbuild/linux-arm64@0.27.2':
optional: true
'@esbuild/linux-arm@0.27.1':
'@esbuild/linux-arm@0.27.2':
optional: true
'@esbuild/linux-ia32@0.27.1':
'@esbuild/linux-ia32@0.27.2':
optional: true
'@esbuild/linux-loong64@0.27.1':
'@esbuild/linux-loong64@0.27.2':
optional: true
'@esbuild/linux-mips64el@0.27.1':
'@esbuild/linux-mips64el@0.27.2':
optional: true
'@esbuild/linux-ppc64@0.27.1':
'@esbuild/linux-ppc64@0.27.2':
optional: true
'@esbuild/linux-riscv64@0.27.1':
'@esbuild/linux-riscv64@0.27.2':
optional: true
'@esbuild/linux-s390x@0.27.1':
'@esbuild/linux-s390x@0.27.2':
optional: true
'@esbuild/linux-x64@0.27.1':
'@esbuild/linux-x64@0.27.2':
optional: true
'@esbuild/netbsd-arm64@0.27.1':
'@esbuild/netbsd-arm64@0.27.2':
optional: true
'@esbuild/netbsd-x64@0.27.1':
'@esbuild/netbsd-x64@0.27.2':
optional: true
'@esbuild/openbsd-arm64@0.27.1':
'@esbuild/openbsd-arm64@0.27.2':
optional: true
'@esbuild/openbsd-x64@0.27.1':
'@esbuild/openbsd-x64@0.27.2':
optional: true
'@esbuild/openharmony-arm64@0.27.1':
'@esbuild/openharmony-arm64@0.27.2':
optional: true
'@esbuild/sunos-x64@0.27.1':
'@esbuild/sunos-x64@0.27.2':
optional: true
'@esbuild/win32-arm64@0.27.1':
'@esbuild/win32-arm64@0.27.2':
optional: true
'@esbuild/win32-ia32@0.27.1':
'@esbuild/win32-ia32@0.27.2':
optional: true
'@esbuild/win32-x64@0.27.1':
'@esbuild/win32-x64@0.27.2':
optional: true
'@eslint-community/eslint-utils@4.9.0(eslint@9.39.2(jiti@2.6.1))':
@@ -2450,23 +2426,6 @@ snapshots:
'@radix-ui/primitive@1.1.3': {}
'@radix-ui/react-accordion@1.2.12(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)':
dependencies:
'@radix-ui/primitive': 1.1.3
'@radix-ui/react-collapsible': 1.1.12(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3)
react: 19.2.3
react-dom: 19.2.3(react@19.2.3)
optionalDependencies:
'@types/react': 19.2.7
'@types/react-dom': 19.2.3(@types/react@19.2.7)
'@radix-ui/react-arrow@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)':
dependencies:
'@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
@@ -2492,22 +2451,6 @@ snapshots:
'@types/react': 19.2.7
'@types/react-dom': 19.2.3(@types/react@19.2.7)
'@radix-ui/react-collapsible@1.1.12(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)':
dependencies:
'@radix-ui/primitive': 1.1.3
'@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3)
react: 19.2.3
react-dom: 19.2.3(react@19.2.3)
optionalDependencies:
'@types/react': 19.2.7
'@types/react-dom': 19.2.3(@types/react@19.2.7)
'@radix-ui/react-collection@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)':
dependencies:
'@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3)
@@ -2733,24 +2676,6 @@ snapshots:
'@types/react': 19.2.7
'@types/react-dom': 19.2.3(@types/react@19.2.7)
'@radix-ui/react-radio-group@1.3.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)':
dependencies:
'@radix-ui/primitive': 1.1.3
'@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-use-size': 1.1.1(@types/react@19.2.7)(react@19.2.3)
react: 19.2.3
react-dom: 19.2.3(react@19.2.3)
optionalDependencies:
'@types/react': 19.2.7
'@types/react-dom': 19.2.3(@types/react@19.2.7)
'@radix-ui/react-roving-focus@1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)':
dependencies:
'@radix-ui/primitive': 1.1.3
@@ -2826,22 +2751,6 @@ snapshots:
'@types/react': 19.2.7
'@types/react-dom': 19.2.3(@types/react@19.2.7)
'@radix-ui/react-tabs@1.1.13(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)':
dependencies:
'@radix-ui/primitive': 1.1.3
'@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3)
'@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3)
react: 19.2.3
react-dom: 19.2.3(react@19.2.3)
optionalDependencies:
'@types/react': 19.2.7
'@types/react-dom': 19.2.3(@types/react@19.2.7)
'@radix-ui/react-tooltip@1.2.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)':
dependencies:
'@radix-ui/primitive': 1.1.3
@@ -3056,12 +2965,12 @@ snapshots:
'@tailwindcss/oxide-win32-arm64-msvc': 4.1.18
'@tailwindcss/oxide-win32-x64-msvc': 4.1.18
'@tailwindcss/vite@4.1.18(vite@7.3.0(@types/node@25.0.2)(jiti@2.6.1)(lightningcss@1.30.2))':
'@tailwindcss/vite@4.1.18(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(lightningcss@1.30.2))':
dependencies:
'@tailwindcss/node': 4.1.18
'@tailwindcss/oxide': 4.1.18
tailwindcss: 4.1.18
vite: 7.3.0(@types/node@25.0.2)(jiti@2.6.1)(lightningcss@1.30.2)
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(lightningcss@1.30.2)
'@types/babel__core@7.20.5':
dependencies:
@@ -3088,7 +2997,7 @@ snapshots:
'@types/json-schema@7.0.15': {}
'@types/node@25.0.2':
'@types/node@25.0.3':
dependencies:
undici-types: 7.16.0
@@ -3191,7 +3100,7 @@ snapshots:
'@typescript-eslint/types': 8.50.0
eslint-visitor-keys: 4.2.1
'@vitejs/plugin-react@5.1.2(vite@7.3.0(@types/node@25.0.2)(jiti@2.6.1)(lightningcss@1.30.2))':
'@vitejs/plugin-react@5.1.2(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(lightningcss@1.30.2))':
dependencies:
'@babel/core': 7.28.5
'@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.5)
@@ -3199,7 +3108,7 @@ snapshots:
'@rolldown/pluginutils': 1.0.0-beta.53
'@types/babel__core': 7.20.5
react-refresh: 0.18.0
vite: 7.3.0(@types/node@25.0.2)(jiti@2.6.1)(lightningcss@1.30.2)
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(lightningcss@1.30.2)
transitivePeerDependencies:
- supports-color
@@ -3228,7 +3137,7 @@ snapshots:
balanced-match@1.0.2: {}
baseline-browser-mapping@2.9.7: {}
baseline-browser-mapping@2.9.11: {}
brace-expansion@1.1.12:
dependencies:
@@ -3241,15 +3150,15 @@ snapshots:
browserslist@4.28.1:
dependencies:
baseline-browser-mapping: 2.9.7
caniuse-lite: 1.0.30001760
baseline-browser-mapping: 2.9.11
caniuse-lite: 1.0.30001761
electron-to-chromium: 1.5.267
node-releases: 2.0.27
update-browserslist-db: 1.2.2(browserslist@4.28.1)
update-browserslist-db: 1.2.3(browserslist@4.28.1)
callsites@3.1.0: {}
caniuse-lite@1.0.30001760: {}
caniuse-lite@1.0.30001761: {}
chalk@4.1.2:
dependencies:
@@ -3297,34 +3206,34 @@ snapshots:
graceful-fs: 4.2.11
tapable: 2.3.0
esbuild@0.27.1:
esbuild@0.27.2:
optionalDependencies:
'@esbuild/aix-ppc64': 0.27.1
'@esbuild/android-arm': 0.27.1
'@esbuild/android-arm64': 0.27.1
'@esbuild/android-x64': 0.27.1
'@esbuild/darwin-arm64': 0.27.1
'@esbuild/darwin-x64': 0.27.1
'@esbuild/freebsd-arm64': 0.27.1
'@esbuild/freebsd-x64': 0.27.1
'@esbuild/linux-arm': 0.27.1
'@esbuild/linux-arm64': 0.27.1
'@esbuild/linux-ia32': 0.27.1
'@esbuild/linux-loong64': 0.27.1
'@esbuild/linux-mips64el': 0.27.1
'@esbuild/linux-ppc64': 0.27.1
'@esbuild/linux-riscv64': 0.27.1
'@esbuild/linux-s390x': 0.27.1
'@esbuild/linux-x64': 0.27.1
'@esbuild/netbsd-arm64': 0.27.1
'@esbuild/netbsd-x64': 0.27.1
'@esbuild/openbsd-arm64': 0.27.1
'@esbuild/openbsd-x64': 0.27.1
'@esbuild/openharmony-arm64': 0.27.1
'@esbuild/sunos-x64': 0.27.1
'@esbuild/win32-arm64': 0.27.1
'@esbuild/win32-ia32': 0.27.1
'@esbuild/win32-x64': 0.27.1
'@esbuild/aix-ppc64': 0.27.2
'@esbuild/android-arm': 0.27.2
'@esbuild/android-arm64': 0.27.2
'@esbuild/android-x64': 0.27.2
'@esbuild/darwin-arm64': 0.27.2
'@esbuild/darwin-x64': 0.27.2
'@esbuild/freebsd-arm64': 0.27.2
'@esbuild/freebsd-x64': 0.27.2
'@esbuild/linux-arm': 0.27.2
'@esbuild/linux-arm64': 0.27.2
'@esbuild/linux-ia32': 0.27.2
'@esbuild/linux-loong64': 0.27.2
'@esbuild/linux-mips64el': 0.27.2
'@esbuild/linux-ppc64': 0.27.2
'@esbuild/linux-riscv64': 0.27.2
'@esbuild/linux-s390x': 0.27.2
'@esbuild/linux-x64': 0.27.2
'@esbuild/netbsd-arm64': 0.27.2
'@esbuild/netbsd-x64': 0.27.2
'@esbuild/openbsd-arm64': 0.27.2
'@esbuild/openbsd-x64': 0.27.2
'@esbuild/openharmony-arm64': 0.27.2
'@esbuild/sunos-x64': 0.27.2
'@esbuild/win32-arm64': 0.27.2
'@esbuild/win32-ia32': 0.27.2
'@esbuild/win32-x64': 0.27.2
escalade@3.2.0: {}
@@ -3341,7 +3250,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
eslint-plugin-react-refresh@0.4.25(eslint@9.39.2(jiti@2.6.1)):
eslint-plugin-react-refresh@0.4.26(eslint@9.39.2(jiti@2.6.1)):
dependencies:
eslint: 9.39.2(jiti@2.6.1)
@@ -3439,6 +3348,15 @@ snapshots:
flatted@3.3.3: {}
framer-motion@12.23.26(react-dom@19.2.3(react@19.2.3))(react@19.2.3):
dependencies:
motion-dom: 12.23.23
motion-utils: 12.23.6
tslib: 2.8.1
optionalDependencies:
react: 19.2.3
react-dom: 19.2.3(react@19.2.3)
fsevents@2.3.3:
optional: true
@@ -3569,7 +3487,7 @@ snapshots:
dependencies:
yallist: 3.1.1
lucide-react@0.561.0(react@19.2.3):
lucide-react@0.562.0(react@19.2.3):
dependencies:
react: 19.2.3
@@ -3585,6 +3503,20 @@ snapshots:
dependencies:
brace-expansion: 2.0.2
motion-dom@12.23.23:
dependencies:
motion-utils: 12.23.6
motion-utils@12.23.6: {}
motion@12.23.26(react-dom@19.2.3(react@19.2.3))(react@19.2.3):
dependencies:
framer-motion: 12.23.26(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
tslib: 2.8.1
optionalDependencies:
react: 19.2.3
react-dom: 19.2.3(react@19.2.3)
ms@2.1.3: {}
nanoid@3.3.11: {}
@@ -3797,7 +3729,7 @@ snapshots:
undici-types@7.16.0: {}
update-browserslist-db@1.2.2(browserslist@4.28.1):
update-browserslist-db@1.2.3(browserslist@4.28.1):
dependencies:
browserslist: 4.28.1
escalade: 3.2.0
@@ -3822,16 +3754,16 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.7
vite@7.3.0(@types/node@25.0.2)(jiti@2.6.1)(lightningcss@1.30.2):
vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(lightningcss@1.30.2):
dependencies:
esbuild: 0.27.1
esbuild: 0.27.2
fdir: 6.5.0(picomatch@4.0.3)
picomatch: 4.0.3
postcss: 8.5.6
rollup: 4.53.5
tinyglobby: 0.2.15
optionalDependencies:
'@types/node': 25.0.2
'@types/node': 25.0.3
fsevents: 2.3.3
jiti: 2.6.1
lightningcss: 1.30.2
+184 -35
View File
@@ -34,7 +34,7 @@ import { ExtractTimeline, ExtractDateRange, SaveAccountToDBWithStatus, CleanupEx
const HISTORY_KEY = "twitter_media_fetch_history";
const MAX_HISTORY = 10;
const CURRENT_VERSION = "4.2";
const CURRENT_VERSION = "4.3";
const BATCH_SIZE = 200; // Fetch in batches for progressive display and resume
function formatNumberWithComma(num: number): string {
@@ -429,7 +429,11 @@ function App() {
}
}
} else {
// Timeline mode with batching for progressive display and resume
// Timeline mode - check fetch mode from settings
const settings = getSettings();
const isSingleMode = settings.fetchMode === "single";
const batchSize = isSingleMode ? 0 : BATCH_SIZE;
let timelineType = "timeline";
if (isBookmarks) {
timelineType = "bookmarks";
@@ -440,6 +444,8 @@ function App() {
let hasMore = true;
let page = 0;
// Single mode: one fetch, no loop
// Batch mode: loop until done or stopped
while (hasMore && !stopFetchRef.current) {
// Check timeout before each batch
if (fetchStartTimeRef.current !== null) {
@@ -450,18 +456,67 @@ function App() {
logger.warning(`Timeout reached (${timeoutSeconds}s). Stopping fetch...`);
stopFetchRef.current = true;
toast.warning("Fetch timeout reached. Stopping...");
// IMPORTANT: Save state immediately before breaking out of loop
// This ensures no data is lost when timeout occurs
if (accountInfo && allTimeline.length > 0) {
saveFetchState({
username: cleanUsername,
cursor: cursor || "",
timeline: allTimeline,
accountInfo: accountInfo,
totalFetched: allTimeline.length,
completed: false,
authToken: authToken.trim(),
mediaType: mediaType || "all",
retweets: retweets || false,
timelineType: timelineType,
});
// Also save to database immediately
const timeoutResponse: TwitterResponse = {
account_info: accountInfo,
timeline: allTimeline,
total_urls: allTimeline.length,
metadata: {
new_entries: 0,
page: page,
batch_size: batchSize,
has_more: hasMore,
cursor: cursor,
completed: false,
},
cursor: cursor,
completed: false,
};
try {
await SaveAccountToDBWithStatus(
accountInfo.name,
accountInfo.nick,
accountInfo.profile_image,
allTimeline.length,
JSON.stringify(timeoutResponse),
mediaType || "all",
cursor || "",
false
);
logger.info(`Saved ${allTimeline.length} items before timeout`);
} catch (err) {
console.error("Failed to save timeout state to database:", err);
}
}
break;
}
}
const batchNum = page + 1;
logger.info(`Fetching batch ${batchNum}${cursor ? " (resuming)" : ""}...`);
logger.info(isSingleMode ? "Fetching all media..." : `Fetching batch ${batchNum}${cursor ? " (resuming)" : ""}...`);
const response = await ExtractTimeline({
username: isBookmarks ? "" : username.trim(),
auth_token: authToken.trim(),
timeline_type: timelineType,
batch_size: BATCH_SIZE,
batch_size: batchSize,
page: page,
media_type: mediaType || "all",
retweets: retweets || false,
@@ -515,7 +570,7 @@ function App() {
metadata: {
new_entries: data.timeline.length,
page: page,
batch_size: BATCH_SIZE,
batch_size: batchSize,
has_more: hasMore,
cursor: cursor,
completed: !hasMore,
@@ -527,23 +582,20 @@ function App() {
logger.info(`Fetched ${allTimeline.length} items total`);
// Save state periodically (every 3 batches) or when stopping
// This reduces localStorage writes for better performance
// Note: cursor is already saved every batch above (lightweight)
if (page % 3 === 0 || !hasMore || stopFetchRef.current) {
saveFetchState({
username: cleanUsername,
cursor: cursor || "",
timeline: allTimeline,
accountInfo: accountInfo,
totalFetched: allTimeline.length,
completed: !hasMore,
authToken: authToken.trim(),
mediaType: mediaType || "all",
retweets: retweets || false,
timelineType: timelineType,
});
}
// Save state EVERY batch to ensure no data loss on timeout/error
// This is critical for large accounts where fetch can take a long time
saveFetchState({
username: cleanUsername,
cursor: cursor || "",
timeline: allTimeline,
accountInfo: accountInfo,
totalFetched: allTimeline.length,
completed: !hasMore,
authToken: authToken.trim(),
mediaType: mediaType || "all",
retweets: retweets || false,
timelineType: timelineType,
});
// Save to database immediately after each batch for realtime persistence
// This ensures data is saved even if fetch fails mid-way
@@ -555,7 +607,7 @@ function App() {
metadata: {
new_entries: data.timeline.length,
page: page,
batch_size: BATCH_SIZE,
batch_size: batchSize,
has_more: hasMore,
cursor: cursor,
completed: !hasMore,
@@ -582,7 +634,8 @@ function App() {
// If stopped by user, keep state for resume
if (stopFetchRef.current) {
logger.info(`Stopped at ${allTimeline.length} items - can resume later`);
const elapsedSecs = fetchStartTimeRef.current ? Math.floor((Date.now() - fetchStartTimeRef.current) / 1000) : 0;
logger.info(`Stopped at ${allTimeline.length} items - can resume later (${elapsedSecs}s)`);
toast.info(`Stopped at ${formatNumberWithComma(allTimeline.length)} items`);
setResumeInfo({ canResume: true, mediaCount: allTimeline.length });
} else {
@@ -601,7 +654,7 @@ function App() {
metadata: {
new_entries: allTimeline.length,
page: page,
batch_size: BATCH_SIZE,
batch_size: batchSize,
has_more: false,
cursor: cursor,
completed: !stopFetchRef.current,
@@ -643,13 +696,15 @@ function App() {
}
if (!stopFetchRef.current) {
logger.success(`Found ${finalData.total_urls} media items`);
const elapsedSecs = fetchStartTimeRef.current ? Math.floor((Date.now() - fetchStartTimeRef.current) / 1000) : 0;
logger.success(`Found ${finalData.total_urls} media items (${elapsedSecs}s)`);
toast.success(`${finalData.total_urls} media items found`);
}
}
} catch (error) {
const errorMsg = error instanceof Error ? error.message : String(error);
logger.error(`Failed to fetch: ${errorMsg}`);
const elapsedSecs = fetchStartTimeRef.current ? Math.floor((Date.now() - fetchStartTimeRef.current) / 1000) : 0;
logger.error(`Failed to fetch: ${errorMsg} (${elapsedSecs}s)`);
toast.error("Failed to fetch media");
// On error, check if we have partial data saved
@@ -959,7 +1014,11 @@ function App() {
continue;
}
// Fetch account
// Fetch account - check fetch mode from settings
const fetchSettings = getSettings();
const isSingleModeMultiple = fetchSettings.fetchMode === "single";
const batchSizeMultiple = isSingleModeMultiple ? 0 : BATCH_SIZE;
const cleanUsername = account.username.trim();
let allTimeline: TwitterResponse["timeline"] = [];
let accountInfo: TwitterResponse["account_info"] | null = null;
@@ -969,8 +1028,53 @@ function App() {
let previousMediaCount = account.mediaCount || 0;
while (hasMore && !stopAllRef.current) {
// Check if this specific account should be stopped
// Check if this specific account should be stopped (timeout)
if (accountStopFlagsRef.current.get(accountId)) {
// IMPORTANT: Save state before breaking to prevent data loss
if (accountInfo && allTimeline.length > 0) {
saveFetchState({
username: cleanUsername,
cursor: cursor || "",
timeline: allTimeline,
accountInfo: accountInfo,
totalFetched: allTimeline.length,
completed: false,
authToken: authToken.trim(),
mediaType: fetchedMediaType || "all",
retweets: false,
timelineType: "timeline",
});
// Also save to database
try {
await SaveAccountToDBWithStatus(
accountInfo.name,
accountInfo.nick,
accountInfo.profile_image,
allTimeline.length,
JSON.stringify({
account_info: accountInfo,
timeline: allTimeline,
total_urls: allTimeline.length,
metadata: {
new_entries: 0,
page: page,
batch_size: batchSizeMultiple,
has_more: hasMore,
cursor: cursor,
completed: false,
},
cursor: cursor,
completed: false,
}),
fetchedMediaType || "all",
cursor || "",
false
);
} catch (err) {
console.error("Failed to save timeout state to database:", err);
}
}
break;
}
@@ -978,7 +1082,7 @@ function App() {
username: cleanUsername,
auth_token: authToken.trim(),
timeline_type: "timeline",
batch_size: BATCH_SIZE,
batch_size: batchSizeMultiple,
page: page,
media_type: fetchedMediaType || "all",
retweets: false,
@@ -1037,6 +1141,22 @@ function App() {
// Update previous count for next iteration
previousMediaCount = currentMediaCount;
// Save fetch state EVERY batch to ensure no data loss on timeout/error
if (accountInfo) {
saveFetchState({
username: cleanUsername,
cursor: cursor || "",
timeline: allTimeline,
accountInfo: accountInfo,
totalFetched: allTimeline.length,
completed: !hasMore,
authToken: authToken.trim(),
mediaType: fetchedMediaType || "all",
retweets: false,
timelineType: "timeline",
});
}
// Save to database after each batch
if (accountInfo) {
try {
@@ -1052,7 +1172,7 @@ function App() {
metadata: {
new_entries: data.timeline.length,
page: page,
batch_size: BATCH_SIZE,
batch_size: batchSizeMultiple,
has_more: hasMore,
cursor: cursor,
completed: !hasMore,
@@ -1070,6 +1190,10 @@ function App() {
}
}
// Calculate elapsed time before clearing
const startTime = accountStartTimesRef.current.get(accountId);
const elapsedSecs = startTime ? Math.floor((Date.now() - startTime) / 1000) : 0;
// Clear timer
clearInterval(timerInterval);
accountTimersRef.current.delete(accountId);
@@ -1085,6 +1209,7 @@ function App() {
if (wasTimeout) {
// Timeout: incomplete if media was fetched, failed if no media
logger.warning(`@${account.username}: timeout - ${finalMediaCount} items (${elapsedSecs}s)`);
setMultipleAccounts((prev) =>
prev.map((acc) =>
acc.id === accountId
@@ -1094,6 +1219,7 @@ function App() {
);
} else if (stopAllRef.current) {
// Stopped by user: incomplete if media was fetched, failed if no media
logger.info(`@${account.username}: stopped - ${finalMediaCount} items (${elapsedSecs}s)`);
setMultipleAccounts((prev) =>
prev.map((acc) =>
acc.id === accountId
@@ -1103,6 +1229,7 @@ function App() {
);
} else if (hasMore) {
// Has more but stopped (e.g., API error): incomplete if media was fetched, failed if no media
logger.warning(`@${account.username}: incomplete - ${finalMediaCount} items (${elapsedSecs}s)`);
setMultipleAccounts((prev) =>
prev.map((acc) =>
acc.id === accountId
@@ -1112,6 +1239,7 @@ function App() {
);
} else {
// Completed successfully
logger.success(`@${account.username}: completed - ${finalMediaCount} items (${elapsedSecs}s)`);
setMultipleAccounts((prev) =>
prev.map((acc) =>
acc.id === accountId
@@ -1121,6 +1249,10 @@ function App() {
);
}
} catch (error) {
// Calculate elapsed time before clearing
const startTime = accountStartTimesRef.current.get(accountId);
const elapsedSecs = startTime ? Math.floor((Date.now() - startTime) / 1000) : 0;
// Clear timer on error
const timerInterval = accountTimersRef.current.get(accountId);
if (timerInterval) {
@@ -1162,7 +1294,7 @@ function App() {
: acc
)
);
logger.error(`Failed to fetch @${account.username}: ${errorMsg}`);
logger.error(`@${account.username}: failed - ${errorMsg} (${elapsedSecs}s)`);
}
}
@@ -1247,6 +1379,11 @@ function App() {
return;
}
// Get fetch mode from settings
const retrySettings = getSettings();
const isSingleModeRetry = retrySettings.fetchMode === "single";
const batchSizeRetry = isSingleModeRetry ? 0 : BATCH_SIZE;
// Check if we have a saved cursor (like resume in single fetch)
const cleanUsername = account.username.trim();
let existingState: FetchState | null = null;
@@ -1390,7 +1527,7 @@ function App() {
username: cleanUsername,
auth_token: authToken.trim(),
timeline_type: "timeline",
batch_size: BATCH_SIZE,
batch_size: batchSizeRetry,
page: page,
media_type: fetchedMediaType || "all",
retweets: false,
@@ -1480,7 +1617,7 @@ function App() {
metadata: {
new_entries: data.timeline.length,
page: page,
batch_size: BATCH_SIZE,
batch_size: batchSizeRetry,
has_more: hasMore,
cursor: cursor,
completed: !hasMore,
@@ -1498,6 +1635,10 @@ function App() {
}
}
// Calculate elapsed time before clearing
const startTime = accountStartTimesRef.current.get(accountId);
const elapsedSecs = startTime ? Math.floor((Date.now() - startTime) / 1000) : 0;
// Clear timer
clearInterval(timerInterval);
accountTimersRef.current.delete(accountId);
@@ -1511,6 +1652,7 @@ function App() {
const wasTimeout = accountStopFlagsRef.current.get(accountId);
if (wasTimeout) {
logger.warning(`@${account.username}: timeout - ${finalMediaCount} items (${elapsedSecs}s)`);
setMultipleAccounts((prev) =>
prev.map((acc) =>
acc.id === accountId
@@ -1519,6 +1661,7 @@ function App() {
)
);
} else if (stopAllRef.current) {
logger.info(`@${account.username}: stopped - ${finalMediaCount} items (${elapsedSecs}s)`);
setMultipleAccounts((prev) =>
prev.map((acc) =>
acc.id === accountId
@@ -1527,6 +1670,7 @@ function App() {
)
);
} else if (hasMore) {
logger.warning(`@${account.username}: incomplete - ${finalMediaCount} items (${elapsedSecs}s)`);
setMultipleAccounts((prev) =>
prev.map((acc) =>
acc.id === accountId
@@ -1536,6 +1680,7 @@ function App() {
);
} else {
// Completed successfully - clear fetch state and cursor
logger.success(`@${account.username}: completed - ${finalMediaCount} items (${elapsedSecs}s)`);
clearFetchState(cleanUsername);
clearCursor(cleanUsername);
setMultipleAccounts((prev) =>
@@ -1545,6 +1690,10 @@ function App() {
);
}
} catch (error) {
// Calculate elapsed time before clearing
const startTime = accountStartTimesRef.current.get(accountId);
const elapsedSecs = startTime ? Math.floor((Date.now() - startTime) / 1000) : 0;
// Clear timer on error
const timerInterval = accountTimersRef.current.get(accountId);
if (timerInterval) {
@@ -1582,7 +1731,7 @@ function App() {
: acc
)
);
logger.error(`Failed to fetch @${account.username}: ${errorMsg}`);
logger.error(`@${account.username}: failed - ${errorMsg} (${elapsedSecs}s)`);
}
};
+185 -121
View File
@@ -34,7 +34,7 @@ import {
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { Trash2, FileInput, FileOutput, Pencil, Tag, Shuffle, X, XCircle, Download, StopCircle, Globe, Lock, Bookmark, Heart, Image, Images, Video, Film, FileText, Filter, AlertCircle, MoreVertical, FileBraces, CloudBackup, Search, LayoutGrid, Grid3X3, List, ArrowUpDown, ArrowUp, FolderOpen } from "lucide-react";
import { Trash2, FileInput, FileOutput, Pencil, Tag, Shuffle, X, XCircle, Download, StopCircle, Globe, Lock, Bookmark, Heart, Image, Images, Video, Film, FileText, Filter, AlertCircle, MoreVertical, FileBraces, CloudBackup, Search, LayoutGrid, Grid3X3, List, ArrowUpDown, ArrowUp, FolderOpen, Users, MessageSquare } from "lucide-react";
import { toastWithSound as toast } from "@/lib/toast-with-sound";
import { getSettings } from "@/lib/settings";
import { openExternal } from "@/lib/utils";
@@ -123,7 +123,7 @@ export function DatabaseView({ onLoadAccount, onUpdateSelected }: DatabaseViewPr
const [filterMediaType, setFilterMediaType] = useState<string>("all");
const [accountViewMode, setAccountViewMode] = useState<"public" | "private">("public");
const [searchQuery, setSearchQuery] = useState<string>("");
const [sortOrder, setSortOrder] = useState<"newest" | "oldest">("newest");
const [sortOrder, setSortOrder] = useState<"newest" | "oldest" | "username-asc" | "username-desc" | "followers-high" | "followers-low" | "posts-high" | "posts-low" | "media-high" | "media-low">("newest");
const [gridView, setGridView] = useState<"large" | "small" | "list">("list");
const [editingAccount, setEditingAccount] = useState<AccountListItem | null>(null);
const [editGroupName, setEditGroupName] = useState("");
@@ -255,10 +255,36 @@ export function DatabaseView({ onLoadAccount, onUpdateSelected }: DatabaseViewPr
return true;
})
.sort((a, b) => {
// Sort by last_fetched date
const dateA = new Date(a.last_fetched).getTime();
const dateB = new Date(b.last_fetched).getTime();
return sortOrder === "newest" ? dateB - dateA : dateA - dateB;
switch (sortOrder) {
case "newest": {
const dateA = new Date(a.last_fetched).getTime();
const dateB = new Date(b.last_fetched).getTime();
return dateB - dateA;
}
case "oldest": {
const dateA = new Date(a.last_fetched).getTime();
const dateB = new Date(b.last_fetched).getTime();
return dateA - dateB;
}
case "username-asc":
return a.username.toLowerCase().localeCompare(b.username.toLowerCase());
case "username-desc":
return b.username.toLowerCase().localeCompare(a.username.toLowerCase());
case "followers-high":
return (b.followers_count || 0) - (a.followers_count || 0);
case "followers-low":
return (a.followers_count || 0) - (b.followers_count || 0);
case "posts-high":
return (b.statuses_count || 0) - (a.statuses_count || 0);
case "posts-low":
return (a.statuses_count || 0) - (b.statuses_count || 0);
case "media-high":
return (b.total_media || 0) - (a.total_media || 0);
case "media-low":
return (a.total_media || 0) - (b.total_media || 0);
default:
return 0;
}
});
// Intersection Observer for lazy loading
@@ -949,113 +975,129 @@ export function DatabaseView({ onLoadAccount, onUpdateSelected }: DatabaseViewPr
{/* Row 2: Sort, Filters, View Toggle */}
<div className="flex items-center gap-2 pb-2">
{/* Sort Order */}
<Select value={sortOrder} onValueChange={(v) => setSortOrder(v as "newest" | "oldest")}>
<SelectTrigger className="w-auto">
<ArrowUpDown className="h-4 w-4 mr-2" />
<SelectValue placeholder="Sort" />
</SelectTrigger>
<SelectContent>
<SelectItem value="newest">Newest</SelectItem>
<SelectItem value="oldest">Oldest</SelectItem>
</SelectContent>
</Select>
{/* Sort Order - only for public accounts */}
{accountViewMode === "public" && (
<Select value={sortOrder} onValueChange={(v) => setSortOrder(v as typeof sortOrder)}>
<SelectTrigger className="w-auto">
<ArrowUpDown className="h-4 w-4 mr-2" />
<SelectValue placeholder="Sort" />
</SelectTrigger>
<SelectContent>
<SelectItem value="newest">Newest</SelectItem>
<SelectItem value="oldest">Oldest</SelectItem>
<SelectItem value="username-asc">Username (A-Z)</SelectItem>
<SelectItem value="username-desc">Username (Z-A)</SelectItem>
<SelectItem value="followers-high">Followers (High-Low)</SelectItem>
<SelectItem value="followers-low">Followers (Low-High)</SelectItem>
<SelectItem value="posts-high">Posts (High-Low)</SelectItem>
<SelectItem value="posts-low">Posts (Low-High)</SelectItem>
<SelectItem value="media-high">Media Count (High-Low)</SelectItem>
<SelectItem value="media-low">Media Count (Low-High)</SelectItem>
</SelectContent>
</Select>
)}
{/* Media Type Filter */}
<Select value={filterMediaType} onValueChange={setFilterMediaType}>
<SelectTrigger className="w-auto">
<Filter className="h-4 w-4 mr-2" />
<SelectValue placeholder="Filter by type" />
</SelectTrigger>
<SelectContent>
<SelectItem value="all">
<span className="flex items-center gap-2">All Types</span>
</SelectItem>
<SelectItem value="all-media">
<span className="flex items-center gap-2">
<Images className="h-4 w-4 text-indigo-500" />
All Media
</span>
</SelectItem>
<SelectItem value="image">
<span className="flex items-center gap-2">
<Image className="h-4 w-4 text-blue-500" />
Images
</span>
</SelectItem>
<SelectItem value="video">
<span className="flex items-center gap-2">
<Video className="h-4 w-4 text-purple-500" />
Videos
</span>
</SelectItem>
<SelectItem value="gif">
<span className="flex items-center gap-2">
<Film className="h-4 w-4 text-green-500" />
GIFs
</span>
</SelectItem>
<SelectItem value="text">
<span className="flex items-center gap-2">
<FileText className="h-4 w-4 text-orange-500" />
Text
</span>
</SelectItem>
</SelectContent>
</Select>
{/* Group Filter */}
<Select value={filterGroup} onValueChange={setFilterGroup} disabled={groups.length === 0}>
<SelectTrigger className="w-auto">
<Tag className="h-4 w-4 mr-2" />
<SelectValue placeholder="Filter by group" />
</SelectTrigger>
<SelectContent>
<SelectItem value="all">All Groups</SelectItem>
<SelectItem value="ungrouped">Ungrouped</SelectItem>
{groups.map((group) => (
<SelectItem key={group.name} value={group.name}>
{/* Media Type Filter - only for public accounts */}
{accountViewMode === "public" && (
<Select value={filterMediaType} onValueChange={setFilterMediaType}>
<SelectTrigger className="w-auto">
<Filter className="h-4 w-4 mr-2" />
<SelectValue placeholder="Filter by type" />
</SelectTrigger>
<SelectContent>
<SelectItem value="all">
<span className="flex items-center gap-2">All Types</span>
</SelectItem>
<SelectItem value="all-media">
<span className="flex items-center gap-2">
<span
className="w-3 h-3 rounded-full"
style={{ backgroundColor: group.color }}
/>
{group.name}
<Images className="h-4 w-4 text-indigo-500" />
All Media
</span>
</SelectItem>
))}
</SelectContent>
</Select>
<SelectItem value="image">
<span className="flex items-center gap-2">
<Image className="h-4 w-4 text-blue-500" />
Images
</span>
</SelectItem>
<SelectItem value="video">
<span className="flex items-center gap-2">
<Video className="h-4 w-4 text-purple-500" />
Videos
</span>
</SelectItem>
<SelectItem value="gif">
<span className="flex items-center gap-2">
<Film className="h-4 w-4 text-green-500" />
GIFs
</span>
</SelectItem>
<SelectItem value="text">
<span className="flex items-center gap-2">
<FileText className="h-4 w-4 text-orange-500" />
Text
</span>
</SelectItem>
</SelectContent>
</Select>
)}
{/* Group Filter - only for public accounts */}
{accountViewMode === "public" && (
<Select value={filterGroup} onValueChange={setFilterGroup} disabled={groups.length === 0}>
<SelectTrigger className="w-auto">
<Tag className="h-4 w-4 mr-2" />
<SelectValue placeholder="Filter by group" />
</SelectTrigger>
<SelectContent>
<SelectItem value="all">All Groups</SelectItem>
<SelectItem value="ungrouped">Ungrouped</SelectItem>
{groups.map((group) => (
<SelectItem key={group.name} value={group.name}>
<span className="flex items-center gap-2">
<span
className="w-3 h-3 rounded-full"
style={{ backgroundColor: group.color }}
/>
{group.name}
</span>
</SelectItem>
))}
</SelectContent>
</Select>
)}
<div className="flex-1" />
{/* Grid View Toggle */}
<div className="flex items-center border rounded-md">
<Button
variant={gridView === "large" ? "secondary" : "ghost"}
size="icon"
className="h-9 w-9 rounded-r-none"
onClick={() => setGridView("large")}
>
<LayoutGrid className="h-4 w-4" />
</Button>
<Button
variant={gridView === "small" ? "secondary" : "ghost"}
size="icon"
className="h-9 w-9 rounded-none border-x"
onClick={() => setGridView("small")}
>
<Grid3X3 className="h-4 w-4" />
</Button>
<Button
variant={gridView === "list" ? "secondary" : "ghost"}
size="icon"
className="h-9 w-9 rounded-l-none"
onClick={() => setGridView("list")}
>
<List className="h-4 w-4" />
</Button>
</div>
{/* Grid View Toggle - only for public accounts */}
{accountViewMode === "public" && (
<div className="flex items-center border rounded-md">
<Button
variant={gridView === "large" ? "secondary" : "ghost"}
size="icon"
className="h-9 w-9 rounded-r-none"
onClick={() => setGridView("large")}
>
<LayoutGrid className="h-4 w-4" />
</Button>
<Button
variant={gridView === "small" ? "secondary" : "ghost"}
size="icon"
className="h-9 w-9 rounded-none border-x"
onClick={() => setGridView("small")}
>
<Grid3X3 className="h-4 w-4" />
</Button>
<Button
variant={gridView === "list" ? "secondary" : "ghost"}
size="icon"
className="h-9 w-9 rounded-l-none"
onClick={() => setGridView("list")}
>
<List className="h-4 w-4" />
</Button>
</div>
)}
</div>
{/* Bulk Download Progress */}
@@ -1146,7 +1188,7 @@ export function DatabaseView({ onLoadAccount, onUpdateSelected }: DatabaseViewPr
</button>
)}
<div className="text-sm text-muted-foreground mt-1">
{formatNumberWithComma(account.total_media)}
{formatNumberWithComma(account.total_media)} media
</div>
</div>
<div className="flex gap-1">
@@ -1186,10 +1228,12 @@ export function DatabaseView({ onLoadAccount, onUpdateSelected }: DatabaseViewPr
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem onClick={() => handleEditGroup(account)}>
<Pencil className="h-4 w-4 mr-2" />
Edit Group
</DropdownMenuItem>
{!isPrivateAccount(account.username) && (
<DropdownMenuItem onClick={() => handleEditGroup(account)}>
<Pencil className="h-4 w-4 mr-2" />
Edit Group
</DropdownMenuItem>
)}
<DropdownMenuItem
onClick={async () => {
const settings = getSettings();
@@ -1308,7 +1352,7 @@ export function DatabaseView({ onLoadAccount, onUpdateSelected }: DatabaseViewPr
</button>
)}
<div className="text-xs text-muted-foreground">
{formatNumberWithComma(account.total_media)}
{formatNumberWithComma(account.total_media)} media
</div>
</div>
<div className="flex gap-1">
@@ -1348,10 +1392,12 @@ export function DatabaseView({ onLoadAccount, onUpdateSelected }: DatabaseViewPr
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem onClick={() => handleEditGroup(account)}>
<Pencil className="h-4 w-4 mr-2" />
Edit Group
</DropdownMenuItem>
{!isPrivateAccount(account.username) && (
<DropdownMenuItem onClick={() => handleEditGroup(account)}>
<Pencil className="h-4 w-4 mr-2" />
Edit Group
</DropdownMenuItem>
)}
<DropdownMenuItem
onClick={async () => {
const settings = getSettings();
@@ -1435,7 +1481,23 @@ export function DatabaseView({ onLoadAccount, onUpdateSelected }: DatabaseViewPr
<div className="flex-1 min-w-0">
<div className="flex items-center gap-2">
<span className="truncate">{account.name}</span>
<span className="text-muted-foreground">({formatNumberWithComma(account.total_media)})</span>
{/* Stats Badges: Followers, Posts, Media */}
{!isPrivateAccount(account.username) && (account.followers_count > 0 || account.statuses_count > 0) && (
<>
<Badge variant="secondary" className="text-xs flex items-center gap-1">
<Users className="h-3 w-3" />
{formatNumberWithComma(account.followers_count)}
</Badge>
<Badge variant="secondary" className="text-xs flex items-center gap-1">
<MessageSquare className="h-3 w-3" />
{formatNumberWithComma(account.statuses_count)}
</Badge>
</>
)}
<Badge variant="secondary" className="text-xs flex items-center gap-1">
<Images className="h-3 w-3" />
{formatNumberWithComma(account.total_media)}
</Badge>
{/* Media Type Badge */}
<Badge
variant="secondary"
@@ -1544,10 +1606,12 @@ export function DatabaseView({ onLoadAccount, onUpdateSelected }: DatabaseViewPr
<TooltipContent>More Options</TooltipContent>
</Tooltip>
<DropdownMenuContent align="end">
<DropdownMenuItem onClick={() => handleEditGroup(account)}>
<Pencil className="h-4 w-4 mr-2" />
Edit Group
</DropdownMenuItem>
{!isPrivateAccount(account.username) && (
<DropdownMenuItem onClick={() => handleEditGroup(account)}>
<Pencil className="h-4 w-4 mr-2" />
Edit Group
</DropdownMenuItem>
)}
<DropdownMenuItem
onClick={async () => {
const settings = getSettings();
+1 -1
View File
@@ -741,7 +741,7 @@ export function MediaList({
</span>
<span className="flex items-center gap-1">
<MessageSquare className="h-3.5 w-3.5" />
{formatNumber(accountInfo.statuses_count)} tweets
{formatNumber(accountInfo.statuses_count)} posts
</span>
{accountInfo.date && (
<span className="flex items-center gap-1">
+35 -7
View File
@@ -49,6 +49,7 @@ import { Settings as SettingsIcon } from "lucide-react";
import { FetchHistory } from "@/components/FetchHistory";
import type { HistoryItem } from "@/components/FetchHistory";
import { cn } from "@/lib/utils";
import { getSettings, updateSettings, type FetchMode as SettingsFetchMode, type MediaType as SettingsMediaType } from "@/lib/settings";
export type FetchMode = "public" | "private";
export type PrivateType = "bookmarks" | "likes";
@@ -148,8 +149,8 @@ export function SearchBar({
const [useDateRange, setUseDateRange] = useState(false);
const [startDate, setStartDate] = useState("");
const [endDate, setEndDate] = useState("");
const [mediaType, setMediaType] = useState("all");
const [retweets, setRetweets] = useState(false);
const [mediaType, setMediaType] = useState<SettingsMediaType>(getSettings().mediaType);
const [retweets, setRetweets] = useState(getSettings().includeRetweets);
const [mode, setMode] = useState<FetchMode>(externalMode || "public");
const [privateType, setPrivateType] = useState<PrivateType>(externalPrivateType || "bookmarks");
@@ -167,6 +168,7 @@ export function SearchBar({
}, [externalPrivateType]);
const [showAuthInput, setShowAuthInput] = useState(false);
const [showAdvanced, setShowAdvanced] = useState(false);
const [currentFetchMode, setCurrentFetchMode] = useState<SettingsFetchMode>(getSettings().fetchMode);
// Separate auth tokens for public and private modes
const [publicAuthToken, setPublicAuthToken] = useState("");
@@ -413,11 +415,11 @@ export function SearchBar({
<Trash2 className="h-4 w-4" />
</Button>
</TooltipTrigger>
<TooltipContent>Clear resume data</TooltipContent>
<TooltipContent>Clear Resume</TooltipContent>
</Tooltip>
<Button variant="secondary" onClick={handleResume} disabled={!hasAuthToken}>
<RotateCcw className="h-4 w-4" />
Resume ({resumeInfo.mediaCount})
Resume ({resumeInfo.mediaCount.toLocaleString()})
</Button>
</>
)}
@@ -606,13 +608,35 @@ export function SearchBar({
{showAdvanced && (
<div className="p-3 border rounded-lg bg-muted/30 space-y-3">
{/* Options Row */}
<div className="flex items-center gap-4">
<div className="flex items-center gap-4 flex-wrap">
{/* Fetch Mode */}
<div className="flex items-center gap-2">
<Label htmlFor="fetch-mode" className="text-sm">
Fetch Mode
</Label>
<Select value={currentFetchMode} onValueChange={(value: SettingsFetchMode) => {
updateSettings({ fetchMode: value });
setCurrentFetchMode(value);
}}>
<SelectTrigger id="fetch-mode" className="w-auto h-8 bg-background">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="batch">Batch</SelectItem>
<SelectItem value="single">Single</SelectItem>
</SelectContent>
</Select>
</div>
{/* Media Type */}
<div className="flex items-center gap-2">
<Label htmlFor="media-type" className="text-sm">
Media Type
</Label>
<Select value={mediaType} onValueChange={setMediaType}>
<Select value={mediaType} onValueChange={(value: SettingsMediaType) => {
updateSettings({ mediaType: value });
setMediaType(value);
}}>
<SelectTrigger id="media-type" className="w-auto h-8 bg-background">
<SelectValue />
</SelectTrigger>
@@ -631,7 +655,11 @@ export function SearchBar({
<Checkbox
id="retweets"
checked={retweets}
onCheckedChange={(checked) => setRetweets(checked as boolean)}
onCheckedChange={(checked) => {
const value = checked as boolean;
updateSettings({ includeRetweets: value });
setRetweets(value);
}}
className="bg-background"
/>
<Label htmlFor="retweets" className="text-sm cursor-pointer">
+28 -1
View File
@@ -11,6 +11,14 @@ import {
} from "@/components/ui/select";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import { FolderOpen, Save, RotateCcw, Info, Download, Check } from "lucide-react";
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
import { Spinner } from "@/components/ui/spinner";
import { Switch } from "@/components/ui/switch";
import { getSettings, getSettingsWithDefaults, saveSettings, resetToDefaultSettings, applyThemeMode, applyFont, FONT_OPTIONS, type Settings as SettingsType, type FontFamily, type GifQuality, type GifResolution } from "@/lib/settings";
@@ -26,6 +34,7 @@ export function SettingsPage() {
const [downloadingFFmpeg, setDownloadingFFmpeg] = useState(false);
const [exiftoolInstalled, setExiftoolInstalled] = useState(false);
const [downloadingExifTool, setDownloadingExifTool] = useState(false);
const [showResetConfirm, setShowResetConfirm] = useState(false);
useEffect(() => {
applyThemeMode(savedSettings.themeMode);
@@ -80,6 +89,7 @@ export function SettingsPage() {
applyThemeMode(defaultSettings.themeMode);
applyTheme(defaultSettings.theme);
applyFont(defaultSettings.fontFamily);
setShowResetConfirm(false);
toast.success("Settings reset to default");
};
@@ -418,12 +428,13 @@ export function SettingsPage() {
className="w-[20%]"
/>
</div>
</div>
</div>
{/* Actions */}
<div className="flex gap-2 justify-between pt-4 border-t">
<Button variant="outline" onClick={handleReset} className="gap-1.5">
<Button variant="outline" onClick={() => setShowResetConfirm(true)} className="gap-1.5">
<RotateCcw className="h-4 w-4" />
Reset to Default
</Button>
@@ -432,6 +443,22 @@ export function SettingsPage() {
Save Changes
</Button>
</div>
{/* Reset Confirmation Dialog */}
<Dialog open={showResetConfirm} onOpenChange={setShowResetConfirm}>
<DialogContent className="max-w-md [&>button]:hidden">
<DialogHeader>
<DialogTitle>Reset to Default?</DialogTitle>
<DialogDescription>
This will reset all settings to their default values. Your custom configurations will be lost.
</DialogDescription>
</DialogHeader>
<DialogFooter>
<Button variant="outline" onClick={() => setShowResetConfirm(false)}>Cancel</Button>
<Button onClick={handleReset}>Reset</Button>
</DialogFooter>
</DialogContent>
</Dialog>
</div>
);
}
+77 -28
View File
@@ -1,4 +1,10 @@
import { Home, Settings, Bug, Database, LayoutGrid, Coffee, Github } from "lucide-react";
import { HomeIcon } from "@/components/ui/home";
import { SettingsIcon } from "@/components/ui/settings";
import { ArchiveIcon } from "@/components/ui/archive";
import { TerminalIcon } from "@/components/ui/terminal";
import { GithubIcon } from "@/components/ui/github";
import { BlocksIcon } from "@/components/ui/blocks";
import { CoffeeIcon } from "@/components/ui/coffee";
import {
Tooltip,
TooltipContent,
@@ -15,33 +21,76 @@ interface SidebarProps {
}
export function Sidebar({ currentPage, onPageChange }: SidebarProps) {
const navItems = [
{ id: "main" as PageType, icon: Home, label: "Home" },
{ id: "settings" as PageType, icon: Settings, label: "Settings" },
{ id: "database" as PageType, icon: Database, label: "Saved Accounts" },
{ id: "debug" as PageType, icon: Bug, label: "Debug Logs" },
];
return (
<div className="fixed left-0 top-0 h-full w-14 bg-card border-r border-border flex flex-col items-center py-14 z-30">
<div className="flex flex-col gap-2 flex-1">
{navItems.map((item) => (
<Tooltip key={item.id} delayDuration={0}>
<TooltipTrigger asChild>
<Button
variant={currentPage === item.id ? "secondary" : "ghost"}
size="icon"
className="h-10 w-10"
onClick={() => onPageChange(item.id)}
>
<item.icon className="h-5 w-5" />
</Button>
</TooltipTrigger>
<TooltipContent side="right">
<p>{item.label}</p>
</TooltipContent>
</Tooltip>
))}
{/* Home */}
<Tooltip delayDuration={0}>
<TooltipTrigger asChild>
<Button
variant={currentPage === "main" ? "secondary" : "ghost"}
size="icon"
className="h-10 w-10"
onClick={() => onPageChange("main")}
>
<HomeIcon size={20} />
</Button>
</TooltipTrigger>
<TooltipContent side="right">
<p>Home</p>
</TooltipContent>
</Tooltip>
{/* Settings */}
<Tooltip delayDuration={0}>
<TooltipTrigger asChild>
<Button
variant={currentPage === "settings" ? "secondary" : "ghost"}
size="icon"
className="h-10 w-10"
onClick={() => onPageChange("settings")}
>
<SettingsIcon size={20} />
</Button>
</TooltipTrigger>
<TooltipContent side="right">
<p>Settings</p>
</TooltipContent>
</Tooltip>
{/* Database - using animated archive icon */}
<Tooltip delayDuration={0}>
<TooltipTrigger asChild>
<Button
variant={currentPage === "database" ? "secondary" : "ghost"}
size="icon"
className="h-10 w-10"
onClick={() => onPageChange("database")}
>
<ArchiveIcon size={20} />
</Button>
</TooltipTrigger>
<TooltipContent side="right">
<p>Saved Accounts</p>
</TooltipContent>
</Tooltip>
{/* Debug - using animated terminal icon */}
<Tooltip delayDuration={0}>
<TooltipTrigger asChild>
<Button
variant={currentPage === "debug" ? "secondary" : "ghost"}
size="icon"
className="h-10 w-10"
onClick={() => onPageChange("debug")}
>
<TerminalIcon size={20} />
</Button>
</TooltipTrigger>
<TooltipContent side="right">
<p>Debug Logs</p>
</TooltipContent>
</Tooltip>
</div>
{/* Bottom icons */}
@@ -54,7 +103,7 @@ export function Sidebar({ currentPage, onPageChange }: SidebarProps) {
className="h-10 w-10"
onClick={() => openExternal("https://github.com/afkarxyz/Twitter-X-Media-Batch-Downloader/issues")}
>
<Github className="h-5 w-5" />
<GithubIcon size={20} />
</Button>
</TooltipTrigger>
<TooltipContent side="right">
@@ -69,7 +118,7 @@ export function Sidebar({ currentPage, onPageChange }: SidebarProps) {
className="h-10 w-10"
onClick={() => openExternal("https://exyezed.cc/")}
>
<LayoutGrid className="h-5 w-5" />
<BlocksIcon size={20} />
</Button>
</TooltipTrigger>
<TooltipContent side="right">
@@ -84,7 +133,7 @@ export function Sidebar({ currentPage, onPageChange }: SidebarProps) {
className="h-10 w-10"
onClick={() => openExternal("https://ko-fi.com/afkarxyz")}
>
<Coffee className="h-5 w-5" />
<CoffeeIcon size={20} />
</Button>
</TooltipTrigger>
<TooltipContent side="right">
+132
View File
@@ -0,0 +1,132 @@
'use client';
import type { Variants } from 'motion/react';
import type { HTMLAttributes } from 'react';
import { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';
import { motion, useAnimation } from 'motion/react';
import { cn } from '@/lib/utils';
export interface ArchiveIconHandle {
startAnimation: () => void;
stopAnimation: () => void;
}
interface ArchiveIconProps extends HTMLAttributes<HTMLDivElement> {
size?: number;
}
const RECT_VARIANTS: Variants = {
normal: {
translateY: 0,
transition: {
duration: 0.2,
type: 'spring',
stiffness: 200,
damping: 25,
},
},
animate: {
translateY: -1.5,
transition: {
duration: 0.2,
type: 'spring',
stiffness: 200,
damping: 25,
},
},
};
const PATH_VARIANTS: Variants = {
normal: { d: 'M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8' },
animate: { d: 'M4 11v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V11' },
};
const SECONDARY_PATH_VARIANTS: Variants = {
normal: { d: 'M10 12h4' },
animate: { d: 'M10 15h4' },
};
const ArchiveIcon = forwardRef<ArchiveIconHandle, ArchiveIconProps>(
({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
const controls = useAnimation();
const isControlledRef = useRef(false);
useImperativeHandle(ref, () => {
isControlledRef.current = true;
return {
startAnimation: () => controls.start('animate'),
stopAnimation: () => controls.start('normal'),
};
});
const handleMouseEnter = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
if (!isControlledRef.current) {
controls.start('animate');
} else {
onMouseEnter?.(e);
}
},
[controls, onMouseEnter]
);
const handleMouseLeave = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
if (!isControlledRef.current) {
controls.start('normal');
} else {
onMouseLeave?.(e);
}
},
[controls, onMouseLeave]
);
return (
<div
className={cn(className)}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
{...props}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width={size}
height={size}
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
<motion.rect
width="20"
height="5"
x="2"
y="3"
rx="1"
initial="normal"
animate={controls}
variants={RECT_VARIANTS}
/>
<motion.path
d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"
variants={PATH_VARIANTS}
animate={controls}
/>
<motion.path
d="M10 12h4"
variants={SECONDARY_PATH_VARIANTS}
animate={controls}
/>
</svg>
</div>
);
}
);
ArchiveIcon.displayName = 'ArchiveIcon';
export { ArchiveIcon };
+92
View File
@@ -0,0 +1,92 @@
'use client';
import type { Variants } from 'motion/react';
import type { HTMLAttributes } from 'react';
import { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';
import { motion, useAnimation } from 'motion/react';
import { cn } from '@/lib/utils';
export interface BlocksIconHandle {
startAnimation: () => void;
stopAnimation: () => void;
}
interface BlocksIconProps extends HTMLAttributes<HTMLDivElement> {
size?: number;
}
const VARIANTS: Variants = {
normal: { translateX: 0, translateY: 0 },
animate: { translateX: -4, translateY: 4 },
};
const BlocksIcon = forwardRef<BlocksIconHandle, BlocksIconProps>(
({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
const controls = useAnimation();
const isControlledRef = useRef(false);
useImperativeHandle(ref, () => {
isControlledRef.current = true;
return {
startAnimation: () => controls.start('animate'),
stopAnimation: () => controls.start('normal'),
};
});
const handleMouseEnter = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
if (!isControlledRef.current) {
controls.start('animate');
} else {
onMouseEnter?.(e);
}
},
[controls, onMouseEnter]
);
const handleMouseLeave = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
if (!isControlledRef.current) {
controls.start('normal');
} else {
onMouseLeave?.(e);
}
},
[controls, onMouseLeave]
);
return (
<div
className={cn(className)}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
{...props}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width={size}
height={size}
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
<path d="M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3" />
<motion.path
d="M14 3h7v7h-7z"
variants={VARIANTS}
animate={controls}
/>
</svg>
</div>
);
}
);
BlocksIcon.displayName = 'BlocksIcon';
export { BlocksIcon };
+118
View File
@@ -0,0 +1,118 @@
'use client';
import type { Variants } from 'motion/react';
import type { HTMLAttributes } from 'react';
import { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';
import { motion, useAnimation } from 'motion/react';
import { cn } from '@/lib/utils';
export interface CoffeeIconHandle {
startAnimation: () => void;
stopAnimation: () => void;
}
interface CoffeeIconProps extends HTMLAttributes<HTMLDivElement> {
size?: number;
}
const PATH_VARIANTS: Variants = {
normal: {
y: 0,
opacity: 1,
},
animate: (custom: number) => ({
y: -3,
opacity: [0, 1, 0],
transition: {
repeat: Infinity,
duration: 1.5,
ease: 'easeInOut',
delay: 0.2 * custom,
},
}),
};
const CoffeeIcon = forwardRef<CoffeeIconHandle, CoffeeIconProps>(
({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
const controls = useAnimation();
const isControlledRef = useRef(false);
useImperativeHandle(ref, () => {
isControlledRef.current = true;
return {
startAnimation: () => controls.start('animate'),
stopAnimation: () => controls.start('normal'),
};
});
const handleMouseEnter = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
if (!isControlledRef.current) {
controls.start('animate');
} else {
onMouseEnter?.(e);
}
},
[controls, onMouseEnter]
);
const handleMouseLeave = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
if (!isControlledRef.current) {
controls.start('normal');
} else {
onMouseLeave?.(e);
}
},
[controls, onMouseLeave]
);
return (
<div
className={cn(className)}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
{...props}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width={size}
height={size}
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
style={{ overflow: 'visible' }}
>
<motion.path
d="M10 2v2"
animate={controls}
variants={PATH_VARIANTS}
custom={0.2}
/>
<motion.path
d="M14 2v2"
animate={controls}
variants={PATH_VARIANTS}
custom={0.4}
/>
<motion.path
d="M6 2v2"
animate={controls}
variants={PATH_VARIANTS}
custom={0}
/>
<path d="M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1" />
</svg>
</div>
);
}
);
CoffeeIcon.displayName = 'CoffeeIcon';
export { CoffeeIcon };
+149
View File
@@ -0,0 +1,149 @@
'use client';
import type { Variants } from 'motion/react';
import type { HTMLAttributes } from 'react';
import { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';
import { motion, useAnimation } from 'motion/react';
import { cn } from '@/lib/utils';
export interface GithubIconHandle {
startAnimation: () => void;
stopAnimation: () => void;
}
interface GithubIconProps extends HTMLAttributes<HTMLDivElement> {
size?: number;
}
const BODY_VARIANTS: Variants = {
normal: {
opacity: 1,
pathLength: 1,
scale: 1,
transition: {
duration: 0.3,
},
},
animate: {
opacity: [0, 1],
pathLength: [0, 1],
scale: [0.9, 1],
transition: {
duration: 0.4,
},
},
};
const TAIL_VARIANTS: Variants = {
normal: {
pathLength: 1,
rotate: 0,
transition: {
duration: 0.3,
},
},
draw: {
pathLength: [0, 1],
rotate: 0,
transition: {
duration: 0.5,
},
},
wag: {
pathLength: 1,
rotate: [0, -15, 15, -10, 10, -5, 5],
transition: {
duration: 2.5,
ease: 'easeInOut',
repeat: Infinity,
},
},
};
const GithubIcon = forwardRef<GithubIconHandle, GithubIconProps>(
({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
const bodyControls = useAnimation();
const tailControls = useAnimation();
const isControlledRef = useRef(false);
useImperativeHandle(ref, () => {
isControlledRef.current = true;
return {
startAnimation: async () => {
bodyControls.start('animate');
await tailControls.start('draw');
tailControls.start('wag');
},
stopAnimation: () => {
bodyControls.start('normal');
tailControls.start('normal');
},
};
});
const handleMouseEnter = useCallback(
async (e: React.MouseEvent<HTMLDivElement>) => {
if (!isControlledRef.current) {
bodyControls.start('animate');
await tailControls.start('draw');
tailControls.start('wag');
} else {
onMouseEnter?.(e);
}
},
[bodyControls, onMouseEnter, tailControls]
);
const handleMouseLeave = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
if (!isControlledRef.current) {
bodyControls.start('normal');
tailControls.start('normal');
} else {
onMouseLeave?.(e);
}
},
[bodyControls, tailControls, onMouseLeave]
);
return (
<div
className={cn(className)}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
{...props}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width={size}
height={size}
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
<motion.path
variants={BODY_VARIANTS}
initial="normal"
animate={bodyControls}
d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"
/>
<motion.path
variants={TAIL_VARIANTS}
initial="normal"
animate={tailControls}
d="M9 18c-4.51 2-5-2-7-2"
/>
</svg>
</div>
);
}
);
GithubIcon.displayName = 'GithubIcon';
export { GithubIcon };
+103
View File
@@ -0,0 +1,103 @@
'use client';
import type { Transition, Variants } from 'motion/react';
import type { HTMLAttributes } from 'react';
import { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';
import { motion, useAnimation } from 'motion/react';
import { cn } from '@/lib/utils';
export interface HomeIconHandle {
startAnimation: () => void;
stopAnimation: () => void;
}
interface HomeIconProps extends HTMLAttributes<HTMLDivElement> {
size?: number;
}
const DEFAULT_TRANSITION: Transition = {
duration: 0.6,
opacity: { duration: 0.2 },
};
const PATH_VARIANTS: Variants = {
normal: {
pathLength: 1,
opacity: 1,
},
animate: {
opacity: [0, 1],
pathLength: [0, 1],
},
};
const HomeIcon = forwardRef<HomeIconHandle, HomeIconProps>(
({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
const controls = useAnimation();
const isControlledRef = useRef(false);
useImperativeHandle(ref, () => {
isControlledRef.current = true;
return {
startAnimation: () => controls.start('animate'),
stopAnimation: () => controls.start('normal'),
};
});
const handleMouseEnter = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
if (!isControlledRef.current) {
controls.start('animate');
} else {
onMouseEnter?.(e);
}
},
[controls, onMouseEnter]
);
const handleMouseLeave = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
if (!isControlledRef.current) {
controls.start('normal');
} else {
onMouseLeave?.(e);
}
},
[controls, onMouseLeave]
);
return (
<div
className={cn(className)}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
{...props}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width={size}
height={size}
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
<path d="M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
<motion.path
d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"
variants={PATH_VARIANTS}
transition={DEFAULT_TRANSITION}
animate={controls}
/>
</svg>
</div>
);
}
);
HomeIcon.displayName = 'HomeIcon';
export { HomeIcon };
+92
View File
@@ -0,0 +1,92 @@
'use client';
import type { HTMLAttributes } from 'react';
import { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';
import { motion, useAnimation } from 'motion/react';
import { cn } from '@/lib/utils';
export interface SettingsIconHandle {
startAnimation: () => void;
stopAnimation: () => void;
}
interface SettingsIconProps extends HTMLAttributes<HTMLDivElement> {
size?: number;
}
const SettingsIcon = forwardRef<SettingsIconHandle, SettingsIconProps>(
({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
const controls = useAnimation();
const isControlledRef = useRef(false);
useImperativeHandle(ref, () => {
isControlledRef.current = true;
return {
startAnimation: () => controls.start('animate'),
stopAnimation: () => controls.start('normal'),
};
});
const handleMouseEnter = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
if (!isControlledRef.current) {
controls.start('animate');
} else {
onMouseEnter?.(e);
}
},
[controls, onMouseEnter]
);
const handleMouseLeave = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
if (!isControlledRef.current) {
controls.start('normal');
} else {
onMouseLeave?.(e);
}
},
[controls, onMouseLeave]
);
return (
<div
className={cn(className)}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
{...props}
>
<motion.svg
xmlns="http://www.w3.org/2000/svg"
width={size}
height={size}
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
transition={{ type: 'spring', stiffness: 50, damping: 10 }}
variants={{
normal: {
rotate: 0,
},
animate: {
rotate: 180,
},
}}
animate={controls}
>
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</motion.svg>
</div>
);
}
);
SettingsIcon.displayName = 'SettingsIcon';
export { SettingsIcon };
+103
View File
@@ -0,0 +1,103 @@
'use client';
import type { Variants } from 'motion/react';
import type { HTMLAttributes } from 'react';
import { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';
import { motion, useAnimation } from 'motion/react';
import { cn } from '@/lib/utils';
export interface TerminalIconHandle {
startAnimation: () => void;
stopAnimation: () => void;
}
interface TerminalIconProps extends HTMLAttributes<HTMLDivElement> {
size?: number;
}
const LINE_VARIANTS: Variants = {
normal: { opacity: 1 },
animate: {
opacity: [1, 0, 1],
transition: {
duration: 0.8,
repeat: Infinity,
ease: 'linear',
},
},
};
const TerminalIcon = forwardRef<TerminalIconHandle, TerminalIconProps>(
({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
const controls = useAnimation();
const isControlledRef = useRef(false);
useImperativeHandle(ref, () => {
isControlledRef.current = true;
return {
startAnimation: () => controls.start('animate'),
stopAnimation: () => controls.start('normal'),
};
});
const handleMouseEnter = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
if (!isControlledRef.current) {
controls.start('animate');
} else {
onMouseEnter?.(e);
}
},
[controls, onMouseEnter]
);
const handleMouseLeave = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
if (!isControlledRef.current) {
controls.start('normal');
} else {
onMouseLeave?.(e);
}
},
[controls, onMouseLeave]
);
return (
<div
className={cn(className)}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
{...props}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width={size}
height={size}
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
<polyline points="4 17 10 11 4 5" />
<motion.line
x1="12"
x2="20"
y1="19"
y2="19"
variants={LINE_VARIANTS}
animate={controls}
initial="normal"
/>
</svg>
</div>
);
}
);
TerminalIcon.displayName = 'TerminalIcon';
export { TerminalIcon };
+8
View File
@@ -3,6 +3,8 @@ import { GetDefaults } from "../../wailsjs/go/main/App";
export type FontFamily = "google-sans" | "inter" | "poppins" | "roboto" | "dm-sans" | "plus-jakarta-sans" | "manrope" | "space-grotesk" | "noto-sans" | "nunito-sans" | "figtree" | "raleway" | "public-sans" | "outfit" | "jetbrains-mono" | "geist-sans";
export type GifQuality = "fast" | "better";
export type GifResolution = "original" | "high" | "medium" | "low";
export type FetchMode = "single" | "batch";
export type MediaType = "all" | "image" | "video" | "gif" | "text";
export interface Settings {
downloadPath: string;
@@ -14,6 +16,9 @@ export interface Settings {
gifResolution: GifResolution;
proxy: string; // Proxy URL (e.g., http://proxy:port or socks5://proxy:port). Empty to use system proxy or no proxy.
fetchTimeout: number; // Fetch timeout in seconds. Default: 60 seconds.
fetchMode: FetchMode; // Fetch mode: single (all at once) or batch (200 per request). Default: batch.
mediaType: MediaType; // Media type filter. Default: all.
includeRetweets: boolean; // Include retweets in fetch. Default: false.
}
export const DEFAULT_SETTINGS: Settings = {
@@ -26,6 +31,9 @@ export const DEFAULT_SETTINGS: Settings = {
gifResolution: "original",
proxy: "",
fetchTimeout: 60, // Default: 60 seconds
fetchMode: "batch", // Default: batch mode (200 per request)
mediaType: "all", // Default: all media
includeRetweets: false, // Default: don't include retweets
};
export const FONT_OPTIONS: { value: FontFamily; label: string; fontFamily: string }[] = [
+1 -1
View File
@@ -11,7 +11,7 @@
},
"info": {
"productName": "Twitter/X Media Batch Downloader",
"productVersion": "4.2"
"productVersion": "4.3"
},
"wailsjsdir": "./frontend",
"assetdir": "./frontend/dist",