Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -5,5 +5,43 @@ module.exports = {
|
||||
"plugin:react/jsx-runtime",
|
||||
"@electron-toolkit/eslint-config-ts/recommended",
|
||||
"@electron-toolkit/eslint-config-prettier",
|
||||
"plugin:tailwindcss/recommended",
|
||||
"plugin:react-hooks/recommended",
|
||||
],
|
||||
settings: {
|
||||
"import/resolver": {
|
||||
node: { extensions: [".js", ".mjs", ".ts", ".d.ts"] },
|
||||
},
|
||||
tailwindcss: {
|
||||
callees: ["clsx", "cn"],
|
||||
whitelist: [],
|
||||
},
|
||||
react: {
|
||||
version: "detect",
|
||||
},
|
||||
},
|
||||
plugins: ["unused-imports"],
|
||||
rules: {
|
||||
"import/named": "off",
|
||||
"import/no-anonymous-default-export": "off",
|
||||
"import/no-named-as-default": "off",
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"react-hooks/exhaustive-deps":
|
||||
process.env.NODE_ENV === "production" ? "off" : "warn",
|
||||
"import/no-named-as-default-member": "off",
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
"react/prop-types": "off",
|
||||
|
||||
"@typescript-eslint/no-unused-vars": "off",
|
||||
"unused-imports/no-unused-imports": "error",
|
||||
"unused-imports/no-unused-vars": [
|
||||
"warn",
|
||||
{
|
||||
vars: "all",
|
||||
varsIgnorePattern: "^_",
|
||||
args: "after-used",
|
||||
argsIgnorePattern: "^_",
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
Vendored
+7
-1
@@ -7,5 +7,11 @@
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
}
|
||||
},
|
||||
"eslint.codeActionsOnSave.rules": [
|
||||
"!prefer-const",
|
||||
"!unused-imports/no-unused-imports",
|
||||
"!tailwindcss/classnames-order",
|
||||
"*"
|
||||
]
|
||||
}
|
||||
|
||||
+13
-3
@@ -7,7 +7,10 @@
|
||||
"author": "example.com",
|
||||
"homepage": "https://electron-vite.org",
|
||||
"lint-staged": {
|
||||
"**/*": "prettier --write --ignore-unknown"
|
||||
"**/*": "prettier --write --ignore-unknown",
|
||||
"*.{js,jsx,ts,tsx}": [
|
||||
"eslint --cache --fix"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"format": "prettier --write .",
|
||||
@@ -23,7 +26,10 @@
|
||||
"build:win": "npm run build && electron-builder --win",
|
||||
"build:mac": "electron-vite build && electron-builder --mac",
|
||||
"build:linux": "electron-vite build && electron-builder --linux",
|
||||
"prepare": "husky"
|
||||
"prepare": "pnpm exec simple-git-hooks && test -f .env || cp .env.example .env"
|
||||
},
|
||||
"simple-git-hooks": {
|
||||
"pre-commit": "pnpm exec lint-staged"
|
||||
},
|
||||
"dependencies": {
|
||||
"@egoist/tipc": "0.3.1",
|
||||
@@ -88,13 +94,17 @@
|
||||
"electron": "^30.0.6",
|
||||
"electron-builder": "^24.9.1",
|
||||
"electron-vite": "^2.2.0",
|
||||
"eslint": "^9.3.0",
|
||||
"eslint": "^8",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"eslint-plugin-react-hooks": "4.6.2",
|
||||
"eslint-plugin-tailwindcss": "3.15.1",
|
||||
"eslint-plugin-unused-imports": "4.0.0",
|
||||
"husky": "9.0.11",
|
||||
"lint-staged": "15.2.2",
|
||||
"prettier": "^3.2.4",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"simple-git-hooks": "2.11.1",
|
||||
"tailwindcss": "3.4.3",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.2.11"
|
||||
|
||||
Generated
+167
-94
@@ -155,10 +155,10 @@ importers:
|
||||
version: 1.8.0(tailwindcss@3.4.3)
|
||||
'@electron-toolkit/eslint-config-prettier':
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0(eslint@9.3.0)(prettier@3.2.5)
|
||||
version: 2.0.0(eslint@8.57.0)(prettier@3.2.5)
|
||||
'@electron-toolkit/eslint-config-ts':
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0(eslint@9.3.0)(typescript@5.4.5)
|
||||
version: 2.0.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@electron-toolkit/tsconfig':
|
||||
specifier: ^1.0.1
|
||||
version: 1.0.1(@types/node@20.12.12)
|
||||
@@ -190,11 +190,20 @@ importers:
|
||||
specifier: ^2.2.0
|
||||
version: 2.2.0(vite@5.2.11(@types/node@20.12.12))
|
||||
eslint:
|
||||
specifier: ^9.3.0
|
||||
version: 9.3.0
|
||||
specifier: ^8
|
||||
version: 8.57.0
|
||||
eslint-plugin-react:
|
||||
specifier: ^7.33.2
|
||||
version: 7.34.1(eslint@9.3.0)
|
||||
version: 7.34.1(eslint@8.57.0)
|
||||
eslint-plugin-react-hooks:
|
||||
specifier: 4.6.2
|
||||
version: 4.6.2(eslint@8.57.0)
|
||||
eslint-plugin-tailwindcss:
|
||||
specifier: 3.15.1
|
||||
version: 3.15.1(tailwindcss@3.4.3)
|
||||
eslint-plugin-unused-imports:
|
||||
specifier: 4.0.0
|
||||
version: 4.0.0(eslint@8.57.0)
|
||||
husky:
|
||||
specifier: 9.0.11
|
||||
version: 9.0.11
|
||||
@@ -210,6 +219,9 @@ importers:
|
||||
react-dom:
|
||||
specifier: ^18.3.1
|
||||
version: 18.3.1(react@18.3.1)
|
||||
simple-git-hooks:
|
||||
specifier: 2.11.1
|
||||
version: 2.11.1
|
||||
tailwindcss:
|
||||
specifier: 3.4.3
|
||||
version: 3.4.3
|
||||
@@ -736,13 +748,13 @@ packages:
|
||||
resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==}
|
||||
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
|
||||
|
||||
'@eslint/eslintrc@3.1.0':
|
||||
resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
'@eslint/eslintrc@2.1.4':
|
||||
resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
|
||||
'@eslint/js@9.3.0':
|
||||
resolution: {integrity: sha512-niBqk8iwv96+yuTwjM6bWg8ovzAPF9qkICsGtcoa5/dmqcEMfdwNAX7+/OHcJHc7wj7XqPxH98oAHytFYlw6Sw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
'@eslint/js@8.57.0':
|
||||
resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
|
||||
'@floating-ui/core@1.6.0':
|
||||
resolution: {integrity: sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==}
|
||||
@@ -778,8 +790,8 @@ packages:
|
||||
peerDependencies:
|
||||
react-hook-form: ^7.0.0
|
||||
|
||||
'@humanwhocodes/config-array@0.13.0':
|
||||
resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==}
|
||||
'@humanwhocodes/config-array@0.11.14':
|
||||
resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==}
|
||||
engines: {node: '>=10.10.0'}
|
||||
|
||||
'@humanwhocodes/module-importer@1.0.1':
|
||||
@@ -789,10 +801,6 @@ packages:
|
||||
'@humanwhocodes/object-schema@2.0.3':
|
||||
resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==}
|
||||
|
||||
'@humanwhocodes/retry@0.3.0':
|
||||
resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==}
|
||||
engines: {node: '>=18.18'}
|
||||
|
||||
'@iconify-json/mingcute@1.1.17':
|
||||
resolution: {integrity: sha512-WTKnn5OicUo18dE3rkJs00sUjOIAui8Ut9yZSXamRfjzmLxuX9FKqYQAbFXaV6lw0T4QwBQ8/y4ftaWl/1Entg==}
|
||||
|
||||
@@ -1660,6 +1668,7 @@ packages:
|
||||
are-we-there-yet@3.0.1:
|
||||
resolution: {integrity: sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==}
|
||||
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
|
||||
deprecated: This package is no longer supported.
|
||||
|
||||
arg@5.0.2:
|
||||
resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==}
|
||||
@@ -2141,6 +2150,10 @@ packages:
|
||||
resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
doctrine@3.0.0:
|
||||
resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
|
||||
dotenv-expand@5.1.0:
|
||||
resolution: {integrity: sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==}
|
||||
|
||||
@@ -2303,32 +2316,54 @@ packages:
|
||||
eslint-config-prettier:
|
||||
optional: true
|
||||
|
||||
eslint-plugin-react-hooks@4.6.2:
|
||||
resolution: {integrity: sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==}
|
||||
engines: {node: '>=10'}
|
||||
peerDependencies:
|
||||
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0
|
||||
|
||||
eslint-plugin-react@7.34.1:
|
||||
resolution: {integrity: sha512-N97CxlouPT1AHt8Jn0mhhN2RrADlUAsk1/atcT2KyA/l9Q/E6ll7OIGwNumFmWfZ9skV3XXccYS19h80rHtgkw==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8
|
||||
|
||||
eslint-scope@8.0.1:
|
||||
resolution: {integrity: sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==}
|
||||
eslint-plugin-tailwindcss@3.15.1:
|
||||
resolution: {integrity: sha512-4RXRMIaMG07C2TBEW1k0VM4+dDazz1kxcZhkK4zirvmHGZTA4jnlSO2kq5mamuSPi+Wo17dh2SlC8IyFBuCd7Q==}
|
||||
engines: {node: '>=12.13.0'}
|
||||
peerDependencies:
|
||||
tailwindcss: ^3.4.0
|
||||
|
||||
eslint-plugin-unused-imports@4.0.0:
|
||||
resolution: {integrity: sha512-mzM+y2B7XYpQryVa1usT+Y/BdNAtAZiXzwpSyDCboFoJN/LZRN67TNvQxKtuTK/Aplya3sLNQforiubzPPaIcQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/eslint-plugin': '8'
|
||||
eslint: '9'
|
||||
peerDependenciesMeta:
|
||||
'@typescript-eslint/eslint-plugin':
|
||||
optional: true
|
||||
|
||||
eslint-rule-composer@0.3.0:
|
||||
resolution: {integrity: sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==}
|
||||
engines: {node: '>=4.0.0'}
|
||||
|
||||
eslint-scope@7.2.2:
|
||||
resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
|
||||
eslint-visitor-keys@3.4.3:
|
||||
resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
|
||||
eslint-visitor-keys@4.0.0:
|
||||
resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
eslint@9.3.0:
|
||||
resolution: {integrity: sha512-5Iv4CsZW030lpUqHBapdPo3MJetAPtejVW8B84GIcIIv8+ohFaddXsrn1Gn8uD9ijDb+kcYKFUVmC8qG8B2ORQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
eslint@8.57.0:
|
||||
resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
hasBin: true
|
||||
|
||||
espree@10.0.1:
|
||||
resolution: {integrity: sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
espree@9.6.1:
|
||||
resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
|
||||
esquery@1.5.0:
|
||||
resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==}
|
||||
@@ -2397,9 +2432,9 @@ packages:
|
||||
fd-slicer@1.1.0:
|
||||
resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==}
|
||||
|
||||
file-entry-cache@8.0.0:
|
||||
resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==}
|
||||
engines: {node: '>=16.0.0'}
|
||||
file-entry-cache@6.0.1:
|
||||
resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==}
|
||||
engines: {node: ^10.12.0 || >=12.0.0}
|
||||
|
||||
filelist@1.0.4:
|
||||
resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==}
|
||||
@@ -2412,9 +2447,9 @@ packages:
|
||||
resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
flat-cache@4.0.1:
|
||||
resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==}
|
||||
engines: {node: '>=16'}
|
||||
flat-cache@3.2.0:
|
||||
resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==}
|
||||
engines: {node: ^10.12.0 || >=12.0.0}
|
||||
|
||||
flatted@3.3.1:
|
||||
resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==}
|
||||
@@ -2488,6 +2523,7 @@ packages:
|
||||
gauge@4.0.4:
|
||||
resolution: {integrity: sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==}
|
||||
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
|
||||
deprecated: This package is no longer supported.
|
||||
|
||||
gensync@1.0.0-beta.2:
|
||||
resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==}
|
||||
@@ -2553,9 +2589,9 @@ packages:
|
||||
resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
|
||||
engines: {node: '>=4'}
|
||||
|
||||
globals@14.0.0:
|
||||
resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==}
|
||||
engines: {node: '>=18'}
|
||||
globals@13.24.0:
|
||||
resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
globalthis@1.0.3:
|
||||
resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==}
|
||||
@@ -3383,6 +3419,7 @@ packages:
|
||||
npmlog@6.0.2:
|
||||
resolution: {integrity: sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==}
|
||||
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
|
||||
deprecated: This package is no longer supported.
|
||||
|
||||
nth-check@2.1.1:
|
||||
resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==}
|
||||
@@ -3892,6 +3929,10 @@ packages:
|
||||
resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
|
||||
engines: {node: '>=14'}
|
||||
|
||||
simple-git-hooks@2.11.1:
|
||||
resolution: {integrity: sha512-tgqwPUMDcNDhuf1Xf6KTUsyeqGdgKMhzaH4PAZZuzguOgTl5uuyeYe/8mWgAr6IBxB5V06uqEf6Dy37gIWDtDg==}
|
||||
hasBin: true
|
||||
|
||||
simple-update-notifier@2.0.0:
|
||||
resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -4125,6 +4166,10 @@ packages:
|
||||
resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
type-fest@0.20.2:
|
||||
resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
typed-array-buffer@1.0.2:
|
||||
resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -4562,20 +4607,20 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- react
|
||||
|
||||
'@electron-toolkit/eslint-config-prettier@2.0.0(eslint@9.3.0)(prettier@3.2.5)':
|
||||
'@electron-toolkit/eslint-config-prettier@2.0.0(eslint@8.57.0)(prettier@3.2.5)':
|
||||
dependencies:
|
||||
eslint: 9.3.0
|
||||
eslint-config-prettier: 9.1.0(eslint@9.3.0)
|
||||
eslint-plugin-prettier: 5.1.3(eslint-config-prettier@9.1.0(eslint@9.3.0))(eslint@9.3.0)(prettier@3.2.5)
|
||||
eslint: 8.57.0
|
||||
eslint-config-prettier: 9.1.0(eslint@8.57.0)
|
||||
eslint-plugin-prettier: 5.1.3(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.2.5)
|
||||
prettier: 3.2.5
|
||||
transitivePeerDependencies:
|
||||
- '@types/eslint'
|
||||
|
||||
'@electron-toolkit/eslint-config-ts@2.0.0(eslint@9.3.0)(typescript@5.4.5)':
|
||||
'@electron-toolkit/eslint-config-ts@2.0.0(eslint@8.57.0)(typescript@5.4.5)':
|
||||
dependencies:
|
||||
'@typescript-eslint/eslint-plugin': 7.6.0(@typescript-eslint/parser@7.6.0(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/parser': 7.6.0(eslint@9.3.0)(typescript@5.4.5)
|
||||
eslint: 9.3.0
|
||||
'@typescript-eslint/eslint-plugin': 7.6.0(@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/parser': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
eslint: 8.57.0
|
||||
optionalDependencies:
|
||||
typescript: 5.4.5
|
||||
transitivePeerDependencies:
|
||||
@@ -4828,19 +4873,19 @@ snapshots:
|
||||
'@esbuild/win32-x64@0.20.2':
|
||||
optional: true
|
||||
|
||||
'@eslint-community/eslint-utils@4.4.0(eslint@9.3.0)':
|
||||
'@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)':
|
||||
dependencies:
|
||||
eslint: 9.3.0
|
||||
eslint: 8.57.0
|
||||
eslint-visitor-keys: 3.4.3
|
||||
|
||||
'@eslint-community/regexpp@4.10.0': {}
|
||||
|
||||
'@eslint/eslintrc@3.1.0':
|
||||
'@eslint/eslintrc@2.1.4':
|
||||
dependencies:
|
||||
ajv: 6.12.6
|
||||
debug: 4.3.4
|
||||
espree: 10.0.1
|
||||
globals: 14.0.0
|
||||
espree: 9.6.1
|
||||
globals: 13.24.0
|
||||
ignore: 5.3.1
|
||||
import-fresh: 3.3.0
|
||||
js-yaml: 4.1.0
|
||||
@@ -4849,7 +4894,7 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@eslint/js@9.3.0': {}
|
||||
'@eslint/js@8.57.0': {}
|
||||
|
||||
'@floating-ui/core@1.6.0':
|
||||
dependencies:
|
||||
@@ -4882,7 +4927,7 @@ snapshots:
|
||||
dependencies:
|
||||
react-hook-form: 7.51.4(react@18.3.1)
|
||||
|
||||
'@humanwhocodes/config-array@0.13.0':
|
||||
'@humanwhocodes/config-array@0.11.14':
|
||||
dependencies:
|
||||
'@humanwhocodes/object-schema': 2.0.3
|
||||
debug: 4.3.4
|
||||
@@ -4894,8 +4939,6 @@ snapshots:
|
||||
|
||||
'@humanwhocodes/object-schema@2.0.3': {}
|
||||
|
||||
'@humanwhocodes/retry@0.3.0': {}
|
||||
|
||||
'@iconify-json/mingcute@1.1.17':
|
||||
dependencies:
|
||||
'@iconify/types': 2.0.0
|
||||
@@ -5635,16 +5678,16 @@ snapshots:
|
||||
'@types/node': 20.12.12
|
||||
optional: true
|
||||
|
||||
'@typescript-eslint/eslint-plugin@7.6.0(@typescript-eslint/parser@7.6.0(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5)':
|
||||
'@typescript-eslint/eslint-plugin@7.6.0(@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)':
|
||||
dependencies:
|
||||
'@eslint-community/regexpp': 4.10.0
|
||||
'@typescript-eslint/parser': 7.6.0(eslint@9.3.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/parser': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/scope-manager': 7.6.0
|
||||
'@typescript-eslint/type-utils': 7.6.0(eslint@9.3.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/utils': 7.6.0(eslint@9.3.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/type-utils': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/utils': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/visitor-keys': 7.6.0
|
||||
debug: 4.3.4
|
||||
eslint: 9.3.0
|
||||
eslint: 8.57.0
|
||||
graphemer: 1.4.0
|
||||
ignore: 5.3.1
|
||||
natural-compare: 1.4.0
|
||||
@@ -5655,14 +5698,14 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/parser@7.6.0(eslint@9.3.0)(typescript@5.4.5)':
|
||||
'@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5)':
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 7.6.0
|
||||
'@typescript-eslint/types': 7.6.0
|
||||
'@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.5)
|
||||
'@typescript-eslint/visitor-keys': 7.6.0
|
||||
debug: 4.3.4
|
||||
eslint: 9.3.0
|
||||
eslint: 8.57.0
|
||||
optionalDependencies:
|
||||
typescript: 5.4.5
|
||||
transitivePeerDependencies:
|
||||
@@ -5673,12 +5716,12 @@ snapshots:
|
||||
'@typescript-eslint/types': 7.6.0
|
||||
'@typescript-eslint/visitor-keys': 7.6.0
|
||||
|
||||
'@typescript-eslint/type-utils@7.6.0(eslint@9.3.0)(typescript@5.4.5)':
|
||||
'@typescript-eslint/type-utils@7.6.0(eslint@8.57.0)(typescript@5.4.5)':
|
||||
dependencies:
|
||||
'@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.5)
|
||||
'@typescript-eslint/utils': 7.6.0(eslint@9.3.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/utils': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
debug: 4.3.4
|
||||
eslint: 9.3.0
|
||||
eslint: 8.57.0
|
||||
ts-api-utils: 1.3.0(typescript@5.4.5)
|
||||
optionalDependencies:
|
||||
typescript: 5.4.5
|
||||
@@ -5702,15 +5745,15 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/utils@7.6.0(eslint@9.3.0)(typescript@5.4.5)':
|
||||
'@typescript-eslint/utils@7.6.0(eslint@8.57.0)(typescript@5.4.5)':
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@9.3.0)
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0)
|
||||
'@types/json-schema': 7.0.15
|
||||
'@types/semver': 7.5.8
|
||||
'@typescript-eslint/scope-manager': 7.6.0
|
||||
'@typescript-eslint/types': 7.6.0
|
||||
'@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.5)
|
||||
eslint: 9.3.0
|
||||
eslint: 8.57.0
|
||||
semver: 7.6.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@@ -6474,6 +6517,10 @@ snapshots:
|
||||
dependencies:
|
||||
esutils: 2.0.3
|
||||
|
||||
doctrine@3.0.0:
|
||||
dependencies:
|
||||
esutils: 2.0.3
|
||||
|
||||
dotenv-expand@5.1.0: {}
|
||||
|
||||
dotenv@16.4.5: {}
|
||||
@@ -6751,20 +6798,24 @@ snapshots:
|
||||
|
||||
escape-string-regexp@4.0.0: {}
|
||||
|
||||
eslint-config-prettier@9.1.0(eslint@9.3.0):
|
||||
eslint-config-prettier@9.1.0(eslint@8.57.0):
|
||||
dependencies:
|
||||
eslint: 9.3.0
|
||||
eslint: 8.57.0
|
||||
|
||||
eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0(eslint@9.3.0))(eslint@9.3.0)(prettier@3.2.5):
|
||||
eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.2.5):
|
||||
dependencies:
|
||||
eslint: 9.3.0
|
||||
eslint: 8.57.0
|
||||
prettier: 3.2.5
|
||||
prettier-linter-helpers: 1.0.0
|
||||
synckit: 0.8.8
|
||||
optionalDependencies:
|
||||
eslint-config-prettier: 9.1.0(eslint@9.3.0)
|
||||
eslint-config-prettier: 9.1.0(eslint@8.57.0)
|
||||
|
||||
eslint-plugin-react@7.34.1(eslint@9.3.0):
|
||||
eslint-plugin-react-hooks@4.6.2(eslint@8.57.0):
|
||||
dependencies:
|
||||
eslint: 8.57.0
|
||||
|
||||
eslint-plugin-react@7.34.1(eslint@8.57.0):
|
||||
dependencies:
|
||||
array-includes: 3.1.8
|
||||
array.prototype.findlast: 1.2.5
|
||||
@@ -6773,7 +6824,7 @@ snapshots:
|
||||
array.prototype.tosorted: 1.1.3
|
||||
doctrine: 2.1.0
|
||||
es-iterator-helpers: 1.0.18
|
||||
eslint: 9.3.0
|
||||
eslint: 8.57.0
|
||||
estraverse: 5.3.0
|
||||
jsx-ast-utils: 3.3.5
|
||||
minimatch: 3.1.2
|
||||
@@ -6786,43 +6837,58 @@ snapshots:
|
||||
semver: 6.3.1
|
||||
string.prototype.matchall: 4.0.11
|
||||
|
||||
eslint-scope@8.0.1:
|
||||
eslint-plugin-tailwindcss@3.15.1(tailwindcss@3.4.3):
|
||||
dependencies:
|
||||
fast-glob: 3.3.2
|
||||
postcss: 8.4.38
|
||||
tailwindcss: 3.4.3
|
||||
|
||||
eslint-plugin-unused-imports@4.0.0(eslint@8.57.0):
|
||||
dependencies:
|
||||
eslint: 8.57.0
|
||||
eslint-rule-composer: 0.3.0
|
||||
|
||||
eslint-rule-composer@0.3.0: {}
|
||||
|
||||
eslint-scope@7.2.2:
|
||||
dependencies:
|
||||
esrecurse: 4.3.0
|
||||
estraverse: 5.3.0
|
||||
|
||||
eslint-visitor-keys@3.4.3: {}
|
||||
|
||||
eslint-visitor-keys@4.0.0: {}
|
||||
|
||||
eslint@9.3.0:
|
||||
eslint@8.57.0:
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@9.3.0)
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0)
|
||||
'@eslint-community/regexpp': 4.10.0
|
||||
'@eslint/eslintrc': 3.1.0
|
||||
'@eslint/js': 9.3.0
|
||||
'@humanwhocodes/config-array': 0.13.0
|
||||
'@eslint/eslintrc': 2.1.4
|
||||
'@eslint/js': 8.57.0
|
||||
'@humanwhocodes/config-array': 0.11.14
|
||||
'@humanwhocodes/module-importer': 1.0.1
|
||||
'@humanwhocodes/retry': 0.3.0
|
||||
'@nodelib/fs.walk': 1.2.8
|
||||
'@ungap/structured-clone': 1.2.0
|
||||
ajv: 6.12.6
|
||||
chalk: 4.1.2
|
||||
cross-spawn: 7.0.3
|
||||
debug: 4.3.4
|
||||
doctrine: 3.0.0
|
||||
escape-string-regexp: 4.0.0
|
||||
eslint-scope: 8.0.1
|
||||
eslint-visitor-keys: 4.0.0
|
||||
espree: 10.0.1
|
||||
eslint-scope: 7.2.2
|
||||
eslint-visitor-keys: 3.4.3
|
||||
espree: 9.6.1
|
||||
esquery: 1.5.0
|
||||
esutils: 2.0.3
|
||||
fast-deep-equal: 3.1.3
|
||||
file-entry-cache: 8.0.0
|
||||
file-entry-cache: 6.0.1
|
||||
find-up: 5.0.0
|
||||
glob-parent: 6.0.2
|
||||
globals: 13.24.0
|
||||
graphemer: 1.4.0
|
||||
ignore: 5.3.1
|
||||
imurmurhash: 0.1.4
|
||||
is-glob: 4.0.3
|
||||
is-path-inside: 3.0.3
|
||||
js-yaml: 4.1.0
|
||||
json-stable-stringify-without-jsonify: 1.0.1
|
||||
levn: 0.4.1
|
||||
lodash.merge: 4.6.2
|
||||
@@ -6834,11 +6900,11 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
espree@10.0.1:
|
||||
espree@9.6.1:
|
||||
dependencies:
|
||||
acorn: 8.11.3
|
||||
acorn-jsx: 5.3.2(acorn@8.11.3)
|
||||
eslint-visitor-keys: 4.0.0
|
||||
eslint-visitor-keys: 3.4.3
|
||||
|
||||
esquery@1.5.0:
|
||||
dependencies:
|
||||
@@ -6921,9 +6987,9 @@ snapshots:
|
||||
dependencies:
|
||||
pend: 1.2.0
|
||||
|
||||
file-entry-cache@8.0.0:
|
||||
file-entry-cache@6.0.1:
|
||||
dependencies:
|
||||
flat-cache: 4.0.1
|
||||
flat-cache: 3.2.0
|
||||
|
||||
filelist@1.0.4:
|
||||
dependencies:
|
||||
@@ -6938,10 +7004,11 @@ snapshots:
|
||||
locate-path: 6.0.0
|
||||
path-exists: 4.0.0
|
||||
|
||||
flat-cache@4.0.1:
|
||||
flat-cache@3.2.0:
|
||||
dependencies:
|
||||
flatted: 3.3.1
|
||||
keyv: 4.5.4
|
||||
rimraf: 3.0.2
|
||||
|
||||
flatted@3.3.1: {}
|
||||
|
||||
@@ -7100,7 +7167,9 @@ snapshots:
|
||||
|
||||
globals@11.12.0: {}
|
||||
|
||||
globals@14.0.0: {}
|
||||
globals@13.24.0:
|
||||
dependencies:
|
||||
type-fest: 0.20.2
|
||||
|
||||
globalthis@1.0.3:
|
||||
dependencies:
|
||||
@@ -8705,6 +8774,8 @@ snapshots:
|
||||
|
||||
signal-exit@4.1.0: {}
|
||||
|
||||
simple-git-hooks@2.11.1: {}
|
||||
|
||||
simple-update-notifier@2.0.0:
|
||||
dependencies:
|
||||
semver: 7.6.0
|
||||
@@ -8988,6 +9059,8 @@ snapshots:
|
||||
type-fest@0.13.1:
|
||||
optional: true
|
||||
|
||||
type-fest@0.20.2: {}
|
||||
|
||||
typed-array-buffer@1.0.2:
|
||||
dependencies:
|
||||
call-bind: 1.0.7
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
import { app, shell, BrowserWindow } from "electron"
|
||||
import { shell, BrowserWindow } from "electron"
|
||||
import path from "path"
|
||||
import { is } from "@electron-toolkit/utils"
|
||||
import icon from "../../resources/icon.png?asset"
|
||||
@@ -61,7 +61,7 @@ export function createWindow(options?: {
|
||||
trueUrl = decodeURIComponent(
|
||||
details.url.replace(
|
||||
new RegExp(
|
||||
`^${process.env["VITE_IMGPROXY_URL"]}/unsafe/\\d+x\\d+\/`,
|
||||
`^${process.env["VITE_IMGPROXY_URL"]}/unsafe/\\d+x\\d+/`,
|
||||
),
|
||||
"",
|
||||
),
|
||||
|
||||
@@ -4,7 +4,7 @@ function App() {
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className="h-10 drag-region shrink-0 absolute top-0 inset-x-0"
|
||||
className="drag-region absolute inset-x-0 top-0 h-10 shrink-0"
|
||||
aria-hidden
|
||||
></div>
|
||||
<Outlet />
|
||||
|
||||
@@ -5,10 +5,10 @@ import { FeedIcon } from "@renderer/components/feed-icon"
|
||||
|
||||
export function ArticleItem({ entry }: { entry: EntriesResponse[number] }) {
|
||||
return (
|
||||
<div className="flex my-5 px-2 py-3">
|
||||
<div className="my-5 flex px-2 py-3">
|
||||
<FeedIcon feed={entry.feeds} />
|
||||
<div className="line-clamp-5 text-sm flex-1 -mt-0.5 leading-tight">
|
||||
<div className="text-zinc-500 text-[10px] space-x-1">
|
||||
<div className="-mt-0.5 line-clamp-5 flex-1 text-sm leading-tight">
|
||||
<div className="space-x-1 text-[10px] text-zinc-500">
|
||||
<span>{entry.feeds.title}</span>
|
||||
<span>·</span>
|
||||
<span>
|
||||
@@ -20,13 +20,13 @@ export function ArticleItem({ entry }: { entry: EntriesResponse[number] }) {
|
||||
.humanize()}
|
||||
</span>
|
||||
</div>
|
||||
<div className="font-medium my-0.5 break-words">{entry.title}</div>
|
||||
<div className="text-zinc-500 text-[13px]">{entry.description}</div>
|
||||
<div className="my-0.5 break-words font-medium">{entry.title}</div>
|
||||
<div className="text-[13px] text-zinc-500">{entry.description}</div>
|
||||
</div>
|
||||
{entry.images?.[0] && (
|
||||
<Image
|
||||
src={entry.images[0]}
|
||||
className="w-20 h-20 shrink-0 ml-2"
|
||||
className="ml-2 size-20 shrink-0"
|
||||
loading="lazy"
|
||||
proxy={{
|
||||
width: 160,
|
||||
|
||||
@@ -43,8 +43,8 @@ export function EntryColumn() {
|
||||
|
||||
return (
|
||||
<div className="px-2" onClick={() => setActiveEntry(null)}>
|
||||
<div className="ml-9 mb-5">
|
||||
<div className="font-bold text-lg">{activeList?.name}</div>
|
||||
<div className="mb-5 ml-9">
|
||||
<div className="text-lg font-bold">{activeList?.name}</div>
|
||||
<div className="text-xs font-medium text-zinc-400">
|
||||
{entries.data?.pages?.[0].total} Items
|
||||
</div>
|
||||
@@ -59,7 +59,7 @@ export function EntryColumn() {
|
||||
className={cn(
|
||||
activeList?.view &&
|
||||
gridMode.includes(activeList.view) &&
|
||||
"grid gap-2 grid-cols-2 md:grid-cols-3 lg:grid-cols-4 px-2",
|
||||
"grid grid-cols-2 gap-2 px-2 md:grid-cols-3 lg:grid-cols-4",
|
||||
)}
|
||||
>
|
||||
{page.data?.map((entry) => (
|
||||
|
||||
@@ -13,14 +13,13 @@ export function EntryItemWrapper({
|
||||
children: React.ReactNode
|
||||
view?: number
|
||||
}) {
|
||||
if (!entry?.url || view === undefined) return children
|
||||
|
||||
const { items } = useEntryActions({
|
||||
view,
|
||||
entry,
|
||||
})
|
||||
|
||||
const { activeEntry, setActiveEntry } = useMainLayoutContext()
|
||||
if (!entry?.url || view === undefined) return children
|
||||
|
||||
return (
|
||||
<div
|
||||
|
||||
@@ -8,10 +8,10 @@ export function NotificationItem({
|
||||
entry: EntriesResponse[number]
|
||||
}) {
|
||||
return (
|
||||
<div className="flex my-5 px-2 py-3">
|
||||
<div className="my-5 flex px-2 py-3">
|
||||
<FeedIcon feed={entry.feeds} />
|
||||
<div className="line-clamp-5 text-sm flex-1 -mt-0.5 leading-tight">
|
||||
<div className="text-zinc-500 text-[10px] space-x-1">
|
||||
<div className="-mt-0.5 line-clamp-5 flex-1 text-sm leading-tight">
|
||||
<div className="space-x-1 text-[10px] text-zinc-500">
|
||||
<span>{entry.feeds.title}</span>
|
||||
<span>·</span>
|
||||
<span>
|
||||
|
||||
@@ -12,7 +12,7 @@ export function PictureItem({ entry }: { entry: EntriesResponse[number] }) {
|
||||
<Image
|
||||
key={image}
|
||||
src={image}
|
||||
className="w-full aspect-square shrink-0 rounded-md object-cover"
|
||||
className="aspect-square w-full shrink-0 rounded-md object-cover"
|
||||
loading="lazy"
|
||||
proxy={{
|
||||
width: 600,
|
||||
@@ -21,11 +21,11 @@ export function PictureItem({ entry }: { entry: EntriesResponse[number] }) {
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
<div className="line-clamp-5 text-sm flex-1 px-2 pb-3 pt-1">
|
||||
<div className="font-medium line-clamp-2">{entry.title}</div>
|
||||
<div className="line-clamp-5 flex-1 px-2 pb-3 pt-1 text-sm">
|
||||
<div className="line-clamp-2 font-medium">{entry.title}</div>
|
||||
<div className="space-x-1 text-[13px]">
|
||||
<FeedIcon
|
||||
className="w-3.5 h-3.5 inline-block mr-0 align-sub"
|
||||
className="mr-0 inline-block size-3.5 align-sub"
|
||||
feed={entry.feeds}
|
||||
/>
|
||||
<span>{entry.feeds.title}</span>
|
||||
|
||||
@@ -5,10 +5,10 @@ import { FeedIcon } from "@renderer/components/feed-icon"
|
||||
|
||||
export function SocialMediaItem({ entry }: { entry: EntriesResponse[number] }) {
|
||||
return (
|
||||
<div className="flex my-5 px-2 py-3">
|
||||
<div className="my-5 flex px-2 py-3">
|
||||
<FeedIcon feed={entry.feeds} />
|
||||
<div>
|
||||
<div className="line-clamp-5 text-sm flex-1 -mt-0.5">
|
||||
<div className="-mt-0.5 line-clamp-5 flex-1 text-sm">
|
||||
<div className="space-x-1">
|
||||
<span className="font-medium">{entry.author}</span>
|
||||
<span className="text-zinc-500">·</span>
|
||||
@@ -23,12 +23,12 @@ export function SocialMediaItem({ entry }: { entry: EntriesResponse[number] }) {
|
||||
</div>
|
||||
<div className="mt-0.5">{entry.description}</div>
|
||||
</div>
|
||||
<div className="flex gap-2 overflow-x-auto mt-1">
|
||||
<div className="mt-1 flex gap-2 overflow-x-auto">
|
||||
{entry.images?.map((image) => (
|
||||
<Image
|
||||
key={image}
|
||||
src={image}
|
||||
className="w-28 h-28 shrink-0"
|
||||
className="size-28 shrink-0"
|
||||
loading="lazy"
|
||||
proxy={{
|
||||
width: 224,
|
||||
|
||||
@@ -11,7 +11,7 @@ export function VideoItem({ entry }: { entry: EntriesResponse[number] }) {
|
||||
<Image
|
||||
key={entry.images?.[0]}
|
||||
src={entry.images?.[0]}
|
||||
className="w-full aspect-video shrink-0 rounded-md object-cover"
|
||||
className="aspect-video w-full shrink-0 rounded-md object-cover"
|
||||
loading="lazy"
|
||||
proxy={{
|
||||
width: 640,
|
||||
@@ -19,11 +19,11 @@ export function VideoItem({ entry }: { entry: EntriesResponse[number] }) {
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div className="line-clamp-5 text-sm flex-1 px-2 pb-3 pt-1">
|
||||
<div className="font-medium line-clamp-2">{entry.title}</div>
|
||||
<div className="line-clamp-5 flex-1 px-2 pb-3 pt-1 text-sm">
|
||||
<div className="line-clamp-2 font-medium">{entry.title}</div>
|
||||
<div className="space-x-1 text-[13px]">
|
||||
<FeedIcon
|
||||
className="w-3.5 h-3.5 inline-block mr-0 align-sub"
|
||||
className="mr-0 inline-block size-3.5 align-sub"
|
||||
feed={entry.feeds}
|
||||
/>
|
||||
<span>{entry.author}</span>
|
||||
|
||||
@@ -26,7 +26,7 @@ export function EntryContent({ entryId }: { entryId: ActiveEntry }) {
|
||||
<>
|
||||
<EntryShare entry={entry.data} view={0} />
|
||||
<m.div
|
||||
className="px-5 py-5 overflow-y-auto h-[calc(100%-3.5rem)]"
|
||||
className="h-[calc(100%-3.5rem)] overflow-y-auto p-5"
|
||||
initial={{ opacity: 0.01, y: 100 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
exit={{ opacity: 0.01, y: -100 }}
|
||||
@@ -36,12 +36,13 @@ export function EntryContent({ entryId }: { entryId: ActiveEntry }) {
|
||||
<a
|
||||
href={entry.data?.url}
|
||||
target="_blank"
|
||||
className="block hover:bg-zinc-100 max-w-[598px] mx-auto p-6 rounded-md transition-colors"
|
||||
className="mx-auto block max-w-[598px] rounded-md p-6 transition-colors hover:bg-zinc-100"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<div className="text-3xl font-bold select-text break-words">
|
||||
<div className="select-text break-words text-3xl font-bold">
|
||||
{entry.data?.title}
|
||||
</div>
|
||||
<div className="mt-2 text-[13px] text-zinc-500 font-medium">
|
||||
<div className="mt-2 text-[13px] font-medium text-zinc-500">
|
||||
{entry.data?.feeds?.title}
|
||||
</div>
|
||||
<div className="text-[13px] text-zinc-500">
|
||||
@@ -49,7 +50,7 @@ export function EntryContent({ entryId }: { entryId: ActiveEntry }) {
|
||||
new Date(entry.data?.publishedAt).toUTCString()}
|
||||
</div>
|
||||
</a>
|
||||
<div className="max-w-[550px] mx-auto mt-10 mb-32 prose text-[15px] prose-zinc select-text cursor-auto">
|
||||
<div className="prose prose-zinc mx-auto mb-32 mt-10 max-w-[550px] cursor-auto select-text text-[15px]">
|
||||
{content}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,15 +15,14 @@ export function EntryShare({
|
||||
view: number
|
||||
entry?: EntriesResponse[number]
|
||||
}) {
|
||||
if (!entry?.url) return null
|
||||
|
||||
const { items } = useEntryActions({
|
||||
view,
|
||||
entry,
|
||||
})
|
||||
if (!entry?.url) return null
|
||||
|
||||
return (
|
||||
<div className="px-5 h-14 flex items-center text-lg justify-end text-zinc-500 gap-3">
|
||||
<div className="flex h-14 items-center justify-end gap-3 px-5 text-lg text-zinc-500">
|
||||
<TooltipProvider>
|
||||
{items
|
||||
.filter((item) => !item.disabled)
|
||||
@@ -31,13 +30,13 @@ export function EntryShare({
|
||||
<Tooltip key={item.name}>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
className="flex items-center text-xl no-drag-region"
|
||||
className="no-drag-region flex items-center text-xl"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={item.onClick}
|
||||
>
|
||||
{item.icon ? (
|
||||
<img className="w-4 h-4 grayscale" src={item.icon} />
|
||||
<img className="size-4 grayscale" src={item.icon} />
|
||||
) : (
|
||||
<i className={item.className} />
|
||||
)}
|
||||
|
||||
@@ -6,9 +6,7 @@ import {
|
||||
FormControl,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
FormDescription,
|
||||
} from "@renderer/components/ui/form"
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query"
|
||||
import {
|
||||
|
||||
@@ -74,7 +74,7 @@ export function FeedCategory({
|
||||
<Dialog open={dialogOpen} onOpenChange={setDialogOpen}>
|
||||
<div
|
||||
className={cn(
|
||||
"flex items-center justify-between font-medium text-sm leading-loose px-2.5 py-[2px] rounded-md w-full transition-colors",
|
||||
"flex w-full items-center justify-between rounded-md px-2.5 py-[2px] text-sm font-medium leading-loose transition-colors",
|
||||
activeList?.level === levels.folder &&
|
||||
activeList.name === data.name &&
|
||||
"bg-native-active",
|
||||
@@ -113,10 +113,10 @@ export function FeedCategory({
|
||||
)
|
||||
}}
|
||||
>
|
||||
<div className="flex items-center min-w-0 w-full">
|
||||
<div className="flex w-full min-w-0 items-center">
|
||||
<CollapsibleTrigger
|
||||
className={cn(
|
||||
"flex items-center h-7 [&_.i-mingcute-right-fill]:data-[state=open]:rotate-90",
|
||||
"flex h-7 items-center [&_.i-mingcute-right-fill]:data-[state=open]:rotate-90",
|
||||
!setActiveList && "flex-1",
|
||||
)}
|
||||
>
|
||||
@@ -128,7 +128,7 @@ export function FeedCategory({
|
||||
{setActiveList && <span className="truncate">{data.name}</span>}
|
||||
</div>
|
||||
{!!data.unread && (
|
||||
<div className="text-xs text-zinc-500 ml-2">{data.unread}</div>
|
||||
<div className="ml-2 text-xs text-zinc-500">{data.unread}</div>
|
||||
)}
|
||||
<CategoryRenameDialog
|
||||
feedIdList={feedIdList}
|
||||
@@ -163,7 +163,7 @@ export function FeedCategory({
|
||||
key={feed.feedId}
|
||||
feed={feed}
|
||||
view={view}
|
||||
className={!!data.name ? "pl-6" : "pl-2.5"}
|
||||
className={data.name ? "pl-6" : "pl-2.5"}
|
||||
/>
|
||||
))}
|
||||
</m.div>
|
||||
|
||||
@@ -57,7 +57,7 @@ export function FeedColumn() {
|
||||
|
||||
return (
|
||||
<div
|
||||
className="h-full flex flex-col gap-3"
|
||||
className="flex h-full flex-col gap-3"
|
||||
onClick={() =>
|
||||
setActiveList?.({
|
||||
level: levels.view,
|
||||
@@ -70,7 +70,7 @@ export function FeedColumn() {
|
||||
>
|
||||
<div className="ml-5 mr-3 flex items-center justify-between">
|
||||
<div
|
||||
className="font-bold text-xl flex items-center gap-1"
|
||||
className="flex items-center gap-1 text-xl font-bold"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
setActiveList?.({
|
||||
@@ -92,12 +92,12 @@ export function FeedColumn() {
|
||||
</Button>
|
||||
<Button variant="ghost" size="sm">
|
||||
<Link to={`/follow`} className="flex">
|
||||
<i className="i-mingcute-add-line h-5 w-5 text-zinc-500" />
|
||||
<i className="i-mingcute-add-line size-5 text-zinc-500" />
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex text-zinc-500 w-full justify-between text-xl px-3">
|
||||
<div className="flex w-full justify-between px-3 text-xl text-zinc-500">
|
||||
<TooltipProvider>
|
||||
{views.map((item, index) => (
|
||||
<Tooltip key={item.name}>
|
||||
@@ -128,14 +128,14 @@ export function FeedColumn() {
|
||||
))}
|
||||
</TooltipProvider>
|
||||
</div>
|
||||
<div className="w-full h-full overflow-clip" ref={carouselRef}>
|
||||
<m.div className="h-full flex" style={{ x: spring }}>
|
||||
<div className="size-full overflow-hidden" ref={carouselRef}>
|
||||
<m.div className="flex h-full" style={{ x: spring }}>
|
||||
{views.map((item, index) => (
|
||||
<section
|
||||
key={item.name}
|
||||
className="snap-center shrink-0 overflow-y-auto"
|
||||
className="shrink-0 snap-center overflow-y-auto"
|
||||
>
|
||||
<FeedList className="w-64 px-3 mb-6" view={index} />
|
||||
<FeedList className="mb-6 w-64 px-3" view={index} />
|
||||
</section>
|
||||
))}
|
||||
</m.div>
|
||||
|
||||
@@ -60,7 +60,7 @@ export function FeedItem({
|
||||
duration: 3000,
|
||||
description: (
|
||||
<>
|
||||
Feed <i className="font-semibold mr-px">{variables.feeds.title}</i>{" "}
|
||||
Feed <i className="mr-px font-semibold">{variables.feeds.title}</i>{" "}
|
||||
has been unfollowed.
|
||||
</>
|
||||
),
|
||||
@@ -93,7 +93,7 @@ export function FeedItem({
|
||||
<Dialog key={feed.feedId} open={dialogOpen} onOpenChange={setDialogOpen}>
|
||||
<div
|
||||
className={cn(
|
||||
"flex items-center justify-between text-sm font-medium leading-loose w-full pr-2.5 py-[2px] rounded-md",
|
||||
"flex w-full items-center justify-between rounded-md py-[2px] pr-2.5 text-sm font-medium leading-loose",
|
||||
activeList?.level === levels.feed &&
|
||||
activeList.id === feed.feedId &&
|
||||
"bg-native-active",
|
||||
@@ -146,17 +146,17 @@ export function FeedItem({
|
||||
>
|
||||
<div
|
||||
className={cn(
|
||||
"flex items-center min-w-0",
|
||||
"flex min-w-0 items-center",
|
||||
feed.feeds.errorAt && "text-red-900",
|
||||
)}
|
||||
>
|
||||
<FeedIcon feed={feed.feeds} className="w-4 h-4" />
|
||||
<FeedIcon feed={feed.feeds} className="size-4" />
|
||||
<div className="truncate">{feed.feeds.title}</div>
|
||||
{feed.feeds.errorAt && (
|
||||
<TooltipProvider delayDuration={300}>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<i className="i-mingcute-wifi-off-line shrink-0 ml-1 text-base" />
|
||||
<i className="i-mingcute-wifi-off-line ml-1 shrink-0 text-base" />
|
||||
</TooltipTrigger>
|
||||
<TooltipPortal>
|
||||
<TooltipContent>
|
||||
@@ -176,7 +176,7 @@ export function FeedItem({
|
||||
<TooltipProvider delayDuration={300}>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<i className="i-mingcute-eye-close-line shrink-0 ml-1 text-base" />
|
||||
<i className="i-mingcute-eye-close-line ml-1 shrink-0 text-base" />
|
||||
</TooltipTrigger>
|
||||
<TooltipPortal>
|
||||
<TooltipContent>
|
||||
@@ -188,7 +188,7 @@ export function FeedItem({
|
||||
)}
|
||||
</div>
|
||||
{!!feed.unread && (
|
||||
<div className="text-xs text-zinc-500 ml-2">{feed.unread}</div>
|
||||
<div className="ml-2 text-xs text-zinc-500">{feed.unread}</div>
|
||||
)}
|
||||
<FollowDialog
|
||||
feed={feed}
|
||||
|
||||
@@ -22,7 +22,7 @@ export function FeedList({
|
||||
<div className={className}>
|
||||
{!hideTitle && (
|
||||
<div
|
||||
className={cn("flex items-center justify-between mb-2 px-2.5 py-1")}
|
||||
className={cn("mb-2 flex items-center justify-between px-2.5 py-1")}
|
||||
>
|
||||
<div
|
||||
className="font-bold"
|
||||
@@ -39,7 +39,7 @@ export function FeedList({
|
||||
>
|
||||
{view !== undefined && views[view].name}
|
||||
</div>
|
||||
<div className="text-sm text-zinc-500 ml-2 flex items-center gap-3">
|
||||
<div className="ml-2 flex items-center gap-3 text-sm text-zinc-500">
|
||||
{expansion ? (
|
||||
<i
|
||||
className="i-mingcute-list-collapse-fill"
|
||||
|
||||
@@ -16,7 +16,7 @@ export function FeedIcon({
|
||||
return (
|
||||
<Image
|
||||
src={feed.image}
|
||||
className={cn("w-5 h-5 mr-2 rounded-sm shrink-0", className)}
|
||||
className={cn("mr-2 size-5 shrink-0 rounded-sm", className)}
|
||||
proxy={{
|
||||
width: 40,
|
||||
height: 40,
|
||||
|
||||
@@ -9,21 +9,26 @@ export function FollowSummary({
|
||||
docs?: string
|
||||
}) {
|
||||
return (
|
||||
<div className="select-text text-sm space-y-1 max-w-[462px]">
|
||||
<a href={feed.siteUrl} target="_blank" className="flex items-center">
|
||||
<div className="max-w-[462px] select-text space-y-1 text-sm">
|
||||
<a
|
||||
href={feed.siteUrl}
|
||||
target="_blank"
|
||||
className="flex items-center"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<FeedIcon
|
||||
feed={feed}
|
||||
fallbackUrl={docs}
|
||||
className="w-8 h-8 mr-2 shrink-0"
|
||||
className="mr-2 size-8 shrink-0"
|
||||
/>
|
||||
<div className="leading-tight font-semibold text-base truncate">
|
||||
<div className="truncate text-base font-semibold leading-tight">
|
||||
{feed.title}
|
||||
<div className="font-normal truncate text-xs text-zinc-500">
|
||||
<div className="truncate text-xs font-normal text-zinc-500">
|
||||
{feed.description}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<div className="text-zinc-500 flex items-center gap-1 truncate">
|
||||
<div className="flex items-center gap-1 truncate text-zinc-500">
|
||||
<i className="i-mingcute-right-line shrink-0" />
|
||||
{feed.url || docs}
|
||||
</div>
|
||||
|
||||
@@ -100,7 +100,7 @@ export function FollowForm({ type }: { type: string }) {
|
||||
<Form {...form}>
|
||||
<form
|
||||
onSubmit={form.handleSubmit(onSubmit)}
|
||||
className="space-y-8 w-[512px]"
|
||||
className="w-[512px] space-y-8"
|
||||
>
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -121,8 +121,8 @@ export function FollowForm({ type }: { type: string }) {
|
||||
</form>
|
||||
</Form>
|
||||
{mutation.isSuccess && (
|
||||
<div className="max-w-lg mt-8">
|
||||
<div className="text-zinc-500 mb-4">
|
||||
<div className="mt-8 max-w-lg">
|
||||
<div className="mb-4 text-zinc-500">
|
||||
Found {mutation.data?.length || 0} feed
|
||||
{mutation.data?.length > 1 && "s"}
|
||||
</div>
|
||||
@@ -134,7 +134,7 @@ export function FollowForm({ type }: { type: string }) {
|
||||
</CardHeader>
|
||||
{item.docs ? (
|
||||
<CardFooter>
|
||||
<a href={item.docs} target="_blank">
|
||||
<a href={item.docs} target="_blank" rel="noreferrer">
|
||||
<Button>View Docs</Button>
|
||||
</a>
|
||||
</CardFooter>
|
||||
@@ -150,7 +150,8 @@ export function FollowForm({ type }: { type: string }) {
|
||||
key={entry.id}
|
||||
href={entry.url}
|
||||
target="_blank"
|
||||
className="flex items-center gap-1 flex-col min-w-0 flex-1"
|
||||
className="flex min-w-0 flex-1 flex-col items-center gap-1"
|
||||
rel="noreferrer"
|
||||
>
|
||||
{entry.images?.[0] ? (
|
||||
<Image
|
||||
@@ -158,7 +159,7 @@ export function FollowForm({ type }: { type: string }) {
|
||||
className="aspect-square w-full"
|
||||
/>
|
||||
) : (
|
||||
<div className="bg-stone-100 rounded text-zinc-500 p-2 overflow-hidden w-full aspect-square text-xs leading-tight flex">
|
||||
<div className="flex aspect-square w-full overflow-hidden rounded bg-stone-100 p-2 text-xs leading-tight text-zinc-500">
|
||||
{entry.title}
|
||||
</div>
|
||||
)}
|
||||
@@ -179,7 +180,7 @@ export function FollowForm({ type }: { type: string }) {
|
||||
<FollowButton feed={item.feed} />
|
||||
)}
|
||||
<div className="ml-6 text-zinc-500">
|
||||
<span className="text-zinc-800 font-medium">
|
||||
<span className="font-medium text-zinc-800">
|
||||
{item.subscriptionCount}
|
||||
</span>{" "}
|
||||
Followers
|
||||
|
||||
@@ -16,6 +16,7 @@ import { Card, CardContent, CardHeader } from "@renderer/components/ui/card"
|
||||
import { FollowSummary } from "../feed-summary"
|
||||
import { apiFetch } from "@renderer/lib/queries/api-fetch"
|
||||
import { cn } from "@renderer/lib/utils"
|
||||
import type { FeedResponse } from "@renderer/lib/types"
|
||||
|
||||
type FeedResponseList = {
|
||||
id: string
|
||||
@@ -85,7 +86,7 @@ export function FollowImport() {
|
||||
<Form {...form}>
|
||||
<form
|
||||
onSubmit={form.handleSubmit(onSubmit)}
|
||||
className="space-y-8 w-[512px]"
|
||||
className="w-[512px] space-y-8"
|
||||
>
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -114,9 +115,9 @@ export function FollowImport() {
|
||||
</form>
|
||||
</Form>
|
||||
{mutation.isSuccess && (
|
||||
<div className="max-w-lg mt-8">
|
||||
<div className="mt-8 max-w-lg">
|
||||
<Card>
|
||||
<CardHeader className="text-zinc-500 block">
|
||||
<CardHeader className="block text-zinc-500">
|
||||
<span className="font-bold text-zinc-800">
|
||||
{mutation.data?.successfulItems.length || 0}
|
||||
</span>{" "}
|
||||
@@ -134,7 +135,7 @@ export function FollowImport() {
|
||||
{list.map((item) => (
|
||||
<div key={item.key}>
|
||||
<div
|
||||
className={cn("font-medium text-lg mb-4", item.className)}
|
||||
className={cn("mb-4 text-lg font-medium", item.className)}
|
||||
>
|
||||
{item.title}
|
||||
</div>
|
||||
@@ -142,8 +143,8 @@ export function FollowImport() {
|
||||
{!mutation.data?.[item.key].length && (
|
||||
<div className="text-zinc-500">No items</div>
|
||||
)}
|
||||
{mutation.data?.[item.key].map((feed) => (
|
||||
<FollowSummary feed={feed} />
|
||||
{mutation.data?.[item.key].map((feed: FeedResponse) => (
|
||||
<FollowSummary key={feed.id} feed={feed} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export function Recommendations({ type }: { type: string }) {
|
||||
return (
|
||||
<div className="mt-8">
|
||||
<div className="font-medium text-lg">Suggested</div>
|
||||
<div className="text-lg font-medium">Suggested</div>
|
||||
<ul className="mt-2">
|
||||
<li>Suggestions1</li>
|
||||
<li>Suggestions2</li>
|
||||
|
||||
@@ -27,7 +27,7 @@ export function SiteIcon({
|
||||
return (
|
||||
<img
|
||||
src={src}
|
||||
className={cn("w-5 h-5 mr-2 rounded-sm shrink-0", className)}
|
||||
className={cn("mr-2 size-5 shrink-0 rounded-sm", className)}
|
||||
loading="lazy"
|
||||
onError={(e) => {
|
||||
if (fallback) {
|
||||
|
||||
@@ -41,7 +41,7 @@ export const AutoComplete = React.forwardRef<HTMLInputElement, InputProps>(
|
||||
)
|
||||
|
||||
return (
|
||||
<Command className="rounded-lg border overflow-visible relative [&_[cmdk-input-wrapper]]:border-0 [&_.lucide-search]:hidden">
|
||||
<Command className="relative overflow-visible rounded-lg border [&_.lucide-search]:hidden [&_[cmdk-input-wrapper]]:border-0">
|
||||
<CommandInput
|
||||
{...props}
|
||||
onBlur={(e) => {
|
||||
@@ -62,7 +62,7 @@ export const AutoComplete = React.forwardRef<HTMLInputElement, InputProps>(
|
||||
<CommandList>
|
||||
<CommandGroup
|
||||
className={cn(
|
||||
"absolute top-full bg-white w-full z-10 border rounded-lg mt-1 hidden [&[hidden]]:!hidden",
|
||||
"absolute top-full z-10 mt-1 hidden w-full rounded-lg border bg-white [&[hidden]]:!hidden",
|
||||
open && "block",
|
||||
)}
|
||||
>
|
||||
@@ -86,3 +86,4 @@ export const AutoComplete = React.forwardRef<HTMLInputElement, InputProps>(
|
||||
)
|
||||
},
|
||||
)
|
||||
AutoComplete.displayName = "AutoComplete"
|
||||
|
||||
@@ -10,7 +10,7 @@ const Avatar = React.forwardRef<
|
||||
<AvatarPrimitive.Root
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
||||
"relative flex size-10 shrink-0 overflow-hidden rounded-full",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
@@ -24,7 +24,7 @@ const AvatarImage = React.forwardRef<
|
||||
>(({ className, ...props }, ref) => (
|
||||
<AvatarPrimitive.Image
|
||||
ref={ref}
|
||||
className={cn("aspect-square h-full w-full", className)}
|
||||
className={cn("aspect-square size-full", className)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
@@ -37,7 +37,7 @@ const AvatarFallback = React.forwardRef<
|
||||
<AvatarPrimitive.Fallback
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
||||
"flex size-full items-center justify-center rounded-full bg-muted",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
|
||||
@@ -57,7 +57,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
||||
{...props}
|
||||
>
|
||||
{isLoading && (
|
||||
<i className="animate-spin i-mingcute-loading-3-line mr-2" />
|
||||
<i className="i-mingcute-loading-3-line mr-2 animate-spin" />
|
||||
)}
|
||||
{props.children}
|
||||
</Comp>
|
||||
|
||||
@@ -11,7 +11,7 @@ const Checkbox = React.forwardRef<
|
||||
<CheckboxPrimitive.Root
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
||||
"peer size-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
@@ -19,7 +19,7 @@ const Checkbox = React.forwardRef<
|
||||
<CheckboxPrimitive.Indicator
|
||||
className={cn("flex items-center justify-center text-current")}
|
||||
>
|
||||
<Check className="h-4 w-4" />
|
||||
<Check className="size-4" />
|
||||
</CheckboxPrimitive.Indicator>
|
||||
</CheckboxPrimitive.Root>
|
||||
))
|
||||
|
||||
@@ -13,7 +13,7 @@ const Command = React.forwardRef<
|
||||
<CommandPrimitive
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
||||
"flex size-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
@@ -27,7 +27,7 @@ const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
|
||||
return (
|
||||
<Dialog {...props}>
|
||||
<DialogContent className="overflow-hidden p-0 shadow-lg">
|
||||
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
|
||||
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5">
|
||||
{children}
|
||||
</Command>
|
||||
</DialogContent>
|
||||
@@ -39,8 +39,9 @@ const CommandInput = React.forwardRef<
|
||||
React.ElementRef<typeof CommandPrimitive.Input>,
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
|
||||
>(({ className, ...props }, ref) => (
|
||||
// eslint-disable-next-line react/no-unknown-property
|
||||
<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
|
||||
<Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
|
||||
<Search className="mr-2 size-4 shrink-0 opacity-50" />
|
||||
<CommandPrimitive.Input
|
||||
ref={ref}
|
||||
className={cn(
|
||||
|
||||
@@ -43,7 +43,7 @@ const DialogContent = React.forwardRef<
|
||||
>
|
||||
{children}
|
||||
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
|
||||
<X className="h-4 w-4" />
|
||||
<X className="size-4" />
|
||||
<span className="sr-only">Close</span>
|
||||
</DialogPrimitive.Close>
|
||||
</DialogPrimitive.Content>
|
||||
|
||||
@@ -35,11 +35,11 @@ export const Image = ({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={cn("bg-stone-100 rounded overflow-hidden", className)}>
|
||||
<div className={cn("overflow-hidden rounded bg-stone-100", className)}>
|
||||
<img
|
||||
{...props}
|
||||
onError={errorHandle}
|
||||
className={cn(hidden && "hidden", "object-cover size-full")}
|
||||
className={cn(hidden && "hidden", "size-full object-cover")}
|
||||
src={imgSrc}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,7 @@ const SelectTrigger = React.forwardRef<
|
||||
>
|
||||
{children}
|
||||
<SelectPrimitive.Icon asChild>
|
||||
<ChevronDown className="h-4 w-4 opacity-50" />
|
||||
<ChevronDown className="size-4 opacity-50" />
|
||||
</SelectPrimitive.Icon>
|
||||
</SelectPrimitive.Trigger>
|
||||
))
|
||||
@@ -42,7 +42,7 @@ const SelectScrollUpButton = React.forwardRef<
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
<ChevronUp className="h-4 w-4" />
|
||||
<ChevronUp className="size-4" />
|
||||
</SelectPrimitive.ScrollUpButton>
|
||||
))
|
||||
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName
|
||||
@@ -59,7 +59,7 @@ const SelectScrollDownButton = React.forwardRef<
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
<ChevronDown className="h-4 w-4" />
|
||||
<ChevronDown className="size-4" />
|
||||
</SelectPrimitive.ScrollDownButton>
|
||||
))
|
||||
SelectScrollDownButton.displayName =
|
||||
@@ -73,7 +73,7 @@ const SelectContent = React.forwardRef<
|
||||
<SelectPrimitive.Content
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
||||
"relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
||||
position === "popper" &&
|
||||
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
||||
className,
|
||||
@@ -121,9 +121,9 @@ const SelectItem = React.forwardRef<
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
||||
<span className="absolute left-2 flex size-3.5 items-center justify-center">
|
||||
<SelectPrimitive.ItemIndicator>
|
||||
<Check className="h-4 w-4" />
|
||||
<Check className="size-4" />
|
||||
</SelectPrimitive.ItemIndicator>
|
||||
</span>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ const Switch = React.forwardRef<
|
||||
>
|
||||
<SwitchPrimitives.Thumb
|
||||
className={cn(
|
||||
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
||||
"pointer-events-none block size-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
||||
)}
|
||||
/>
|
||||
</SwitchPrimitives.Root>
|
||||
|
||||
@@ -12,7 +12,7 @@ const TabsList = React.forwardRef<
|
||||
<TabsPrimitive.List
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"inline-flex items-center justify-center text-muted-foreground border-b",
|
||||
"inline-flex items-center justify-center border-b text-muted-foreground",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
@@ -27,7 +27,7 @@ const TabsTrigger = React.forwardRef<
|
||||
<TabsPrimitive.Trigger
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"inline-flex items-center justify-center whitespace-nowrap px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-transparent data-[state=active]:border-foreground border-b-2 data-[state=active]:text-foreground",
|
||||
"inline-flex items-center justify-center whitespace-nowrap border-b-2 border-transparent px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-foreground data-[state=active]:text-foreground",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
|
||||
@@ -81,7 +81,7 @@ const ToastClose = React.forwardRef<
|
||||
toast-close=""
|
||||
{...props}
|
||||
>
|
||||
<X className="h-4 w-4" />
|
||||
<X className="size-4" />
|
||||
</ToastPrimitives.Close>
|
||||
))
|
||||
ToastClose.displayName = ToastPrimitives.Close.displayName
|
||||
|
||||
@@ -22,11 +22,11 @@ export function UserButton({
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"h-20 flex items-center gap-2 justify-center py-2 px-5 rounded-xl font-medium bg-stone-300 text-zinc-600",
|
||||
"flex h-20 items-center justify-center gap-2 rounded-xl bg-stone-300 px-5 py-2 font-medium text-zinc-600",
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<Avatar className="w-auto h-full aspect-square">
|
||||
<Avatar className="aspect-square h-full w-auto">
|
||||
<AvatarImage src={session?.user?.image || undefined} />
|
||||
<AvatarFallback>{session?.user?.name?.slice(0, 2)}</AvatarFallback>
|
||||
</Avatar>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { useToast } from "@renderer/components/ui/use-toast"
|
||||
import { ofetch } from "ofetch"
|
||||
import { ofetch, type FetchError } from "ofetch"
|
||||
import {
|
||||
QueryKey,
|
||||
useMutation,
|
||||
useQuery,
|
||||
useQueryClient,
|
||||
type InfiniteData,
|
||||
} from "@tanstack/react-query"
|
||||
import { client } from "@renderer/lib/client"
|
||||
import { EntriesResponse, ListResponse } from "@renderer/lib/types"
|
||||
@@ -23,8 +24,8 @@ export const useEntryActions = ({
|
||||
try {
|
||||
await ofetch("http://localhost:41595")
|
||||
return true
|
||||
} catch (error: any) {
|
||||
return error.data?.code === 401
|
||||
} catch (error: unknown) {
|
||||
return (error as FetchError).data?.code === 401
|
||||
}
|
||||
},
|
||||
})
|
||||
@@ -50,15 +51,20 @@ export const useEntryActions = ({
|
||||
const entriesData = queryClient.getQueriesData({
|
||||
queryKey: ["entries"],
|
||||
})
|
||||
entriesData.forEach(([key, data]: [QueryKey, any]) => {
|
||||
const list = (data?.pages?.[0] as ListResponse<EntriesResponse>).data
|
||||
list?.forEach((item) => {
|
||||
if (item.id === entry.id) {
|
||||
item.collections = target
|
||||
queryClient.setQueryData(key, data)
|
||||
}
|
||||
})
|
||||
})
|
||||
entriesData.forEach(
|
||||
([key, data]: [
|
||||
QueryKey,
|
||||
InfiniteData<ListResponse<EntriesResponse>>,
|
||||
]) => {
|
||||
const list = data?.pages?.[0]?.data
|
||||
list?.forEach((item) => {
|
||||
if (item.id === entry.id) {
|
||||
item.collections = target
|
||||
queryClient.setQueryData(key, data)
|
||||
}
|
||||
})
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
const collect = useMutation({
|
||||
|
||||
@@ -13,7 +13,7 @@ export const apiFetch = ofetch.create({
|
||||
if (options.body instanceof FormData) {
|
||||
options.body.append("csrfToken", csrfToken)
|
||||
} else {
|
||||
;(options.body as Record<string, any>).csrfToken = csrfToken
|
||||
;(options.body as Record<string, unknown>).csrfToken = csrfToken
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -44,7 +44,7 @@ export function Component() {
|
||||
]
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-8 items-center justify-center w-full overflow-y-auto">
|
||||
<div className="flex w-full flex-col items-center justify-center gap-8 overflow-y-auto">
|
||||
<div className="text-2xl font-bold">Follow</div>
|
||||
<Tabs defaultValue="General">
|
||||
<TabsList className="w-full">
|
||||
@@ -59,7 +59,7 @@ export function Component() {
|
||||
))}
|
||||
</TabsList>
|
||||
{tabs.map((tab) => (
|
||||
<TabsContent key={tab.name} value={tab.name} className="h-96 mt-8">
|
||||
<TabsContent key={tab.name} value={tab.name} className="mt-8 h-96">
|
||||
{tab.value === "import" ? (
|
||||
<FollowImport />
|
||||
) : (
|
||||
|
||||
@@ -17,7 +17,7 @@ export function Component() {
|
||||
<>
|
||||
<div
|
||||
className={cn(
|
||||
"pt-10 border-r shrink-0 h-full overflow-y-auto",
|
||||
"h-full shrink-0 overflow-y-auto border-r pt-10",
|
||||
activeList && wideMode.includes(activeList.view)
|
||||
? "flex-1"
|
||||
: "w-[340px]",
|
||||
|
||||
@@ -9,7 +9,7 @@ export function Component() {
|
||||
useMainLayoutContext()
|
||||
return (
|
||||
<div className="flex h-full">
|
||||
<div className="w-64 pt-10 border-r shrink-0 bg-native">
|
||||
<div className="w-64 shrink-0 border-r bg-native pt-10">
|
||||
<FeedColumn />
|
||||
</div>
|
||||
<MainLayoutOutlet
|
||||
|
||||
@@ -12,21 +12,21 @@ export function Component() {
|
||||
const { data: session } = useSession()
|
||||
|
||||
return (
|
||||
<div className="flex gap-10 w-full px-10 py-16">
|
||||
<div className="flex flex-col gap-8 flex-1 pt-20 min-w-40">
|
||||
<Avatar className="w-32 h-32 aspect-square">
|
||||
<div className="flex w-full gap-10 px-10 py-16">
|
||||
<div className="flex min-w-40 flex-1 flex-col gap-8 pt-20">
|
||||
<Avatar className="aspect-square size-32">
|
||||
<AvatarImage src={session?.user?.image || undefined} />
|
||||
<AvatarFallback>{session?.user?.name?.slice(0, 2)}</AvatarFallback>
|
||||
</Avatar>
|
||||
<div className="font-bold text-4xl">{session?.user?.name}</div>
|
||||
<div className="text-4xl font-bold">{session?.user?.name}</div>
|
||||
</div>
|
||||
<div className="flex-[2] flex flex-col gap-8">
|
||||
<div className="h-full flex flex-col gap-4">
|
||||
<div className="font-bold text-2xl">Subscriptions</div>
|
||||
<div className="flex flex-[2] flex-col gap-8">
|
||||
<div className="flex h-full flex-col gap-4">
|
||||
<div className="text-2xl font-bold">Subscriptions</div>
|
||||
<div className="overflow-y-auto">
|
||||
{views.map((view, index) => (
|
||||
<div key={view.name}>
|
||||
<div className="font-semibold flex items-center gap-2 mb-1">
|
||||
<div className="mb-1 flex items-center gap-2 font-semibold">
|
||||
<span className={cn("flex", view.className)}>
|
||||
{view.icon}
|
||||
</span>
|
||||
|
||||
@@ -26,8 +26,8 @@ export function Component() {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="h-screen w-full flex items-center justify-center flex-col gap-10">
|
||||
<img src="./icon.svg" alt="logo" className="h-20 w-20" />
|
||||
<div className="flex h-screen w-full flex-col items-center justify-center gap-10">
|
||||
<img src="./icon.svg" alt="logo" className="size-20" />
|
||||
<h1 className="text-3xl font-bold">Log in to Follow</h1>
|
||||
{redirecting ? (
|
||||
<div>Redirecting</div>
|
||||
@@ -52,7 +52,7 @@ export function Component() {
|
||||
GitHub
|
||||
</Button>
|
||||
<Button
|
||||
className="text-lg bg-blue-500 hover:bg-blue-500/90"
|
||||
className="bg-blue-500 text-lg hover:bg-blue-500/90"
|
||||
size="xl"
|
||||
onClick={() =>
|
||||
signIn("google", {
|
||||
|
||||
@@ -27,9 +27,9 @@ export function Component() {
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="h-screen w-full flex items-center justify-center flex-col gap-10">
|
||||
<img src="./icon.svg" alt="logo" className="h-20 w-20" />
|
||||
<UserButton className="text-2xl bg-stone-100 px-10 py-4" />
|
||||
<div className="flex h-screen w-full flex-col items-center justify-center gap-10">
|
||||
<img src="./icon.svg" alt="logo" className="size-20" />
|
||||
<UserButton className="bg-stone-100 px-10 py-4 text-2xl" />
|
||||
<h1 className="text-3xl font-bold">
|
||||
Successfully connected to Follow Account
|
||||
</h1>
|
||||
|
||||
@@ -24,7 +24,7 @@ export function Component() {
|
||||
const tab = location.pathname.replace(/^\/settings\/?/, "")
|
||||
|
||||
return (
|
||||
<div className="flex flex-col h-screen">
|
||||
<div className="flex h-screen flex-col">
|
||||
{/* <div
|
||||
className="h-10 border-b flex items-center pl-20 text-sm font-medium"
|
||||
aria-hidden
|
||||
@@ -32,15 +32,15 @@ export function Component() {
|
||||
Follow Settings
|
||||
</div> */}
|
||||
<div className="flex flex-1">
|
||||
<div className="border-r w-44 p-3 bg-native pt-10">
|
||||
<div className="font-bold text-xl flex items-center gap-1 mx-2 mb-5">
|
||||
<div className="w-44 border-r bg-native p-3 pt-10">
|
||||
<div className="mx-2 mb-5 flex items-center gap-1 text-xl font-bold">
|
||||
<img src="./icon.svg" alt="logo" className="size-6" />
|
||||
Settings
|
||||
</div>
|
||||
{tabs.map((t) => (
|
||||
<Link
|
||||
key={t.path}
|
||||
className={`flex items-center font-medium text-[15px] leading-loose rounded-md transition-colors px-2.5 py-[3px] my-1 text-zinc-600 ${
|
||||
className={`my-1 flex items-center rounded-md px-2.5 py-[3px] text-[15px] font-medium leading-loose text-zinc-600 transition-colors ${
|
||||
tab === t.path ? "bg-native-active text-zinc-900" : ""
|
||||
}`}
|
||||
to={`/settings/${t.path}`}
|
||||
|
||||
Vendored
-2
@@ -1,5 +1,3 @@
|
||||
import { User } from "@auth/core/types"
|
||||
|
||||
declare module "@auth/core/types" {
|
||||
interface User {
|
||||
handle?: string | null
|
||||
|
||||
Reference in New Issue
Block a user