Compare commits

..
52 changed files with 660 additions and 1656 deletions

No files matched your search

+33 -11
View File
@@ -196,6 +196,7 @@
"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@babel/code-frame": "^7.27.1", "@babel/code-frame": "^7.27.1",
"@babel/generator": "^7.28.5", "@babel/generator": "^7.28.5",
@@ -1831,6 +1832,7 @@
} }
], ],
"license": "MIT", "license": "MIT",
"peer": true,
"engines": { "engines": {
"node": ">=18" "node": ">=18"
}, },
@@ -1854,6 +1856,7 @@
} }
], ],
"license": "MIT", "license": "MIT",
"peer": true,
"engines": { "engines": {
"node": ">=18" "node": ">=18"
} }
@@ -1875,6 +1878,7 @@
"resolved": "https://registry.npmjs.org/@dnd-kit/core/-/core-6.3.1.tgz", "resolved": "https://registry.npmjs.org/@dnd-kit/core/-/core-6.3.1.tgz",
"integrity": "sha512-xkGBRQQab4RLwgXxoqETICr6S5JlogafbhNsidmrkVv2YRs5MLwpjoF2qpiGjQt8S9AoxtIV603s0GIUpY5eYQ==", "integrity": "sha512-xkGBRQQab4RLwgXxoqETICr6S5JlogafbhNsidmrkVv2YRs5MLwpjoF2qpiGjQt8S9AoxtIV603s0GIUpY5eYQ==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@dnd-kit/accessibility": "^3.1.1", "@dnd-kit/accessibility": "^3.1.1",
"@dnd-kit/utilities": "^3.2.2", "@dnd-kit/utilities": "^3.2.2",
@@ -5459,8 +5463,7 @@
"resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",
"integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT"
"peer": true
}, },
"node_modules/@types/cacheable-request": { "node_modules/@types/cacheable-request": {
"version": "6.0.3", "version": "6.0.3",
@@ -5702,6 +5705,7 @@
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.20.tgz", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.20.tgz",
"integrity": "sha512-IPaCZN7PShZK/3t6Q87pfTkRm6oLTd4vztyoj+cbHUF1g3FfVb2tFIL79uCRKEfv16AhqDMBywP2VW3KIZUvcg==", "integrity": "sha512-IPaCZN7PShZK/3t6Q87pfTkRm6oLTd4vztyoj+cbHUF1g3FfVb2tFIL79uCRKEfv16AhqDMBywP2VW3KIZUvcg==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@types/prop-types": "*", "@types/prop-types": "*",
"csstype": "^3.0.2" "csstype": "^3.0.2"
@@ -5713,6 +5717,7 @@
"integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==",
"devOptional": true, "devOptional": true,
"license": "MIT", "license": "MIT",
"peer": true,
"peerDependencies": { "peerDependencies": {
"@types/react": "^18.0.0" "@types/react": "^18.0.0"
} }
@@ -5817,6 +5822,7 @@
"integrity": "sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q==", "integrity": "sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "8.31.1", "@typescript-eslint/scope-manager": "8.31.1",
"@typescript-eslint/types": "8.31.1", "@typescript-eslint/types": "8.31.1",
@@ -6176,6 +6182,7 @@
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"license": "MIT", "license": "MIT",
"peer": true,
"bin": { "bin": {
"acorn": "bin/acorn" "acorn": "bin/acorn"
}, },
@@ -6679,6 +6686,7 @@
} }
], ],
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"baseline-browser-mapping": "^2.8.19", "baseline-browser-mapping": "^2.8.19",
"caniuse-lite": "^1.0.30001751", "caniuse-lite": "^1.0.30001751",
@@ -6947,6 +6955,7 @@
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"anymatch": "~3.1.2", "anymatch": "~3.1.2",
"braces": "~3.0.2", "braces": "~3.0.2",
@@ -7747,8 +7756,7 @@
"resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz",
"integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT"
"peer": true
}, },
"node_modules/dom-helpers": { "node_modules/dom-helpers": {
"version": "5.2.1", "version": "5.2.1",
@@ -7832,7 +7840,8 @@
"version": "8.6.0", "version": "8.6.0",
"resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-8.6.0.tgz", "resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-8.6.0.tgz",
"integrity": "sha512-SjWyZBHJPbqxHOzckOfo8lHisEaJWmwd23XppYFYVh10bU66/Pn5tkVkbkCMZVdbUE5eTCI2nD8OyIP4Z+uwkA==", "integrity": "sha512-SjWyZBHJPbqxHOzckOfo8lHisEaJWmwd23XppYFYVh10bU66/Pn5tkVkbkCMZVdbUE5eTCI2nD8OyIP4Z+uwkA==",
"license": "MIT" "license": "MIT",
"peer": true
}, },
"node_modules/embla-carousel-react": { "node_modules/embla-carousel-react": {
"version": "8.6.0", "version": "8.6.0",
@@ -8146,6 +8155,7 @@
"integrity": "sha512-QldCVh/ztyKJJZLr4jXNUByx3gR+TDYZCRXEktiZoUR3PGy4qCmSbkxcIle8GEwGpb5JBZazlaJ/CxLidXdEbQ==", "integrity": "sha512-QldCVh/ztyKJJZLr4jXNUByx3gR+TDYZCRXEktiZoUR3PGy4qCmSbkxcIle8GEwGpb5JBZazlaJ/CxLidXdEbQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.12.1", "@eslint-community/regexpp": "^4.12.1",
@@ -8411,6 +8421,7 @@
"resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz", "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz",
"integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==", "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"accepts": "^2.0.0", "accepts": "^2.0.0",
"body-parser": "^2.2.0", "body-parser": "^2.2.0",
@@ -9633,6 +9644,7 @@
} }
], ],
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@babel/runtime": "^7.27.6" "@babel/runtime": "^7.27.6"
}, },
@@ -10416,6 +10428,7 @@
"integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==", "integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"cssstyle": "^4.2.1", "cssstyle": "^4.2.1",
"data-urls": "^5.0.0", "data-urls": "^5.0.0",
@@ -10812,7 +10825,6 @@
"integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"bin": { "bin": {
"lz-string": "bin/bin.js" "lz-string": "bin/bin.js"
} }
@@ -12610,6 +12622,7 @@
} }
], ],
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"nanoid": "^3.3.8", "nanoid": "^3.3.8",
"picocolors": "^1.1.1", "picocolors": "^1.1.1",
@@ -12777,7 +12790,6 @@
"integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"ansi-regex": "^5.0.1", "ansi-regex": "^5.0.1",
"ansi-styles": "^5.0.0", "ansi-styles": "^5.0.0",
@@ -12793,7 +12805,6 @@
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"engines": { "engines": {
"node": ">=8" "node": ">=8"
} }
@@ -12804,7 +12815,6 @@
"integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"engines": { "engines": {
"node": ">=10" "node": ">=10"
}, },
@@ -12817,8 +12827,7 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT"
"peer": true
}, },
"node_modules/prismjs": { "node_modules/prismjs": {
"version": "1.30.0", "version": "1.30.0",
@@ -13026,6 +13035,7 @@
"resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
"integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"loose-envify": "^1.1.0" "loose-envify": "^1.1.0"
}, },
@@ -13052,6 +13062,7 @@
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
"integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"loose-envify": "^1.1.0", "loose-envify": "^1.1.0",
"scheduler": "^0.23.2" "scheduler": "^0.23.2"
@@ -13077,6 +13088,7 @@
"resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.56.1.tgz", "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.56.1.tgz",
"integrity": "sha512-qWAVokhSpshhcEuQDSANHx3jiAEFzu2HAaaQIzi/r9FNPm1ioAvuJSD4EuZzWd7Al7nTRKcKPnBKO7sRn+zavQ==", "integrity": "sha512-qWAVokhSpshhcEuQDSANHx3jiAEFzu2HAaaQIzi/r9FNPm1ioAvuJSD4EuZzWd7Al7nTRKcKPnBKO7sRn+zavQ==",
"license": "MIT", "license": "MIT",
"peer": true,
"engines": { "engines": {
"node": ">=18.0.0" "node": ">=18.0.0"
}, },
@@ -13125,6 +13137,7 @@
"resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-10.1.0.tgz", "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-10.1.0.tgz",
"integrity": "sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ==", "integrity": "sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@types/hast": "^3.0.0", "@types/hast": "^3.0.0",
"@types/mdast": "^4.0.0", "@types/mdast": "^4.0.0",
@@ -13706,6 +13719,7 @@
"integrity": "sha512-C5VvvgCCyfyotVITIAv+4efVytl5F7wt+/I2i9q9GZcEXW9BP52YYOXC58igUi+LFZVHukErIIqQSWwv/M3WRw==", "integrity": "sha512-C5VvvgCCyfyotVITIAv+4efVytl5F7wt+/I2i9q9GZcEXW9BP52YYOXC58igUi+LFZVHukErIIqQSWwv/M3WRw==",
"devOptional": true, "devOptional": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@types/estree": "1.0.7" "@types/estree": "1.0.7"
}, },
@@ -14820,6 +14834,7 @@
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz",
"integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==", "integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@alloc/quick-lru": "^5.2.0", "@alloc/quick-lru": "^5.2.0",
"arg": "^5.0.2", "arg": "^5.0.2",
@@ -15023,6 +15038,7 @@
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"engines": { "engines": {
"node": ">=12" "node": ">=12"
}, },
@@ -15318,6 +15334,7 @@
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
"devOptional": true, "devOptional": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"peer": true,
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
"tsserver": "bin/tsserver" "tsserver": "bin/tsserver"
@@ -15845,6 +15862,7 @@
"integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"esbuild": "^0.25.0", "esbuild": "^0.25.0",
"fdir": "^6.4.4", "fdir": "^6.4.4",
@@ -15989,6 +16007,7 @@
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"engines": { "engines": {
"node": ">=12" "node": ">=12"
}, },
@@ -16459,6 +16478,7 @@
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"fast-deep-equal": "^3.1.3", "fast-deep-equal": "^3.1.3",
"fast-uri": "^3.0.1", "fast-uri": "^3.0.1",
@@ -16535,6 +16555,7 @@
"integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==", "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"bin": { "bin": {
"rollup": "dist/bin/rollup" "rollup": "dist/bin/rollup"
}, },
@@ -16994,6 +17015,7 @@
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
"license": "MIT", "license": "MIT",
"peer": true,
"funding": { "funding": {
"url": "https://github.com/sponsors/colinhacks" "url": "https://github.com/sponsors/colinhacks"
} }
@@ -38,14 +38,7 @@ class JSONRPCClient {
} }
} }
/** async fetch(request) {
* Generic JSON-RPC call method
* @param {string} method - The RPC method name
* @param {object} params - Parameters for the method
* @param {number} timeout - Timeout in milliseconds (default: 10000)
* @returns {Promise} - Resolves with the result or rejects with error
*/
async call(method, params, timeout = 10000) {
const id = ++this.requestId; const id = ++this.requestId;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
@@ -54,25 +47,21 @@ class JSONRPCClient {
// Send JSON-RPC request to parent // Send JSON-RPC request to parent
window.parent.postMessage({ window.parent.postMessage({
jsonrpc: "2.0", jsonrpc: "2.0",
method, method: "fetch",
params, params: { request },
id, id,
}, "*"); }, "*");
// Timeout handling // Timeout after 10 seconds
setTimeout(() => { setTimeout(() => {
if (this.pendingRequests.has(id)) { if (this.pendingRequests.has(id)) {
this.pendingRequests.delete(id); this.pendingRequests.delete(id);
reject(new Error(`RPC call to ${method} with ID ${id} timed out`)); reject(new Error(`Timeout fetching: ${request.url}`));
} }
}, timeout); }, 10000);
}); });
} }
async fetch(request) {
return this.call("fetch", { request }, 10000);
}
handleResponse(message) { handleResponse(message) {
const { id, result, error } = message; const { id, result, error } = message;
const pending = this.pendingRequests.get(id); const pending = this.pendingRequests.get(id);
@@ -164,38 +153,6 @@ class ConsoleInterceptor {
} }
} }
// Nostr Bridge - proxies window.nostr calls to parent window
class NostrBridge {
constructor(rpcClient) {
this.rpcClient = rpcClient;
console.log('[NostrBridge] initializing...');
this.injectNostr();
}
injectNostr() {
// Create the window.nostr object
window.nostr = {
getPublicKey: () => this.callNostrMethod('getPublicKey', []),
signEvent: (event) => this.callNostrMethod('signEvent', [event]),
nip04: {
encrypt: (pubkey, plaintext) => this.callNostrMethod('nip04.encrypt', [pubkey, plaintext]),
decrypt: (pubkey, ciphertext) => this.callNostrMethod('nip04.decrypt', [pubkey, ciphertext]),
},
nip44: {
encrypt: (pubkey, plaintext) => this.callNostrMethod('nip44.encrypt', [pubkey, plaintext]),
decrypt: (pubkey, ciphertext) => this.callNostrMethod('nip44.decrypt', [pubkey, ciphertext]),
},
};
console.log('[NostrBridge] window.nostr injected');
}
async callNostrMethod(method, args) {
// Use the generic RPC client call method
// Extension prompts may take time, so use 30 second timeout
return this.rpcClient.call('nostr', { method, args }, 30000);
}
}
// Navigation Handler - manages iframe navigation and history // Navigation Handler - manages iframe navigation and history
class NavigationHandler { class NavigationHandler {
constructor() { constructor() {
@@ -362,8 +319,8 @@ class NavigationHandler {
// Main Fetch Client // Main Fetch Client
class FetchClient { class FetchClient {
constructor(rpcClient) { constructor() {
this.rpcClient = rpcClient; this.rpcClient = new JSONRPCClient();
this.consoleInterceptor = new ConsoleInterceptor(); this.consoleInterceptor = new ConsoleInterceptor();
this.navigationHandler = new NavigationHandler(); this.navigationHandler = new NavigationHandler();
this.init(); this.init();
@@ -436,8 +393,8 @@ class FetchClient {
active: navigator.serviceWorker.controller, active: navigator.serviceWorker.controller,
installing: null, installing: null,
waiting: null, waiting: null,
addEventListener: () => { }, addEventListener: () => {},
removeEventListener: () => { }, removeEventListener: () => {},
}); });
}; };
} }
@@ -612,14 +569,8 @@ const setupGlobalErrorHandlers = () => {
// Initialize // Initialize
setupGlobalErrorHandlers(); setupGlobalErrorHandlers();
const init = () => {
const rpcClient = new JSONRPCClient();
new FetchClient(rpcClient);
new NostrBridge(rpcClient);
}
if (document.readyState === "loading") { if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", init); document.addEventListener("DOMContentLoaded", () => new FetchClient());
} else { } else {
init(); new FetchClient();
} }
+2 -2
View File
@@ -99,7 +99,7 @@ export function AppLayout({
onClick={() => setIsSidebarVisible(false)} onClick={() => setIsSidebarVisible(false)}
/> />
{/* Sidebar - positioned above the backdrop */} {/* Sidebar - positioned above the backdrop */}
<div className="relative left-0 top-0 h-full w-72 max-w-[80vw] bg-background border-r shadow-lg z-10"> <div className="relative left-0 top-0 h-full w-80 max-w-[80vw] bg-background border-r shadow-lg z-10">
<ProjectSidebar <ProjectSidebar
selectedProject={selectedProject} selectedProject={selectedProject}
onSelectProject={(project) => { onSelectProject={(project) => {
@@ -123,7 +123,7 @@ export function AppLayout({
<div className="min-h-screen flex bg-background"> <div className="min-h-screen flex bg-background">
{/* Fixed Sidebar - show if showSidebar is true and sidebar is visible */} {/* Fixed Sidebar - show if showSidebar is true and sidebar is visible */}
{showSidebar && isSidebarVisible && ( {showSidebar && isSidebarVisible && (
<div className="w-72 border-r bg-sidebar transition-all duration-300"> <div className="w-80 border-r bg-sidebar transition-all duration-300">
<ProjectSidebar <ProjectSidebar
selectedProject={selectedProject} selectedProject={selectedProject}
onSelectProject={handleProjectSelect} onSelectProject={handleProjectSelect}
+51 -25
View File
@@ -35,25 +35,51 @@ export function AppShowcase() {
}, [config.showcaseModerator]); }, [config.showcaseModerator]);
const isModerator = user?.pubkey === MODERATOR_HEX; const isModerator = user?.pubkey === MODERATOR_HEX;
// Filter and shuffle submissions - memoized with stable dependency // Categorize and organize submissions - single pass for efficiency
const { templateApps, featuredApps, approvedApps } = useMemo(() => { const {
// Filter visible submissions displayedFeaturedApps,
const visibleSubmissions = submissions.filter(app => !app.isHidden); displayedTemplateApps,
moreApps
// Separate template apps from other apps } = useMemo(() => {
const templates = shuffleArray(visibleSubmissions.filter(app => app.appTags.includes('Template'))); const DISPLAY_LIMIT = 6;
const nonTemplateSubmissions = visibleSubmissions.filter(app => !app.appTags.includes('Template'));
// Single pass categorization
// Shuffle featured and approved apps for random display order const templates: typeof submissions = [];
const featured = shuffleArray(nonTemplateSubmissions.filter(app => app.isFeatured)); const featured: typeof submissions = [];
const approved = shuffleArray(nonTemplateSubmissions.filter(app => app.isApproved && !app.isFeatured)); const approved: typeof submissions = [];
for (const app of submissions) {
if (app.isHidden) continue;
const isTemplate = app.appTags.includes('Template');
const isFeatured = app.isFeatured;
const isApproved = app.isApproved;
if (isTemplate) {
templates.push(app);
} else if (isFeatured) {
featured.push(app);
} else if (isApproved) {
approved.push(app);
}
}
// Shuffle each category once
const shuffledTemplates = shuffleArray(templates);
const shuffledFeatured = shuffleArray(featured);
const shuffledApproved = shuffleArray(approved);
// Split into display and more sections
return { return {
templateApps: templates, displayedFeaturedApps: shuffledFeatured.slice(0, DISPLAY_LIMIT),
featuredApps: featured, displayedTemplateApps: shuffledTemplates.slice(0, DISPLAY_LIMIT),
approvedApps: approved, moreApps: [
...shuffledFeatured.slice(DISPLAY_LIMIT),
...shuffledTemplates.slice(DISPLAY_LIMIT),
...shuffledApproved,
],
}; };
}, [submissions]); // Only depend on submissions, not intermediate filtered arrays }, [submissions]);
// Don't show showcase if disabled in settings // Don't show showcase if disabled in settings
if (!config.showcaseEnabled) { if (!config.showcaseEnabled) {
@@ -124,7 +150,7 @@ export function AppShowcase() {
{/* Apps Grid */} {/* Apps Grid */}
<div className="space-y-12"> <div className="space-y-12">
{/* Featured Apps */} {/* Featured Apps */}
{featuredApps.length > 0 && ( {displayedFeaturedApps.length > 0 && (
<div> <div>
<div className="flex items-start gap-3 mb-6"> <div className="flex items-start gap-3 mb-6">
<div className="flex-none w-8 h-8 bg-yellow-100 dark:bg-yellow-900/30 rounded-lg flex items-center justify-center"> <div className="flex-none w-8 h-8 bg-yellow-100 dark:bg-yellow-900/30 rounded-lg flex items-center justify-center">
@@ -136,7 +162,7 @@ export function AppShowcase() {
</div> </div>
</div> </div>
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6"> <div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
{featuredApps.slice(0, 6).map((app) => ( {displayedFeaturedApps.map((app) => (
<AppShowcaseCard <AppShowcaseCard
key={app.id} key={app.id}
app={app} app={app}
@@ -149,7 +175,7 @@ export function AppShowcase() {
)} )}
{/* Templates Section */} {/* Templates Section */}
{templateApps.length > 0 && ( {displayedTemplateApps.length > 0 && (
<div> <div>
<div className="flex items-start gap-3 mb-6"> <div className="flex items-start gap-3 mb-6">
<div className="flex-none w-8 h-8 bg-purple-100 dark:bg-purple-900/30 rounded-lg flex items-center justify-center"> <div className="flex-none w-8 h-8 bg-purple-100 dark:bg-purple-900/30 rounded-lg flex items-center justify-center">
@@ -161,7 +187,7 @@ export function AppShowcase() {
</div> </div>
</div> </div>
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6"> <div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
{templateApps.slice(0, 6).map((app) => ( {displayedTemplateApps.map((app) => (
<AppShowcaseCard <AppShowcaseCard
key={app.id} key={app.id}
app={app} app={app}
@@ -173,8 +199,8 @@ export function AppShowcase() {
</div> </div>
)} )}
{/* More Apps (Approved) - Collapsible */} {/* More Apps (Remaining Featured, Templates, and Approved) - Collapsible */}
{approvedApps.length > 0 && ( {moreApps.length > 0 && (
<div> <div>
<Collapsible open={showAllApps} onOpenChange={setShowAllApps}> <Collapsible open={showAllApps} onOpenChange={setShowAllApps}>
<CollapsibleTrigger asChild> <CollapsibleTrigger asChild>
@@ -185,7 +211,7 @@ export function AppShowcase() {
</div> </div>
<div className="text-left"> <div className="text-left">
<h3 className="text-xl font-bold text-foreground"> <h3 className="text-xl font-bold text-foreground">
{t('moreAppsCount', { count: approvedApps.length })} {t('moreAppsCount', { count: moreApps.length })}
</h3> </h3>
<p className="text-sm text-muted-foreground"> <p className="text-sm text-muted-foreground">
{showAllApps ? t('clickToCollapse') : t('clickToViewMore')} {showAllApps ? t('clickToCollapse') : t('clickToViewMore')}
@@ -196,7 +222,7 @@ export function AppShowcase() {
</CollapsibleTrigger> </CollapsibleTrigger>
<CollapsibleContent> <CollapsibleContent>
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6"> <div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
{approvedApps.map((app) => ( {moreApps.map((app) => (
<AppShowcaseCard <AppShowcaseCard
key={app.id} key={app.id}
app={app} app={app}
+14 -127
View File
@@ -1,4 +1,4 @@
import { useState, useEffect, useCallback } from 'react'; import { useState, useEffect } from 'react';
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
import QRCode from 'qrcode'; import QRCode from 'qrcode';
import { CreditCard, Zap, ExternalLink, RefreshCw, Check, X, Clock, AlertCircle, Copy, RotateCcw, ArrowLeft, Gift, Plus, History, DollarSign, Printer, Download } from 'lucide-react'; import { CreditCard, Zap, ExternalLink, RefreshCw, Check, X, Clock, AlertCircle, Copy, RotateCcw, ArrowLeft, Gift, Plus, History, DollarSign, Printer, Download } from 'lucide-react';
@@ -85,33 +85,17 @@ const PRESET_AMOUNTS = [5, 10, 25, 50, 100];
interface LightningPaymentProps { interface LightningPaymentProps {
invoice: string; invoice: string;
amount: number; amount: number;
paymentId: string;
provider: AIProvider;
onClose: () => void; onClose: () => void;
onPaymentCompleted: () => void;
} }
function LightningPayment({ invoice, amount, paymentId, provider, onClose, onPaymentCompleted }: LightningPaymentProps) { function LightningPayment({ invoice, amount, onClose }: LightningPaymentProps) {
const { t } = useTranslation(); const { t } = useTranslation();
const { user } = useCurrentUser();
const { config } = useAppContext();
const queryClient = useQueryClient();
const [qrDataUrl, setQrDataUrl] = useState<string>(''); const [qrDataUrl, setQrDataUrl] = useState<string>('');
const [isWebLNAvailable, setIsWebLNAvailable] = useState(false); const [isWebLNAvailable, setIsWebLNAvailable] = useState(false);
const [isPayingWithWebLN, setIsPayingWithWebLN] = useState(false); const [isPayingWithWebLN, setIsPayingWithWebLN] = useState(false);
const [showCopiedTooltip, setShowCopiedTooltip] = useState(false); const [showCopiedTooltip, setShowCopiedTooltip] = useState(false);
const [paymentCompleted, setPaymentCompleted] = useState(false);
const { toast } = useToast(); const { toast } = useToast();
const formatCurrency = useCallback((amount: number) => {
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2,
maximumFractionDigits: 2,
}).format(amount);
}, []);
useEffect(() => { useEffect(() => {
// Generate QR code // Generate QR code
QRCode.toDataURL(invoice, { QRCode.toDataURL(invoice, {
@@ -129,98 +113,6 @@ function LightningPayment({ invoice, amount, paymentId, provider, onClose, onPay
setIsWebLNAvailable(typeof window !== 'undefined' && 'webln' in window); setIsWebLNAvailable(typeof window !== 'undefined' && 'webln' in window);
}, [invoice]); }, [invoice]);
// Poll payment status
useEffect(() => {
// Don't poll if payment already completed
if (paymentCompleted) return;
let intervalId: NodeJS.Timeout | null = null;
const pollPaymentStatus = async () => {
// Double-check in case state updated during async operation
if (paymentCompleted) return;
try {
const ai = createAIClient(provider, user, config.corsProxy);
const payment = await ai.get(`/credits/payments/${paymentId}`) as Payment;
if (payment.status === 'completed') {
// Mark as completed to prevent further polling
setPaymentCompleted(true);
// Clear the interval immediately
if (intervalId) {
clearInterval(intervalId);
intervalId = null;
}
// Update credits balance
queryClient.invalidateQueries({
queryKey: ['ai-credits', provider.nostr ? user?.pubkey ?? '' : '', provider.id],
});
// Update payments list
queryClient.invalidateQueries({
queryKey: ['ai-payments', provider.nostr ? user?.pubkey ?? '' : '', provider.id],
});
// Show toast
toast({
title: t('paymentCompleted'),
description: t('creditsAddedToAccount', { amount: formatCurrency(payment.amount) }),
});
// Close dialog immediately
onPaymentCompleted();
} else if (payment.status === 'failed') {
// Mark as completed to prevent further polling
setPaymentCompleted(true);
// Clear the interval immediately
if (intervalId) {
clearInterval(intervalId);
intervalId = null;
}
toast({
title: t('paymentFailed'),
description: t('paymentFailed'),
variant: 'destructive',
});
} else if (payment.status === 'expired') {
// Mark as completed to prevent further polling
setPaymentCompleted(true);
// Clear the interval immediately
if (intervalId) {
clearInterval(intervalId);
intervalId = null;
}
toast({
title: t('paymentExpired'),
description: t('paymentExpiredMessage'),
variant: 'destructive',
});
}
} catch (error) {
console.error('Failed to poll payment status:', error);
}
};
// Poll immediately on mount
pollPaymentStatus();
// Then poll every 3 seconds
intervalId = setInterval(pollPaymentStatus, 3000);
return () => {
if (intervalId) {
clearInterval(intervalId);
}
};
}, [paymentId, provider, user, config.corsProxy, queryClient, toast, t, onPaymentCompleted, formatCurrency, paymentCompleted]);
const handleWebLNPay = async () => { const handleWebLNPay = async () => {
if (!window.webln) return; if (!window.webln) return;
@@ -253,6 +145,15 @@ function LightningPayment({ invoice, amount, paymentId, provider, onClose, onPay
setTimeout(() => setShowCopiedTooltip(false), 2000); setTimeout(() => setShowCopiedTooltip(false), 2000);
}; };
const formatCurrency = (amount: number) => {
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2,
maximumFractionDigits: 2,
}).format(amount);
};
return ( return (
<div className="space-y-4"> <div className="space-y-4">
<div className="text-center"> <div className="text-center">
@@ -322,7 +223,6 @@ export function CreditsDialog({ open, onOpenChange, provider }: CreditsDialogPro
const [amount, setAmount] = useState<number>(10); const [amount, setAmount] = useState<number>(10);
const [paymentMethod, setPaymentMethod] = useState<'stripe' | 'lightning'>('stripe'); const [paymentMethod, setPaymentMethod] = useState<'stripe' | 'lightning'>('stripe');
const [lightningInvoice, setLightningInvoice] = useState<string | null>(null); const [lightningInvoice, setLightningInvoice] = useState<string | null>(null);
const [lightningPaymentId, setLightningPaymentId] = useState<string | null>(null);
const [refreshingPayments, setRefreshingPayments] = useState<Set<string>>(new Set()); const [refreshingPayments, setRefreshingPayments] = useState<Set<string>>(new Set());
const [giftcardAmount, setGiftcardAmount] = useState<number>(10); const [giftcardAmount, setGiftcardAmount] = useState<number>(10);
const [giftcardQuantity, setGiftcardQuantity] = useState<number>(1); const [giftcardQuantity, setGiftcardQuantity] = useState<number>(1);
@@ -401,7 +301,6 @@ export function CreditsDialog({ open, onOpenChange, provider }: CreditsDialogPro
} else if (payment.method === 'lightning') { } else if (payment.method === 'lightning') {
// Show Lightning payment interface // Show Lightning payment interface
setLightningInvoice(payment.url); setLightningInvoice(payment.url);
setLightningPaymentId(payment.id);
} }
// Refresh payments list // Refresh payments list
@@ -587,7 +486,6 @@ export function CreditsDialog({ open, onOpenChange, provider }: CreditsDialogPro
} else if (paymentPreview.method === 'lightning') { } else if (paymentPreview.method === 'lightning') {
// Show Lightning payment interface // Show Lightning payment interface
setLightningInvoice(paymentPreview.url); setLightningInvoice(paymentPreview.url);
setLightningPaymentId(paymentPreview.id);
} }
// Refresh payments list // Refresh payments list
@@ -984,22 +882,12 @@ export function CreditsDialog({ open, onOpenChange, provider }: CreditsDialogPro
</DialogHeader> </DialogHeader>
{/* Lightning Payment Interface */} {/* Lightning Payment Interface */}
{lightningInvoice && lightningPaymentId ? ( {lightningInvoice ? (
<div className="flex-1 overflow-y-auto px-1 -mx-1"> <div className="flex-1 overflow-y-auto px-1 -mx-1">
<LightningPayment <LightningPayment
invoice={lightningInvoice} invoice={lightningInvoice}
amount={amount} amount={amount}
paymentId={lightningPaymentId} onClose={() => setLightningInvoice(null)}
provider={provider}
onClose={() => {
setLightningInvoice(null);
setLightningPaymentId(null);
}}
onPaymentCompleted={() => {
// Close the lightning payment view immediately
setLightningInvoice(null);
setLightningPaymentId(null);
}}
/> />
</div> </div>
) : ( ) : (
@@ -1166,7 +1054,6 @@ export function CreditsDialog({ open, onOpenChange, provider }: CreditsDialogPro
onClick={() => { onClick={() => {
if (payment.method === 'lightning') { if (payment.method === 'lightning') {
setLightningInvoice(payment.url); setLightningInvoice(payment.url);
setLightningPaymentId(payment.id);
} else { } else {
window.open(payment.url, '_blank'); window.open(payment.url, '_blank');
} }
@@ -1285,7 +1172,7 @@ export function CreditsDialog({ open, onOpenChange, provider }: CreditsDialogPro
</AccordionItem> </AccordionItem>
{/* Your Gift Cards Accordion */} {/* Your Gift Cards Accordion */}
<AccordionItem value="list"> <AccordionItem value="list" className="border-b-0">
<AccordionTrigger className="hover:no-underline"> <AccordionTrigger className="hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<CreditCard className="h-4 w-4" /> <CreditCard className="h-4 w-4" />
+2
View File
@@ -182,6 +182,7 @@ export function GitDialog({ projectId, children, open, onOpenChange }: GitDialog
await git.checkout({ await git.checkout({
dir: projectPath, dir: projectPath,
ref: branchName, ref: branchName,
force: true,
}); });
toast({ toast({
@@ -1288,6 +1289,7 @@ export function GitDialog({ projectId, children, open, onOpenChange }: GitDialog
await git.checkout({ await git.checkout({
dir: projectPath, dir: projectPath,
ref: pr.sourceBranch, ref: pr.sourceBranch,
force: true,
}); });
await refetchGitStatus(); await refetchGitStatus();
toast({ toast({
+1 -1
View File
@@ -269,7 +269,7 @@ export function MCPServersSection() {
{/* Add New MCP Server */} {/* Add New MCP Server */}
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="add-server"> <AccordionItem value="add-server" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<Plus className="h-4 w-4" /> <Plus className="h-4 w-4" />
+27 -10
View File
@@ -111,11 +111,13 @@ describe('ModelSelector', () => {
// Recently used section should NOT be visible // Recently used section should NOT be visible
expect(screen.queryByText('Recently Used')).not.toBeInTheDocument(); expect(screen.queryByText('Recently Used')).not.toBeInTheDocument();
// provider1 should be hidden since all its models are in recently used // provider1 should still be visible (models appear in both sections now)
expect(screen.queryByText('provider1')).not.toBeInTheDocument(); expect(screen.getByText('provider1')).toBeInTheDocument();
expect(screen.getByText('model1')).toBeInTheDocument();
expect(screen.getByText('model2')).toBeInTheDocument();
// provider2 should still show with model3 // provider2 should still show with model3
expect(screen.getByText('provider2/model3')).toBeInTheDocument(); expect(screen.getByText('model3')).toBeInTheDocument();
}); });
it('shows recently used section when less than 5 models but some recently used are not available', async () => { it('shows recently used section when less than 5 models but some recently used are not available', async () => {
@@ -160,11 +162,17 @@ describe('ModelSelector', () => {
// Wait for the dropdown to open // Wait for the dropdown to open
await waitFor(() => { await waitFor(() => {
expect(screen.getByText('provider1')).toBeInTheDocument(); // provider1 appears in both recently used and available sections
const provider1Elements = screen.queryAllByText('provider1');
expect(provider1Elements.length).toBeGreaterThan(0);
}); });
// Recently used section SHOULD be visible // Recently used section SHOULD be visible
expect(screen.getByText('Recently Used')).toBeInTheDocument(); expect(screen.getByText('Recently Used')).toBeInTheDocument();
// provider1 should appear in both sections (recently used and available)
const provider1Elements = screen.queryAllByText('provider1');
expect(provider1Elements.length).toBeGreaterThanOrEqual(1);
}); });
it('shows recently used section when 5 or more models are available', async () => { it('shows recently used section when 5 or more models are available', async () => {
@@ -217,13 +225,22 @@ describe('ModelSelector', () => {
// Recently used section SHOULD be visible // Recently used section SHOULD be visible
expect(screen.getByText('Recently Used')).toBeInTheDocument(); expect(screen.getByText('Recently Used')).toBeInTheDocument();
// provider1 should be hidden since all its models are in recently used // provider1 should still be visible (models appear in both sections now)
expect(screen.queryByText('provider1')).not.toBeInTheDocument(); // Use queryAllByText since provider1 appears as a heading in both sections
const provider1Elements = screen.queryAllByText('provider1');
expect(provider1Elements.length).toBeGreaterThanOrEqual(1);
// Models should be visible (display text is just the model name, not full ID)
// model1 and model2 appear in both recently used and available sections
const model1Elements = screen.queryAllByText('model1');
expect(model1Elements.length).toBeGreaterThanOrEqual(1);
const model2Elements = screen.queryAllByText('model2');
expect(model2Elements.length).toBeGreaterThanOrEqual(1);
// provider2 and provider3 should still show // provider2 and provider3 should still show (only in available section)
expect(screen.getByText('provider2/model3')).toBeInTheDocument(); expect(screen.getByText('model3')).toBeInTheDocument();
expect(screen.getByText('provider2/model4')).toBeInTheDocument(); expect(screen.getByText('model4')).toBeInTheDocument();
expect(screen.getByText('provider3/model5')).toBeInTheDocument(); expect(screen.getByText('model5')).toBeInTheDocument();
}); });
it('hides recently used section when no recently used models exist', async () => { it('hides recently used section when no recently used models exist', async () => {
+185 -78
View File
@@ -1,10 +1,11 @@
import { useState, useMemo, useEffect, memo } from 'react'; import { useState, useMemo, useEffect, memo } from 'react';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Decimal } from 'decimal.js';
import { Check, ChevronDown, Edit3, RefreshCw, AlertCircle, Settings, TriangleAlert } from 'lucide-react'; import { Check, ChevronDown, Edit3, RefreshCw, AlertCircle, Settings, TriangleAlert } from 'lucide-react';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input'; import { Input } from '@/components/ui/input';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { Dialog, DialogContent, DialogTrigger } from '@/components/ui/dialog';
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '@/components/ui/command'; import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '@/components/ui/command';
import { Skeleton } from '@/components/ui/skeleton'; import { Skeleton } from '@/components/ui/skeleton';
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
@@ -14,6 +15,72 @@ import { useIsMobile } from '@/hooks/useIsMobile';
import { ModelPricing } from '@/components/ModelPricing'; import { ModelPricing } from '@/components/ModelPricing';
import { cn } from '@/lib/utils'; import { cn } from '@/lib/utils';
// Type for model (matches ProviderModel from useProviderModels)
type ModelType = {
id: string;
name?: string;
provider: string;
fullId: string;
description?: string;
contextLength?: number;
pricing?: {
prompt: Decimal;
completion: Decimal;
};
};
// Interface for grouped models by provider
interface ModelGroup {
provider: string;
models: ModelType[];
}
// Parse model ID into components (provider/company/model or provider/model)
function parseModelId(fullId: string) {
const parts = fullId.split('/');
return {
provider: parts[0] || '',
company: parts.length >= 3 ? parts[1] : null,
modelName: parts.length >= 3 ? parts.slice(2).join('/') : parts[1] || '',
};
}
// Group models by provider and sort
function groupModelsByProvider(models: ModelType[], excludeIds: Set<string>): ModelGroup[] {
const groups: Record<string, ModelType[]> = {};
// Group by provider
models.forEach(model => {
if (!excludeIds.has(model.fullId)) {
const { provider } = parseModelId(model.fullId);
if (!groups[provider]) groups[provider] = [];
groups[provider].push(model);
}
});
// Sort models within each group and convert to array
return Object.entries(groups)
.map(([provider, models]) => ({
provider,
models: models.sort((a, b) => {
const aParsed = parseModelId(a.fullId);
const bParsed = parseModelId(b.fullId);
// Sort by company, then model name
if (aParsed.company && bParsed.company) {
const diff = aParsed.company.localeCompare(bParsed.company);
if (diff !== 0) return diff;
}
return aParsed.modelName.localeCompare(bParsed.modelName);
}),
}))
.sort((a, b) => {
// Shakespeare first, then alphabetical
if (a.provider === 'shakespeare') return -1;
if (b.provider === 'shakespeare') return 1;
return a.provider.localeCompare(b.provider);
});
}
interface ModelSelectorProps { interface ModelSelectorProps {
value: string; value: string;
onChange: (value: string) => void; onChange: (value: string) => void;
@@ -24,6 +91,46 @@ interface ModelSelectorProps {
onOpenChange?: (open: boolean) => void; onOpenChange?: (open: boolean) => void;
} }
// Render a model item in the list
const ModelItem = memo(({ model, currentValue, onSelect, valuePrefix = '' }: {
model: ModelType;
currentValue: string;
onSelect: (value: string) => void;
valuePrefix?: string;
}) => {
const parsed = parseModelId(model.fullId);
const displayText = parsed.company
? `${parsed.company}/${parsed.modelName}`
: parsed.modelName;
// Use prefix to make value unique (prevents both recently used and available from highlighting together)
const uniqueValue = valuePrefix ? `${valuePrefix}-${model.fullId}` : model.fullId;
return (
<CommandItem
key={model.fullId}
value={uniqueValue}
keywords={[model.fullId]}
onSelect={() => onSelect(model.fullId)}
className="cursor-pointer"
title={model.fullId}
>
<Check
className={cn(
"mr-2 h-4 w-4 shrink-0",
currentValue === model.fullId ? "opacity-100" : "opacity-0"
)}
/>
<span className="flex-1 min-w-0 truncate">
{displayText}
</span>
{model.pricing && (
<ModelPricing pricing={model.pricing} className="ml-2 shrink-0" />
)}
</CommandItem>
);
});
export const ModelSelector = memo(function ModelSelector({ export const ModelSelector = memo(function ModelSelector({
value, value,
onChange, onChange,
@@ -52,25 +159,11 @@ export const ModelSelector = memo(function ModelSelector({
const recentlyUsedModels = useMemo(() => settings.recentlyUsedModels || [], [settings.recentlyUsedModels]); const recentlyUsedModels = useMemo(() => settings.recentlyUsedModels || [], [settings.recentlyUsedModels]);
// Create a Set of recently used model IDs for efficient lookup // Group models by provider (don't exclude recently used - they should appear in both sections)
const recentlyUsedSet = useMemo(() => new Set(recentlyUsedModels), [recentlyUsedModels]); const modelGroups = useMemo(
() => groupModelsByProvider(models, new Set()),
// Group models by provider, excluding models that are in the recently used section [models]
const modelsByProvider = useMemo(() => { );
const groups: Record<string, typeof models> = {};
for (const model of models) {
// Skip models that are already shown in recently used
if (recentlyUsedSet.has(model.fullId)) {
continue;
}
if (!groups[model.provider]) {
groups[model.provider] = [];
}
groups[model.provider].push(model);
}
return groups;
}, [models, recentlyUsedSet]);
// Determine if we should show the "Recently Used" section // Determine if we should show the "Recently Used" section
const shouldShowRecentlyUsed = useMemo(() => { const shouldShowRecentlyUsed = useMemo(() => {
@@ -95,6 +188,15 @@ export const ModelSelector = memo(function ModelSelector({
return !allRecentlyUsedAreAvailable; return !allRecentlyUsedAreAvailable;
}, [recentlyUsedModels, models]); }, [recentlyUsedModels, models]);
// Group recently used models (same structure as available models)
const recentlyUsedGroups = useMemo(() => {
if (!shouldShowRecentlyUsed) return [];
const recentModels = recentlyUsedModels
.map(id => models.find(m => m.fullId === id))
.filter((m): m is ModelType => m !== undefined);
return groupModelsByProvider(recentModels, new Set());
}, [recentlyUsedModels, models, shouldShowRecentlyUsed]);
// Check if the current model is free // Check if the current model is free
const isCurrentModelFree = useMemo(() => { const isCurrentModelFree = useMemo(() => {
if (!value) return false; if (!value) return false;
@@ -271,8 +373,8 @@ export const ModelSelector = memo(function ModelSelector({
</TooltipContent> </TooltipContent>
</Tooltip> </Tooltip>
)} )}
<Popover open={open} onOpenChange={setOpen}> <Dialog open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild> <DialogTrigger asChild>
<Button <Button
variant="ghost" variant="ghost"
role="combobox" role="combobox"
@@ -287,13 +389,28 @@ export const ModelSelector = memo(function ModelSelector({
</span> </span>
<ChevronDown className="size-3 shrink-0 opacity-50" /> <ChevronDown className="size-3 shrink-0 opacity-50" />
</Button> </Button>
</PopoverTrigger> </DialogTrigger>
<PopoverContent className="p-0 w-80" align="end"> <DialogContent
<Command> className={cn(
"p-0 max-w-[90vw] sm:max-w-lg md:max-w-2xl",
"max-h-[85vh] overflow-hidden flex flex-col"
)}
onOpenAutoFocus={(e) => e.preventDefault()}
>
<Command
className="flex flex-col h-full overflow-hidden"
filter={(value, search, keywords) => {
// Substring search: match if search appears anywhere in value or keywords
const s = search.toLowerCase();
if (value.toLowerCase().includes(s)) return 1;
if (keywords?.some(k => typeof k === 'string' && k.toLowerCase().includes(s))) return 1;
return 0;
}}
>
{(isConfigured && models.length >= 5) && ( {(isConfigured && models.length >= 5) && (
<CommandInput placeholder={t('searchModels')} className="h-9" /> <CommandInput placeholder={t('searchModels')} className="h-9" autoFocus={false} />
)} )}
<CommandList> <CommandList className="flex-1 overflow-y-auto overflow-x-hidden">
<CommandEmpty> <CommandEmpty>
<div className="py-6 text-center text-sm text-muted-foreground"> <div className="py-6 text-center text-sm text-muted-foreground">
<p>{t('noModelsFound')}</p> <p>{t('noModelsFound')}</p>
@@ -301,34 +418,31 @@ export const ModelSelector = memo(function ModelSelector({
</div> </div>
</CommandEmpty> </CommandEmpty>
{/* Recently Used section */}
{shouldShowRecentlyUsed && ( {shouldShowRecentlyUsed && (
<CommandGroup heading={t('recentlyUsed')}> <>
{recentlyUsedModels.map((modelId) => { <CommandGroup heading={t('recentlyUsed')} />
const modelData = models.find(m => m.fullId === modelId); {recentlyUsedGroups.map((group) => (
return ( <CommandGroup key={`recent-${group.provider}`} heading={group.provider}>
<CommandItem {group.models.map((model) => (
key={modelId} <ModelItem
value={modelId} key={model.fullId}
onSelect={() => handleSelect(modelId)} model={model}
className="cursor-pointer" currentValue={value}
> onSelect={handleSelect}
<Check valuePrefix="recent"
className={cn(
"mr-2 h-4 w-4",
value === modelId ? "opacity-100" : "opacity-0"
)}
/> />
<span className="truncate flex-1">{modelId}</span> ))}
{modelData?.pricing && ( </CommandGroup>
<ModelPricing pricing={modelData.pricing} className="ml-2" /> ))}
)} {modelGroups.length > 0 && <CommandSeparator />}
</CommandItem> </>
);
})}
</CommandGroup>
)} )}
{shouldShowRecentlyUsed && <CommandSeparator />} {/* Available Models section */}
{!isLoading && modelGroups.length > 0 && (
<CommandGroup heading={t('availableModels')} />
)}
{/* Loading state */} {/* Loading state */}
{isLoading && ( {isLoading && (
@@ -366,32 +480,25 @@ export const ModelSelector = memo(function ModelSelector({
</CommandGroup> </CommandGroup>
)} )}
{/* Provider models */} {/* No models available state */}
{!isLoading && Object.entries(modelsByProvider).map(([provider, providerModels]) => ( {!isLoading && !error && !shouldShowRecentlyUsed && modelGroups.length === 0 && (
<div key={provider}> <div className="py-12 text-center text-sm text-muted-foreground">
<CommandSeparator /> <p>{t('noModelsFound')}</p>
<CommandGroup heading={provider}>
{providerModels.map((model) => (
<CommandItem
key={model.fullId}
value={model.fullId}
onSelect={() => handleSelect(model.fullId)}
className="cursor-pointer"
>
<Check
className={cn(
"mr-2 h-4 w-4",
value === model.fullId ? "opacity-100" : "opacity-0"
)}
/>
<span className="truncate flex-1">{model.fullId}</span>
{model.pricing && (
<ModelPricing pricing={model.pricing} className="ml-2" />
)}
</CommandItem>
))}
</CommandGroup>
</div> </div>
)}
{/* Provider models */}
{!isLoading && modelGroups.map((group) => (
<CommandGroup key={group.provider} heading={group.provider}>
{group.models.map((model) => (
<ModelItem
key={model.fullId}
model={model}
currentValue={value}
onSelect={handleSelect}
/>
))}
</CommandGroup>
))} ))}
{/* Custom model option and manage providers - moved to bottom */} {/* Custom model option and manage providers - moved to bottom */}
@@ -418,8 +525,8 @@ export const ModelSelector = memo(function ModelSelector({
</CommandGroup> </CommandGroup>
</CommandList> </CommandList>
</Command> </Command>
</PopoverContent> </DialogContent>
</Popover> </Dialog>
</div> </div>
</TooltipProvider> </TooltipProvider>
); );
-67
View File
@@ -1,67 +0,0 @@
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog';
import {
Alert,
AlertDescription,
AlertTitle,
} from '@/components/ui/alert';
import { Button } from '@/components/ui/button';
interface NostrPermissionDialogProps {
open: boolean;
onResponse: (granted: boolean) => void;
}
export function NostrPermissionDialog({ open, onResponse }: NostrPermissionDialogProps) {
return (
<Dialog open={open} onOpenChange={(isOpen) => {
if (!isOpen) {
onResponse(false);
}
}}>
<DialogContent>
<DialogHeader>
<DialogTitle>Allow Nostr Access?</DialogTitle>
<DialogDescription className="space-y-3">
<p>
This project is requesting access to your Nostr signer (window.nostr).
</p>
<Alert variant="destructive">
<AlertTitle>Warning</AlertTitle>
<AlertDescription>
Granting access will allow this app to take actions on your behalf, including:
<ul className="list-disc list-inside mt-2 space-y-1">
<li>Read your public key</li>
<li>Sign events (publish posts, reactions, etc.)</li>
<li>Encrypt and decrypt messages</li>
</ul>
</AlertDescription>
</Alert>
<p className="text-sm text-muted-foreground">
Only grant access if you trust this application.
</p>
</DialogDescription>
</DialogHeader>
<DialogFooter className="gap-2">
<Button
variant="outline"
onClick={() => onResponse(false)}
>
Deny
</Button>
<Button
onClick={() => onResponse(true)}
>
Allow
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
);
}
@@ -1,65 +0,0 @@
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog';
import { Button } from '@/components/ui/button';
interface NostrSignerRequiredDialogProps {
open: boolean;
onOpenChange: (open: boolean) => void;
}
export function NostrSignerRequiredDialog({ open, onOpenChange }: NostrSignerRequiredDialogProps) {
return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent>
<DialogHeader>
<DialogTitle>Nostr Signer Required</DialogTitle>
<DialogDescription className="space-y-3">
<p>
This page tried to use a NIP-07 signer, but you don't have one installed!
</p>
<p>
Please install a Nostr signer extension to continue:
</p>
<div className="space-y-2 mt-4">
<a
href="https://github.com/soapbox-pub/soapbox-signer"
target="_blank"
rel="noopener noreferrer"
className="block text-primary hover:underline"
>
• Soapbox Signer
</a>
<a
href="https://getalby.com/"
target="_blank"
rel="noopener noreferrer"
className="block text-primary hover:underline"
>
• Alby
</a>
<a
href="https://github.com/fiatjaf/nos2x"
target="_blank"
rel="noopener noreferrer"
className="block text-primary hover:underline"
>
• nos2x
</a>
</div>
</DialogDescription>
</DialogHeader>
<DialogFooter>
<Button variant="outline" onClick={() => onOpenChange(false)}>
Close
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
);
}
+11 -27
View File
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import { useRegisterSW } from 'virtual:pwa-register/react'; import { useRegisterSW } from 'virtual:pwa-register/react';
import { Sparkles, X } from 'lucide-react'; import { Sparkles } from 'lucide-react';
/** /**
* Component that prompts users to update when a new service worker is available * Component that prompts users to update when a new service worker is available
@@ -52,38 +52,22 @@ export function PWAUpdatePrompt() {
updateServiceWorker(true); updateServiceWorker(true);
}; };
const handleDismiss = (e: React.MouseEvent) => {
e.stopPropagation();
setShowPrompt(false);
};
if (!showPrompt) { if (!showPrompt) {
return null; return null;
} }
return ( return (
<div className="fixed bottom-4 left-1/2 -translate-x-1/2 md:top-4 md:right-4 md:bottom-auto md:left-auto md:translate-x-0 z-50 animate-in slide-in-from-bottom-4 md:slide-in-from-top-4 duration-500 max-w-full"> <div className="fixed bottom-4 left-1/2 -translate-x-1/2 md:top-4 md:right-4 md:bottom-auto md:left-auto md:translate-x-0 z-50 animate-in slide-in-from-bottom-4 md:slide-in-from-top-4 duration-500 max-w-full">
<div className="relative group"> <button
<button onClick={handleUpdate}
onClick={handleUpdate} disabled={isUpdating}
disabled={isUpdating} className="group relative flex items-center gap-2 px-4 py-2.5 bg-gradient-to-r from-amber-100 to-yellow-100 dark:from-amber-900 dark:to-yellow-900 border border-amber-300 dark:border-amber-700 rounded-full shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 active:scale-95 disabled:cursor-not-allowed disabled:hover:scale-100 max-w-full truncate"
className={`relative flex items-center gap-2 px-4 py-2.5 ${!isUpdating ? 'pr-10' : ''} bg-gradient-to-r from-amber-100 to-yellow-100 dark:from-amber-900 dark:to-yellow-900 border border-amber-300 dark:border-amber-700 rounded-full shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 active:scale-95 disabled:cursor-not-allowed disabled:hover:scale-100 max-w-full truncate`} >
> <Sparkles className={`h-4 w-4 text-amber-600 dark:text-amber-400 ${isUpdating ? 'animate-spin' : 'group-hover:rotate-12 transition-transform duration-300'}`} />
<Sparkles className={`h-4 w-4 text-amber-600 dark:text-amber-400 ${isUpdating ? 'animate-spin' : 'group-hover:rotate-12 transition-transform duration-300'}`} /> <span className="text-sm font-medium whitespace-nowrap max-w-full truncate text-amber-900 dark:text-amber-100">
<span className="text-sm font-medium whitespace-nowrap max-w-full truncate text-amber-900 dark:text-amber-100"> {isUpdating ? 'Updating...' : 'Update available — Click to refresh'}
{isUpdating ? 'Updating...' : 'Update available — Click to refresh'} </span>
</span> </button>
</button>
{!isUpdating && (
<button
onClick={handleDismiss}
className="absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded-full hover:bg-amber-200 dark:hover:bg-amber-800 transition-colors duration-200"
aria-label="Dismiss update notification"
>
<X className="h-4 w-4 text-amber-700 dark:text-amber-300" />
</button>
)}
</div>
</div> </div>
); );
} }
+1 -1
View File
@@ -122,7 +122,7 @@ export function PluginsSection() {
{/* Add Plugin Section */} {/* Add Plugin Section */}
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="add-plugin"> <AccordionItem value="add-plugin" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<Plus className="h-4 w-4" /> <Plus className="h-4 w-4" />
+6 -41
View File
@@ -1,10 +1,9 @@
import React, { useEffect, useState, useMemo } from 'react'; import React, { useEffect } from 'react';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Plus, Folder, GitBranch, Loader2, ChevronDown, Star, Columns2, X, Settings, HelpCircle, Search } from 'lucide-react'; import { Plus, Folder, GitBranch, Loader2, ChevronDown, Star, Columns2, X, Settings, HelpCircle } from 'lucide-react';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { Skeleton } from '@/components/ui/skeleton'; import { Skeleton } from '@/components/ui/skeleton';
import { Input } from '@/components/ui/input';
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '@/components/ui/dropdown-menu'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '@/components/ui/dropdown-menu';
import { useProjects } from '@/hooks/useProjects'; import { useProjects } from '@/hooks/useProjects';
import { useProjectSessionStatus } from '@/hooks/useProjectSessionStatus'; import { useProjectSessionStatus } from '@/hooks/useProjectSessionStatus';
@@ -94,24 +93,10 @@ export function ProjectSidebar({
const queryClient = useQueryClient(); const queryClient = useQueryClient();
const { data: projects = [], isLoading, error } = useProjects(); const { data: projects = [], isLoading, error } = useProjects();
const [favorites] = useLocalStorage<string[]>('project-favorites', []); const [favorites] = useLocalStorage<string[]>('project-favorites', []);
const [searchQuery, setSearchQuery] = useState('');
const isMobile = useIsMobile(); const isMobile = useIsMobile();
const navigate = useNavigate(); const navigate = useNavigate();
// Fast in-memory search filtering
const filteredProjects = useMemo(() => {
if (!searchQuery.trim()) {
return projects;
}
const query = searchQuery.toLowerCase();
return projects.filter(project =>
project.id.toLowerCase().includes(query) ||
project.name.toLowerCase().includes(query)
);
}, [projects, searchQuery]);
// Custom navigate function that closes sidebar on mobile // Custom navigate function that closes sidebar on mobile
const navigateAndClose = (path: string) => { const navigateAndClose = (path: string) => {
navigate(path); navigate(path);
@@ -181,12 +166,12 @@ export function ProjectSidebar({
<div className="flex-1 overflow-y-auto"> <div className="flex-1 overflow-y-auto">
<div className="p-2"> <div className="p-2">
<div className="mb-2 space-y-3"> <div className="mb-2">
<div className="relative rounded-md bg-gradient-to-r from-primary to-accent hover:from-primary/90 hover:to-accent/90 transition-all duration-200"> <div className="relative rounded-md bg-gradient-to-r from-primary to-accent hover:from-primary/90 hover:to-accent/90 transition-all duration-200">
<div className="flex"> <div className="flex">
<button <button
onClick={handleNewProject} onClick={handleNewProject}
className="flex-1 flex items-center justify-center px-3 py-2.5 text-sm font-medium text-primary-foreground rounded-l-md hover:bg-white/10 transition-colors" className="flex-1 flex items-center justify-center px-3 py-2 text-sm font-medium text-primary-foreground rounded-l-md hover:bg-white/10 transition-colors"
> >
<Plus className="h-4 w-4 mr-2" /> <Plus className="h-4 w-4 mr-2" />
{t('newProject')} {t('newProject')}
@@ -194,7 +179,7 @@ export function ProjectSidebar({
<div className="w-px bg-white/20" /> <div className="w-px bg-white/20" />
<DropdownMenu> <DropdownMenu>
<DropdownMenuTrigger asChild> <DropdownMenuTrigger asChild>
<button className="px-3 py-2.5 text-primary-foreground hover:bg-white/10 rounded-r-md transition-colors"> <button className="px-2 py-2 text-primary-foreground hover:bg-white/10 rounded-r-md transition-colors">
<ChevronDown className="h-4 w-4" /> <ChevronDown className="h-4 w-4" />
</button> </button>
</DropdownMenuTrigger> </DropdownMenuTrigger>
@@ -210,20 +195,6 @@ export function ProjectSidebar({
</DropdownMenu> </DropdownMenu>
</div> </div>
</div> </div>
{/* Search Input */}
{projects.length > 0 && (
<div className="relative">
<Search className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none" />
<Input
type="text"
placeholder={t('searchProjects')}
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
className="pl-9 h-9 text-sm bg-sidebar-accent/50 border-sidebar-border focus-visible:ring-primary/50"
/>
</div>
)}
</div> </div>
{isLoading ? ( {isLoading ? (
@@ -243,15 +214,9 @@ export function ProjectSidebar({
<p className="text-sm">{t('noProjectsYet')}</p> <p className="text-sm">{t('noProjectsYet')}</p>
<p className="text-xs">{t('createFirstProject')}</p> <p className="text-xs">{t('createFirstProject')}</p>
</div> </div>
) : filteredProjects.length === 0 ? (
<div className="text-center p-6 text-muted-foreground">
<Search className="h-8 w-8 mx-auto mb-2 opacity-50" />
<p className="text-sm">{t('noProjectsFound')}</p>
<p className="text-xs">{t('tryDifferentSearch')}</p>
</div>
) : ( ) : (
<div className="space-y-1"> <div className="space-y-1">
{filteredProjects.map((project) => ( {projects.map((project) => (
<ProjectItem <ProjectItem
key={project.id} key={project.id}
project={project} project={project}
+1 -7
View File
@@ -197,13 +197,7 @@ function QuillyContent({ error, onDismiss, onNewChat, onOpenModelSelector, onTry
message: error.message message: error.message
? `AI service error: ${error.message}` ? `AI service error: ${error.message}`
: 'Sorry, I encountered an unexpected error. Please try again.', : 'Sorry, I encountered an unexpected error. Please try again.',
actions: onTryAgain ? [{ actions: [],
label: 'Try again',
onClick: () => {
onTryAgain();
onDismiss();
},
}] : [],
}; };
}; };
-99
View File
@@ -1,99 +0,0 @@
import React from 'react';
import { Button } from '@/components/ui/button';
import { Card, CardContent } from '@/components/ui/card';
import { Badge } from '@/components/ui/badge';
import { GitBranch } from 'lucide-react';
import type { Repository } from '@/hooks/useUserRepositories';
import { useAuthor } from '@/hooks/useAuthor';
import { Avatar, AvatarImage, AvatarFallback } from '@/components/ui/avatar';
import { genUserName } from '@/lib/genUserName';
import { useNavigate } from 'react-router-dom';
import { nip19 } from 'nostr-tools';
interface RepositoryCardProps {
repo: Repository;
}
export function RepositoryCard({ repo }: RepositoryCardProps) {
const { data: authorData } = useAuthor(repo.pubkey);
const navigate = useNavigate();
const displayName = authorData?.metadata?.name || genUserName(repo.pubkey);
const profileImage = authorData?.metadata?.picture;
// Construct Nostr clone URL
const nostrCloneUrl = `nostr://${nip19.npubEncode(repo.pubkey)}/${repo.repoId}`;
const handleClone = () => {
// Navigate to clone page with Nostr URL parameter
navigate(`/clone?url=${encodeURIComponent(nostrCloneUrl)}`);
};
return (
<Card className="h-full flex flex-col hover:shadow-lg transition-shadow cursor-pointer" onClick={handleClone}>
<CardContent className="p-6 flex flex-col flex-1">
{/* Header with name and author */}
<div className="mb-4">
<h3 className="font-semibold text-lg leading-tight mb-2 truncate">
{repo.name}
</h3>
<div className="flex items-center gap-2 text-sm text-muted-foreground">
<Avatar className="h-4 w-4">
{profileImage && (
<AvatarImage src={profileImage} alt={displayName} />
)}
<AvatarFallback className="text-[8px]">
{displayName.slice(0, 2).toUpperCase()}
</AvatarFallback>
</Avatar>
<span className="truncate">{displayName}</span>
</div>
</div>
{/* Description */}
{repo.description && (
<p className="text-sm text-muted-foreground line-clamp-2 mb-4">
{repo.description}
</p>
)}
{/* Tags */}
{repo.repoTags.length > 0 && (
<div className="flex flex-wrap gap-1 mb-4">
{repo.repoTags.slice(0, 3).map((tag, index) => (
<Badge key={index} variant="secondary" className="text-xs">
{tag}
</Badge>
))}
{repo.repoTags.length > 3 && (
<Badge variant="secondary" className="text-xs">
+{repo.repoTags.length - 3}
</Badge>
)}
</div>
)}
{/* Personal fork badge */}
{repo.isPersonalFork && (
<div className="mb-4">
<Badge variant="outline" className="text-xs">
Personal Fork
</Badge>
</div>
)}
{/* Actions */}
<div className="mt-auto">
<Button
size="sm"
className="w-full"
onClick={handleClone}
>
<GitBranch className="h-4 w-4 mr-2" />
Clone
</Button>
</div>
</CardContent>
</Card>
);
}
-57
View File
@@ -1,57 +0,0 @@
import { ChevronRight } from 'lucide-react';
import { cn } from '@/lib/utils';
interface SettingsItemProps {
icon: React.ComponentType<{ className?: string }>;
title: string;
onClick: () => void;
isActive?: boolean;
className?: string;
}
export function SettingsItem({
icon: Icon,
title,
onClick,
isActive = false,
className,
}: SettingsItemProps) {
return (
<button
onClick={onClick}
className={cn(
'group w-full text-left p-2 rounded-lg transition-all duration-200 border',
{
'bg-primary/10 border-primary/20 shadow-sm': isActive,
'border-transparent hover:bg-muted/60 hover:shadow-sm': !isActive,
},
className
)}
>
<div className="flex items-center gap-2.5">
<div className="rounded-md transition-all duration-200">
<Icon className={cn('h-4 w-4 flex-shrink-0 transition-colors duration-200', {
'text-primary': isActive,
'text-muted-foreground group-hover:text-foreground': !isActive,
})} />
</div>
<div className="flex-1 min-w-0">
<div className={cn('text-sm font-medium transition-colors duration-200', {
'text-primary': isActive,
'text-foreground': !isActive,
})}>
{title}
</div>
</div>
<ChevronRight className={cn(
'h-4 w-4 flex-shrink-0 transition-all duration-200',
'opacity-0 -translate-x-1 group-hover:opacity-100 group-hover:translate-x-0',
{
'text-primary opacity-60': isActive,
'text-muted-foreground': !isActive,
}
)} />
</div>
</button>
);
}
-43
View File
@@ -1,43 +0,0 @@
import { ChevronRight } from 'lucide-react';
import { cn } from '@/lib/utils';
interface SettingsItemMobileProps {
icon: React.ComponentType<{ className?: string }>;
title: string;
onClick: () => void;
isFirst?: boolean;
isLast?: boolean;
}
export function SettingsItemMobile({
icon: Icon,
title,
onClick,
isFirst = false,
isLast = false,
}: SettingsItemMobileProps) {
return (
<button
onClick={onClick}
className={cn(
'w-full text-left px-4 py-3.5 bg-background transition-colors active:bg-muted/50',
'flex items-center gap-3',
'border-b border-border last:border-b-0',
{
'rounded-t-xl': isFirst,
'rounded-b-xl': isLast,
}
)}
>
<div className="flex items-center justify-center w-7 h-7 rounded-lg bg-primary/10">
<Icon className="h-4 w-4 text-primary flex-shrink-0" />
</div>
<div className="flex-1 min-w-0">
<div className="text-base text-foreground">
{title}
</div>
</div>
<ChevronRight className="h-5 w-5 text-muted-foreground/50 flex-shrink-0" />
</button>
);
}
+36 -31
View File
@@ -8,8 +8,8 @@ import { ProjectSidebar } from '@/components/ProjectSidebar';
import { useProjectsManager } from '@/hooks/useProjectsManager'; import { useProjectsManager } from '@/hooks/useProjectsManager';
import { useIsMobile } from '@/hooks/useIsMobile'; import { useIsMobile } from '@/hooks/useIsMobile';
import { type Project } from '@/lib/ProjectsManager'; import { type Project } from '@/lib/ProjectsManager';
import { getSettingsCategories } from '@/lib/settingsItems'; import { cn } from '@/lib/utils';
import { SettingsItem } from '@/components/SettingsItem'; import { getSettingsItems } from '@/lib/settingsItems';
export function SettingsLayout() { export function SettingsLayout() {
const { t } = useTranslation(); const { t } = useTranslation();
@@ -60,11 +60,9 @@ export function SettingsLayout() {
}; };
// Get current settings page // Get current settings page
const settingsCategories = getSettingsCategories(t); const settingsItems = getSettingsItems(t);
const currentPath = location.pathname; const currentPath = location.pathname;
const currentSettingsId = settingsCategories const currentSettingsId = settingsItems.find(item => item.href === currentPath)?.id;
.flatMap(category => category.items)
.find(item => item.href === currentPath)?.id;
if (isMobile) { if (isMobile) {
return ( return (
@@ -91,7 +89,7 @@ export function SettingsLayout() {
className="absolute inset-0" className="absolute inset-0"
onClick={() => setIsSidebarVisible(false)} onClick={() => setIsSidebarVisible(false)}
/> />
<div className="relative left-0 top-0 h-full w-72 max-w-[80vw] bg-background border-r shadow-lg z-10"> <div className="relative left-0 top-0 h-full w-80 max-w-[80vw] bg-background border-r shadow-lg z-10">
<ProjectSidebar <ProjectSidebar
selectedProject={null} selectedProject={null}
onSelectProject={(project) => { onSelectProject={(project) => {
@@ -114,7 +112,7 @@ export function SettingsLayout() {
<div className="h-screen flex bg-background overflow-hidden"> <div className="h-screen flex bg-background overflow-hidden">
{/* Left Column - Projects Sidebar (optionally hidden) */} {/* Left Column - Projects Sidebar (optionally hidden) */}
{isSidebarVisible && ( {isSidebarVisible && (
<div className="w-72 border-r bg-sidebar flex-shrink-0"> <div className="w-80 border-r bg-sidebar flex-shrink-0">
<ProjectSidebar <ProjectSidebar
selectedProject={null} selectedProject={null}
onSelectProject={handleProjectSelect} onSelectProject={handleProjectSelect}
@@ -125,7 +123,7 @@ export function SettingsLayout() {
)} )}
{/* Middle Column - Settings Navigation */} {/* Middle Column - Settings Navigation */}
<div className="w-72 border-r bg-background flex flex-col flex-shrink-0"> <div className="w-96 border-r bg-background flex flex-col flex-shrink-0">
{/* Header with toggle button */} {/* Header with toggle button */}
<div className="h-12 px-4 py-2 border-b flex-shrink-0"> <div className="h-12 px-4 py-2 border-b flex-shrink-0">
<div className="flex items-center gap-3"> <div className="flex items-center gap-3">
@@ -148,29 +146,36 @@ export function SettingsLayout() {
{/* Settings Navigation - Scrollable */} {/* Settings Navigation - Scrollable */}
<ScrollArea className="flex-1"> <ScrollArea className="flex-1">
<div className="p-4 space-y-6"> <div className="p-4">
{settingsCategories.map((category) => ( <div className="space-y-2">
<div key={category.id}> {settingsItems.map((item) => {
<h3 className="text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2 px-2"> const Icon = item.icon;
{category.title} const isActive = currentSettingsId === item.id;
</h3>
<div className="space-y-1">
{category.items.map((item) => {
const isActive = currentSettingsId === item.id;
return ( return (
<SettingsItem <button
key={item.id} key={item.id}
icon={item.icon} onClick={() => navigate(item.href)}
title={item.title} className={cn('w-full text-left p-3 rounded-lg transition-colors border border-transparent', {
onClick={() => navigate(item.href)} 'bg-primary/10 border border-primary/20': isActive,
isActive={isActive} 'hover:bg-muted/50': !isActive,
/> })}
); >
})} <div className="flex items-start gap-3">
</div> <Icon className={`h-5 w-5 mt-0.5 ${isActive ? 'text-primary' : 'text-muted-foreground'}`} />
</div> <div className="flex-1 min-w-0">
))} <div className={`font-medium ${isActive ? 'text-primary' : 'text-foreground'}`}>
{item.title}
</div>
<div className="text-sm text-muted-foreground mt-0.5">
{item.description}
</div>
</div>
</div>
</button>
);
})}
</div>
</div> </div>
</ScrollArea> </ScrollArea>
</div> </div>
+3 -180
View File
@@ -7,7 +7,6 @@ import { useFSPaths } from '@/hooks/useFSPaths';
import { addConsoleMessage, getConsoleMessages, type ConsoleMessage } from '@/lib/consoleMessages'; import { addConsoleMessage, getConsoleMessages, type ConsoleMessage } from '@/lib/consoleMessages';
import { useConsoleError } from '@/hooks/useConsoleError'; import { useConsoleError } from '@/hooks/useConsoleError';
import { useBuildProject } from '@/hooks/useBuildProject'; import { useBuildProject } from '@/hooks/useBuildProject';
import { useCurrentUser } from '@/hooks/useCurrentUser';
import { Tabs, TabsContent } from '@/components/ui/tabs'; import { Tabs, TabsContent } from '@/components/ui/tabs';
import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area'; import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
@@ -26,8 +25,6 @@ import {
PopoverContent, PopoverContent,
PopoverTrigger, PopoverTrigger,
} from '@/components/ui/popover'; } from '@/components/ui/popover';
import { NostrPermissionDialog } from '@/components/NostrPermissionDialog';
import { NostrSignerRequiredDialog } from '@/components/NostrSignerRequiredDialog';
import { cn } from '@/lib/utils'; import { cn } from '@/lib/utils';
import { FileTree } from './FileTree'; import { FileTree } from './FileTree';
import { FileEditor } from './FileEditor'; import { FileEditor } from './FileEditor';
@@ -60,16 +57,6 @@ interface JSONRPCRequest {
id: number; id: number;
} }
interface NostrRPCRequest {
jsonrpc: '2.0';
method: 'nostr';
params: {
method: string;
args: unknown[];
};
id: number;
}
interface JSONRPCResponse { interface JSONRPCResponse {
jsonrpc: '2.0'; jsonrpc: '2.0';
result?: { result?: {
@@ -106,7 +93,6 @@ export function PreviewPane({ projectId, activeTab, onToggleView, projectName, o
const { fs } = useFS(); const { fs } = useFS();
const { projectsPath } = useFSPaths(); const { projectsPath } = useFSPaths();
const projectsManager = useProjectsManager(); const projectsManager = useProjectsManager();
const { user } = useCurrentUser();
// Use console error state from provider // Use console error state from provider
const { hasErrors: hasConsoleErrors, clearErrors } = useConsoleError(); const { hasErrors: hasConsoleErrors, clearErrors } = useConsoleError();
@@ -333,155 +319,6 @@ export function PreviewPane({ projectId, activeTab, onToggleView, projectName, o
} }
}, [historyIndex, navigationHistory, sendNavigationCommand]); }, [historyIndex, navigationHistory, sendNavigationCommand]);
// Track which projects have been granted Nostr access
const [nostrPermissions, setNostrPermissions] = useState<Set<string>>(new Set());
const [nostrPermissionDialog, setNostrPermissionDialog] = useState<{
open: boolean;
projectId: string;
resolve: (granted: boolean) => void;
} | null>(null);
const [noSignerDialog, setNoSignerDialog] = useState(false);
const requestNostrPermission = useCallback(async (projectId: string): Promise<boolean> => {
// Check if permission already granted
if (nostrPermissions.has(projectId)) {
return true;
}
// Show permission dialog and wait for user response
return new Promise<boolean>((resolve) => {
setNostrPermissionDialog({
open: true,
projectId,
resolve,
});
});
}, [nostrPermissions]);
const handleNostrPermissionResponse = useCallback((granted: boolean) => {
if (nostrPermissionDialog) {
const { projectId, resolve } = nostrPermissionDialog;
if (granted) {
// Grant permission for this project
setNostrPermissions(prev => new Set([...prev, projectId]));
}
// Close dialog and resolve the promise
setNostrPermissionDialog(null);
resolve(granted);
}
}, [nostrPermissionDialog]);
const handleNostr = useCallback(async (request: NostrRPCRequest) => {
const { params, id } = request;
const { method, args } = params;
console.log('[NOSTR BRIDGE] Handling request:', method, args);
try {
// Check if user is logged in with a signer
if (!user?.signer) {
// Show the "no signer" dialog
setNoSignerDialog(true);
throw new Error('NO_SIGNER_INSTALLED');
}
// Request permission if this is the first Nostr access from this project
const hasPermission = await requestNostrPermission(projectId);
if (!hasPermission) {
throw new Error('User denied Nostr access');
}
let result: unknown;
// Route to appropriate signer method
switch (method) {
case 'getPublicKey':
result = await user.signer.getPublicKey();
break;
case 'signEvent':
if (!args[0] || typeof args[0] !== 'object') {
throw new Error('Invalid event object');
}
result = await user.signer.signEvent(args[0] as Parameters<typeof user.signer.signEvent>[0]);
break;
case 'nip04.encrypt':
if (!user.signer.nip04?.encrypt) {
throw new Error('NIP-04 encryption not supported by signer');
}
if (typeof args[0] !== 'string' || typeof args[1] !== 'string') {
throw new Error('Invalid arguments for nip04.encrypt');
}
result = await user.signer.nip04.encrypt(args[0], args[1]);
break;
case 'nip04.decrypt':
if (!user.signer.nip04?.decrypt) {
throw new Error('NIP-04 decryption not supported by signer');
}
if (typeof args[0] !== 'string' || typeof args[1] !== 'string') {
throw new Error('Invalid arguments for nip04.decrypt');
}
result = await user.signer.nip04.decrypt(args[0], args[1]);
break;
case 'nip44.encrypt':
if (!user.signer.nip44?.encrypt) {
throw new Error('NIP-44 encryption not supported by signer');
}
if (typeof args[0] !== 'string' || typeof args[1] !== 'string') {
throw new Error('Invalid arguments for nip44.encrypt');
}
result = await user.signer.nip44.encrypt(args[0], args[1]);
break;
case 'nip44.decrypt':
if (!user.signer.nip44?.decrypt) {
throw new Error('NIP-44 decryption not supported by signer');
}
if (typeof args[0] !== 'string' || typeof args[1] !== 'string') {
throw new Error('Invalid arguments for nip44.decrypt');
}
result = await user.signer.nip44.decrypt(args[0], args[1]);
break;
default:
throw new Error(`Unsupported Nostr method: ${method}`);
}
console.log('[NOSTR BRIDGE] Success:', method, result);
// Send success response
if (iframeRef.current?.contentWindow) {
const targetOrigin = `https://${projectId}.${previewDomain}`;
iframeRef.current.contentWindow.postMessage({
jsonrpc: '2.0',
result,
id
}, targetOrigin);
}
} catch (error) {
console.error('[NOSTR BRIDGE] Error:', method, error);
// Send error response
if (iframeRef.current?.contentWindow) {
const targetOrigin = `https://${projectId}.${previewDomain}`;
iframeRef.current.contentWindow.postMessage({
jsonrpc: '2.0',
error: {
code: -32000,
message: error instanceof Error ? error.message : String(error),
},
id
}, targetOrigin);
}
}
}, [user, projectId, previewDomain, requestNostrPermission]);
const handleFetch = useCallback(async (request: JSONRPCRequest) => { const handleFetch = useCallback(async (request: JSONRPCRequest) => {
const { params, id } = request; const { params, id } = request;
const { request: fetchRequest } = params; const { request: fetchRequest } = params;
@@ -604,7 +441,7 @@ export function PreviewPane({ projectId, activeTab, onToggleView, projectName, o
// Verify origin for security // Verify origin for security
const expectedOrigin = `https://${projectId}.${previewDomain}`; const expectedOrigin = `https://${projectId}.${previewDomain}`;
if (event.origin !== expectedOrigin) { if (event.origin !== expectedOrigin) {
console.log(`Ignoring message with source ${event.data.source} from unexpected origin: ${event.origin}, expected: ${expectedOrigin}`); console.log(`Ignoring message from unexpected origin: ${event.origin}, expected: ${expectedOrigin}`);
return; return;
} }
@@ -612,8 +449,6 @@ export function PreviewPane({ projectId, activeTab, onToggleView, projectName, o
console.log('Received message from iframe:', message); console.log('Received message from iframe:', message);
if (message.jsonrpc === '2.0' && message.method === 'fetch') { if (message.jsonrpc === '2.0' && message.method === 'fetch') {
handleFetch(message); handleFetch(message);
} else if (message.jsonrpc === '2.0' && message.method === 'nostr') {
handleNostr(message);
} else if (message.jsonrpc === '2.0' && message.method === 'console') { } else if (message.jsonrpc === '2.0' && message.method === 'console') {
handleConsoleMessage(message); handleConsoleMessage(message);
} else if (message.jsonrpc === '2.0' && message.method === 'updateNavigationState') { } else if (message.jsonrpc === '2.0' && message.method === 'updateNavigationState') {
@@ -623,7 +458,7 @@ export function PreviewPane({ projectId, activeTab, onToggleView, projectName, o
window.addEventListener('message', handleMessage); window.addEventListener('message', handleMessage);
return () => window.removeEventListener('message', handleMessage); return () => window.removeEventListener('message', handleMessage);
}, [handleFetch, handleNostr, handleConsoleMessage, handleUpdateNavigationState, projectId, previewDomain]); }, [handleFetch, handleConsoleMessage, handleUpdateNavigationState, projectId, previewDomain]);
useEffect(() => { useEffect(() => {
if (selectedFile) { if (selectedFile) {
@@ -1113,18 +948,6 @@ export function PreviewPane({ projectId, activeTab, onToggleView, projectName, o
onOpenChange={setDeployDialogOpen} onOpenChange={setDeployDialogOpen}
/> />
)} )}
{/* Nostr Permission Dialog */}
<NostrPermissionDialog
open={nostrPermissionDialog?.open ?? false}
onResponse={handleNostrPermissionResponse}
/>
{/* No Signer Installed Dialog */}
<NostrSignerRequiredDialog
open={noSignerDialog}
onOpenChange={setNoSignerDialog}
/>
</div> </div>
); );
} }
+1
View File
@@ -223,6 +223,7 @@ export function BranchManager({ projectId, currentBranch, onBranchChange }: Bran
await git.checkout({ await git.checkout({
dir: projectPath, dir: projectPath,
ref: branchName, ref: branchName,
force: true,
}); });
toast({ toast({
+1 -1
View File
@@ -12,7 +12,7 @@ const AccordionItem = React.forwardRef<
>(({ className, ...props }, ref) => ( >(({ className, ...props }, ref) => (
<AccordionPrimitive.Item <AccordionPrimitive.Item
ref={ref} ref={ref}
className={cn("border rounded-lg bg-card text-card-foreground shadow-sm", className)} className={cn("border-b", className)}
{...props} {...props}
/> />
)) ))
+1 -1
View File
@@ -11,7 +11,7 @@ const Checkbox = React.forwardRef<
<CheckboxPrimitive.Root <CheckboxPrimitive.Root
ref={ref} ref={ref}
className={cn( className={cn(
"peer h-4 w-4 shrink-0 rounded-xs 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 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",
className className
)} )}
{...props} {...props}
+1 -1
View File
@@ -17,7 +17,7 @@ const SelectTrigger = React.forwardRef<
<SelectPrimitive.Trigger <SelectPrimitive.Trigger
ref={ref} ref={ref}
className={cn( className={cn(
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground hover:bg-border/20 dark:hover:bg-border/50 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
className className
)} )}
{...props} {...props}
-43
View File
@@ -1,43 +0,0 @@
import { useNostr } from '@nostrify/react';
import { useQuery } from '@tanstack/react-query';
/**
* Hook to get the user's contact list (kind 3 follow list)
* Returns an array of pubkeys that the user follows
*/
export function useContacts(userPubkey?: string) {
const { nostr } = useNostr();
return useQuery({
queryKey: ['nostr', 'contacts', userPubkey],
queryFn: async (): Promise<string[]> => {
if (!userPubkey) {
return [];
}
// Get the user's contact list (kind 3)
const events = await nostr.query([{
kinds: [3],
authors: [userPubkey],
limit: 1,
}], { signal: AbortSignal.timeout(3000) });
if (events.length === 0) {
return [];
}
// Get the most recent contact list event
const contactList = events.sort((a, b) => b.created_at - a.created_at)[0];
// Extract pubkeys from 'p' tags
const followedPubkeys = contactList.tags
.filter(tag => tag[0] === 'p' && tag[1])
.map(tag => tag[1]);
return followedPubkeys;
},
enabled: !!userPubkey,
staleTime: 60000, // 1 minute
refetchInterval: 300000, // 5 minutes
});
}
-92
View File
@@ -1,92 +0,0 @@
import { useNostr } from '@nostrify/react';
import { useQuery } from '@tanstack/react-query';
import type { NostrEvent } from '@nostrify/nostrify';
import type { Repository } from './useUserRepositories';
// Kind 30617 for repository announcements (NIP-34)
const REPOSITORY_KIND = 30617;
/**
* Hook to get repositories from a list of followed users
*/
export function useFollowedRepositories(followedPubkeys: string[] = []) {
const { nostr } = useNostr();
return useQuery({
queryKey: ['nostr', 'followed-repositories', followedPubkeys.sort().join(',')],
queryFn: async (): Promise<Repository[]> => {
if (followedPubkeys.length === 0) {
return [];
}
// Get all repository announcements from followed users
const events = await nostr.query([{
kinds: [REPOSITORY_KIND],
authors: followedPubkeys,
limit: 500, // Increased limit to get more repos from follows
}], { signal: AbortSignal.timeout(5000) });
// Process repository events
const repositories: Repository[] = [];
const repoMap = new Map<string, NostrEvent>();
// Group by author+d-tag to get latest version of each repo
for (const event of events) {
const dTag = event.tags.find(tag => tag[0] === 'd')?.[1];
if (!dTag) continue;
const key = `${event.pubkey}:${dTag}`;
const existing = repoMap.get(key);
if (!existing || event.created_at > existing.created_at) {
repoMap.set(key, event);
}
}
// Convert to Repository objects
for (const [, event] of repoMap) {
try {
const dTag = event.tags.find(tag => tag[0] === 'd')?.[1];
if (!dTag) continue;
const name = event.tags.find(tag => tag[0] === 'name')?.[1] || dTag;
const description = event.tags.find(tag => tag[0] === 'description')?.[1] || '';
const webUrls = event.tags.filter(tag => tag[0] === 'web').map(tag => tag[1]).filter(Boolean);
const cloneUrls = event.tags.filter(tag => tag[0] === 'clone').map(tag => tag[1]).filter(Boolean);
const relays = event.tags.filter(tag => tag[0] === 'relays').map(tag => tag[1]).filter(Boolean);
const maintainers = event.tags.filter(tag => tag[0] === 'maintainers').map(tag => tag[1]).filter(Boolean);
const repoTags = event.tags.filter(tag => tag[0] === 't' && tag[1] !== 'personal-fork').map(tag => tag[1]);
const earliestUniqueCommit = event.tags.find(tag => tag[0] === 'r' && tag[2] === 'euc')?.[1];
const isPersonalFork = event.tags.some(tag => tag[0] === 't' && tag[1] === 'personal-fork');
// Filter out invalid repositories without clone URLs
if (cloneUrls.length === 0) {
console.warn('Skipping repository without clone URLs:', dTag);
continue;
}
repositories.push({
...event,
repoId: dTag,
name,
description,
webUrls,
cloneUrls,
relays,
maintainers,
repoTags,
earliestUniqueCommit,
isPersonalFork,
});
} catch (error) {
console.warn('Failed to parse repository:', error);
}
}
// Sort by created_at (newest first)
return repositories.sort((a, b) => b.created_at - a.created_at);
},
enabled: followedPubkeys.length > 0,
staleTime: 30000, // 30 seconds
refetchInterval: 60000, // 1 minute
});
}
-96
View File
@@ -1,96 +0,0 @@
import { useNostr } from '@nostrify/react';
import { useQuery } from '@tanstack/react-query';
import type { NostrEvent } from '@nostrify/nostrify';
// Kind 30617 for repository announcements (NIP-34)
const REPOSITORY_KIND = 30617;
export interface Repository extends NostrEvent {
repoId: string;
name: string;
description: string;
webUrls: string[];
cloneUrls: string[];
relays: string[];
maintainers: string[];
repoTags: string[];
earliestUniqueCommit?: string;
isPersonalFork: boolean;
}
export function useUserRepositories(userPubkey?: string) {
const { nostr } = useNostr();
return useQuery({
queryKey: ['nostr', 'user-repositories', userPubkey],
queryFn: async (): Promise<Repository[]> => {
if (!userPubkey) {
return [];
}
// Get all repository announcements for this user
const events = await nostr.query([{
kinds: [REPOSITORY_KIND],
authors: [userPubkey],
limit: 100,
}], { signal: AbortSignal.timeout(3000) });
// Process repository events
const repositories: Repository[] = [];
const repoMap = new Map<string, NostrEvent>();
// Group by d-tag (repo-id) to get latest version
for (const event of events) {
const dTag = event.tags.find(tag => tag[0] === 'd')?.[1];
if (!dTag) continue;
const existing = repoMap.get(dTag);
if (!existing || event.created_at > existing.created_at) {
repoMap.set(dTag, event);
}
}
// Convert to Repository objects
for (const [dTag, event] of repoMap) {
try {
const name = event.tags.find(tag => tag[0] === 'name')?.[1] || dTag;
const description = event.tags.find(tag => tag[0] === 'description')?.[1] || '';
const webUrls = event.tags.filter(tag => tag[0] === 'web').map(tag => tag[1]).filter(Boolean);
const cloneUrls = event.tags.filter(tag => tag[0] === 'clone').map(tag => tag[1]).filter(Boolean);
const relays = event.tags.filter(tag => tag[0] === 'relays').map(tag => tag[1]).filter(Boolean);
const maintainers = event.tags.filter(tag => tag[0] === 'maintainers').map(tag => tag[1]).filter(Boolean);
const repoTags = event.tags.filter(tag => tag[0] === 't' && tag[1] !== 'personal-fork').map(tag => tag[1]);
const earliestUniqueCommit = event.tags.find(tag => tag[0] === 'r' && tag[2] === 'euc')?.[1];
const isPersonalFork = event.tags.some(tag => tag[0] === 't' && tag[1] === 'personal-fork');
// Filter out invalid repositories without clone URLs
if (cloneUrls.length === 0) {
console.warn('Skipping repository without clone URLs:', dTag);
continue;
}
repositories.push({
...event,
repoId: dTag,
name,
description,
webUrls,
cloneUrls,
relays,
maintainers,
repoTags,
earliestUniqueCommit,
isPersonalFork,
});
} catch (error) {
console.warn('Failed to parse repository:', error);
}
}
return repositories;
},
enabled: !!userPubkey,
staleTime: 30000, // 30 seconds
refetchInterval: 60000, // 1 minute
});
}
+6 -1
View File
@@ -37,7 +37,7 @@
--input: 220 13% 91%; --input: 220 13% 91%;
--ring: 271 81% 56%; --ring: 271 81% 56%;
--radius: 0.75rem; --radius: 0.375rem;
/* Sidebar colors - Enhanced purple theme */ /* Sidebar colors - Enhanced purple theme */
--sidebar-background: 271 81% 96%; --sidebar-background: 271 81% 96%;
@@ -113,11 +113,16 @@
border-color: hsl(var(--border)); border-color: hsl(var(--border));
} }
html {
overscroll-behavior: none;
}
body { body {
background-color: hsl(var(--background)); background-color: hsl(var(--background));
color: hsl(var(--foreground)); color: hsl(var(--foreground));
font-family: 'Inter Variable', 'Inter', 'system-ui', 'sans-serif'; font-family: 'Inter Variable', 'Inter', 'system-ui', 'sans-serif';
font-feature-settings: "rlig" 1, "calt" 1; font-feature-settings: "rlig" 1, "calt" 1;
overscroll-behavior: none;
} }
/* GitHub-style scrollbars */ /* GitHub-style scrollbars */
+2
View File
@@ -122,6 +122,7 @@ export class GitCheckoutCommand implements GitSubcommand {
await this.git.checkout({ await this.git.checkout({
dir: cwd, dir: cwd,
ref: branchName, ref: branchName,
force: true,
}); });
return createSuccessResult(`Switched to branch '${branchName}'\n`); return createSuccessResult(`Switched to branch '${branchName}'\n`);
@@ -164,6 +165,7 @@ export class GitCheckoutCommand implements GitSubcommand {
await this.git.checkout({ await this.git.checkout({
dir: cwd, dir: cwd,
ref: branchName, ref: branchName,
force: true,
}); });
return createSuccessResult(`Switched to a new branch '${branchName}'\n`); return createSuccessResult(`Switched to a new branch '${branchName}'\n`);
+1
View File
@@ -1244,6 +1244,7 @@ export class Git {
fs: this.fs, fs: this.fs,
dir: options.dir, dir: options.dir,
ref: expectedBranch, ref: expectedBranch,
force: true,
}); });
} catch (checkoutError) { } catch (checkoutError) {
console.warn(`Failed to checkout branch ${expectedBranch}:`, checkoutError); console.warn(`Failed to checkout branch ${expectedBranch}:`, checkoutError);
+55 -70
View File
@@ -2,87 +2,72 @@ import { Bot, GitBranch, Database, Wifi, Settings2, Info, Settings, Rocket } fro
export interface SettingsItem { export interface SettingsItem {
id: string; id: string;
icon: React.ComponentType<{ className?: string }>;
title: string; title: string;
description: string;
icon: React.ComponentType<{ className?: string }>;
href: string; href: string;
} }
export interface SettingsCategory {
id: string;
title: string;
items: SettingsItem[];
}
/** /**
* Get the categorized list of settings items with translations * Get the list of settings items with translations
* @param t - Translation function from useTranslation hook * @param t - Translation function from useTranslation hook
* @returns Array of settings categories with translated items * @returns Array of settings items
*/ */
export const getSettingsCategories = (t: (key: string) => string): SettingsCategory[] => [ export const getSettingsItems = (t: (key: string) => string): SettingsItem[] => [
{ {
id: 'general', id: 'preferences',
title: t('general'), title: t('preferences'),
items: [ description: t('preferencesDescription'),
{ icon: Settings2,
id: 'preferences', href: '/settings/preferences',
icon: Settings2,
title: t('preferences'),
href: '/settings/preferences',
},
],
}, },
{ {
id: 'integrations', id: 'ai',
title: t('integrations'), title: t('aiSettings'),
items: [ description: t('aiSettingsDescription'),
{ icon: Bot,
id: 'ai', href: '/settings/ai',
icon: Bot,
title: t('aiSettings'),
href: '/settings/ai',
},
{
id: 'git',
icon: GitBranch,
title: t('gitSettings'),
href: '/settings/git',
},
{
id: 'nostr',
icon: Wifi,
title: t('nostrSettings'),
href: '/settings/nostr',
},
{
id: 'deploy',
icon: Rocket,
title: t('deploySettings'),
href: '/settings/deploy',
},
],
}, },
{ {
id: 'advanced', id: 'git',
title: t('advanced'), title: t('gitSettings'),
items: [ description: t('gitSettingsDescription'),
{ icon: GitBranch,
id: 'storage', href: '/settings/git',
icon: Database, },
title: t('storageSettings'), {
href: '/settings/storage', id: 'deploy',
}, title: t('deploySettings'),
{ description: t('deploySettingsDescription'),
id: 'system', icon: Rocket,
icon: Settings, href: '/settings/deploy',
title: t('systemSettings'), },
href: '/settings/system', {
}, id: 'nostr',
{ title: t('nostrSettings'),
id: 'about', description: t('nostrSettingsDescription'),
icon: Info, icon: Wifi,
title: t('aboutShakespeare'), href: '/settings/nostr',
href: '/settings/about', },
}, {
], id: 'storage',
title: t('storageSettings'),
description: t('storageSettingsDescription'),
icon: Database,
href: '/settings/storage',
},
{
id: 'system',
title: t('systemSettings'),
description: t('systemSettingsDescription'),
icon: Settings,
href: '/settings/system',
},
{
id: 'about',
title: t('aboutShakespeare'),
description: t('aboutShakespeareDescription'),
icon: Info,
href: '/settings/about',
}, },
]; ];
+4 -4
View File
@@ -29,7 +29,7 @@ export const defaultSystemPrompt = `{% if mode === "init" %}You are Shakespeare,
# Your Environment # Your Environment
You are operating within **Shakespeare**, an AI-powered website builder that allows users to create custom applications through natural language conversation. You are operating within **Shakespeare**, an AI-powered Nostr website builder that allows users to create custom Nostr applications through natural language conversation.
- **Current Date**: {{ date }} - **Current Date**: {{ date }}
- **Current Page**: {{ location.href }} - **Current Page**: {{ location.href }}
@@ -38,7 +38,7 @@ You are operating within **Shakespeare**, an AI-powered website builder that all
## What Shakespeare Is ## What Shakespeare Is
Shakespeare is a web-based development environment where users can build websites and applications by chatting with an AI assistant (you). The platform combines the power of AI-driven development with a user-friendly interface that requires no coding knowledge from the user. Shakespeare is a web-based development environment where users can build Nostr websites and applications by chatting with an AI assistant (you). The platform combines the power of AI-driven development with a user-friendly interface that requires no coding knowledge from the user.
**Important Architecture Notes:** **Important Architecture Notes:**
@@ -140,11 +140,11 @@ Shakespeare operates on a browser-based virtual filesystem (VFS) that persists a
As the AI assistant in Shakespeare, you help users by: As the AI assistant in Shakespeare, you help users by:
- Understanding their requirements through natural conversation - Understanding their requirements through natural conversation
- Writing and modifying code files to build their applications - Writing and modifying code files to build their Nostr applications
- Explaining technical concepts in accessible terms - Explaining technical concepts in accessible terms
- Providing suggestions and best practices - Providing suggestions and best practices
- Troubleshooting issues and implementing fixes - Troubleshooting issues and implementing fixes
- Building complete, functional websites and applications - Building complete, functional Nostr websites and applications
- Learning from existing projects in the VFS to provide better solutions - Learning from existing projects in the VFS to provide better solutions
The user expects you to handle all technical implementation while they focus on describing their vision and requirements. You can leverage the knowledge from other projects in the VFS to build better, more sophisticated applications. The user expects you to handle all technical implementation while they focus on describing their vision and requirements. You can leverage the knowledge from other projects in the VFS to build better, more sophisticated applications.
-54
View File
@@ -185,58 +185,4 @@ describe('GitCommitTool', () => {
expect(result).toContain('✅ Successfully committed'); expect(result).toContain('✅ Successfully committed');
}); });
it('should error when HEAD is detached (currentBranch returns null)', async () => {
// Mock .git directory exists
vi.mocked(mockFS.stat).mockResolvedValue({
isDirectory: () => true,
isFile: () => false,
});
// Mock detached HEAD state - currentBranch returns null
vi.mocked(mockGitInstance.currentBranch).mockResolvedValue(null);
await expect(tool.execute({ message: 'Test commit' })).rejects.toThrow('❌ Cannot commit: Git is in a detached HEAD state');
// Verify commit was never called
expect(mockGitInstance.commit).not.toHaveBeenCalled();
});
it('should error when HEAD is detached (currentBranch returns undefined)', async () => {
// Mock .git directory exists
vi.mocked(mockFS.stat).mockResolvedValue({
isDirectory: () => true,
isFile: () => false,
});
// Mock detached HEAD state - currentBranch returns undefined
vi.mocked(mockGitInstance.currentBranch).mockResolvedValue(undefined);
await expect(tool.execute({ message: 'Test commit' })).rejects.toThrow('❌ Cannot commit: Git is in a detached HEAD state');
// Verify commit was never called
expect(mockGitInstance.commit).not.toHaveBeenCalled();
});
it('should provide helpful instructions when HEAD is detached', async () => {
// Mock .git directory exists
vi.mocked(mockFS.stat).mockResolvedValue({
isDirectory: () => true,
isFile: () => false,
});
// Mock detached HEAD state
vi.mocked(mockGitInstance.currentBranch).mockResolvedValue(null);
try {
await tool.execute({ message: 'Test commit' });
expect.fail('Should have thrown an error');
} catch (error) {
const errorMessage = (error as Error).message;
// Verify the error message contains safe instructions that preserve changes
expect(errorMessage).toContain('git checkout -b temp-branch');
expect(errorMessage).toContain('try the commit again');
expect(errorMessage).toContain('preserving all changes');
}
});
}); });
+10 -20
View File
@@ -41,26 +41,6 @@ export class GitCommitTool implements Tool<GitCommitParams> {
throw new Error(`❌ Commit message cannot be empty.`); throw new Error(`❌ Commit message cannot be empty.`);
} }
// Check for detached HEAD state before doing any work
// currentBranch returns null when HEAD is detached
const currentBranch = await this.git.currentBranch({
dir: this.cwd,
});
if (currentBranch === null || currentBranch === undefined) {
throw new Error(
`❌ Cannot commit: Git is in a detached HEAD state.\n\n` +
`This usually happens after checking out a specific commit. ` +
`Your changes need to be on a branch before committing.\n\n` +
`To fix this and preserve your staged changes:\n` +
` 1. Run: git checkout -b temp-branch\n` +
` (This creates a new branch from your current state, preserving all changes)\n` +
` 2. Then try the commit again\n` +
` 3. After committing, you can merge to main with:\n` +
` git checkout main && git merge temp-branch`
);
}
// Get git status to see what files have changed // Get git status to see what files have changed
const statusMatrix = await this.git.statusMatrix({ const statusMatrix = await this.git.statusMatrix({
dir: this.cwd, dir: this.cwd,
@@ -99,6 +79,16 @@ export class GitCommitTool implements Tool<GitCommitParams> {
} }
} }
// Get current branch name
let currentBranch = 'main';
try {
currentBranch = await this.git.currentBranch({
dir: this.cwd,
}) || 'main';
} catch {
// Default to 'main' if we can't get the current branch
}
// Commit the changes (author/committer will be set automatically by Git class) // Commit the changes (author/committer will be set automatically by Git class)
const commitSha = await this.git.commit({ const commitSha = await this.git.commit({
dir: this.cwd, dir: this.cwd,
+7 -6
View File
@@ -3,9 +3,6 @@
"settings": "Settings", "settings": "Settings",
"backToSettings": "Back to Settings", "backToSettings": "Back to Settings",
"help": "Help", "help": "Help",
"general": "General",
"integrations": "Integrations",
"advanced": "Advanced",
"anonymous": "Anonymous", "anonymous": "Anonymous",
"logIn": "Log in", "logIn": "Log in",
"signUp": "Sign up", "signUp": "Sign up",
@@ -97,12 +94,14 @@
"chooseModel": "Choose a model...", "chooseModel": "Choose a model...",
"selectModelToDescribe": "Please select a model below, then describe what you'd like to build...", "selectModelToDescribe": "Please select a model below, then describe what you'd like to build...",
"examplePrompt": "e.g., Create a farming equipment marketplace for local farmers to buy and sell tractors, tools, and supplies...", "examplePrompt": "e.g., Create a farming equipment marketplace for local farmers to buy and sell tractors, tools, and supplies...",
"settingsDescription": "Manage your application settings and preferences.",
"aiSettings": "AI", "aiSettings": "AI",
"aiSettingsDescription": "Configure AI providers and API keys", "aiSettingsDescription": "Configure AI providers and API keys",
"gitSettings": "Git", "gitSettings": "Git",
"gitSettingsDescription": "Configure Git credentials for HTTP authentication", "gitSettingsDescription": "Configure Git credentials for HTTP authentication",
"deploySettings": "Deployment", "deploySettings": "Deployment",
"deploySettingsDescription": "Configure deployment providers", "deploySettingsDescription": "Configure deployment providers",
"deploySettingsDescriptionLong": "Configure deployment providers to deploy your projects to various hosting platforms.",
"nostrSettings": "Nostr", "nostrSettings": "Nostr",
"nostrSettingsDescription": "Configure relay connections and Nostr preferences", "nostrSettingsDescription": "Configure relay connections and Nostr preferences",
"storageSettings": "Storage", "storageSettings": "Storage",
@@ -113,9 +112,6 @@
"importRepository": "Import Repository", "importRepository": "Import Repository",
"noProjectsYet": "No projects yet", "noProjectsYet": "No projects yet",
"createFirstProject": "Create your first project to get started", "createFirstProject": "Create your first project to get started",
"searchProjects": "Search projects...",
"noProjectsFound": "No projects found",
"tryDifferentSearch": "Try a different search term",
"closeSidebar": "Close sidebar", "closeSidebar": "Close sidebar",
"collapseSidebar": "Collapse sidebar", "collapseSidebar": "Collapse sidebar",
"welcomeToShakespeare": "Welcome to Shakespeare", "welcomeToShakespeare": "Welcome to Shakespeare",
@@ -183,6 +179,7 @@
"pushFailed": "Push failed", "pushFailed": "Push failed",
"pullSuccessful": "Pull successful", "pullSuccessful": "Pull successful",
"pullFailed": "Pull failed", "pullFailed": "Pull failed",
"aiSettingsDescriptionLong": "Configure AI providers by adding your API keys. Settings are automatically saved and stored locally in your browser.",
"configuredProviders": "Configured Providers", "configuredProviders": "Configured Providers",
"addProvider": "Add Provider", "addProvider": "Add Provider",
"getApiKey": "Get API key", "getApiKey": "Get API key",
@@ -208,6 +205,7 @@
"shakespeareDeployNostrAuth": "This provider uses Nostr authentication. Make sure you are logged in to deploy.", "shakespeareDeployNostrAuth": "This provider uses Nostr authentication. Make sure you are logged in to deploy.",
"providerType": "Provider Type", "providerType": "Provider Type",
"selectProviderType": "Select a provider type", "selectProviderType": "Select a provider type",
"gitSettingsDescriptionLong": "Configure Git credentials for HTTP authentication. Settings are automatically saved and stored locally in your browser.",
"configuredCredentials": "Configured Credentials", "configuredCredentials": "Configured Credentials",
"origin": "Origin", "origin": "Origin",
"username": "Username", "username": "Username",
@@ -228,6 +226,7 @@
"license": "License", "license": "License",
"loadingLicense": "Loading license...", "loadingLicense": "Loading license...",
"failedToLoadLicense": "Failed to load license", "failedToLoadLicense": "Failed to load license",
"dataSettingsDescriptionLong": "Export files and manage local data.",
"offlineCache": "Offline Cache", "offlineCache": "Offline Cache",
"offlineCacheDescription": "Shakespeare caches files locally to enable offline functionality. Clear the cache to free up space or troubleshoot issues.", "offlineCacheDescription": "Shakespeare caches files locally to enable offline functionality. Clear the cache to free up space or troubleshoot issues.",
"cacheSize": "Cache size", "cacheSize": "Cache size",
@@ -282,6 +281,7 @@
"noModelsFound": "No models found.", "noModelsFound": "No models found.",
"tryCustomModel": "Try using a custom model instead.", "tryCustomModel": "Try using a custom model instead.",
"recentlyUsed": "Recently Used", "recentlyUsed": "Recently Used",
"availableModels": "Available Models",
"errorLoadingModels": "Error Loading Models", "errorLoadingModels": "Error Loading Models",
"apiAuthenticationFailed": "API Authentication Failed", "apiAuthenticationFailed": "API Authentication Failed",
"invalidApiKey": "Invalid API key for {{provider}}. Please check your API key in Settings.", "invalidApiKey": "Invalid API key for {{provider}}. Please check your API key in Settings.",
@@ -295,6 +295,7 @@
"untracked": "untracked", "untracked": "untracked",
"toggleSidebar": "Toggle sidebar", "toggleSidebar": "Toggle sidebar",
"openSidebar": "Open sidebar", "openSidebar": "Open sidebar",
"nostrSettingsDescriptionLong": "Configure your Nostr connection settings and relay preferences.",
"nostrAccounts": "Nostr Accounts", "nostrAccounts": "Nostr Accounts",
"noAccountsLoggedIn": "No accounts logged in. Add an account to get started.", "noAccountsLoggedIn": "No accounts logged in. Add an account to get started.",
"createAccount": "Create Account", "createAccount": "Create Account",
+5 -6
View File
@@ -3,9 +3,6 @@
"settings": "Saitunan", "settings": "Saitunan",
"backToSettings": "Koma zuwa Saitunan", "backToSettings": "Koma zuwa Saitunan",
"help": "Taimako", "help": "Taimako",
"general": "Gabaɗaya",
"integrations": "Haɗin Kai",
"advanced": "Ci Gaba",
"anonymous": "Maras Suna", "anonymous": "Maras Suna",
"logIn": "Shiga", "logIn": "Shiga",
"signUp": "Yi Rajista", "signUp": "Yi Rajista",
@@ -108,9 +105,6 @@
"importRepository": "Shigo da Repository", "importRepository": "Shigo da Repository",
"noProjectsYet": "Babu ayyuka har yanzu", "noProjectsYet": "Babu ayyuka har yanzu",
"createFirstProject": "Ƙirƙiri aikin farko don farawa", "createFirstProject": "Ƙirƙiri aikin farko don farawa",
"searchProjects": "Nemo ayyuka...",
"noProjectsFound": "Ba a sami ayyuka ba",
"tryDifferentSearch": "Gwada kalmar nema daban",
"closeSidebar": "Rufe gefen mashigi", "closeSidebar": "Rufe gefen mashigi",
"collapseSidebar": "Rufe gefen mashigi", "collapseSidebar": "Rufe gefen mashigi",
"welcomeToShakespeare": "Maraba da Shakespeare", "welcomeToShakespeare": "Maraba da Shakespeare",
@@ -178,6 +172,7 @@
"pushFailed": "Turawa ta gaza", "pushFailed": "Turawa ta gaza",
"pullSuccessful": "Ja ya yi nasara", "pullSuccessful": "Ja ya yi nasara",
"pullFailed": "Ja ya gaza", "pullFailed": "Ja ya gaza",
"aiSettingsDescriptionLong": "Saita masu samar da AI ta hanyar ƙara maɓallan API. Saitunan ana ajiye su kai tsaye kuma ana adana su a cikin burauzar ku.",
"configuredProviders": "Masu Samarwa da aka Saita", "configuredProviders": "Masu Samarwa da aka Saita",
"addProvider": "Ƙara Mai Samarwa", "addProvider": "Ƙara Mai Samarwa",
"getApiKey": "Sami maɓallin API", "getApiKey": "Sami maɓallin API",
@@ -203,6 +198,7 @@
"shakespeareDeployNostrAuth": "Wannan mai samarwa yana amfani da tabbatar da Nostr. Tabbatar cewa kun shiga don tura.", "shakespeareDeployNostrAuth": "Wannan mai samarwa yana amfani da tabbatar da Nostr. Tabbatar cewa kun shiga don tura.",
"providerType": "Nau'in Mai Samarwa", "providerType": "Nau'in Mai Samarwa",
"selectProviderType": "Zaɓi nau'in mai samarwa", "selectProviderType": "Zaɓi nau'in mai samarwa",
"gitSettingsDescriptionLong": "Saita bayanan shaidar Git don tabbatar da HTTP. Saitunan ana ajiye su kai tsaye kuma ana adana su a cikin burauzar ku.",
"configuredCredentials": "Bayanan Shaidar da aka Saita", "configuredCredentials": "Bayanan Shaidar da aka Saita",
"origin": "Asali", "origin": "Asali",
"username": "Sunan mai amfani", "username": "Sunan mai amfani",
@@ -214,6 +210,7 @@
"gitEmail": "Imel Git", "gitEmail": "Imel Git",
"coAuthoredByShakespeare": "Haɗin marubuta da Shakespeare", "coAuthoredByShakespeare": "Haɗin marubuta da Shakespeare",
"gitIdentityDescription": "Idan an saita suna da imel, za a yi amfani da su azaman marubucin aikin. In ba haka ba, za a yi amfani da shakespeare.diy. Lokacin da aka kunna haɗin marubuta, za a ƙara Shakespeare azaman haɗin marubuta.", "gitIdentityDescription": "Idan an saita suna da imel, za a yi amfani da su azaman marubucin aikin. In ba haka ba, za a yi amfani da shakespeare.diy. Lokacin da aka kunna haɗin marubuta, za a ƙara Shakespeare azaman haɗin marubuta.",
"dataSettingsDescriptionLong": "Fitar da fayiloli da sarrafa bayanan gida.",
"exportFiles": "Fitar da Fayiloli", "exportFiles": "Fitar da Fayiloli",
"exportFilesDescription": "Sauke duk ayyukanku da fayiloli azaman ajiyar ZIP. Wannan ya haɗa da duk fayilolin aikin, saitunan, da bayanan da aka adana a gida.", "exportFilesDescription": "Sauke duk ayyukanku da fayiloli azaman ajiyar ZIP. Wannan ya haɗa da duk fayilolin aikin, saitunan, da bayanan da aka adana a gida.",
"exportAllFiles": "Fitar da Duk Fayiloli", "exportAllFiles": "Fitar da Duk Fayiloli",
@@ -270,6 +267,7 @@
"noModelsFound": "Ba a sami samfura ba.", "noModelsFound": "Ba a sami samfura ba.",
"tryCustomModel": "Gwada amfani da samfuri na musamman.", "tryCustomModel": "Gwada amfani da samfuri na musamman.",
"recentlyUsed": "An yi amfani da su kwanan nan", "recentlyUsed": "An yi amfani da su kwanan nan",
"availableModels": "Samfura Masu Samuwa",
"errorLoadingModels": "Kuskure wajen Lodin Samfura", "errorLoadingModels": "Kuskure wajen Lodin Samfura",
"apiAuthenticationFailed": "Gazawar Tabbatarwar API", "apiAuthenticationFailed": "Gazawar Tabbatarwar API",
"invalidApiKey": "Maɓallin API na {{provider}} ba daidai ba ne. Da fatan za a duba maɓallin API a cikin Saitunan.", "invalidApiKey": "Maɓallin API na {{provider}} ba daidai ba ne. Da fatan za a duba maɓallin API a cikin Saitunan.",
@@ -283,6 +281,7 @@
"untracked": "ba a bi ba", "untracked": "ba a bi ba",
"toggleSidebar": "Juya gefen mashigi", "toggleSidebar": "Juya gefen mashigi",
"openSidebar": "Buɗe gefen mashigi", "openSidebar": "Buɗe gefen mashigi",
"nostrSettingsDescriptionLong": "Saita saitunan haɗin Nostr da zaɓuɓɓukan relay.",
"nostrAccounts": "Asusun Nostr", "nostrAccounts": "Asusun Nostr",
"noAccountsLoggedIn": "Babu asusun da aka shiga. Ƙara asusu don farawa.", "noAccountsLoggedIn": "Babu asusun da aka shiga. Ƙara asusu don farawa.",
"createAccount": "Ƙirƙiri Asusu", "createAccount": "Ƙirƙiri Asusu",
+5 -6
View File
@@ -3,9 +3,6 @@
"settings": "Ntọala", "settings": "Ntọala",
"backToSettings": "Laghachi na Ntọala", "backToSettings": "Laghachi na Ntọala",
"help": "Enyemaka", "help": "Enyemaka",
"general": "Izugbe",
"integrations": "Njikọta",
"advanced": "Dị elu",
"anonymous": "Onye na-amaghị aha", "anonymous": "Onye na-amaghị aha",
"logIn": "Banye", "logIn": "Banye",
"signUp": "Debanye aha", "signUp": "Debanye aha",
@@ -108,9 +105,6 @@
"importRepository": "Bubata Repository", "importRepository": "Bubata Repository",
"noProjectsYet": "Enwebeghị ọrụ ọ bụla", "noProjectsYet": "Enwebeghị ọrụ ọ bụla",
"createFirstProject": "Mepụta ọrụ mbụ gị iji malite", "createFirstProject": "Mepụta ọrụ mbụ gị iji malite",
"searchProjects": "Chọọ ọrụ...",
"noProjectsFound": "Achọtaghị ọrụ ọ bụla",
"tryDifferentSearch": "Nwalee okwu ọchụchọ dị iche",
"closeSidebar": "Mechie sidebar", "closeSidebar": "Mechie sidebar",
"collapseSidebar": "Gbakọọ sidebar", "collapseSidebar": "Gbakọọ sidebar",
"welcomeToShakespeare": "Nnọọ na Shakespeare", "welcomeToShakespeare": "Nnọọ na Shakespeare",
@@ -178,6 +172,7 @@
"pushFailed": "Nkwanye dara", "pushFailed": "Nkwanye dara",
"pullSuccessful": "Ndọta gara nke ọma", "pullSuccessful": "Ndọta gara nke ọma",
"pullFailed": "Ndọta dara", "pullFailed": "Ndọta dara",
"aiSettingsDescriptionLong": "Hazie ndị na-enye AI site na ịtinye igodo API gị. Ntọala na-echekwa onwe ya ma chekwaa ya na mpaghara na browser gị.",
"configuredProviders": "Ndị Na-enye Ahaziri", "configuredProviders": "Ndị Na-enye Ahaziri",
"addProvider": "Tinye Onye Na-enye", "addProvider": "Tinye Onye Na-enye",
"getApiKey": "Nweta igodo API", "getApiKey": "Nweta igodo API",
@@ -203,6 +198,7 @@
"shakespeareDeployNostrAuth": "Onye na-enye a na-eji nkwenye Nostr. Jide n'aka na ị banyere iji bufee.", "shakespeareDeployNostrAuth": "Onye na-enye a na-eji nkwenye Nostr. Jide n'aka na ị banyere iji bufee.",
"providerType": "Ụdị Onye Na-enye", "providerType": "Ụdị Onye Na-enye",
"selectProviderType": "Họrọ ụdị onye na-enye", "selectProviderType": "Họrọ ụdị onye na-enye",
"gitSettingsDescriptionLong": "Hazie nzere Git maka nkwenye HTTP. Ntọala na-echekwa onwe ya ma chekwaa ya na mpaghara na browser gị.",
"configuredCredentials": "Nzere Ahaziri", "configuredCredentials": "Nzere Ahaziri",
"origin": "Mmalite", "origin": "Mmalite",
"username": "Aha onye ọrụ", "username": "Aha onye ọrụ",
@@ -214,6 +210,7 @@
"gitEmail": "Ozi-eletrọniki Git", "gitEmail": "Ozi-eletrọniki Git",
"coAuthoredByShakespeare": "Ndekọ ọnụ na Shakespeare", "coAuthoredByShakespeare": "Ndekọ ọnụ na Shakespeare",
"gitIdentityDescription": "Ọ bụrụ na ahaziri aha na ozi-eletrọniki, a ga-eji ha dị ka onye dere ya. Ma ọ bụghị, a ga-eji shakespeare.diy. Mgbe emere ndekọ ọnụ, a ga-etinye Shakespeare dị ka ndekọ ọnụ.", "gitIdentityDescription": "Ọ bụrụ na ahaziri aha na ozi-eletrọniki, a ga-eji ha dị ka onye dere ya. Ma ọ bụghị, a ga-eji shakespeare.diy. Mgbe emere ndekọ ọnụ, a ga-etinye Shakespeare dị ka ndekọ ọnụ.",
"dataSettingsDescriptionLong": "Bupụta faịlụ ma jikwaa data mpaghara.",
"exportFiles": "Bupụta Faịlụ", "exportFiles": "Bupụta Faịlụ",
"exportFilesDescription": "Budata ọrụ gị niile na faịlụ dị ka mkpokọta ZIP. Nke a gụnyere faịlụ ọrụ niile, ntọala, na data echekwara na mpaghara.", "exportFilesDescription": "Budata ọrụ gị niile na faịlụ dị ka mkpokọta ZIP. Nke a gụnyere faịlụ ọrụ niile, ntọala, na data echekwara na mpaghara.",
"exportAllFiles": "Bupụta Faịlụ Niile", "exportAllFiles": "Bupụta Faịlụ Niile",
@@ -270,6 +267,7 @@
"noModelsFound": "Ahụghị ụdịdị ọ bụla.", "noModelsFound": "Ahụghị ụdịdị ọ bụla.",
"tryCustomModel": "Gbalịa iji ụdịdị omenala kama.", "tryCustomModel": "Gbalịa iji ụdịdị omenala kama.",
"recentlyUsed": "Ejiri Na Nso Nso A", "recentlyUsed": "Ejiri Na Nso Nso A",
"availableModels": "Ụdịdị Dị",
"errorLoadingModels": "Njehie Na-ebu Ụdịdị", "errorLoadingModels": "Njehie Na-ebu Ụdịdị",
"contextUsage": "Ojiji ọnọdụ: {{tokens}} / {{total}} tokens ({{percentage}}%)", "contextUsage": "Ojiji ọnọdụ: {{tokens}} / {{total}} tokens ({{percentage}}%)",
"totalCostSession": "Mkpokọta ọnụ ahịa maka oge nkata a", "totalCostSession": "Mkpokọta ọnụ ahịa maka oge nkata a",
@@ -280,6 +278,7 @@
"untracked": "na-esoghị", "untracked": "na-esoghị",
"toggleSidebar": "Gbanwee sidebar", "toggleSidebar": "Gbanwee sidebar",
"openSidebar": "Meghee sidebar", "openSidebar": "Meghee sidebar",
"nostrSettingsDescriptionLong": "Hazie ntọala njikọ Nostr gị na nhọrọ relay.",
"nostrAccounts": "Akaụntụ Nostr", "nostrAccounts": "Akaụntụ Nostr",
"noAccountsLoggedIn": "Enweghị akaụntụ banyere. Tinye akaụntụ iji malite.", "noAccountsLoggedIn": "Enweghị akaụntụ banyere. Tinye akaụntụ iji malite.",
"createAccount": "Mepụta Akaụntụ", "createAccount": "Mepụta Akaụntụ",
+6 -6
View File
@@ -3,9 +3,6 @@
"settings": "Configurações", "settings": "Configurações",
"backToSettings": "Voltar às Configurações", "backToSettings": "Voltar às Configurações",
"help": "Ajuda", "help": "Ajuda",
"general": "Geral",
"integrations": "Integrações",
"advanced": "Avançado",
"anonymous": "Anônimo", "anonymous": "Anônimo",
"logIn": "Entrar", "logIn": "Entrar",
"signUp": "Cadastrar", "signUp": "Cadastrar",
@@ -100,6 +97,7 @@
"gitSettingsDescription": "Configure credenciais do Git para autenticação HTTP", "gitSettingsDescription": "Configure credenciais do Git para autenticação HTTP",
"deploySettings": "Implantação", "deploySettings": "Implantação",
"deploySettingsDescription": "Configure provedores de implantação", "deploySettingsDescription": "Configure provedores de implantação",
"deploySettingsDescriptionLong": "Configure provedores de implantação para implantar seus projetos em várias plataformas de hospedagem.",
"nostrSettings": "Nostr", "nostrSettings": "Nostr",
"nostrSettingsDescription": "Configure conexões de relay e preferências do Nostr", "nostrSettingsDescription": "Configure conexões de relay e preferências do Nostr",
"storageSettings": "Armazenamento", "storageSettings": "Armazenamento",
@@ -110,9 +108,6 @@
"importRepository": "Importar Repositório", "importRepository": "Importar Repositório",
"noProjectsYet": "Nenhum projeto ainda", "noProjectsYet": "Nenhum projeto ainda",
"createFirstProject": "Crie seu primeiro projeto para começar", "createFirstProject": "Crie seu primeiro projeto para começar",
"searchProjects": "Pesquisar projetos...",
"noProjectsFound": "Nenhum projeto encontrado",
"tryDifferentSearch": "Tente um termo de pesquisa diferente",
"closeSidebar": "Fechar barra lateral", "closeSidebar": "Fechar barra lateral",
"collapseSidebar": "Recolher barra lateral", "collapseSidebar": "Recolher barra lateral",
"welcomeToShakespeare": "Bem-vindo ao Shakespeare", "welcomeToShakespeare": "Bem-vindo ao Shakespeare",
@@ -180,6 +175,7 @@
"pushFailed": "Push falhou", "pushFailed": "Push falhou",
"pullSuccessful": "Pull realizado com sucesso", "pullSuccessful": "Pull realizado com sucesso",
"pullFailed": "Pull falhou", "pullFailed": "Pull falhou",
"aiSettingsDescriptionLong": "Configure provedores de IA adicionando suas chaves de API. As configurações são salvas automaticamente e armazenadas localmente em seu navegador.",
"configuredProviders": "Provedores Configurados", "configuredProviders": "Provedores Configurados",
"addProvider": "Adicionar Provedor", "addProvider": "Adicionar Provedor",
"getApiKey": "Obter chave de API", "getApiKey": "Obter chave de API",
@@ -205,6 +201,7 @@
"shakespeareDeployNostrAuth": "Este provedor usa autenticação Nostr. Certifique-se de estar logado para implantar.", "shakespeareDeployNostrAuth": "Este provedor usa autenticação Nostr. Certifique-se de estar logado para implantar.",
"providerType": "Tipo de Provedor", "providerType": "Tipo de Provedor",
"selectProviderType": "Selecione um tipo de provedor", "selectProviderType": "Selecione um tipo de provedor",
"gitSettingsDescriptionLong": "Configure credenciais do Git para autenticação HTTP. As configurações são salvas automaticamente e armazenadas localmente em seu navegador.",
"configuredCredentials": "Credenciais Configuradas", "configuredCredentials": "Credenciais Configuradas",
"origin": "Origem", "origin": "Origem",
"username": "Nome de usuário", "username": "Nome de usuário",
@@ -216,6 +213,7 @@
"gitEmail": "Email Git", "gitEmail": "Email Git",
"coAuthoredByShakespeare": "Co-autoria de Shakespeare", "coAuthoredByShakespeare": "Co-autoria de Shakespeare",
"gitIdentityDescription": "Se nome e email estiverem configurados, eles serão usados como autor do commit. Caso contrário, shakespeare.diy será usado. Quando co-autoria estiver ativada, Shakespeare será adicionado como co-autor.", "gitIdentityDescription": "Se nome e email estiverem configurados, eles serão usados como autor do commit. Caso contrário, shakespeare.diy será usado. Quando co-autoria estiver ativada, Shakespeare será adicionado como co-autor.",
"dataSettingsDescriptionLong": "Exporte arquivos e gerencie dados locais.",
"offlineCache": "Cache Offline", "offlineCache": "Cache Offline",
"offlineCacheDescription": "O Shakespeare armazena arquivos localmente para permitir funcionalidade offline. Limpe o cache para liberar espaço ou solucionar problemas.", "offlineCacheDescription": "O Shakespeare armazena arquivos localmente para permitir funcionalidade offline. Limpe o cache para liberar espaço ou solucionar problemas.",
"cacheSize": "Tamanho do cache", "cacheSize": "Tamanho do cache",
@@ -279,6 +277,7 @@
"noModelsFound": "Nenhum modelo encontrado.", "noModelsFound": "Nenhum modelo encontrado.",
"tryCustomModel": "Tente usar um modelo personalizado.", "tryCustomModel": "Tente usar um modelo personalizado.",
"recentlyUsed": "Usados Recentemente", "recentlyUsed": "Usados Recentemente",
"availableModels": "Modelos Disponíveis",
"errorLoadingModels": "Erro ao Carregar Modelos", "errorLoadingModels": "Erro ao Carregar Modelos",
"apiAuthenticationFailed": "Falha na Autenticação da API", "apiAuthenticationFailed": "Falha na Autenticação da API",
"invalidApiKey": "Chave de API inválida para {{provider}}. Verifique sua chave de API nas Configurações.", "invalidApiKey": "Chave de API inválida para {{provider}}. Verifique sua chave de API nas Configurações.",
@@ -292,6 +291,7 @@
"untracked": "não rastreado", "untracked": "não rastreado",
"toggleSidebar": "Alternar barra lateral", "toggleSidebar": "Alternar barra lateral",
"openSidebar": "Abrir barra lateral", "openSidebar": "Abrir barra lateral",
"nostrSettingsDescriptionLong": "Configure suas configurações de conexão Nostr e preferências de relay.",
"nostrAccounts": "Contas Nostr", "nostrAccounts": "Contas Nostr",
"noAccountsLoggedIn": "Nenhuma conta logada. Adicione uma conta para começar.", "noAccountsLoggedIn": "Nenhuma conta logada. Adicione uma conta para começar.",
"createAccount": "Criar Conta", "createAccount": "Criar Conta",
+5 -6
View File
@@ -3,9 +3,6 @@
"settings": "Awọn eto", "settings": "Awọn eto",
"backToSettings": "Pada si Awọn eto", "backToSettings": "Pada si Awọn eto",
"help": "Iranlọwọ", "help": "Iranlọwọ",
"general": "Gbogbogbo",
"integrations": "Awọn isopọ",
"advanced": "To siwaju",
"anonymous": "Alainidamọ", "anonymous": "Alainidamọ",
"logIn": "Wọle", "logIn": "Wọle",
"signUp": "Forukọsilẹ", "signUp": "Forukọsilẹ",
@@ -108,9 +105,6 @@
"importRepository": "Gbe Repository wọle", "importRepository": "Gbe Repository wọle",
"noProjectsYet": "Ko si awọn iṣẹ akanṣe sibẹsibẹ", "noProjectsYet": "Ko si awọn iṣẹ akanṣe sibẹsibẹ",
"createFirstProject": "Ṣẹda iṣẹ akanṣe akọkọ rẹ lati bẹrẹ", "createFirstProject": "Ṣẹda iṣẹ akanṣe akọkọ rẹ lati bẹrẹ",
"searchProjects": "Wa awọn iṣẹ akanṣe...",
"noProjectsFound": "Ko ri awọn iṣẹ akanṣe",
"tryDifferentSearch": "Gbiyanju ọrọ wiwa miiran",
"closeSidebar": "Ti ẹgbẹ sidebar", "closeSidebar": "Ti ẹgbẹ sidebar",
"collapseSidebar": "Subu sidebar", "collapseSidebar": "Subu sidebar",
"welcomeToShakespeare": "Kaabo si Shakespeare", "welcomeToShakespeare": "Kaabo si Shakespeare",
@@ -178,6 +172,7 @@
"pushFailed": "Titari kuna", "pushFailed": "Titari kuna",
"pullSuccessful": "Fifa ni aṣeyọri", "pullSuccessful": "Fifa ni aṣeyọri",
"pullFailed": "Fifa kuna", "pullFailed": "Fifa kuna",
"aiSettingsDescriptionLong": "Tunto awọn olupese AI nipa fifi awọn bọtini API rẹ kun. Awọn eto ni a fi pamọ laifọwọyi ati pe a tọju wọn ni agbegbe ninu awọn aṣawakiri rẹ.",
"configuredProviders": "Awọn Olupese Ti a Tunto", "configuredProviders": "Awọn Olupese Ti a Tunto",
"addProvider": "Fi Olupese kun", "addProvider": "Fi Olupese kun",
"getApiKey": "Gba bọtini API", "getApiKey": "Gba bọtini API",
@@ -203,6 +198,7 @@
"shakespeareDeployNostrAuth": "Olupese yii nlo ijẹrisi Nostr. Rii daju pe o ti wọle lati gbe jade.", "shakespeareDeployNostrAuth": "Olupese yii nlo ijẹrisi Nostr. Rii daju pe o ti wọle lati gbe jade.",
"providerType": "Iru Olupese", "providerType": "Iru Olupese",
"selectProviderType": "Yan iru olupese kan", "selectProviderType": "Yan iru olupese kan",
"gitSettingsDescriptionLong": "Tunto awọn ẹri Git fun ijẹrisi HTTP. Awọn eto ni a fi pamọ laifọwọyi ati pe a tọju wọn ni agbegbe ninu awọn aṣawakiri rẹ.",
"configuredCredentials": "Awọn Ẹri Ti a Tunto", "configuredCredentials": "Awọn Ẹri Ti a Tunto",
"origin": "Ipilẹṣẹ", "origin": "Ipilẹṣẹ",
"username": "Orukọ olumulo", "username": "Orukọ olumulo",
@@ -214,6 +210,7 @@
"gitEmail": "Imeeli Git", "gitEmail": "Imeeli Git",
"coAuthoredByShakespeare": "Ajọpọ onkọwe pẹlu Shakespeare", "coAuthoredByShakespeare": "Ajọpọ onkọwe pẹlu Shakespeare",
"gitIdentityDescription": "Ti a ba tunto orukọ ati imeeli, wọn yoo jẹ lilo bi onkọwe. Bibẹẹkọ, shakespeare.diy yoo jẹ lilo. Nigbati a ba mu ajọpọ onkọwe ṣiṣẹ, Shakespeare yoo jẹ fifikun bi ajọpọ onkọwe.", "gitIdentityDescription": "Ti a ba tunto orukọ ati imeeli, wọn yoo jẹ lilo bi onkọwe. Bibẹẹkọ, shakespeare.diy yoo jẹ lilo. Nigbati a ba mu ajọpọ onkọwe ṣiṣẹ, Shakespeare yoo jẹ fifikun bi ajọpọ onkọwe.",
"dataSettingsDescriptionLong": "Gbe awọn faili jade ati ṣakoso data agbegbe.",
"exportFiles": "Gbe Awọn faili jade", "exportFiles": "Gbe Awọn faili jade",
"exportFilesDescription": "Gba gbogbo awọn iṣẹ akanṣe ati awọn faili rẹ gẹgẹbi apo ZIP. Eyi pẹlu gbogbo awọn faili iṣẹ akanṣe, awọn eto, ati data ti a tọju ni agbegbe.", "exportFilesDescription": "Gba gbogbo awọn iṣẹ akanṣe ati awọn faili rẹ gẹgẹbi apo ZIP. Eyi pẹlu gbogbo awọn faili iṣẹ akanṣe, awọn eto, ati data ti a tọju ni agbegbe.",
"exportAllFiles": "Gbe Gbogbo Awọn faili jade", "exportAllFiles": "Gbe Gbogbo Awọn faili jade",
@@ -270,6 +267,7 @@
"noModelsFound": "Ko si awọn awoṣe ti a ri.", "noModelsFound": "Ko si awọn awoṣe ti a ri.",
"tryCustomModel": "Gbiyanju lilo awoṣe aṣa dipo.", "tryCustomModel": "Gbiyanju lilo awoṣe aṣa dipo.",
"recentlyUsed": "Ti a Lo Laipẹ", "recentlyUsed": "Ti a Lo Laipẹ",
"availableModels": "Awọn awoṣe Ti O Wa",
"errorLoadingModels": "Aṣiṣe Gbigbe Awọn awoṣe", "errorLoadingModels": "Aṣiṣe Gbigbe Awọn awoṣe",
"contextUsage": "Lilo aaye oro: {{tokens}} / {{total}} awọn token ({{percentage}}%)", "contextUsage": "Lilo aaye oro: {{tokens}} / {{total}} awọn token ({{percentage}}%)",
"totalCostSession": "Lapapọ iye owo fun igba ibaraẹnisọrọ yii", "totalCostSession": "Lapapọ iye owo fun igba ibaraẹnisọrọ yii",
@@ -280,6 +278,7 @@
"untracked": "ti a ko tọpa", "untracked": "ti a ko tọpa",
"toggleSidebar": "Yipada sidebar", "toggleSidebar": "Yipada sidebar",
"openSidebar": "Ṣi sidebar", "openSidebar": "Ṣi sidebar",
"nostrSettingsDescriptionLong": "Tunto awọn eto asopọ Nostr rẹ ati awọn ayanfẹ relay.",
"nostrAccounts": "Awọn Akọọlẹ Nostr", "nostrAccounts": "Awọn Akọọlẹ Nostr",
"noAccountsLoggedIn": "Ko si awọn akọọlẹ ti o wọle. Fi akọọlẹ kun lati bẹrẹ.", "noAccountsLoggedIn": "Ko si awọn akọọlẹ ti o wọle. Fi akọọlẹ kun lati bẹrẹ.",
"createAccount": "Ṣẹda Akọọlẹ", "createAccount": "Ṣẹda Akọọlẹ",
+6 -6
View File
@@ -3,9 +3,6 @@
"settings": "设置", "settings": "设置",
"backToSettings": "返回设置", "backToSettings": "返回设置",
"help": "帮助", "help": "帮助",
"general": "常规",
"integrations": "集成",
"advanced": "高级",
"anonymous": "匿名", "anonymous": "匿名",
"logIn": "登录", "logIn": "登录",
"signUp": "注册", "signUp": "注册",
@@ -100,6 +97,7 @@
"gitSettingsDescription": "配置HTTP身份验证的Git凭据", "gitSettingsDescription": "配置HTTP身份验证的Git凭据",
"deploySettings": "部署", "deploySettings": "部署",
"deploySettingsDescription": "配置部署提供商", "deploySettingsDescription": "配置部署提供商",
"deploySettingsDescriptionLong": "配置部署提供商以将您的项目部署到各种托管平台。",
"nostrSettings": "Nostr", "nostrSettings": "Nostr",
"nostrSettingsDescription": "配置中继连接和Nostr偏好", "nostrSettingsDescription": "配置中继连接和Nostr偏好",
"storageSettings": "存储", "storageSettings": "存储",
@@ -110,9 +108,6 @@
"importRepository": "导入仓库", "importRepository": "导入仓库",
"noProjectsYet": "还没有项目", "noProjectsYet": "还没有项目",
"createFirstProject": "创建您的第一个项目开始使用", "createFirstProject": "创建您的第一个项目开始使用",
"searchProjects": "搜索项目...",
"noProjectsFound": "未找到项目",
"tryDifferentSearch": "尝试不同的搜索词",
"closeSidebar": "关闭侧边栏", "closeSidebar": "关闭侧边栏",
"collapseSidebar": "折叠侧边栏", "collapseSidebar": "折叠侧边栏",
"welcomeToShakespeare": "欢迎使用Shakespeare", "welcomeToShakespeare": "欢迎使用Shakespeare",
@@ -180,6 +175,7 @@
"pushFailed": "推送失败", "pushFailed": "推送失败",
"pullSuccessful": "拉取成功", "pullSuccessful": "拉取成功",
"pullFailed": "拉取失败", "pullFailed": "拉取失败",
"aiSettingsDescriptionLong": "通过添加您的API密钥来配置AI提供商。设置会自动保存并存储在您的浏览器本地。",
"configuredProviders": "已配置的提供商", "configuredProviders": "已配置的提供商",
"addProvider": "添加提供商", "addProvider": "添加提供商",
"getApiKey": "获取API密钥", "getApiKey": "获取API密钥",
@@ -205,6 +201,7 @@
"shakespeareDeployNostrAuth": "此提供商使用Nostr身份验证。请确保您已登录以进行部署。", "shakespeareDeployNostrAuth": "此提供商使用Nostr身份验证。请确保您已登录以进行部署。",
"providerType": "提供商类型", "providerType": "提供商类型",
"selectProviderType": "选择提供商类型", "selectProviderType": "选择提供商类型",
"gitSettingsDescriptionLong": "配置HTTP身份验证的Git凭据。设置会自动保存并存储在您的浏览器本地。",
"configuredCredentials": "已配置的凭据", "configuredCredentials": "已配置的凭据",
"origin": "源", "origin": "源",
"username": "用户名", "username": "用户名",
@@ -216,6 +213,7 @@
"gitEmail": "Git邮箱", "gitEmail": "Git邮箱",
"coAuthoredByShakespeare": "Shakespeare共同作者", "coAuthoredByShakespeare": "Shakespeare共同作者",
"gitIdentityDescription": "如果配置了名称和邮箱,它们将用作提交作者。否则,将使用shakespeare.diy。启用共同作者时,Shakespeare将被添加为共同作者。", "gitIdentityDescription": "如果配置了名称和邮箱,它们将用作提交作者。否则,将使用shakespeare.diy。启用共同作者时,Shakespeare将被添加为共同作者。",
"dataSettingsDescriptionLong": "导出文件和管理本地数据。",
"offlineCache": "离线缓存", "offlineCache": "离线缓存",
"offlineCacheDescription": "Shakespeare在本地缓存文件以启用离线功能。清除缓存以释放空间或解决问题。", "offlineCacheDescription": "Shakespeare在本地缓存文件以启用离线功能。清除缓存以释放空间或解决问题。",
"cacheSize": "缓存大小", "cacheSize": "缓存大小",
@@ -279,6 +277,7 @@
"noModelsFound": "未找到模型。", "noModelsFound": "未找到模型。",
"tryCustomModel": "尝试使用自定义模型。", "tryCustomModel": "尝试使用自定义模型。",
"recentlyUsed": "最近使用", "recentlyUsed": "最近使用",
"availableModels": "可用模型",
"errorLoadingModels": "加载模型时出错", "errorLoadingModels": "加载模型时出错",
"apiAuthenticationFailed": "API身份验证失败", "apiAuthenticationFailed": "API身份验证失败",
"invalidApiKey": "{{provider}}的API密钥无效。请在设置中检查您的API密钥。", "invalidApiKey": "{{provider}}的API密钥无效。请在设置中检查您的API密钥。",
@@ -292,6 +291,7 @@
"untracked": "未跟踪", "untracked": "未跟踪",
"toggleSidebar": "切换侧边栏", "toggleSidebar": "切换侧边栏",
"openSidebar": "打开侧边栏", "openSidebar": "打开侧边栏",
"nostrSettingsDescriptionLong": "配置您的Nostr连接设置和中继偏好。",
"nostrAccounts": "Nostr账户", "nostrAccounts": "Nostr账户",
"noAccountsLoggedIn": "没有账户登录。添加账户开始使用。", "noAccountsLoggedIn": "没有账户登录。添加账户开始使用。",
"createAccount": "创建账户", "createAccount": "创建账户",
+39 -42
View File
@@ -26,7 +26,6 @@ import { PasswordInput } from '@/components/ui/password-input';
import { Label } from '@/components/ui/label'; import { Label } from '@/components/ui/label';
import { Checkbox } from '@/components/ui/checkbox'; import { Checkbox } from '@/components/ui/checkbox';
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion'; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion';
import { Card, CardContent } from '@/components/ui/card';
import { CreditsBadge } from '@/components/CreditsBadge'; import { CreditsBadge } from '@/components/CreditsBadge';
import { CreditsDialog } from '@/components/CreditsDialog'; import { CreditsDialog } from '@/components/CreditsDialog';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
@@ -304,7 +303,7 @@ export function AISettings() {
{t('aiSettings')} {t('aiSettings')}
</h1> </h1>
<p className="text-muted-foreground"> <p className="text-muted-foreground">
{t('aiSettingsDescription')} {t('aiSettingsDescriptionLong')}
</p> </p>
</div> </div>
</div> </div>
@@ -317,7 +316,7 @@ export function AISettings() {
{t('aiSettings')} {t('aiSettings')}
</h1> </h1>
<p className="text-muted-foreground"> <p className="text-muted-foreground">
{t('aiSettingsDescription')} {t('aiSettingsDescriptionLong')}
</p> </p>
</div> </div>
)} )}
@@ -369,44 +368,43 @@ export function AISettings() {
const showNostrLoginRequired = isNostrPreset && !isLoggedIntoNostr; const showNostrLoginRequired = isNostrPreset && !isLoggedIntoNostr;
return ( return (
<Card key={preset.id}> <div key={preset.id} className="border rounded-lg p-4 space-y-3">
<CardContent className="p-4 space-y-3"> <div className="flex items-center justify-between">
<div className="flex items-center justify-between"> <div className="flex items-center gap-2">
<div className="flex items-center gap-2"> <ExternalFavicon
<ExternalFavicon url={preset.baseURL}
url={preset.baseURL} size={16}
size={16} fallback={<Bot size={16} />}
fallback={<Bot size={16} />} />
/> <h5 className="font-medium">{preset.name}</h5>
<h5 className="font-medium">{preset.name}</h5>
</div>
{(preset.apiKeysURL && preset.id !== "routstr") && (
<button
type="button"
className="text-xs text-muted-foreground underline hover:text-foreground"
onClick={() => window.open(preset.apiKeysURL, '_blank')}
>
{t('getApiKey')}
</button>
)}
</div> </div>
{(preset.apiKeysURL && preset.id !== "routstr") && (
<button
type="button"
className="text-xs text-muted-foreground underline hover:text-foreground"
onClick={() => window.open(preset.apiKeysURL, '_blank')}
>
{t('getApiKey')}
</button>
)}
</div>
{showNostrLoginRequired ? ( {showNostrLoginRequired ? (
<div className="space-y-2"> <div className="space-y-2">
<p className="text-sm text-muted-foreground"> <p className="text-sm text-muted-foreground">
{t('loginToNostrRequired')} {t('loginToNostrRequired')}
</p> </p>
<Button <Button
asChild asChild
className="w-full" className="w-full"
> >
<Link to="/settings/nostr"> <Link to="/settings/nostr">
{t('goToNostrSettings')} {t('goToNostrSettings')}
</Link> </Link>
</Button> </Button>
</div> </div>
) : ( ) : (
<div className="space-y-2"> <div className="space-y-2">
<div className="flex gap-2"> <div className="flex gap-2">
{!preset.nostr && ( {!preset.nostr && (
<PasswordInput <PasswordInput
@@ -471,8 +469,7 @@ export function AISettings() {
</div> </div>
</div> </div>
)} )}
</CardContent> </div>
</Card>
); );
})} })}
</div> </div>
@@ -482,7 +479,7 @@ export function AISettings() {
{/* Custom Provider */} {/* Custom Provider */}
<div className="space-y-3"> <div className="space-y-3">
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="custom-provider"> <AccordionItem value="custom-provider" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<h4 className="text-sm font-medium">{t('addCustomProvider')}</h4> <h4 className="text-sm font-medium">{t('addCustomProvider')}</h4>
</AccordionTrigger> </AccordionTrigger>
+13 -18
View File
@@ -5,7 +5,6 @@ import { Info, ExternalLink, Loader2, AlertTriangle, ArrowLeft, Code, Globe } fr
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion'; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion';
import { Alert, AlertDescription } from '@/components/ui/alert'; import { Alert, AlertDescription } from '@/components/ui/alert';
import { Card, CardContent } from '@/components/ui/card';
import { useIsMobile } from '@/hooks/useIsMobile'; import { useIsMobile } from '@/hooks/useIsMobile';
import { EmailSubscription } from '@/components/EmailSubscription'; import { EmailSubscription } from '@/components/EmailSubscription';
@@ -86,7 +85,7 @@ export function AboutSettings() {
<div className="space-y-3"> <div className="space-y-3">
{/* Mirrors */} {/* Mirrors */}
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="mirrors"> <AccordionItem value="mirrors" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<Globe className="h-5 w-5" /> <Globe className="h-5 w-5" />
@@ -132,25 +131,21 @@ export function AboutSettings() {
</Accordion> </Accordion>
{/* Project Information */} {/* Project Information */}
<Card> <Button
<CardContent className="p-0"> variant="outline"
<Button className="w-full h-12 flex items-center gap-2 justify-start text-base"
variant="ghost" asChild
className="w-full h-12 flex items-center gap-2 justify-start text-base" >
asChild <a href="https://gitlab.com/soapbox-pub/shakespeare" target="_blank">
> <Code className="!size-5" />
<a href="https://gitlab.com/soapbox-pub/shakespeare" target="_blank"> {t('sourceCode')}
<Code className="!size-5" /> <ExternalLink className="ml-auto" />
{t('sourceCode')} </a>
<ExternalLink className="ml-auto" /> </Button>
</a>
</Button>
</CardContent>
</Card>
{/* License */} {/* License */}
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="license-text"> <AccordionItem value="license-text" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<Info className="h-5 w-5" /> <Info className="h-5 w-5" />
-135
View File
@@ -10,14 +10,6 @@ import { useToast } from '@/hooks/useToast';
import { ZipImportDialog } from '@/components/ZipImportDialog'; import { ZipImportDialog } from '@/components/ZipImportDialog';
import { useSeoMeta } from '@unhead/react'; import { useSeoMeta } from '@unhead/react';
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from '@/components/ui/dropdown-menu'; import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from '@/components/ui/dropdown-menu';
import { useCurrentUser } from '@/hooks/useCurrentUser';
import { useUserRepositories } from '@/hooks/useUserRepositories';
import { useContacts } from '@/hooks/useContacts';
import { useFollowedRepositories } from '@/hooks/useFollowedRepositories';
import { RepositoryCard } from '@/components/RepositoryCard';
import { Skeleton } from '@/components/ui/skeleton';
import { Card, CardContent } from '@/components/ui/card';
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs';
export default function Clone() { export default function Clone() {
const { t } = useTranslation(); const { t } = useTranslation();
@@ -30,11 +22,6 @@ export default function Clone() {
const { toast } = useToast(); const { toast } = useToast();
const autoCloneInitiatedRef = useRef(false); const autoCloneInitiatedRef = useRef(false);
const [isZipDialogOpen, setIsZipDialogOpen] = useState(false); const [isZipDialogOpen, setIsZipDialogOpen] = useState(false);
const { user } = useCurrentUser();
const { data: repositories = [], isLoading: isLoadingRepos } = useUserRepositories(user?.pubkey);
const { data: contacts = [] } = useContacts(user?.pubkey);
const { data: followedRepositories = [], isLoading: isLoadingFollowedRepos } = useFollowedRepositories(contacts);
const [activeTab, setActiveTab] = useState<'my-projects' | 'follows'>('my-projects');
useSeoMeta({ useSeoMeta({
title: `${t('importRepository')} - Shakespeare`, title: `${t('importRepository')} - Shakespeare`,
@@ -289,128 +276,6 @@ export default function Clone() {
open={isZipDialogOpen} open={isZipDialogOpen}
onOpenChange={setIsZipDialogOpen} onOpenChange={setIsZipDialogOpen}
/> />
{/* NIP-34 Repositories with Tabs */}
{user && (
<div className="mt-16 max-w-7xl mx-auto">
<Tabs value={activeTab} onValueChange={(value) => setActiveTab(value as 'my-projects' | 'follows')}>
<TabsList className="mb-6">
<TabsTrigger value="my-projects">
My Projects
</TabsTrigger>
<TabsTrigger value="follows">
Follows
</TabsTrigger>
</TabsList>
<TabsContent value="my-projects">
{isLoadingRepos ? (
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
{Array.from({ length: 3 }).map((_, i) => (
<Card key={i} className="h-full flex flex-col">
<CardContent className="p-6 flex flex-col flex-1">
<div className="flex items-start gap-3 mb-4">
<Skeleton className="w-12 h-12 rounded-lg" />
<div className="flex-1 space-y-2">
<Skeleton className="h-5 w-32" />
<Skeleton className="h-4 w-24" />
</div>
</div>
<div className="space-y-2 mb-4">
<Skeleton className="h-4 w-full" />
<Skeleton className="h-4 w-4/5" />
</div>
<div className="flex gap-1 mb-4">
<Skeleton className="h-5 w-16" />
<Skeleton className="h-5 w-20" />
</div>
<div className="mt-auto flex gap-2">
<Skeleton className="h-9 flex-1" />
<Skeleton className="h-9 w-9" />
</div>
</CardContent>
</Card>
))}
</div>
) : repositories.length > 0 ? (
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
{repositories.map((repo) => (
<RepositoryCard key={repo.id} repo={repo} />
))}
</div>
) : (
<Card className="border-dashed">
<CardContent className="py-12 px-8 text-center">
<div className="max-w-sm mx-auto space-y-4">
<p className="text-muted-foreground">
No repositories found. Publish your first repository to Nostr to see it here.
</p>
</div>
</CardContent>
</Card>
)}
</TabsContent>
<TabsContent value="follows">
{isLoadingFollowedRepos ? (
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
{Array.from({ length: 6 }).map((_, i) => (
<Card key={i} className="h-full flex flex-col">
<CardContent className="p-6 flex flex-col flex-1">
<div className="flex items-start gap-3 mb-4">
<Skeleton className="w-12 h-12 rounded-lg" />
<div className="flex-1 space-y-2">
<Skeleton className="h-5 w-32" />
<Skeleton className="h-4 w-24" />
</div>
</div>
<div className="space-y-2 mb-4">
<Skeleton className="h-4 w-full" />
<Skeleton className="h-4 w-4/5" />
</div>
<div className="flex gap-1 mb-4">
<Skeleton className="h-5 w-16" />
<Skeleton className="h-5 w-20" />
</div>
<div className="mt-auto flex gap-2">
<Skeleton className="h-9 flex-1" />
<Skeleton className="h-9 w-9" />
</div>
</CardContent>
</Card>
))}
</div>
) : followedRepositories.length > 0 ? (
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
{followedRepositories.map((repo) => (
<RepositoryCard key={repo.id} repo={repo} />
))}
</div>
) : contacts.length > 0 ? (
<Card className="border-dashed">
<CardContent className="py-12 px-8 text-center">
<div className="max-w-sm mx-auto space-y-4">
<p className="text-muted-foreground">
None of the people you follow have published repositories yet.
</p>
</div>
</CardContent>
</Card>
) : (
<Card className="border-dashed">
<CardContent className="py-12 px-8 text-center">
<div className="max-w-sm mx-auto space-y-4">
<p className="text-muted-foreground">
You're not following anyone yet. Follow people on Nostr to see their repositories here.
</p>
</div>
</CardContent>
</Card>
)}
</TabsContent>
</Tabs>
</div>
)}
</AppLayout> </AppLayout>
); );
} }
+33 -35
View File
@@ -32,7 +32,6 @@ import { Input } from '@/components/ui/input';
import { PasswordInput } from '@/components/ui/password-input'; import { PasswordInput } from '@/components/ui/password-input';
import { Label } from '@/components/ui/label'; import { Label } from '@/components/ui/label';
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion'; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion';
import { Card, CardContent } from '@/components/ui/card';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
import { useDeploySettings } from '@/hooks/useDeploySettings'; import { useDeploySettings } from '@/hooks/useDeploySettings';
import { useNetlifyOAuth } from '@/hooks/useNetlifyOAuth'; import { useNetlifyOAuth } from '@/hooks/useNetlifyOAuth';
@@ -84,6 +83,7 @@ function SortableProviderItem({ provider, index, preset, onRemove, onUpdate, sho
ref={setNodeRef} ref={setNodeRef}
style={style} style={style}
value={String(index)} value={String(index)}
className="border rounded-lg"
> >
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
@@ -519,7 +519,7 @@ export function DeploySettings() {
{t('deploySettings')} {t('deploySettings')}
</h1> </h1>
<p className="text-muted-foreground"> <p className="text-muted-foreground">
{t('deploySettingsDescription')} {t('deploySettingsDescriptionLong')}
</p> </p>
</div> </div>
</div> </div>
@@ -532,7 +532,7 @@ export function DeploySettings() {
{t('deploySettings')} {t('deploySettings')}
</h1> </h1>
<p className="text-muted-foreground"> <p className="text-muted-foreground">
{t('deploySettingsDescription')} {t('deploySettingsDescriptionLong')}
</p> </p>
</div> </div>
)} )}
@@ -591,37 +591,36 @@ export function DeploySettings() {
const oauthError = oauthHook?.error ?? null; const oauthError = oauthHook?.error ?? null;
return ( return (
<Card key={preset.id}> <div key={preset.id} className="border rounded-lg p-4 space-y-3">
<CardContent className="p-4 space-y-3"> <div className="flex items-center justify-between">
<div className="flex items-center justify-between"> <div className="flex items-center gap-2">
<div className="flex items-center gap-2"> {(() => {
{(() => { const url = getProviderUrl(preset);
const url = getProviderUrl(preset); return url ? (
return url ? ( <ExternalFavicon
<ExternalFavicon url={url}
url={url} size={16}
size={16} fallback={<Rocket size={16} />}
fallback={<Rocket size={16} />} />
/> ) : (
) : ( <Rocket size={16} />
<Rocket size={16} /> );
); })()}
})()} <h5 className="font-medium">{preset.name}</h5>
<h5 className="font-medium">{preset.name}</h5>
</div>
{preset.apiKeyURL && !isOAuthConfigured && (
<button
type="button"
className="text-xs text-muted-foreground underline hover:text-foreground"
onClick={() => window.open(preset.apiKeyURL, '_blank')}
>
{t('getApiKey')}
</button>
)}
</div> </div>
<p className="text-sm text-muted-foreground">{preset.description}</p> {preset.apiKeyURL && !isOAuthConfigured && (
<button
type="button"
className="text-xs text-muted-foreground underline hover:text-foreground"
onClick={() => window.open(preset.apiKeyURL, '_blank')}
>
{t('getApiKey')}
</button>
)}
</div>
<p className="text-sm text-muted-foreground">{preset.description}</p>
{showNostrLoginRequired ? ( {showNostrLoginRequired ? (
<div className="space-y-2"> <div className="space-y-2">
<p className="text-sm text-muted-foreground"> <p className="text-sm text-muted-foreground">
{t('loginToNostrRequired')} {t('loginToNostrRequired')}
@@ -725,8 +724,7 @@ export function DeploySettings() {
</div> </div>
</div> </div>
)} )}
</CardContent> </div>
</Card>
); );
})} })}
</div> </div>
@@ -736,7 +734,7 @@ export function DeploySettings() {
{/* Custom Provider */} {/* Custom Provider */}
<div className="space-y-3"> <div className="space-y-3">
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="custom-provider"> <AccordionItem value="custom-provider" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<h4 className="text-sm font-medium">{t('addCustomProvider')}</h4> <h4 className="text-sm font-medium">{t('addCustomProvider')}</h4>
</AccordionTrigger> </AccordionTrigger>
+26 -29
View File
@@ -6,7 +6,6 @@ import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label'; import { Label } from '@/components/ui/label';
import { Badge } from '@/components/ui/badge'; import { Badge } from '@/components/ui/badge';
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion'; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion';
import { Card, CardContent } from '@/components/ui/card';
import { Switch } from '@/components/ui/switch'; import { Switch } from '@/components/ui/switch';
import { import {
DropdownMenu, DropdownMenu,
@@ -127,7 +126,7 @@ export function GitSettings() {
{t('gitSettings')} {t('gitSettings')}
</h1> </h1>
<p className="text-muted-foreground"> <p className="text-muted-foreground">
{t('gitSettingsDescription')} {t('gitSettingsDescriptionLong')}
</p> </p>
</div> </div>
</div> </div>
@@ -140,7 +139,7 @@ export function GitSettings() {
{t('gitSettings')} {t('gitSettings')}
</h1> </h1>
<p className="text-muted-foreground"> <p className="text-muted-foreground">
{t('gitSettingsDescription')} {t('gitSettingsDescriptionLong')}
</p> </p>
</div> </div>
)} )}
@@ -157,7 +156,7 @@ export function GitSettings() {
const isCustom = !preset; const isCustom = !preset;
return ( return (
<AccordionItem key={origin} value={origin}> <AccordionItem key={origin} value={origin} className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<ExternalFavicon <ExternalFavicon
@@ -224,29 +223,28 @@ export function GitSettings() {
<h4 className="text-sm font-medium">{t('addProvider')}</h4> <h4 className="text-sm font-medium">{t('addProvider')}</h4>
<div className="grid grid-cols-1 md:grid-cols-2 gap-3"> <div className="grid grid-cols-1 md:grid-cols-2 gap-3">
{availablePresets.map((preset) => ( {availablePresets.map((preset) => (
<Card key={preset.id}> <div key={preset.id} className="border rounded-lg p-4 space-y-3">
<CardContent className="p-4 space-y-3"> <div className="flex items-center justify-between">
<div className="flex items-center justify-between"> <div className="flex items-center gap-2">
<div className="flex items-center gap-2"> <ExternalFavicon
<ExternalFavicon url={preset.origin}
url={preset.origin} size={16}
size={16} fallback={<GitBranch size={16} />}
fallback={<GitBranch size={16} />} />
/> <h5 className="font-medium">{preset.name}</h5>
<h5 className="font-medium">{preset.name}</h5>
</div>
{preset.tokenURL && (preset.id !== 'github' || !isOAuthConfigured) && (
<button
type="button"
className="text-xs text-muted-foreground underline hover:text-foreground"
onClick={() => window.open(preset.tokenURL, '_blank')}
>
{t('getToken')}
</button>
)}
</div> </div>
{preset.tokenURL && (preset.id !== 'github' || !isOAuthConfigured) && (
<button
type="button"
className="text-xs text-muted-foreground underline hover:text-foreground"
onClick={() => window.open(preset.tokenURL, '_blank')}
>
{t('getToken')}
</button>
)}
</div>
{preset.id === 'github' ? ( {preset.id === 'github' ? (
// Special rendering for GitHub - OAuth button if configured, otherwise token input // Special rendering for GitHub - OAuth button if configured, otherwise token input
isOAuthConfigured && !forceManualEntry[preset.id] ? ( isOAuthConfigured && !forceManualEntry[preset.id] ? (
<div className="space-y-3"> <div className="space-y-3">
@@ -351,8 +349,7 @@ export function GitSettings() {
</Button> </Button>
</div> </div>
)} )}
</CardContent> </div>
</Card>
))} ))}
</div> </div>
</div> </div>
@@ -361,7 +358,7 @@ export function GitSettings() {
{/* Custom Provider */} {/* Custom Provider */}
<div className="space-y-3"> <div className="space-y-3">
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="custom-provider"> <AccordionItem value="custom-provider" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<h4 className="text-sm font-medium">{t('addCustomProvider')}</h4> <h4 className="text-sm font-medium">{t('addCustomProvider')}</h4>
</AccordionTrigger> </AccordionTrigger>
@@ -422,7 +419,7 @@ export function GitSettings() {
{/* Git Identity */} {/* Git Identity */}
<div className="space-y-3"> <div className="space-y-3">
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="git-identity"> <AccordionItem value="git-identity" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<h4 className="text-sm font-medium">{t('gitIdentity')}</h4> <h4 className="text-sm font-medium">{t('gitIdentity')}</h4>
</AccordionTrigger> </AccordionTrigger>
+2 -2
View File
@@ -150,7 +150,7 @@ export function NostrSettings() {
{t('nostrSettings')} {t('nostrSettings')}
</h1> </h1>
<p className="text-muted-foreground"> <p className="text-muted-foreground">
{t('nostrSettingsDescription')} {t('nostrSettingsDescriptionLong')}
</p> </p>
</div> </div>
</div> </div>
@@ -163,7 +163,7 @@ export function NostrSettings() {
{t('nostrSettings')} {t('nostrSettings')}
</h1> </h1>
<p className="text-muted-foreground"> <p className="text-muted-foreground">
{t('nostrSettingsDescription')} {t('nostrSettingsDescriptionLong')}
</p> </p>
</div> </div>
)} )}
+2 -2
View File
@@ -199,7 +199,7 @@ export function ProjectView() {
onClick={() => setIsSidebarVisible(false)} onClick={() => setIsSidebarVisible(false)}
/> />
{/* Sidebar - positioned above the backdrop */} {/* Sidebar - positioned above the backdrop */}
<div className="relative left-0 top-0 h-full w-72 max-w-[80vw] bg-background border-r shadow-lg z-10"> <div className="relative left-0 top-0 h-full w-80 max-w-[80vw] bg-background border-r shadow-lg z-10">
<ProjectSidebar <ProjectSidebar
selectedProject={project} selectedProject={project}
onSelectProject={(selectedProject) => { onSelectProject={(selectedProject) => {
@@ -314,7 +314,7 @@ export function ProjectView() {
return ( return (
<div className="h-screen flex bg-background"> <div className="h-screen flex bg-background">
{/* Fixed Sidebar */} {/* Fixed Sidebar */}
<div className={`w-72 border-r bg-sidebar duration-300 ${isSidebarVisible ? 'block' : 'hidden'}`}> <div className={`w-80 border-r bg-sidebar duration-300 ${isSidebarVisible ? 'block' : 'hidden'}`}>
<ProjectSidebar <ProjectSidebar
selectedProject={project} selectedProject={project}
onSelectProject={(selectedProject) => { onSelectProject={(selectedProject) => {
+28 -24
View File
@@ -1,38 +1,42 @@
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useIsMobile } from '@/hooks/useIsMobile'; import { useIsMobile } from '@/hooks/useIsMobile';
import { getSettingsCategories } from '@/lib/settingsItems'; import { getSettingsItems } from '@/lib/settingsItems';
import { SettingsItemMobile } from '@/components/SettingsItemMobile';
export function Settings() { export function Settings() {
const { t } = useTranslation(); const { t } = useTranslation();
const navigate = useNavigate(); const navigate = useNavigate();
const isMobile = useIsMobile(); const isMobile = useIsMobile();
const settingsCategories = getSettingsCategories(t); const settingsItems = getSettingsItems(t);
if (isMobile) { if (isMobile) {
return ( return (
<div className="p-4 space-y-8"> <div className="p-6 space-y-4">
{settingsCategories.map((category) => ( <div className="space-y-2">
<div key={category.id}> <h2 className="text-xl font-bold">{t('settings')}</h2>
<h3 className="text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2 px-2"> <p className="text-muted-foreground">
{category.title} {t('settingsDescription')}
</h3> </p>
<div className="overflow-hidden rounded-xl border border-border shadow-sm"> </div>
{category.items.map((item, index) => ( <div className="space-y-3">
<SettingsItemMobile {settingsItems.map((item) => {
key={item.id} const Icon = item.icon;
icon={item.icon} return (
title={item.title} <div
onClick={() => navigate(item.href)} key={item.id}
isFirst={index === 0} className="flex items-center gap-3 p-4 rounded-lg border hover:border-primary/20 hover:bg-primary/5 cursor-pointer transition-colors"
isLast={index === category.items.length - 1} onClick={() => navigate(item.href)}
/> >
))} <Icon className="h-5 w-5 text-primary flex-shrink-0" />
</div> <div className="flex-1 min-w-0">
</div> <div className="font-medium">{item.title}</div>
))} <div className="text-sm text-muted-foreground">{item.description}</div>
</div>
</div>
);
})}
</div>
{import.meta.env.VERSION && ( {import.meta.env.VERSION && (
<div className="text-center text-xs text-muted-foreground/60 pt-4"> <div className="text-center text-xs text-muted-foreground/60 pt-4">
v{import.meta.env.VERSION} v{import.meta.env.VERSION}
@@ -43,4 +47,4 @@ export function Settings() {
} }
} }
export default Settings; export default Settings;
+1 -1
View File
@@ -15,7 +15,7 @@ describe('StorageSettings', () => {
expect(screen.getByText('Storage')).toBeInTheDocument(); expect(screen.getByText('Storage')).toBeInTheDocument();
// Check for description // Check for description
expect(screen.getByText('Export files and manage local data')).toBeInTheDocument(); expect(screen.getByText('Export files and manage local data.')).toBeInTheDocument();
// Check for Persist Data section // Check for Persist Data section
expect(screen.getByText('Persist Data')).toBeInTheDocument(); expect(screen.getByText('Persist Data')).toBeInTheDocument();
+2 -2
View File
@@ -288,7 +288,7 @@ export function StorageSettings() {
{t('storageSettings')} {t('storageSettings')}
</h1> </h1>
<p className="text-muted-foreground"> <p className="text-muted-foreground">
{t('storageSettingsDescription')} {t('dataSettingsDescriptionLong')}
</p> </p>
</div> </div>
</div> </div>
@@ -301,7 +301,7 @@ export function StorageSettings() {
{t('storageSettings')} {t('storageSettings')}
</h1> </h1>
<p className="text-muted-foreground"> <p className="text-muted-foreground">
{t('storageSettingsDescription')} {t('dataSettingsDescriptionLong')}
</p> </p>
</div> </div>
)} )}
+11 -11
View File
@@ -308,7 +308,7 @@ export function SystemSettings() {
<div className="space-y-3 max-w-xl"> <div className="space-y-3 max-w-xl">
{/* Service Worker Configuration */} {/* Service Worker Configuration */}
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="service-worker"> <AccordionItem value="service-worker" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<h4 className="text-sm font-medium">{t('serviceWorker')}</h4> <h4 className="text-sm font-medium">{t('serviceWorker')}</h4>
</AccordionTrigger> </AccordionTrigger>
@@ -411,7 +411,7 @@ export function SystemSettings() {
{/* Project Template Configuration */} {/* Project Template Configuration */}
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="project-template"> <AccordionItem value="project-template" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<h4 className="text-sm font-medium">{t('projectTemplate')}</h4> <h4 className="text-sm font-medium">{t('projectTemplate')}</h4>
@@ -459,7 +459,7 @@ export function SystemSettings() {
{/* CORS Proxy Configuration */} {/* CORS Proxy Configuration */}
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="cors-proxy"> <AccordionItem value="cors-proxy" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<h4 className="text-sm font-medium">{t('corsProxy')}</h4> <h4 className="text-sm font-medium">{t('corsProxy')}</h4>
@@ -507,7 +507,7 @@ export function SystemSettings() {
{/* Favicon URL Configuration */} {/* Favicon URL Configuration */}
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="favicon-url"> <AccordionItem value="favicon-url" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<h4 className="text-sm font-medium">{t('faviconUrl')}</h4> <h4 className="text-sm font-medium">{t('faviconUrl')}</h4>
@@ -555,7 +555,7 @@ export function SystemSettings() {
{/* JavaScript CDN Configuration */} {/* JavaScript CDN Configuration */}
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="esm-url"> <AccordionItem value="esm-url" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<h4 className="text-sm font-medium">{t('esmUrl')}</h4> <h4 className="text-sm font-medium">{t('esmUrl')}</h4>
@@ -604,7 +604,7 @@ export function SystemSettings() {
{/* Preview Domain Configuration */} {/* Preview Domain Configuration */}
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="preview-domain"> <AccordionItem value="preview-domain" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<h4 className="text-sm font-medium">{t('previewDomain')}</h4> <h4 className="text-sm font-medium">{t('previewDomain')}</h4>
@@ -652,7 +652,7 @@ export function SystemSettings() {
{/* Showcase Configuration */} {/* Showcase Configuration */}
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="showcase"> <AccordionItem value="showcase" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<h4 className="text-sm font-medium">{t('showcase')}</h4> <h4 className="text-sm font-medium">{t('showcase')}</h4>
@@ -746,7 +746,7 @@ export function SystemSettings() {
{/* Sentry DSN Configuration */} {/* Sentry DSN Configuration */}
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="sentry-dsn"> <AccordionItem value="sentry-dsn" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<h4 className="text-sm font-medium">{t('sentryDsn')}</h4> <h4 className="text-sm font-medium">{t('sentryDsn')}</h4>
@@ -794,7 +794,7 @@ export function SystemSettings() {
{/* Filesystem Paths Configuration */} {/* Filesystem Paths Configuration */}
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="filesystem-paths"> <AccordionItem value="filesystem-paths" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<h4 className="text-sm font-medium">{t('filesystemPaths')}</h4> <h4 className="text-sm font-medium">{t('filesystemPaths')}</h4>
@@ -1016,7 +1016,7 @@ export function SystemSettings() {
{/* System Prompt Configuration */} {/* System Prompt Configuration */}
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="system-prompt"> <AccordionItem value="system-prompt" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<h4 className="text-sm font-medium">{t('systemPrompt')}</h4> <h4 className="text-sm font-medium">{t('systemPrompt')}</h4>
@@ -1063,7 +1063,7 @@ export function SystemSettings() {
{/* Terminal */} {/* Terminal */}
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="terminal"> <AccordionItem value="terminal" className="border rounded-lg">
<AccordionTrigger className="px-4 py-3 hover:no-underline"> <AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<h4 className="text-sm font-medium">{t('terminal')}</h4> <h4 className="text-sm font-medium">{t('terminal')}</h4>
+1 -2
View File
@@ -81,8 +81,7 @@ export default {
borderRadius: { borderRadius: {
lg: 'var(--radius)', lg: 'var(--radius)',
md: 'calc(var(--radius) - 2px)', md: 'calc(var(--radius) - 2px)',
sm: 'calc(var(--radius) - 4px)', sm: 'calc(var(--radius) - 4px)'
xs: '2px'
}, },
keyframes: { keyframes: {
'accordion-down': { 'accordion-down': {