@weppy/roblox-mcp 2.0.7 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +19 -1
- package/COMMERCIAL-LICENSE.md +1 -1
- package/README.md +12 -12
- package/TRADEMARKS.md +1 -1
- package/docs/assets/screenshots/plugin_main.png +0 -0
- package/docs/assets/screenshots/plugins_menu.png +0 -0
- package/docs/assets/screenshots/weppy_plugin_toolbar.png +0 -0
- package/docs/en/dashboard/changelog.md +1 -1
- package/docs/en/dashboard/connection.md +1 -1
- package/docs/en/dashboard/overview.md +1 -1
- package/docs/en/dashboard/playtest.md +1 -1
- package/docs/en/dashboard/settings.md +1 -1
- package/docs/en/dashboard/sync.md +1 -1
- package/docs/en/dashboard/tools.md +1 -1
- package/docs/en/installation/README.md +5 -3
- package/docs/en/installation/ai-apps/antigravity.md +1 -1
- package/docs/en/installation/ai-apps/claude-app.md +1 -1
- package/docs/en/installation/ai-apps/claude-code.md +1 -1
- package/docs/en/installation/ai-apps/codex-app.md +1 -1
- package/docs/en/installation/ai-apps/codex-cli.md +1 -1
- package/docs/en/installation/ai-apps/cursor.md +1 -1
- package/docs/en/installation/ai-apps/gemini-cli.md +1 -1
- package/docs/en/installation/roblox-explorer.md +9 -9
- package/docs/en/installation/roblox-plugin.md +3 -3
- package/docs/en/pro-upgrade.md +3 -3
- package/docs/en/sync/overview.md +2 -2
- package/docs/en/tools/system-and-debugging.md +8 -0
- package/docs/es/README.md +7 -7
- package/docs/es/dashboard/changelog.md +1 -1
- package/docs/es/dashboard/connection.md +1 -1
- package/docs/es/dashboard/overview.md +1 -1
- package/docs/es/dashboard/playtest.md +1 -1
- package/docs/es/dashboard/settings.md +1 -1
- package/docs/es/dashboard/sync.md +1 -1
- package/docs/es/dashboard/tools.md +1 -1
- package/docs/es/installation/README.md +2 -2
- package/docs/es/installation/ai-apps/antigravity.md +1 -1
- package/docs/es/installation/ai-apps/claude-app.md +1 -1
- package/docs/es/installation/ai-apps/claude-code.md +1 -1
- package/docs/es/installation/ai-apps/codex-app.md +1 -1
- package/docs/es/installation/ai-apps/codex-cli.md +1 -1
- package/docs/es/installation/ai-apps/cursor.md +1 -1
- package/docs/es/installation/ai-apps/gemini-cli.md +1 -1
- package/docs/es/installation/roblox-explorer.md +9 -9
- package/docs/es/installation/roblox-plugin.md +3 -3
- package/docs/es/pro-upgrade.md +1 -1
- package/docs/es/sync/overview.md +2 -2
- package/docs/es/tools/system-and-debugging.md +8 -0
- package/docs/id/README.md +7 -7
- package/docs/id/dashboard/changelog.md +1 -1
- package/docs/id/dashboard/connection.md +1 -1
- package/docs/id/dashboard/overview.md +1 -1
- package/docs/id/dashboard/playtest.md +1 -1
- package/docs/id/dashboard/settings.md +1 -1
- package/docs/id/dashboard/sync.md +1 -1
- package/docs/id/dashboard/tools.md +1 -1
- package/docs/id/installation/README.md +3 -3
- package/docs/id/installation/ai-apps/antigravity.md +1 -1
- package/docs/id/installation/ai-apps/claude-app.md +1 -1
- package/docs/id/installation/ai-apps/claude-code.md +1 -1
- package/docs/id/installation/ai-apps/codex-app.md +1 -1
- package/docs/id/installation/ai-apps/codex-cli.md +1 -1
- package/docs/id/installation/ai-apps/cursor.md +1 -1
- package/docs/id/installation/ai-apps/gemini-cli.md +1 -1
- package/docs/id/installation/roblox-explorer.md +9 -9
- package/docs/id/installation/roblox-plugin.md +3 -3
- package/docs/id/pro-upgrade.md +1 -1
- package/docs/id/sync/overview.md +2 -2
- package/docs/id/tools/system-and-debugging.md +8 -0
- package/docs/ja/README.md +7 -7
- package/docs/ja/installation/README.md +3 -3
- package/docs/ja/installation/ai-apps/antigravity.md +1 -1
- package/docs/ja/installation/ai-apps/claude-app.md +1 -1
- package/docs/ja/installation/ai-apps/claude-code.md +1 -1
- package/docs/ja/installation/ai-apps/codex-app.md +1 -1
- package/docs/ja/installation/ai-apps/codex-cli.md +1 -1
- package/docs/ja/installation/ai-apps/cursor.md +1 -1
- package/docs/ja/installation/ai-apps/gemini-cli.md +1 -1
- package/docs/ja/installation/roblox-explorer.md +9 -9
- package/docs/ja/installation/roblox-plugin.md +3 -3
- package/docs/ja/pro-upgrade.md +1 -1
- package/docs/ja/sync/overview.md +2 -2
- package/docs/ja/tools/system-and-debugging.md +8 -0
- package/docs/ko/README.md +7 -7
- package/docs/ko/installation/README.md +5 -3
- package/docs/ko/installation/ai-apps/antigravity.md +1 -1
- package/docs/ko/installation/ai-apps/claude-app.md +1 -1
- package/docs/ko/installation/ai-apps/claude-code.md +1 -1
- package/docs/ko/installation/ai-apps/codex-app.md +1 -1
- package/docs/ko/installation/ai-apps/codex-cli.md +1 -1
- package/docs/ko/installation/ai-apps/cursor.md +1 -1
- package/docs/ko/installation/ai-apps/gemini-cli.md +1 -1
- package/docs/ko/installation/roblox-explorer.md +9 -9
- package/docs/ko/installation/roblox-plugin.md +3 -3
- package/docs/ko/pro-upgrade.md +1 -1
- package/docs/ko/sync/overview.md +2 -2
- package/docs/ko/tools/system-and-debugging.md +8 -0
- package/docs/pt-br/README.md +8 -8
- package/docs/pt-br/dashboard/changelog.md +1 -1
- package/docs/pt-br/dashboard/connection.md +1 -1
- package/docs/pt-br/dashboard/overview.md +1 -1
- package/docs/pt-br/dashboard/playtest.md +1 -1
- package/docs/pt-br/dashboard/settings.md +1 -1
- package/docs/pt-br/dashboard/sync.md +1 -1
- package/docs/pt-br/dashboard/tools.md +1 -1
- package/docs/pt-br/installation/README.md +3 -3
- package/docs/pt-br/installation/ai-apps/antigravity.md +1 -1
- package/docs/pt-br/installation/ai-apps/claude-app.md +1 -1
- package/docs/pt-br/installation/ai-apps/claude-code.md +1 -1
- package/docs/pt-br/installation/ai-apps/codex-app.md +1 -1
- package/docs/pt-br/installation/ai-apps/codex-cli.md +1 -1
- package/docs/pt-br/installation/ai-apps/cursor.md +1 -1
- package/docs/pt-br/installation/ai-apps/gemini-cli.md +1 -1
- package/docs/pt-br/installation/roblox-explorer.md +9 -9
- package/docs/pt-br/installation/roblox-plugin.md +3 -3
- package/docs/pt-br/pro-upgrade.md +1 -1
- package/docs/pt-br/sync/overview.md +2 -2
- package/docs/pt-br/tools/system-and-debugging.md +8 -0
- package/docs/troubleshooting.md +1 -1
- package/install.ps1 +37 -14
- package/install.sh +38 -3
- package/llms-full.txt +8 -8
- package/llms.txt +5 -5
- package/package.json +1 -1
- package/plugins/weppy-roblox-mcp/.claude-plugin/plugin.json +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogDetailPage-D6Tqz7ut.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogDetailPage-DRPIGDB0.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-BH87M2hn.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-DVPYTw2L.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ConfirmModal-CvXLNYq0.js → ConfirmModal-Db4rfrTo.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-Cv2i3LSr.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{InfoLabel-vz7vtbbV.js → InfoLabel-DzXzzs6Q.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/OverviewPage-Dsfl-NRT.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/OverviewPage-FoC28UL8.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-BjBAsHLz.js +11 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-Dw8nj399.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{PropertyDiff-CbDafceC.js → PropertyDiff-BZMdMzMr.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-BB7-WAMU.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-BKp2VKMW.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{StatusBadge-BMTgkxDJ.js → StatusBadge-DtcYlxe-.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-DcELF5_j.js +4 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromo-CcQarFkP.css +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromo.module-BBX3CVXn.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromoProgress-r5fgmYI5.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-Cfau3bX3.js +1 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-DWRH2iF4.js +129 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{tier-promo-config-CJ-J0n2q.css → tier-promo-config-C-Xy3iYW.css} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{tier-promo-config-B9lIKWCQ.js → tier-promo-config-CQFDWwo4.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{useLiveUptime-DXXyWm6j.js → useLiveUptime-5lD1XKnw.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/index.html +3 -3
- package/plugins/weppy-roblox-mcp/dashboard/dist/wrox-icon.png +0 -0
- package/plugins/weppy-roblox-mcp/dist/index.js +79 -76
- package/plugins/weppy-roblox-mcp/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogDetailPage-C2oKsYGC.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogDetailPage-IgHLnaEX.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-Br-A5H5t.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-Dao4jPQA.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-Bl7tLgL2.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/OverviewPage-BDDctbAl.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/OverviewPage-CS05LsEh.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-C0iCoAQp.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-LnuHE5FL.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-CJs9ctOf.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-DP9OFhNb.css +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-BfXIBNVS.js +0 -4
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromoPanel-CUrTMsXB.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/TierPromoProgress-DBA-FZGE.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-O4dXhEU-.js +0 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-CkXvRg-O.js +0 -69
- package/smithery.yaml +0 -13
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._page_17pcx_2{display:flex;flex-direction:column;gap:20px;max-width:900px}._header_17pcx_10{display:flex;align-items:center;gap:12px}._backLink_17pcx_16{font-family:var(--font-label);font-size:12px;color:var(--accent);cursor:pointer;text-decoration:none;transition:opacity var(--transition)}._backLink_17pcx_16:hover{opacity:.8}._headerTitle_17pcx_29{font-family:var(--font-label);font-size:14px;font-weight:600;color:var(--text-primary);letter-spacing:.03em}._headerTime_17pcx_37{font-family:var(--font-code);font-size:12px;color:var(--text-secondary);margin-left:auto}._statusActive_17pcx_44{color:var(--success);font-weight:600}._statusCompleted_17pcx_49{color:var(--text-muted)}._section_17pcx_54{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._sectionTitle_17pcx_61{font-family:var(--font-label);font-size:12px;font-weight:600;color:var(--text-primary);text-transform:uppercase;letter-spacing:.05em;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid var(--border)}._summaryGrid_17pcx_74{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px}._summaryCard_17pcx_80{background:var(--bg-secondary);border:1px solid var(--border);border-radius:6px;padding:10px 12px;text-align:center;cursor:pointer;transition:border-color var(--transition)}._summaryCard_17pcx_80:hover{border-color:var(--accent)}._summaryCardActive_17pcx_94{border-color:var(--accent);background:var(--accent-dim)}._summaryIcon_17pcx_99{font-size:20px;display:block;margin-bottom:4px}._summaryCount_17pcx_105{font-family:var(--font-code);font-size:18px;font-weight:700;color:var(--text-primary)}._summaryLabel_17pcx_112{font-family:var(--font-label);font-size:10px;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.04em;margin-top:2px}._timelineFilter_17pcx_122{display:flex;align-items:center;gap:8px;margin-bottom:12px}._filterLabel_17pcx_129{font-family:var(--font-label);font-size:11px;color:var(--text-secondary)}._filterSelect_17pcx_135{font-family:var(--font-code);font-size:11px;padding:3px 8px;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-primary)}._timeline_17pcx_122{display:flex;flex-direction:column;gap:0;position:relative;max-height:480px;overflow-y:auto}._timelineEntry_17pcx_155{display:flex;gap:12px;padding:8px 0;border-bottom:1px solid var(--border);transition:background var(--transition);cursor:pointer}._timelineEntry_17pcx_155:last-child{border-bottom:none}._timelineEntry_17pcx_155:hover{background:var(--bg-secondary)}._timelineTime_17pcx_172{font-family:var(--font-code);font-size:11px;color:var(--text-muted);min-width:50px;flex-shrink:0}._timelineIcon_17pcx_180{font-size:14px;flex-shrink:0}._timelineBody_17pcx_185{flex:1;min-width:0}._timelineSummary_17pcx_190{font-family:var(--font-code);font-size:12px;color:var(--text-primary);word-break:break-all}._timelineTarget_17pcx_197{font-family:var(--font-code);font-size:11px;color:var(--text-secondary);margin-top:2px}._timelineConfidence_17pcx_204{font-family:var(--font-label);font-size:9px;padding:1px 5px;border-radius:3px;margin-left:8px;vertical-align:middle}._confidenceExact_17pcx_213{background:#22c55e26;color:var(--success)}._confidencePartial_17pcx_218{background:#f59e0b26;color:var(--warning)}._confidenceAfterOnly_17pcx_223{background:#22c55e14;color:var(--text-secondary)}._confidenceIntentOnly_17pcx_228{background:#ef444426;color:var(--error)}._confidenceUnknown_17pcx_233{background:var(--bg-secondary);color:var(--text-muted)}._timelineExpanded_17pcx_239{margin-top:8px;padding:8px;background:var(--bg-card);border:1px solid var(--border);border-radius:6px}._beforeAfterList_17pcx_248{display:flex;flex-direction:column;gap:12px}._beforeAfterItem_17pcx_254{background:var(--bg-secondary);border:1px solid var(--border);border-radius:6px;overflow:hidden}._beforeAfterHeader_17pcx_261{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:var(--bg-card);border-bottom:1px solid var(--border);cursor:pointer}._beforeAfterPath_17pcx_271{font-family:var(--font-code);font-size:11px;color:var(--text-primary)}._beforeAfterBadge_17pcx_277{font-family:var(--font-label);font-size:9px;padding:1px 6px;border-radius:3px;text-transform:uppercase;letter-spacing:.04em}._badgeCreate_17pcx_286{background:#22c55e26;color:var(--success)}._badgeModify_17pcx_291{background:#f59e0b26;color:var(--warning)}._badgeDelete_17pcx_296{background:#ef444426;color:var(--error)}._badgeMove_17pcx_301{background:#3b82f626;color:var(--accent)}._beforeAfterBody_17pcx_306{padding:8px}._empty_17pcx_311{text-align:center;padding:20px;color:var(--text-muted);font-family:var(--font-label);font-size:12px}._loading_17pcx_320{text-align:center;padding:40px 20px;color:var(--text-secondary);font-family:var(--font-label);font-size:12px}._error_17pcx_329{text-align:center;padding:40px 20px;color:var(--error);font-family:var(--font-label);font-size:13px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,b as j,u as L,e as O,c as A,j as t,T as p}from"./index-CkXvRg-O.js";import{I as $}from"./InfoLabel-vz7vtbbV.js";import{D,P as F}from"./PropertyDiff-CbDafceC.js";function M(e){const a={scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0};for(const l of e)switch(l.category){case"script":l.changeType==="create"?a.scriptsCreated++:a.scriptsModified++;break;case"instance":l.changeType==="create"?a.instancesCreated++:l.changeType==="delete"?a.instancesDeleted++:l.changeType==="move"&&a.instancesMoved++;break;case"property":a.propertiesChanged++;break;case"lighting":a.lightingChanged=!0;break;case"terrain":a.terrainChanged=!0;break;case"asset":a.assetsInserted++;break}return a}function P(e){const[a,l]=r.useState(""),[i,m]=r.useState(""),[g,f]=r.useState(),[y,h]=r.useState("completed"),[x,_]=r.useState([]),[s,c]=r.useState([]),[o,u]=r.useState([]),[N,E]=r.useState({scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0}),[I,v]=r.useState(!0),[w,T]=r.useState(null),C=r.useCallback(async()=>{if(e){v(!0),T(null);try{const[d,k]=await Promise.all([j.get(`/api/dashboard/changelog/${e}`),j.get(`/api/dashboard/changelog/${e}/changes`)]);l(d.entryId),m(d.startTime),f(d.endTime),h(d.status),_(d.entries),c(d.failures),u(k.changes),E(M(k.changes))}catch(d){T(d instanceof Error?d.message:"Failed to load changelog detail")}finally{v(!1)}}},[e]);return r.useEffect(()=>{C()},[C]),{entryId:a,startTime:i,endTime:g,status:y,entries:x,failures:s,changes:o,changeSummary:N,loading:I,error:w,refresh:C}}const K={script:"📝",instance:"🧱",property:"🎨",lighting:"🌅",terrain:"⛰️",asset:"📦"};function B(e){return K[e]??"❓"}const G="_page_17pcx_2",R="_header_17pcx_10",U="_backLink_17pcx_16",z="_headerTitle_17pcx_29",H="_headerTime_17pcx_37",q="_statusActive_17pcx_44",J="_statusCompleted_17pcx_49",V="_section_17pcx_54",Y="_sectionTitle_17pcx_61",Q="_summaryGrid_17pcx_74",W="_summaryCard_17pcx_80",X="_summaryCardActive_17pcx_94",Z="_summaryIcon_17pcx_99",ee="_summaryCount_17pcx_105",te="_summaryLabel_17pcx_112",ne="_timelineFilter_17pcx_122",ae="_filterLabel_17pcx_129",se="_filterSelect_17pcx_135",ie="_timeline_17pcx_122",ce="_timelineEntry_17pcx_155",re="_timelineTime_17pcx_172",le="_timelineIcon_17pcx_180",oe="_timelineBody_17pcx_185",de="_timelineSummary_17pcx_190",me="_timelineTarget_17pcx_197",ge="_timelineConfidence_17pcx_204",he="_confidenceExact_17pcx_213",ue="_confidencePartial_17pcx_218",pe="_confidenceAfterOnly_17pcx_223",fe="_confidenceIntentOnly_17pcx_228",ye="_confidenceUnknown_17pcx_233",xe="_timelineExpanded_17pcx_239",_e="_empty_17pcx_311",Ce="_loading_17pcx_320",be="_error_17pcx_329",n={page:G,header:R,backLink:U,headerTitle:z,headerTime:H,statusActive:q,statusCompleted:J,section:V,sectionTitle:Y,summaryGrid:Q,summaryCard:W,summaryCardActive:X,summaryIcon:Z,summaryCount:ee,summaryLabel:te,timelineFilter:ne,filterLabel:ae,filterSelect:se,timeline:ie,timelineEntry:ce,timelineTime:re,timelineIcon:le,timelineBody:oe,timelineSummary:de,timelineTarget:me,timelineConfidence:ge,confidenceExact:he,confidencePartial:ue,confidenceAfterOnly:pe,confidenceIntentOnly:fe,confidenceUnknown:ye,timelineExpanded:xe,empty:_e,loading:Ce,error:be},S=[{key:"script",icon:"📝",labelKey:"changelog.category.script"},{key:"instance",icon:"🧱",labelKey:"changelog.category.instance"},{key:"property",icon:"🎨",labelKey:"changelog.category.property"},{key:"lighting",icon:"🌅",labelKey:"changelog.category.lighting"},{key:"terrain",icon:"⛰️",labelKey:"changelog.category.terrain"},{key:"asset",icon:"📦",labelKey:"changelog.category.asset"}];function b(e){if(!e)return"--:--";const a=new Date(e);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}`}function ve(e){if(!e)return"--:--:--";const a=new Date(e);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}:${String(a.getSeconds()).padStart(2,"0")}`}function Te(e,a){if(!e||!a)return"";const l=new Date(a).getTime()-new Date(e).getTime();return l<0?"":`${Math.round(l/6e4)}min`}function ke(e){switch(e){case"exact":return n.confidenceExact;case"partial":return n.confidencePartial;case"after-only":return n.confidenceAfterOnly;case"intent-only":return n.confidenceIntentOnly;default:return n.confidenceUnknown}}function je(e,a){switch(a){case"exact":return e("changelog.detail.confidence.exact","Exact");case"partial":return e("changelog.detail.confidence.partial","Partial");case"after-only":return e("changelog.detail.confidence.afterOnly","After only");case"intent-only":return e("changelog.detail.confidence.intentOnly","Intent only");default:return e("changelog.detail.confidence.unknown","Unknown")}}function Se(e,a){switch(a){case"exact":return e("changelog.detail.confidence.exact.tooltip","Both the before and after state were confirmed for this change.");case"partial":return e("changelog.detail.confidence.partial.tooltip","Only part of the before and after state could be confirmed for this change.");case"after-only":return e("changelog.detail.confidence.afterOnly.tooltip","Only the resulting state after the change could be confirmed.");case"intent-only":return e("changelog.detail.confidence.intentOnly.tooltip","Only the requested action was recorded, not the resulting state.");default:return e("changelog.detail.confidence.unknown.tooltip","This change could not be confidently classified from the available data.")}}function Le(){const{t:e}=L(),{id:a}=O(),l=A(),i=P(a),[m,g]=r.useState("all"),[f,y]=r.useState(null),h=r.useMemo(()=>[...m==="all"?i.changes:i.changes.filter(c=>c.category===m)].reverse(),[i.changes,m]);if(i.loading)return t.jsx("div",{className:n.loading,children:e("common.loading","Loading...")});if(i.error)return t.jsxs("div",{className:n.error,children:[i.error,t.jsx("br",{}),t.jsxs("span",{className:n.backLink,onClick:()=>l("/changelog"),children:["←"," ",e("changelog.detail.backToList","Back to list")]})]});const x=Te(i.startTime,i.endTime),_=i.endTime?`${b(i.startTime)} → ${b(i.endTime)} (${x})`:`${b(i.startTime)} → ${e("changelog.card.inProgress","in progress")}`;return t.jsxs("div",{className:n.page,children:[t.jsxs("div",{className:n.header,children:[t.jsxs("span",{className:n.backLink,onClick:()=>l("/changelog"),children:["←"," ",e("sidebar.changelog","Changelog")]}),t.jsx("span",{className:n.headerTitle,children:"|"}),t.jsx("span",{className:n.headerTime,children:_}),t.jsx(p,{text:i.status==="active"?e("changelog.card.active.tooltip","This session is still receiving new game changes."):e("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),children:t.jsx("span",{className:i.status==="active"?n.statusActive:n.statusCompleted,children:i.status==="active"?e("changelog.card.active","Active"):e("changelog.card.completed","Completed")})})]}),t.jsxs("div",{className:n.section,children:[t.jsx("div",{className:n.sectionTitle,children:t.jsx(p,{text:e("changelog.detail.changeSummary.tooltip","Counts of extracted game changes grouped by category for this session."),children:t.jsx("span",{children:e("changelog.detail.changeSummary","Change Summary")})})}),t.jsx("div",{className:n.summaryGrid,children:S.map(s=>{const c=i.changeSummary;let o;switch(s.key){case"script":o=c.scriptsModified+c.scriptsCreated;break;case"instance":o=c.instancesCreated+c.instancesDeleted+c.instancesMoved;break;case"property":o=c.propertiesChanged;break;case"lighting":o=c.lightingChanged?1:0;break;case"terrain":o=c.terrainChanged?1:0;break;case"asset":o=c.assetsInserted;break;default:o=0}const u=m===s.key;return t.jsxs("div",{className:`${n.summaryCard} ${u?n.summaryCardActive:""}`,onClick:()=>g(u?"all":s.key),children:[t.jsx("span",{className:n.summaryIcon,children:s.icon}),t.jsx("div",{className:n.summaryCount,children:o}),t.jsx("div",{className:n.summaryLabel,children:e(s.labelKey,s.key)})]},s.key)})})]}),t.jsxs("div",{className:n.section,children:[t.jsx("div",{className:n.sectionTitle,children:t.jsx(p,{text:e("changelog.detail.changeTimeline.tooltip","Chronological list of extracted game changes for this session."),children:t.jsx("span",{children:e("changelog.detail.changeTimeline","Change Timeline")})})}),t.jsxs("div",{className:n.timelineFilter,children:[t.jsx("span",{className:n.filterLabel,children:t.jsx($,{label:`${e("changelog.detail.filterCategory","Category")}:`,tooltip:e("changelog.detail.filterCategory.tooltip","Filter the timeline to a single change category.")})}),t.jsxs("select",{className:n.filterSelect,value:m,onChange:s=>g(s.target.value),children:[t.jsx("option",{value:"all",children:e("tools.filter.all","All")}),S.map(s=>t.jsxs("option",{value:s.key,children:[s.icon," ",e(s.labelKey,s.key)]},s.key))]})]}),h.length===0?t.jsx("div",{className:n.empty,children:e("changelog.detail.noChanges","No changes in this category")}):t.jsx("div",{className:n.timeline,children:h.map((s,c)=>{const o=f===c;return t.jsxs("div",{children:[t.jsxs("div",{className:n.timelineEntry,onClick:()=>y(o?null:c),children:[t.jsx("span",{className:n.timelineTime,children:ve(s.timestamp)}),t.jsx("span",{className:n.timelineIcon,children:B(s.category)}),t.jsxs("div",{className:n.timelineBody,children:[t.jsxs("div",{className:n.timelineSummary,children:[s.summary,t.jsx(p,{text:Se(e,s.confidence),children:t.jsx("span",{className:`${n.timelineConfidence} ${ke(s.confidence)}`,children:je(e,s.confidence)})})]}),t.jsx("div",{className:n.timelineTarget,children:s.target})]})]}),o&&t.jsx("div",{className:n.timelineExpanded,children:t.jsx(Ne,{change:s})})]},c)})})]})]})}function Ne({change:e}){return e.category==="script"&&(e.before||e.after)?t.jsx(D,{before:e.before,after:e.after}):e.category==="property"?t.jsx(F,{before:e.before,after:e.after}):e.details?t.jsx("pre",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-secondary)",margin:0,whiteSpace:"pre-wrap",wordBreak:"break-all"},children:JSON.stringify(e.details,null,2)}):t.jsx("div",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-muted)"},children:e.target})}export{Le as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._card_z2aep_2{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:14px 18px;cursor:pointer;transition:border-color var(--transition),box-shadow var(--transition)}._card_z2aep_2:hover{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent-dim)}._header_z2aep_17{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}._statusBadge_z2aep_24{display:flex;align-items:center;gap:6px;font-family:var(--font-label);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.05em}._statusDot_z2aep_35{width:7px;height:7px;border-radius:50%}._active_z2aep_41 ._statusDot_z2aep_35{background:var(--success);box-shadow:0 0 6px var(--success)}._active_z2aep_41{color:var(--success)}._completed_z2aep_50 ._statusDot_z2aep_35{background:var(--text-muted)}._completed_z2aep_50{color:var(--text-secondary)}._timeRange_z2aep_58{font-family:var(--font-code);font-size:11px;color:var(--text-secondary)}._summaryList_z2aep_65{display:flex;flex-direction:column;gap:4px}._summaryItem_z2aep_71{display:flex;align-items:center;gap:8px;font-family:var(--font-code);font-size:12px;color:var(--text-primary)}._summaryIcon_z2aep_80{width:20px;text-align:center;flex-shrink:0}._summaryText_z2aep_86{color:var(--text-secondary)}._progressBar_z2aep_91{margin-top:10px;height:3px;background:var(--bg-secondary);border-radius:2px;overflow:hidden}._progressFill_z2aep_99{height:100%;background:var(--accent);border-radius:2px;animation:_pulse_z2aep_1 2s ease-in-out infinite}@keyframes _pulse_z2aep_1{0%,to{opacity:.6;width:30%}50%{opacity:1;width:70%}}._emptySummary_z2aep_112{font-family:var(--font-label);font-size:12px;color:var(--text-muted);text-align:center;padding:8px 0}._page_sg9qx_2{display:flex;flex-direction:column;gap:16px;max-width:700px}._headerRow_sg9qx_9{display:flex;align-items:center;justify-content:space-between;gap:12px}._header_sg9qx_9{font-family:var(--font-label);font-size:14px;font-weight:600;color:var(--text-primary);letter-spacing:.05em;text-transform:uppercase}._clearButton_sg9qx_26{border:1px solid rgba(209,84,84,.5);background:#d154541f;color:#f4c1c1;border-radius:8px;padding:6px 12px;cursor:pointer}._headerSub_sg9qx_35{font-size:11px;font-weight:400;color:var(--text-muted);text-transform:none;letter-spacing:0;margin-left:8px}._filterTabs_sg9qx_45{display:flex;gap:2px;border-bottom:1px solid var(--border)}._filterTab_sg9qx_45{font-family:var(--font-label);font-size:12px;font-weight:500;padding:8px 16px;background:none;border:none;border-bottom:2px solid transparent;color:var(--text-secondary);cursor:pointer;transition:color var(--transition),border-color var(--transition)}._filterTab_sg9qx_45:hover{color:var(--text-primary)}._filterTabActive_sg9qx_68{color:var(--accent);border-bottom-color:var(--accent)}._list_sg9qx_74{display:flex;flex-direction:column;gap:10px}._empty_sg9qx_81{text-align:center;padding:40px 20px;color:var(--text-muted);font-family:var(--font-label);font-size:13px}._loading_sg9qx_90{text-align:center;padding:40px 20px;color:var(--text-secondary);font-family:var(--font-label);font-size:12px}._pagination_sg9qx_99{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:4px}._pageInfo_sg9qx_107{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._btn_sg9qx_113{font-family:var(--font-label);font-size:12px;padding:4px 12px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_sg9qx_113:hover:not(:disabled){border-color:var(--accent);background:var(--accent-dim)}._btn_sg9qx_113:disabled{opacity:.4;cursor:default}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,b as N,D as k,u as I,j as s,T,c as B,d as q}from"./index-CkXvRg-O.js";import{C as z}from"./ConfirmModal-CvXLNYq0.js";const L=10;function M(){const[a,p]=i.useState([]),[e,t]=i.useState(0),[m,d]=i.useState(!1),[l,f]=i.useState(!0),[g,o]=i.useState(0),[u,C]=i.useState("all"),x=i.useRef(null),_=i.useCallback(async(h,y)=>{f(!0);try{const j={limit:String(L),offset:String(h)};y!=="all"&&(j.status=y);const S=await N.get("/api/dashboard/changelog",j);p(S.entries),t(S.total),d(S.hasMore)}catch{p([]),t(0),d(!1)}finally{f(!1)}},[]),v=i.useCallback(()=>{_(g,u)},[_,g,u]),c=i.useCallback(async()=>{await N.post("/api/dashboard/changelog/clear"),p([]),t(0),d(!1)},[]);return i.useEffect(()=>{_(g,u)},[_,g,u]),i.useEffect(()=>{const h=new k;x.current=h,h.connect();const y=h.on("command",()=>{_(g,u)});return()=>{y(),h.disconnect(),x.current=null}},[_,g,u]),{entries:a,total:e,hasMore:m,loading:l,offset:g,statusFilter:u,setOffset:o,setStatusFilter:C,refresh:v,clear:c}}const w="_card_z2aep_2",R="_header_z2aep_17",A="_statusBadge_z2aep_24",D="_statusDot_z2aep_35",E="_active_z2aep_41",F="_completed_z2aep_50",O="_timeRange_z2aep_58",P="_summaryList_z2aep_65",G="_summaryItem_z2aep_71",H="_summaryIcon_z2aep_80",Z="_summaryText_z2aep_86",U="_progressBar_z2aep_91",J="_progressFill_z2aep_99",K="_emptySummary_z2aep_112",r={card:w,header:R,statusBadge:A,statusDot:D,active:E,completed:F,timeRange:O,summaryList:P,summaryItem:G,summaryIcon:H,summaryText:Z,progressBar:U,progressFill:J,emptySummary:K};function $(a){if(!a)return"--:--";const p=new Date(a);return`${String(p.getHours()).padStart(2,"0")}:${String(p.getMinutes()).padStart(2,"0")}`}function Q({entry:a,onClick:p}){const{t:e}=I(),t=a.changeSummary,m=a.status==="active",d=a.isBootstrapOnly===!0,l=[],f=t.scriptsModified+t.scriptsCreated;if(f>0){const c=[];t.scriptsModified>0&&c.push(`${t.scriptsModified} ${e("changelog.card.modified","modified")}`),t.scriptsCreated>0&&c.push(`${t.scriptsCreated} ${e("changelog.card.created","created")}`);const h=`${f} ${e("changelog.card.scripts","scripts")} ${c.join(", ")}`;l.push({icon:"📝",text:h,tooltip:e("changelog.card.scripts.tooltip","Script changes made in this session.")})}const g=t.instancesCreated+t.instancesDeleted+t.instancesMoved;if(g>0){const c=[];t.instancesCreated>0&&c.push(`${t.instancesCreated} ${e("changelog.card.created","created")}`),t.instancesDeleted>0&&c.push(`${t.instancesDeleted} ${e("changelog.card.deleted","deleted")}`),t.instancesMoved>0&&c.push(`${t.instancesMoved} ${e("changelog.card.moved","moved")}`);const h=`${g} ${e("changelog.card.instances","instances")} ${c.join(", ")}`;l.push({icon:"🧱",text:h,tooltip:e("changelog.card.instances.tooltip","Instance create, delete, move, or clone changes in this session.")})}t.propertiesChanged>0&&l.push({icon:"🎨",text:`${t.propertiesChanged} ${e("changelog.card.propertiesChanged","properties changed")}`,tooltip:e("changelog.card.propertiesChanged.tooltip","Property value changes recorded for this session.")}),t.lightingChanged&&l.push({icon:"🌅",text:e("changelog.card.lightingConfigured","Lighting configured"),tooltip:e("changelog.card.lightingConfigured.tooltip","Lighting or atmosphere settings changed in this session.")}),t.terrainChanged&&l.push({icon:"⛰️",text:e("changelog.card.terrainConfigured","Terrain configured"),tooltip:e("changelog.card.terrainConfigured.tooltip","Terrain data or terrain settings changed in this session.")}),t.assetsInserted>0&&l.push({icon:"📦",text:`${t.assetsInserted} ${e("changelog.card.assetsInserted","assets inserted")}`,tooltip:e("changelog.card.assetsInserted.tooltip","Assets inserted into the place during this session.")});const o=$(a.startTime),u=m?e("changelog.card.inProgress","in progress"):a.endTime?$(a.endTime):"--:--",C=d?e("changelog.card.bootstrapStatus","Bootstrap"):m?e("changelog.card.active","Active"):e("changelog.card.completed","Completed"),x=d?e("changelog.card.bootstrapStatus.tooltip","This session only contains the initial sync bootstrap snapshot."):m?e("changelog.card.active.tooltip","This session is still receiving new game changes."):e("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),_=d?e("changelog.card.bootstrapSummary","Initial sync snapshot"):e("changelog.card.noChanges","No changes yet"),v=d?e("changelog.card.bootstrapSummary.tooltip","Initial file sync writes are collapsed into a single bootstrap snapshot row."):e("changelog.card.noChanges.tooltip","No game changes have been extracted for this session yet.");return s.jsxs("div",{className:r.card,onClick:p,children:[s.jsxs("div",{className:r.header,children:[s.jsx(T,{text:x,children:s.jsxs("span",{className:`${r.statusBadge} ${m?r.active:r.completed}`,children:[s.jsx("span",{className:r.statusDot}),C]})}),s.jsxs("span",{className:r.timeRange,children:[o,"~",u]})]}),s.jsx("div",{className:r.summaryList,children:l.length>0?l.map((c,h)=>s.jsxs("div",{className:r.summaryItem,children:[s.jsx("span",{className:r.summaryIcon,children:c.icon}),s.jsx(T,{text:c.tooltip,children:s.jsx("span",{className:r.summaryText,children:c.text})})]},h)):s.jsx(T,{text:v,children:s.jsx("span",{className:r.emptySummary,style:{display:"block"},children:_})})}),m&&s.jsx("div",{className:r.progressBar,children:s.jsx("div",{className:r.progressFill})})]})}const V="_page_sg9qx_2",W="_headerRow_sg9qx_9",X="_header_sg9qx_9",Y="_clearButton_sg9qx_26",ee="_headerSub_sg9qx_35",se="_filterTabs_sg9qx_45",te="_filterTab_sg9qx_45",ae="_filterTabActive_sg9qx_68",ne="_list_sg9qx_74",oe="_empty_sg9qx_81",ce="_loading_sg9qx_90",re="_pagination_sg9qx_99",ie="_pageInfo_sg9qx_107",le="_btn_sg9qx_113",n={page:V,headerRow:W,header:X,clearButton:Y,headerSub:ee,filterTabs:se,filterTab:te,filterTabActive:ae,list:ne,empty:oe,loading:ce,pagination:re,pageInfo:ie,btn:le},b=10,de=[{key:"all",label:"changelog.filter.all"},{key:"active",label:"changelog.filter.active"},{key:"completed",label:"changelog.filter.completed"}];function pe(){const{t:a}=I(),p=B(),e=M(),{show:t}=q(),[m,d]=i.useState(!1),[l,f]=i.useState(!1),g=async()=>{f(!0);try{await e.clear(),t(a("toast.clearSuccess","Cleared successfully"),"success"),d(!1)}catch{t(a("toast.clearFailed","Failed to clear data"),"error")}finally{f(!1)}};return s.jsxs("div",{className:n.page,children:[s.jsxs("div",{className:n.headerRow,children:[s.jsxs("h2",{className:n.header,children:[a("sidebar.changelog","Changelog"),s.jsx("span",{className:n.headerSub,children:a("changelog.subtitle","Game Change History")})]}),s.jsx("button",{className:n.clearButton,onClick:()=>d(!0),children:a("common.clear","Clear")})]}),s.jsx("div",{className:n.filterTabs,children:de.map(o=>s.jsx("button",{className:`${n.filterTab} ${e.statusFilter===o.key?n.filterTabActive:""}`,onClick:()=>{e.setStatusFilter(o.key),e.setOffset(0)},children:a(o.label,o.key.charAt(0).toUpperCase()+o.key.slice(1))},o.key))}),e.loading&&e.entries.length===0&&s.jsx("div",{className:n.loading,children:a("common.loading","Loading...")}),!e.loading&&e.entries.length===0?s.jsx("div",{className:n.empty,children:a("changelog.empty","No changelog entries yet")}):s.jsx("div",{className:n.list,children:e.entries.map(o=>s.jsx(Q,{entry:o,onClick:()=>p(`/changelog/${o.entryId}`)},o.entryId))}),e.total>b&&s.jsxs("div",{className:n.pagination,children:[s.jsx("button",{className:n.btn,disabled:e.offset===0,onClick:()=>e.setOffset(Math.max(0,e.offset-b)),children:a("tools.page.prev","Prev")}),s.jsxs("span",{className:n.pageInfo,children:[e.offset+1,"–",Math.min(e.offset+b,e.total)," / ",e.total]}),s.jsx("button",{className:n.btn,disabled:!e.hasMore,onClick:()=>e.setOffset(e.offset+b),children:a("tools.page.next","Next")})]}),s.jsx(z,{open:m,title:a("changelog.clear.title","Clear changelog?"),message:a("changelog.clear.message","This permanently removes the stored changelog for the current place."),cancelLabel:a("common.cancel","Cancel"),confirmLabel:a("common.clear","Clear"),loading:l,onCancel:()=>!l&&d(!1),onConfirm:g})]})}export{pe as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as $,r,j as e,a as R,b as N,D as I,d as L,T as A}from"./index-CkXvRg-O.js";import{I as a}from"./InfoLabel-vz7vtbbV.js";import{S as E}from"./StatusBadge-BMTgkxDJ.js";import{C as M}from"./ConfirmModal-CvXLNYq0.js";import{u as P,f as k}from"./useLiveUptime-DXXyWm6j.js";const B="_container_1h084_2",H="_entry_1h084_14",T="_timestamp_1h084_21",F="_message_1h084_27",D="_warn_1h084_34",U="_error_1h084_39",G="_empty_1h084_44",v={container:B,entry:H,timestamp:T,message:F,warn:D,error:U,empty:G};function O({entries:n}){const{t}=$(),c=r.useRef(null);return r.useEffect(()=>{const l=c.current;l&&(l.scrollTop=l.scrollHeight)},[n.length]),e.jsx("div",{ref:c,className:v.container,children:n.length===0?e.jsx("div",{className:v.empty,children:t("connection.log.empty","No events yet")}):n.map((l,g)=>e.jsxs("div",{className:`${v.entry} ${l.type?v[l.type]:""}`,children:[e.jsx("span",{className:v.timestamp,children:l.timestamp}),e.jsx("span",{className:v.message,children:l.message})]},g))})}const w=50;function V(){const n=new Date;return`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}function q(){const{level:n,status:t,error:c}=R(),[l,g]=r.useState(null),[y,m]=r.useState([]),u=r.useRef(null),_=r.useCallback((i,f)=>{m(d=>{const p=[...d,{timestamp:V(),message:i,type:f}];return p.length>w?p.slice(-w):p})},[]),x=r.useCallback(async()=>{try{const i=await N.get("/connection-info");g(i)}catch{g(null)}},[]),j=r.useCallback(async()=>{try{const i=await N.get("/api/dashboard/connection-log");m(i.entries??[])}catch{m([])}},[]),C=r.useCallback(async()=>{await N.post("/api/dashboard/connection-log/clear"),m([])},[]);return r.useEffect(()=>{n!=="L0"&&t&&x(),j()},[n,t,x,j]),r.useEffect(()=>{const i=new I;u.current=i,i.connect();const f=i.on("connection",p=>{const h=p,b=h.status==="connected"?"connected":"disconnected";_(`Plugin ${b} — ${h.clientId}`,h.status==="connected"?"info":"warn")}),d=i.on("mcp_status",p=>{const h=p,b=h.status==="registered"?"registered":"unregistered";_(`MCP ${b} — ${h.aiClientName}`,h.status==="registered"?"info":"warn"),x()});return()=>{f(),d(),i.disconnect(),u.current=null}},[_,x]),{status:t,connectionInfo:l,connectionLog:y,level:n,error:c,clearConnectionLog:C}}const X="_page_12byi_2",z="_card_12byi_10",J="_disabled_12byi_18",K="_cardHeader_12byi_24",Q="_clearButton_12byi_37",W="_serverGrid_12byi_47",Y="_statusRow_12byi_65",Z="_table_12byi_79",ee="_toggleBtn_12byi_104",ne="_disconnected_12byi_119",te="_disconnectedActions_12byi_136",se="_btn_12byi_143",ce="_emptyRow_12byi_161",s={page:X,card:z,disabled:J,cardHeader:K,clearButton:Q,serverGrid:W,statusRow:Y,table:Z,toggleBtn:ee,disconnected:ne,disconnectedActions:te,btn:se,emptyRow:ce};function S(n,t){const c=Math.max(0,Math.floor((Date.now()-n)/1e3));return c<60?`${c}${t("connection.time.secondsAgo","s ago")}`:c<3600?`${Math.floor(c/60)}${t("connection.time.minutesAgo","m ago")}`:`${Math.floor(c/3600)}${t("connection.time.hoursAgo","h ago")}`}function de(){var b;const{t:n}=$(),{status:t,connectionInfo:c,connectionLog:l,level:g,clearConnectionLog:y}=q(),{show:m}=L(),[u,_]=r.useState(!0),[x,j]=r.useState(!1),[C,i]=r.useState(!1),f=P(t==null?void 0:t.uptime),d=g==="L0",p=d?"offline":"online",h=async()=>{i(!0);try{await y(),m(n("toast.clearSuccess","Cleared successfully"),"success"),j(!1)}catch{m(n("toast.clearFailed","Failed to clear data"),"error")}finally{i(!1)}};return e.jsxs("div",{className:s.page,children:[e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:n("connection.server.title","Server Status")}),d?e.jsxs("div",{className:s.disconnected,children:[e.jsx("h3",{children:n("level.l0.title")}),e.jsx("p",{children:n("level.l0.message")}),e.jsx("p",{children:n("common.reconnecting")}),e.jsxs("div",{className:s.disconnectedActions,children:[e.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:n("connection.reconnect","Reconnect")}),e.jsx("button",{className:s.btn,onClick:()=>{window.location.hash="#/settings"},children:n("connection.checkSettings","Check Settings")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:s.statusRow,children:e.jsx(E,{status:p})}),e.jsxs("dl",{className:s.serverGrid,children:[(t==null?void 0:t.version)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(a,{label:n("connection.server.version","Version"),tooltip:n("connection.server.version.tooltip","Installed MCP server version")})}),e.jsx("dd",{children:e.jsx(A,{text:n("connection.server.version.tooltip","Installed MCP server version"),children:`v${t.version}`})})]}),(t==null?void 0:t.pid)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(a,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("dd",{children:t.pid})]}),(t==null?void 0:t.uptime)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(a,{label:n("connection.server.uptime","Uptime"),tooltip:n("connection.server.uptime.tooltip","Time elapsed since the MCP server started")})}),e.jsx("dd",{children:k(f??t.uptime)})]}),(t==null?void 0:t.sessionId)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(a,{label:n("connection.server.session","Session"),tooltip:n("connection.server.session.tooltip","Current MCP session identifier")})}),e.jsx("dd",{children:t.sessionId.slice(0,8)})]}),(c==null?void 0:c.serverExecutable)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(a,{label:n("connection.server.exec","Exec"),tooltip:n("connection.server.exec.tooltip","Executable path used to launch the MCP server")})}),e.jsx("dd",{children:c.serverExecutable})]})]})]})]}),e.jsxs("div",{className:`${s.card} ${d?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsxs("span",{children:[n("connection.agents.title","AI Agents")," ","(",(c==null?void 0:c.mcpInstanceCount)??0,")"]}),e.jsx("button",{className:s.toggleBtn,onClick:()=>_(o=>!o),"aria-label":u?n("common.collapse","Collapse"):n("common.expand","Expand"),children:u?"▾":"▸"})]}),u&&e.jsxs("table",{className:s.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:n("connection.agents.name","Agent")}),e.jsx("th",{children:e.jsx(a,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("th",{children:e.jsx(a,{label:n("connection.agents.projectRoot","Project Root"),tooltip:n("connection.agents.projectRoot.tooltip","Authoritative project root for sync ownership")})}),e.jsx("th",{children:n("connection.agents.connected","Connected")})]})}),e.jsx("tbody",{children:c!=null&&c.mcpInstances&&c.mcpInstances.length>0?c.mcpInstances.map(o=>e.jsxs("tr",{children:[e.jsx("td",{children:o.aiClientName??n("connection.agents.unknown","Unknown")}),e.jsx("td",{children:o.pid}),e.jsx("td",{children:o.projectRoot??o.cwd??n("connection.agents.projectRoot.unresolved","Unresolved")}),e.jsx("td",{children:S(o.connectedAt,n)})]},o.instanceId)):e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:s.emptyRow,children:n("connection.agents.none","No agents connected")})})})]})]}),e.jsxs("div",{className:`${s.card} ${d?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[n("connection.plugins.title","Plugins")," ","(",((b=t==null?void 0:t.pluginClients)==null?void 0:b.length)??0,")"]}),e.jsxs("table",{className:s.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:n("connection.plugins.place","Place")}),e.jsx("th",{children:e.jsx(a,{label:n("connection.plugins.clientId","Client ID"),tooltip:n("connection.plugins.clientId.tooltip","Unique plugin client identifier for this Studio connection")})}),e.jsx("th",{children:e.jsx(a,{label:n("connection.plugins.lastSeen","Last Seen"),tooltip:n("connection.plugins.lastSeen.tooltip","Most recent heartbeat received from the plugin")})}),e.jsx("th",{children:e.jsx(a,{label:n("connection.plugins.version","Ver"),tooltip:n("connection.plugins.version.tooltip","Installed plugin version reported by Studio")})})]})}),e.jsx("tbody",{children:t!=null&&t.pluginClients&&t.pluginClients.length>0?t.pluginClients.map(o=>e.jsxs("tr",{children:[e.jsx("td",{children:o.placeName??o.projectName??"-"}),e.jsx("td",{children:o.clientId.slice(0,10)}),e.jsx("td",{children:S(o.lastSeen,n)}),e.jsx("td",{children:o.pluginVersion??"-"})]},o.clientId)):e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:s.emptyRow,children:n("connection.plugins.none","No plugins connected")})})})]})]}),e.jsxs("div",{className:`${s.card} ${d?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx("span",{children:n("connection.log.title","Connection Log")}),e.jsx("button",{className:s.clearButton,onClick:()=>j(!0),children:n("common.clear","Clear")})]}),e.jsx(O,{entries:l})]}),e.jsx(M,{open:x,title:n("connection.clear.title","Clear connection log?"),message:n("connection.clear.message","This permanently removes the stored connection log for the current project."),cancelLabel:n("common.cancel","Cancel"),confirmLabel:n("common.clear","Clear"),loading:C,onCancel:()=>!C&&j(!1),onConfirm:h})]})}export{de as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,u as L,r as _,a as G,b as D,D as F,T as U}from"./index-CkXvRg-O.js";import{I as V}from"./InfoLabel-vz7vtbbV.js";import{S as A}from"./StatusBadge-BMTgkxDJ.js";import{D as z,P as O}from"./PropertyDiff-CbDafceC.js";import{u as J,T as X}from"./tier-promo-config-B9lIKWCQ.js";import{u as q,f as K}from"./useLiveUptime-DXXyWm6j.js";import{T as Q}from"./TierPromoProgress-DBA-FZGE.js";const W="_page_9uhoo_2",Y="_card_9uhoo_10",Z="_cardHeader_9uhoo_17",ee="_disconnectCard_9uhoo_28",te="_disconnectIcon_9uhoo_36",se="_disconnectTitle_9uhoo_41",ne="_disconnectMessage_9uhoo_48",ie="_reconnectGuide_9uhoo_55",re="_guideStep_9uhoo_64",ce="_stepNumber_9uhoo_72",ae="_reconnectIndicator_9uhoo_88",oe="_reconnectDot_9uhoo_98",le="_pulse_9uhoo_1",de="_disconnectActions_9uhoo_112",ue="_btn_9uhoo_118",me="_btnSecondary_9uhoo_134",he="_metricRow_9uhoo_152",ve="_metricGrid_9uhoo_158",_e="_metricCard_9uhoo_164",ge="_metric_ok_9uhoo_174",pe="_metric_warn_9uhoo_179",fe="_metric_error_9uhoo_184",xe="_metricHeader_9uhoo_189",je="_metricIcon_9uhoo_200",Ce="_metricTitle_9uhoo_204",we="_metricValue_9uhoo_208",Ne="_metricSubtitle_9uhoo_215",ye="_guideCard_9uhoo_225",Se="_guideTitle_9uhoo_232",Te="_checklist_9uhoo_239",be="_feedEmpty_9uhoo_263",Ie="_feedList_9uhoo_270",ke="_feedItem_9uhoo_278",De="_feedTime_9uhoo_291",Me="_feedIcon_9uhoo_298",Pe="_feedSummary_9uhoo_304",Ee="_feedItemClickable_9uhoo_314",Be="_feedChevron_9uhoo_322",He="_feedDetail_9uhoo_331",Re="_feedDetailPre_9uhoo_340",Le="_feedDetailText_9uhoo_349",$e="_changelogSummary_9uhoo_356",Ge="_changeTag_9uhoo_365",Fe="_tierBar_9uhoo_377",Ue="_tierBarTrack_9uhoo_383",Ve="_tierBarFillBasic_9uhoo_391",Ae="_tierBarFillPro_9uhoo_396",ze="_tierLabels_9uhoo_401",s={page:W,card:Y,cardHeader:Z,disconnectCard:ee,disconnectIcon:te,disconnectTitle:se,disconnectMessage:ne,reconnectGuide:ie,guideStep:re,stepNumber:ce,reconnectIndicator:ae,reconnectDot:oe,pulse:le,disconnectActions:de,btn:ue,btnSecondary:me,metricRow:he,metricGrid:ve,metricCard:_e,metric_ok:ge,metric_warn:pe,metric_error:fe,metricHeader:xe,metricIcon:je,metricTitle:Ce,metricValue:we,metricSubtitle:Ne,guideCard:ye,guideTitle:Se,checklist:Te,feedEmpty:be,feedList:Ie,feedItem:ke,feedTime:De,feedIcon:Me,feedSummary:Pe,feedItemClickable:Ee,feedChevron:Be,feedDetail:He,feedDetailPre:Re,feedDetailText:Le,changelogSummary:$e,changeTag:Ge,tierBar:Fe,tierBarTrack:Ue,tierBarFillBasic:Ve,tierBarFillPro:Ae,tierLabels:ze};function N({title:e,value:c,icon:i,subtitle:r,status:a,children:n}){const d=a?s[`metric_${a}`]:"";return t.jsxs("div",{className:`${s.metricCard} ${d}`,children:[t.jsxs("div",{className:s.metricHeader,children:[i&&t.jsx("span",{className:s.metricIcon,children:i}),t.jsx("span",{className:s.metricTitle,children:e})]}),t.jsx("div",{className:s.metricValue,children:c}),r&&t.jsx("div",{className:s.metricSubtitle,children:r}),n]})}function E({changes:e}){const{t:c}=L(),[i,r]=_.useState(null);return e.length===0?t.jsx("div",{className:s.feedEmpty,children:c("overview.feed.empty")}):t.jsx("div",{className:s.feedList,children:e.map((a,n)=>{const d=i===n,l=a.raw,g=l&&(l.before!=null||l.after!=null||l.details!=null);return t.jsxs("div",{children:[t.jsxs("div",{className:`${s.feedItem} ${g?s.feedItemClickable:""}`,onClick:()=>g&&r(d?null:n),children:[t.jsx("span",{className:s.feedTime,children:a.timestamp}),t.jsx("span",{className:s.feedIcon,children:a.icon}),t.jsx("span",{className:s.feedSummary,children:a.summary}),g&&t.jsx("span",{className:s.feedChevron,children:d?"▴":"▾"})]}),d&&l&&t.jsx("div",{className:s.feedDetail,children:t.jsx(Oe,{change:l})})]},n)})})}function Oe({change:e}){return e.category==="script"&&(e.before||e.after)?t.jsx(z,{before:e.before,after:e.after}):e.category==="property"?t.jsx(O,{before:e.before,after:e.after}):e.details?t.jsx("pre",{className:s.feedDetailPre,children:JSON.stringify(e.details,null,2)}):t.jsx("div",{className:s.feedDetailText,children:e.target})}const B=20;function $(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}function H(){return $(new Date)}function R(e){switch(e){case"script":return"📝";case"instance":return"🧱";case"property":return"🎨";case"lighting":return"💡";case"terrain":return"⛰️";case"asset":return"📦";default:return"🔧"}}function Je(){const{level:e,status:c}=G(),i=J(),[r,a]=_.useState(null),[n,d]=_.useState(null),[l,g]=_.useState(null),[x,h]=_.useState([]),y=_.useRef(null),S=_.useCallback(async()=>{try{const o=await D.get("/connection-info");a(o)}catch{a(null)}},[]),T=_.useCallback(async()=>{try{const o=await D.get("/api/dashboard/changelog/active");if(g(o),o.recentChanges&&o.recentChanges.length>0){const p=o.recentChanges.map(v=>({timestamp:v.timestamp?$(new Date(v.timestamp)):H(),icon:R(v.category),summary:v.summary,category:v.category,raw:v}));h(p)}}catch{g(null)}},[]),f=_.useCallback(async()=>{try{const o=await D.get("/sync/status");d(o)}catch{d(null)}},[]);return _.useEffect(()=>{e!=="L0"?(S(),T(),f()):(a(null),d(null),g(null));const o=new F;y.current=o,o.connect();const p=o.on("game_change",j=>{const u=j,C={timestamp:H(),icon:R(u.category),summary:u.summary,category:u.category};h(k=>{const w=[C,...k];return w.length>B?w.slice(0,B):w}),T()}),v=o.on("sync",j=>{const u=j;d(C=>({...C,state:u.status,...u.placeId?{placeId:u.placeId}:{}}))});return()=>{p(),v(),o.disconnect(),y.current=null}},[e,S,T,f]),{level:e,status:c,connectionInfo:r,syncStatus:n,changeSummary:l,recentChanges:x,tier:i}}function M(e){return e.scriptsModified+e.scriptsCreated+e.instancesCreated+e.instancesDeleted+e.instancesMoved+e.propertiesChanged+e.assetsInserted+(e.lightingChanged?1:0)+(e.terrainChanged?1:0)}function Xe(e,c){switch(e){case"syncing":return c("status.syncing","Syncing");case"initializing":return c("status.initializing","Initializing");case"error":return c("status.error","Error");default:return c("status.idle","Idle")}}function qe(e){switch(e){case"syncing":return"ok";case"initializing":return"warn";case"error":return"error";default:return"ok"}}function I(e,c,i,r){return t.jsxs("div",{className:e.metricSubtitle,children:[t.jsx(V,{label:c,tooltip:i}),": ",r]},c)}function m(e,c){return t.jsx(U,{text:c,children:e})}function st(){var w,P;const{t:e}=L(),{level:c,status:i,connectionInfo:r,syncStatus:a,changeSummary:n,recentChanges:d,tier:l}=Je(),g=q(i==null?void 0:i.uptime);if(c==="L0")return t.jsx("div",{className:s.page,children:t.jsxs("div",{className:s.disconnectCard,children:[t.jsx("div",{className:s.disconnectIcon,children:"⚠️"}),t.jsx("h2",{className:s.disconnectTitle,children:e("overview.l0.title")}),t.jsx("p",{className:s.disconnectMessage,children:e("overview.l0.message")}),t.jsxs("div",{className:s.reconnectGuide,children:[t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"1"}),t.jsx("span",{children:e("overview.l0.step1")})]}),t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"2"}),t.jsx("span",{children:e("overview.l0.step2")})]})]}),t.jsxs("div",{className:s.reconnectIndicator,children:[t.jsx("span",{className:s.reconnectDot}),e("overview.l0.reconnecting")]}),t.jsxs("div",{className:s.disconnectActions,children:[t.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:e("overview.l0.reconnectBtn")}),t.jsx("button",{className:s.btnSecondary,onClick:()=>{window.location.hash="#/settings"},children:e("overview.l0.settingsBtn")})]})]})});const x=(r==null?void 0:r.mcpInstanceCount)??0,h=((w=r==null?void 0:r.mcpInstances)==null?void 0:w.find(b=>!b.isServer&&b.aiClientName))??((P=r==null?void 0:r.mcpInstances)==null?void 0:P.find(b=>!!b.aiClientName))??null,y=(i==null?void 0:i.pluginClients)??[],S=y.length>0,T=(i==null?void 0:i.sessionId)??(r==null?void 0:r.sessionId)??"-",f=e("overview.metric.server.tooltip","MCP server runtime and process status"),o=e("overview.metric.plugin.tooltip","Roblox Studio plugin connection and version status"),p=e("overview.metric.agent.tooltip","Connected AI coding agents and their runtime state"),v=e("overview.metric.sync.tooltip","Current Studio to local sync activity"),j=i?[I(s,e("overview.meta.version","Version"),e("overview.meta.version.tooltip","Installed MCP server version"),`v${i.version}`),I(s,e("overview.meta.session","Session"),e("overview.meta.session.tooltip","Current MCP session identifier"),T),I(s,e("overview.meta.pid","PID"),e("overview.meta.pid.tooltip","Operating system process identifier"),String(i.pid??"-")),I(s,e("overview.meta.uptime","Uptime"),e("overview.meta.uptime.tooltip","Time elapsed since the MCP server started"),K(g??i.uptime))]:[];if(c==="L1")return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricRow,children:[t.jsx(N,{title:m(e("overview.metric.server"),f),value:m(e("status.online"),f),icon:"🖥️",status:"ok",children:t.jsxs(t.Fragment,{children:[j,t.jsx(A,{status:"online"})]})}),t.jsx(N,{title:m(e("overview.metric.agent"),p),value:m((h==null?void 0:h.aiClientName)??e("overview.metric.noAgent"),p),icon:"🤖",subtitle:x>1?`${x} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:h?"ok":"warn"})]}),t.jsxs("div",{className:s.guideCard,children:[t.jsx("h3",{className:s.guideTitle,children:e("overview.l1.pluginGuide")}),t.jsxs("ul",{className:s.checklist,children:[t.jsx("li",{children:e("overview.l1.check1")}),t.jsx("li",{children:e("overview.l1.check2")}),t.jsx("li",{children:e("overview.l1.check3")})]})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),d.length>0?t.jsx(E,{changes:d}):t.jsx("div",{className:s.feedEmpty,children:e("overview.l1.feedHint")})]}),n&&M(n)>0&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",M(n)]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]});const u=y[0],C=n?M(n):0,k=!!n&&C>0;return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricGrid,children:[t.jsx(N,{title:m(e("overview.metric.server"),f),value:m(e("status.online"),f),icon:"🖥️",status:"ok",children:t.jsx(t.Fragment,{children:j})}),t.jsx(N,{title:m(e("overview.metric.plugin"),o),value:m(e(S?"status.online":"status.offline"),o),icon:"🔌",subtitle:u?`${u.placeName??u.projectName??"-"} / v${u.pluginVersion??"-"}`:void 0,status:S?"ok":"error"}),t.jsx(N,{title:m(e("overview.metric.agent"),p),value:m((h==null?void 0:h.aiClientName)??e("overview.metric.noAgent"),p),icon:"🤖",subtitle:x>1?`${x} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:h?"ok":"warn"}),t.jsx(N,{title:m(e("overview.metric.sync"),v),value:m(Xe(a==null?void 0:a.state,e),v),icon:"🔄",status:qe(a==null?void 0:a.state)})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),t.jsx(E,{changes:d})]}),k&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",C]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]}),!l.loading&&l.tier==="basic"&&l.totalCalls>0&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.tier.title")}),t.jsx(Q,{basicCalls:l.basicCalls,proCalls:l.proCalls,totalCalls:l.totalCalls,proUsagePercent:l.proUsagePercent,upgradeHref:X.overview})]})]})}export{st as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._page_9uhoo_2{display:flex;flex-direction:column;gap:16px;max-width:820px}._card_9uhoo_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._cardHeader_9uhoo_17{font-family:var(--font-label);font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-secondary);margin-bottom:12px}._disconnectCard_9uhoo_28{background:var(--bg-card);border:1px solid var(--error);border-radius:var(--radius);padding:40px 32px;text-align:center}._disconnectIcon_9uhoo_36{font-size:48px;margin-bottom:16px}._disconnectTitle_9uhoo_41{color:var(--error);font-size:18px;font-weight:600;margin:0 0 8px}._disconnectMessage_9uhoo_48{color:var(--text-secondary);font-size:14px;margin:0 0 24px}._reconnectGuide_9uhoo_55{display:flex;flex-direction:column;gap:8px;max-width:360px;margin:0 auto 20px;text-align:left}._guideStep_9uhoo_64{display:flex;align-items:center;gap:12px;font-size:13px;color:var(--text-primary)}._stepNumber_9uhoo_72{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:var(--accent-dim);color:var(--accent);font-family:var(--font-code);font-size:12px;font-weight:600;flex-shrink:0}._reconnectIndicator_9uhoo_88{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;color:var(--text-muted);margin-bottom:20px}._reconnectDot_9uhoo_98{width:8px;height:8px;border-radius:50%;background:var(--warning);animation:_pulse_9uhoo_1 1.5s ease-in-out infinite}@keyframes _pulse_9uhoo_1{0%,to{opacity:.4}50%{opacity:1}}._disconnectActions_9uhoo_112{display:flex;gap:8px;justify-content:center}._btn_9uhoo_118{font-family:var(--font-label);font-size:12px;padding:8px 16px;border-radius:4px;border:1px solid var(--accent);background:var(--accent);color:var(--bg-primary);cursor:pointer;transition:opacity var(--transition)}._btn_9uhoo_118:hover{opacity:.85}._btnSecondary_9uhoo_134{font-family:var(--font-label);font-size:12px;padding:8px 16px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btnSecondary_9uhoo_134:hover{border-color:var(--accent);background:var(--accent-dim)}._metricRow_9uhoo_152,._metricGrid_9uhoo_158{display:grid;grid-template-columns:1fr 1fr;gap:16px}._metricCard_9uhoo_164{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px;display:flex;flex-direction:column;gap:6px}._metric_ok_9uhoo_174{border-color:var(--success);box-shadow:0 0 0 1px #22c55e14}._metric_warn_9uhoo_179{border-color:var(--warning);box-shadow:0 0 0 1px #f59e0b14}._metric_error_9uhoo_184{border-color:var(--error);box-shadow:0 0 0 1px #ef444414}._metricHeader_9uhoo_189{display:flex;align-items:center;gap:6px;font-family:var(--font-label);font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-secondary)}._metricIcon_9uhoo_200{font-size:14px}._metricTitle_9uhoo_204{flex:1}._metricValue_9uhoo_208{font-family:var(--font-code);font-size:18px;font-weight:600;color:var(--text-primary)}._metricSubtitle_9uhoo_215{font-family:var(--font-code);font-size:11px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._guideCard_9uhoo_225{background:var(--bg-card);border:1px solid var(--warning);border-radius:var(--radius);padding:16px 20px}._guideTitle_9uhoo_232{font-size:14px;font-weight:500;color:var(--text-primary);margin:0 0 12px}._checklist_9uhoo_239{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}._checklist_9uhoo_239 li{font-size:13px;color:var(--text-secondary);padding-left:24px;position:relative}._checklist_9uhoo_239 li:before{content:"○";position:absolute;left:4px;color:var(--text-muted)}._feedEmpty_9uhoo_263{color:var(--text-muted);font-style:italic;font-size:13px;padding:12px 0}._feedList_9uhoo_270{display:flex;flex-direction:column;gap:4px;max-height:320px;overflow-y:auto}._feedItem_9uhoo_278{display:flex;align-items:baseline;gap:8px;font-size:12px;padding:4px 0;border-bottom:1px solid var(--border)}._feedItem_9uhoo_278:last-child{border-bottom:none}._feedTime_9uhoo_291{font-family:var(--font-code);color:var(--text-muted);flex-shrink:0;width:40px}._feedIcon_9uhoo_298{flex-shrink:0;width:18px;text-align:center}._feedSummary_9uhoo_304{color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}._feedItemClickable_9uhoo_314{cursor:pointer}._feedItemClickable_9uhoo_314:hover{background:var(--bg-secondary)}._feedChevron_9uhoo_322{flex-shrink:0;font-size:10px;color:var(--text-muted);width:14px;text-align:center}._feedDetail_9uhoo_331{padding:8px 12px;margin:2px 0 6px;background:var(--bg-secondary);border:1px solid var(--border);border-radius:6px;overflow-x:auto}._feedDetailPre_9uhoo_340{font-family:var(--font-code);font-size:11px;color:var(--text-secondary);margin:0;white-space:pre-wrap;word-break:break-all}._feedDetailText_9uhoo_349{font-family:var(--font-code);font-size:11px;color:var(--text-muted)}._changelogSummary_9uhoo_356{display:flex;flex-wrap:wrap;gap:8px;font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._changeTag_9uhoo_365{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:3px;background:var(--bg-secondary);border:1px solid var(--border);white-space:nowrap}._tierBar_9uhoo_377{display:flex;flex-direction:column;gap:6px}._tierBarTrack_9uhoo_383{display:flex;height:8px;border-radius:4px;overflow:hidden;background:var(--bg-secondary)}._tierBarFillBasic_9uhoo_391{background:var(--text-muted);transition:width .3s ease}._tierBarFillPro_9uhoo_396{background:var(--accent);transition:width .3s ease}._tierLabels_9uhoo_401{display:flex;justify-content:space-between;font-family:var(--font-code);font-size:11px;color:var(--text-muted)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,b as _,u as I,j as e,T as p,a as T,d as M}from"./index-CkXvRg-O.js";import{u as k,T as H}from"./tier-promo-config-B9lIKWCQ.js";import{T as D}from"./TierPromoPanel-CUrTMsXB.js";import{I as x}from"./InfoLabel-vz7vtbbV.js";import{C as $}from"./ConfirmModal-CvXLNYq0.js";const E=5e3;function A(){const[t,a]=n.useState({state:"NotRunning"}),[y,o]=n.useState([]),[r,c]=n.useState(null),[j,g]=n.useState(!0),m=n.useRef(null),u=n.useCallback(async()=>{try{const l=await _.get("/api/dashboard/playtest/status");a(l)}catch{}},[]),h=n.useCallback(async()=>{try{const l=await _.get("/api/dashboard/playtest/history");o(l.entries??[])}catch{o([])}},[]),d=n.useCallback(async()=>{await Promise.all([u(),h()]),g(!1)},[u,h]),S=n.useCallback(()=>{d()},[d]),N=n.useCallback(async()=>{await _.post("/api/dashboard/playtest/history/clear"),o([]),c(null)},[]),i=n.useCallback(async l=>{try{const R=await _.get(`/api/dashboard/playtest/report/${l}`);c(R)}catch{c(null)}},[]),f=n.useCallback(async l=>{try{await _.post("/api/dashboard/playtest/control",{action:l}),setTimeout(u,500)}catch{}},[u]);return n.useEffect(()=>(d(),m.current=setInterval(d,E),()=>{m.current&&clearInterval(m.current)}),[d]),{status:t,history:y,selectedReport:r,loading:j,loadReport:i,control:f,refresh:S,clearHistory:N}}const B="_page_62ru9_2",z="_card_62ru9_10",O="_cardHeader_62ru9_17",F="_clearButton_62ru9_29",U="_statusRow_62ru9_39",V="_statusIndicator_62ru9_46",G="_statusRunning_62ru9_54",q="_statusPaused_62ru9_59",J="_statusNotRunning_62ru9_63",K="_statusLabel_62ru9_67",Q="_statusMeta_62ru9_74",W="_controlButtons_62ru9_80",X="_btn_62ru9_87",Y="_btnPrimary_62ru9_109",Z="_btnDanger_62ru9_119",tt="_historyList_62ru9_129",et="_historyItem_62ru9_137",st="_historyItemSelected_62ru9_156",at="_historyItemHeader_62ru9_161",rt="_historyIcon_62ru9_167",nt="_historyTimestamp_62ru9_172",ot="_historyName_62ru9_179",it="_historyItemMeta_62ru9_189",lt="_historyMode_62ru9_198",ct="_historyDuration_62ru9_202",ut="_historyStatus_62ru9_206",dt="_status_passed_62ru9_213",pt="_status_failed_62ru9_217",yt="_status_running_62ru9_221",mt="_historyError_62ru9_225",ht="_reportContainer_62ru9_236",_t="_reportSection_62ru9_242",gt="_reportSectionHeader_62ru9_248",ft="_reportMarkdown_62ru9_260",xt="_reportLogs_62ru9_273",bt="_emptyState_62ru9_288",jt="_emptyStateTitle_62ru9_295",St="_emptyStateMessage_62ru9_303",Nt="_upgradePanel_62ru9_312",Rt="_upgradePanelIcon_62ru9_320",It="_upgradePanelTitle_62ru9_325",wt="_upgradePanelDesc_62ru9_333",Pt="_benefitList_62ru9_343",Lt="_benefitItem_62ru9_354",vt="_upgradeActions_62ru9_369",s={page:B,card:z,cardHeader:O,clearButton:F,statusRow:U,statusIndicator:V,statusRunning:G,statusPaused:q,statusNotRunning:J,statusLabel:K,statusMeta:Q,controlButtons:W,btn:X,btnPrimary:Y,btnDanger:Z,historyList:tt,historyItem:et,historyItemSelected:st,historyItemHeader:at,historyIcon:rt,historyTimestamp:nt,historyName:ot,historyItemMeta:it,historyMode:lt,historyDuration:ct,historyStatus:ut,status_passed:dt,status_failed:pt,status_running:yt,historyError:mt,reportContainer:ht,reportSection:_t,reportSectionHeader:gt,reportMarkdown:ft,reportLogs:xt,emptyState:bt,emptyStateTitle:jt,emptyStateMessage:St,upgradePanel:Nt,upgradePanelIcon:Rt,upgradePanelTitle:It,upgradePanelDesc:wt,benefitList:Pt,benefitItem:Lt,upgradeActions:vt};function b(t){return t.trim().toLowerCase()}function Ct(t){switch(b(t)){case"passed":return"✅";case"failed":return"❌";case"running":return"⏱";default:return"❓"}}function Tt(t,a){switch(b(a)){case"run":return t("playtest.status.mode.run","Run");case"server":return t("playtest.status.mode.server","Server");case"edit":return t("playtest.status.mode.edit","Edit");case"play":return t("playtest.status.mode.play","Play");default:return a}}function Mt(t,a){switch(b(a)){case"passed":return t("playtest.history.status.passed","Passed");case"failed":return t("playtest.history.status.failed","Failed");case"running":return t("playtest.history.status.running","Running");default:return t("playtest.history.status.unknown","Unknown")}}function kt(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function Ht({entries:t,onSelect:a,selectedTimestamp:y}){const{t:o}=I();return t.length===0?e.jsx("div",{className:s.emptyState,children:o("playtest.history.empty","No test results yet")}):e.jsx("div",{className:s.historyList,children:t.map(r=>{const c=r.timestamp===y;return e.jsxs("button",{className:`${s.historyItem} ${c?s.historyItemSelected:""}`,onClick:()=>a(r.timestamp),children:[e.jsxs("div",{className:s.historyItemHeader,children:[e.jsx("span",{className:s.historyIcon,children:Ct(r.status)}),e.jsx("span",{className:s.historyTimestamp,children:r.timestamp}),e.jsx("span",{className:s.historyName,children:r.testName})]}),e.jsxs("div",{className:s.historyItemMeta,children:[e.jsx(p,{text:o("playtest.history.mode.tooltip","Playtest mode used for this recorded test run."),children:e.jsxs("span",{className:s.historyMode,children:[o("playtest.history.mode","Mode"),": ",Tt(o,r.mode)]})}),e.jsx("span",{className:s.historyDuration,children:kt(r.durationMs)}),e.jsx(p,{text:o("playtest.history.status.tooltip","Recorded result state for this automated playtest run."),children:e.jsx("span",{className:`${s.historyStatus} ${s[`status_${b(r.status)}`]??""}`,children:Mt(o,r.status)})})]}),r.errorMessage&&e.jsx("div",{className:s.historyError,children:r.errorMessage})]},r.timestamp)})})}function Dt({report:t}){const{t:a}=I();return e.jsxs("div",{className:s.reportContainer,children:[t.markdown&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(p,{text:a("playtest.report.content.tooltip","Markdown summary for the selected automated playtest run."),children:e.jsx("span",{children:a("playtest.report.content","Report")})})}),e.jsx("pre",{className:s.reportMarkdown,children:t.markdown})]}),t.logs&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(p,{text:a("playtest.report.logs.tooltip","Execution logs captured for the selected automated playtest run."),children:e.jsx("span",{children:a("playtest.report.logs","Logs")})})}),e.jsx("pre",{className:s.reportLogs,children:t.logs})]}),!t.markdown&&!t.logs&&e.jsx("div",{className:s.emptyState,children:a("playtest.report.empty","No report content available")})]})}function L(t){return(t==null?void 0:t.trim().toLowerCase())??""}function w(t){switch(L(t).replace(/[\s_-]+/g,"")){case"running":return"running";case"paused":return"paused";case"notrunning":return"not-running";default:return"not-running"}}function $t(t){switch(w(t)){case"paused":return s.statusPaused;case"running":return s.statusRunning;default:return s.statusNotRunning}}function Et(t,a){switch(w(a)){case"paused":return t("playtest.status.state.paused","Paused");case"running":return t("playtest.status.state.running","Running");default:return t("playtest.status.state.notRunning","Not Running")}}function At(t,a){switch(w(a)){case"paused":return t("playtest.status.state.paused.tooltip","The current Roblox playtest session is paused.");case"running":return t("playtest.status.state.running.tooltip","A Roblox playtest session is currently running.");default:return t("playtest.status.state.notRunning.tooltip","No Roblox playtest session is currently running.")}}function Bt(t,a){switch(L(a)){case"run":return t("playtest.status.mode.run","Run");case"server":return t("playtest.status.mode.server","Server");case"edit":return t("playtest.status.mode.edit","Edit");case"play":return t("playtest.status.mode.play","Play");default:return a}}function Gt(){const{t}=I(),{level:a}=T(),{tier:y,loading:o}=k(),r=A(),{show:c}=M(),[j,g]=n.useState(null),[m,u]=n.useState(!1),[h,d]=n.useState(!1),S=!o&&y==="basic",N=a==="L0"||a==="L1";if(S)return e.jsx("div",{className:s.page,children:e.jsx(D,{icon:t("playtest.basic.icon","🎮"),title:t("playtest.basic.title","Playtest is a Pro-only feature"),description:t("playtest.basic.desc","Control playtesting from the dashboard, run automated tests, and view detailed test reports."),benefits:[t("playtest.basic.benefit1","One-click play/pause/stop controls"),t("playtest.basic.benefit2","Automated test execution via AI agent"),t("playtest.basic.benefit3","Test history with pass/fail tracking"),t("playtest.basic.benefit4","Detailed markdown test reports")],upgradeLabel:t("tier.upgrade","Upgrade to Pro"),upgradeHref:H.playtest})});const{status:i,history:f,selectedReport:l,loading:R}=r,v=P=>{g(P),r.loadReport(P)},C=async()=>{d(!0);try{await r.clearHistory(),c(t("toast.clearSuccess","Cleared successfully"),"success"),u(!1),g(null)}catch{c(t("toast.clearFailed","Failed to clear data"),"error")}finally{d(!1)}};return e.jsxs("div",{className:s.page,children:[!N&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(x,{label:t("playtest.status.title","Playtest Status"),tooltip:t("playtest.status.title.tooltip","Current Roblox playtest session state reported by Studio.")})}),e.jsxs("div",{className:s.statusRow,children:[e.jsx("span",{className:`${s.statusIndicator} ${$t(i.state)}`}),e.jsx(p,{text:At(t,i.state),children:e.jsx("span",{className:s.statusLabel,children:Et(t,i.state)})}),i.mode&&e.jsxs("span",{className:s.statusMeta,children:[e.jsx(x,{label:`${t("playtest.status.mode","Mode")}:`,tooltip:t("playtest.status.mode.tooltip","Studio playtest launch mode for the current session.")})," ",e.jsx(p,{text:t("playtest.status.mode.value.tooltip","Specific Roblox Studio playtest mode currently in use."),children:e.jsx("span",{children:Bt(t,i.mode)})})]}),i.placeName&&e.jsx(p,{text:t("playtest.status.place.tooltip","Roblox place currently associated with this playtest session."),children:e.jsxs("span",{className:s.statusMeta,children:[i.placeName,i.placeId?` (${i.placeId})`:""]})})]})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(x,{label:t("playtest.history.title","Test History"),tooltip:t("playtest.history.title.tooltip","Recorded automated playtest runs for this project.")}),e.jsx("button",{className:s.clearButton,onClick:()=>u(!0),children:t("common.clear","Clear")})]}),R?e.jsx("div",{className:s.emptyState,children:t("common.loading","Loading...")}):f.length===0?e.jsxs("div",{className:s.emptyState,children:[e.jsx("div",{className:s.emptyStateTitle,children:t("playtest.empty.title","No playtest results yet")}),e.jsxs("div",{className:s.emptyStateMessage,children:[t("playtest.empty.message.before","Test results will appear here when the AI agent runs automated tests via")," ",e.jsx(p,{text:t("playtest.empty.runTest.tooltip","Dashboard automation entry point that runs Roblox playtest checks through the system_info tool."),children:e.jsx("span",{children:"system_info.run_test"})}),t("playtest.empty.message.after",".")]})]}):e.jsx(Ht,{entries:f,onSelect:v,selectedTimestamp:j??void 0})]}),l&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(x,{label:t("playtest.report.title","Selected Report"),tooltip:t("playtest.report.title.tooltip","Detailed output for the currently selected automated playtest run.")})}),e.jsx(Dt,{report:l})]}),e.jsx($,{open:m,title:t("playtest.clear.title","Clear test history?"),message:t("playtest.clear.message","This permanently removes the stored playtest reports for the current place."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:h,onCancel:()=>!h&&u(!1),onConfirm:C})]})}export{Gt as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._page_62ru9_2{display:flex;flex-direction:column;gap:16px;max-width:900px}._card_62ru9_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._cardHeader_62ru9_17{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--text-primary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:8px}._clearButton_62ru9_29{border:1px solid rgba(209,84,84,.5);background:#d154541f;color:#f4c1c1;border-radius:8px;padding:6px 12px;cursor:pointer}._statusRow_62ru9_39{display:flex;align-items:center;gap:12px;margin-bottom:8px}._statusIndicator_62ru9_46{display:inline-block;width:8px;height:8px;border-radius:50%;flex-shrink:0}._statusRunning_62ru9_54{background:var(--success);box-shadow:0 0 6px var(--success)}._statusPaused_62ru9_59{background:var(--warning)}._statusNotRunning_62ru9_63{background:var(--text-muted)}._statusLabel_62ru9_67{font-family:var(--font-code);font-size:13px;font-weight:600;color:var(--text-primary)}._statusMeta_62ru9_74{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._controlButtons_62ru9_80{display:flex;gap:8px;margin-top:12px}._btn_62ru9_87{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_62ru9_87:hover{border-color:var(--accent);background:var(--accent-dim)}._btn_62ru9_87:disabled{opacity:.4;pointer-events:none}._btnPrimary_62ru9_109{background:var(--accent);color:var(--bg-card);border-color:var(--accent)}._btnPrimary_62ru9_109:hover{opacity:.9}._btnDanger_62ru9_119{border-color:var(--error);color:var(--error)}._btnDanger_62ru9_119:hover{background:#ef44441a}._historyList_62ru9_129{display:flex;flex-direction:column;gap:4px;max-height:320px;overflow-y:auto}._historyItem_62ru9_137{display:flex;flex-direction:column;gap:4px;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);cursor:pointer;text-align:left;width:100%;font-family:inherit;transition:border-color var(--transition)}._historyItem_62ru9_137:hover{border-color:var(--accent)}._historyItemSelected_62ru9_156{border-color:var(--accent);background:var(--accent-dim)}._historyItemHeader_62ru9_161{display:flex;align-items:center;gap:8px}._historyIcon_62ru9_167{font-size:14px;flex-shrink:0}._historyTimestamp_62ru9_172{font-family:var(--font-code);font-size:11px;color:var(--text-muted);flex-shrink:0}._historyName_62ru9_179{font-family:var(--font-label);font-size:12px;font-weight:500;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._historyItemMeta_62ru9_189{display:flex;gap:12px;font-family:var(--font-code);font-size:11px;color:var(--text-secondary);padding-left:22px}._historyMode_62ru9_198{color:var(--text-muted)}._historyDuration_62ru9_202{color:var(--text-secondary)}._historyStatus_62ru9_206{font-weight:500;text-transform:uppercase;font-size:10px;letter-spacing:.04em}._status_passed_62ru9_213{color:var(--success)}._status_failed_62ru9_217{color:var(--error)}._status_running_62ru9_221{color:var(--accent)}._historyError_62ru9_225{font-family:var(--font-code);font-size:11px;color:var(--error);padding-left:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._reportContainer_62ru9_236{display:flex;flex-direction:column;gap:12px}._reportSection_62ru9_242{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}._reportSectionHeader_62ru9_248{font-family:var(--font-label);font-size:11px;font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.06em;padding:6px 12px;background:var(--bg-secondary);border-bottom:1px solid var(--border)}._reportMarkdown_62ru9_260{padding:12px;margin:0;font-family:var(--font-code);font-size:12px;line-height:1.6;color:var(--text-primary);white-space:pre-wrap;word-break:break-word;max-height:400px;overflow-y:auto}._reportLogs_62ru9_273{padding:12px;margin:0;font-family:var(--font-code);font-size:11px;line-height:1.5;color:var(--text-secondary);white-space:pre-wrap;word-break:break-word;max-height:240px;overflow-y:auto;background:var(--bg-secondary)}._emptyState_62ru9_288{text-align:center;padding:32px 16px;color:var(--text-muted);font-size:13px}._emptyStateTitle_62ru9_295{font-family:var(--font-label);font-size:14px;font-weight:600;color:var(--text-secondary);margin-bottom:8px}._emptyStateMessage_62ru9_303{font-size:12px;color:var(--text-muted);max-width:360px;margin:0 auto;line-height:1.5}._upgradePanel_62ru9_312{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:32px 24px;text-align:center}._upgradePanelIcon_62ru9_320{font-size:32px;margin-bottom:12px}._upgradePanelTitle_62ru9_325{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--text-primary);margin-bottom:8px}._upgradePanelDesc_62ru9_333{font-size:13px;color:var(--text-secondary);margin-bottom:16px;max-width:400px;margin-left:auto;margin-right:auto;line-height:1.5}._benefitList_62ru9_343{list-style:none;padding:0;margin:0 auto 16px;display:flex;flex-direction:column;gap:4px;max-width:360px;text-align:left}._benefitItem_62ru9_354{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_62ru9_354:before{content:"+";position:absolute;left:0;color:var(--accent);font-weight:600}._upgradeActions_62ru9_369{display:flex;gap:8px;justify-content:center}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as H,r as c,i as M,D,k as F,l as G,m as $,b as E,u as q,j as e,T as j,A as K,S as U}from"./index-CkXvRg-O.js";import{I as o}from"./InfoLabel-vz7vtbbV.js";function V(){const{level:s}=H(),[r,C]=c.useState(null),[p,a]=c.useState(null),[N,S]=c.useState(null),[A,u]=c.useState(!1),[m,k]=c.useState(!0),[B,f]=c.useState(!1),[P,L]=c.useState(null),g="gumroad",v=s==="L0",h=c.useCallback(n=>{n&&a(l=>({...l,...n,maskedKey:n.maskedKey??(l==null?void 0:l.maskedKey),provider:n.provider??(l==null?void 0:l.provider)??g}))},[g]),y=c.useCallback(n=>{if(!n){a(null);return}a({...n,provider:n.provider??g})},[g]),_=c.useCallback(async()=>{try{return await M(g)}catch{return null}},[g]);c.useEffect(()=>{let n=!1;async function l(){try{const[i,d,b]=await Promise.all([E.get("/api/dashboard/settings").catch(()=>null),_(),E.get("/sync/config").catch(()=>null)]);if(n)return;i&&C(i),d&&h(d),b&&S(b)}catch{}finally{n||k(!1)}}return l(),()=>{n=!0}},[_,h]),c.useEffect(()=>{const n=new D;n.connect();const l=n.on("license",i=>{_().then(d=>{if(d){if((i==null?void 0:i.cleared)===!0){y(d);return}h(d)}})});return()=>{l(),n.disconnect()}},[_,h,y]);const x=c.useCallback((n,l)=>{L(n??l)},[]),T=c.useCallback(async n=>{if(v)return!1;if(!n.trim())return L("License key is required."),!1;f(!0);try{const l=await F({provider:g,licenseKey:n.trim()});return h(l.license),x(l.message,l.ok?"License updated.":"License activation failed."),l.ok}catch{return L("License activation failed."),!1}finally{f(!1)}},[x,v,g,h]),I=c.useCallback(async()=>{if(!v){f(!0);try{const n=await G({provider:g});h(n.license),x(n.message,n.ok?"License updated.":"License refresh failed.")}catch{L("License refresh failed.")}finally{f(!1)}}},[x,v,g,h]),O=c.useCallback(async()=>{if(!v){f(!0);try{const n=await $({provider:g});y(n.license),x(n.message,n.ok?"License reset.":"License reset failed.")}catch{L("License reset failed.")}finally{f(!1)}}},[x,v,g,y]),w=c.useCallback(async(n,l)=>{if(r){C(i=>i&&{...i,hot:{...i.hot,[n]:l}}),u(!0);try{await E.patch("/api/dashboard/settings",{[n]:l})}catch{C(i=>i&&{...i,hot:{...i.hot,[n]:r.hot[n]}})}finally{u(!1)}}},[r]),R=c.useCallback(async n=>{u(!0);try{const l=await E.post("/sync/config",n);S(l)}catch{}finally{u(!1)}},[]);return{settings:r,license:p,syncConfig:N,saving:A,licenseProvider:g,licenseControlsDisabled:v,licenseSubmitting:B,licenseMessage:P,activateLicense:T,refreshLicense:I,resetLicense:O,updateHotSetting:w,updateSyncConfig:R,loading:m}}const W="_page_1dguc_2",Q="_card_1dguc_10",Y="_licenseCardPro_1dguc_17",z="_cardHeader_1dguc_28",J="_headerBadge_1dguc_42",X="_headerBadgeLive_1dguc_53",Z="_licenseGrid_1dguc_59",ee="_statusDot_1dguc_77",se="_statusActive_1dguc_86",te="_statusGrace_1dguc_91",ie="_statusInactive_1dguc_96",ne="_statusError_1dguc_100",ae="_proBadge_1dguc_105",le="_upgradeLink_1dguc_119",ce="_licenseControls_1dguc_133",oe="_licenseControlRow_1dguc_142",re="_licenseField_1dguc_149",de="_licenseFieldGrow_1dguc_155",ge="_controlLabel_1dguc_160",ue="_textInput_1dguc_166",he="_actionBtn_1dguc_182",pe="_licenseMessage_1dguc_204",me="_licenseNotice_1dguc_211",xe="_licenseNoticeInfo_1dguc_221",ve="_licenseNoticeWarning_1dguc_227",_e="_licenseNoticeMuted_1dguc_233",be="_settingRow_1dguc_239",je="_settingLabel_1dguc_253",fe="_settingControl_1dguc_260",Le="_select_1dguc_267",ye="_numberInput_1dguc_285",Ne="_checkbox_1dguc_303",Ce="_savedIndicator_1dguc_311",Se="_coldGrid_1dguc_324",ke="_coldHint_1dguc_342",Te="_syncForm_1dguc_351",Ie="_syncRow_1dguc_357",we="_syncField_1dguc_364",Re="_saveBtn_1dguc_378",Ee="_langRow_1dguc_402",Ae="_loading_1dguc_415",Be="_unit_1dguc_424",t={page:W,card:Q,licenseCardPro:Y,cardHeader:z,headerBadge:J,headerBadgeLive:X,licenseGrid:Z,statusDot:ee,statusActive:se,statusGrace:te,statusInactive:ie,statusError:ne,proBadge:ae,upgradeLink:le,licenseControls:ce,licenseControlRow:oe,licenseField:re,licenseFieldGrow:de,controlLabel:ge,textInput:ue,actionBtn:he,licenseMessage:pe,licenseNotice:me,licenseNoticeInfo:xe,licenseNoticeWarning:ve,licenseNoticeMuted:_e,settingRow:be,settingLabel:je,settingControl:fe,select:Le,numberInput:ye,checkbox:Ne,savedIndicator:Ce,coldGrid:Se,coldHint:ke,syncForm:Te,syncRow:Ie,syncField:we,saveBtn:Re,langRow:Ee,loading:Ae,unit:Be},Pe={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia"},Oe=["debug","info","warn","error"];function He(s){return s==="active"?t.statusActive:s==="grace"?t.statusGrace:s==="invalid"||s==="revoked"?t.statusError:t.statusInactive}function Me(s,r){return s.refreshBlockedReason==="missing_session_token"?{label:r("settings.license.status.activationRequired","Activation Required"),tooltip:r("settings.license.status.activationRequired.tooltip","Manual license activation is required before the dashboard can refresh this status."),detail:r("settings.license.detail.missingSessionToken","Refresh is blocked because the current session token is missing."),detailTone:t.licenseNoticeWarning}:s.statusDetail==="grace_provider_unavailable"?{label:r("settings.license.status.grace","Grace"),tooltip:r("settings.license.status.grace.tooltip","Provider verification is temporarily unavailable, but Pro access remains active during the grace period."),detail:r("settings.license.detail.graceProviderUnavailable","Provider unavailable. Pro access remains active during grace mode."),detailTone:t.licenseNoticeInfo}:s.statusDetail==="grace_cancelled"||s.statusDetail==="grace_expired"||s.statusDetail==="grace_payment_failed"?{label:r("settings.license.status.grace","Grace"),tooltip:r("settings.license.status.graceBilling.tooltip","Pro access is still available during a billing-related grace period."),detail:r("settings.license.detail.graceBilling","Pro access remains available during a billing grace period."),detailTone:t.licenseNoticeInfo}:{label:r(`settings.license.${s.status}`,s.status),tooltip:r(`settings.license.${s.status}.tooltip`,"Current license activation state."),detail:s.refreshRequired?r("settings.license.detail.refreshRecommended","License verification should be refreshed soon."):null,detailTone:t.licenseNoticeMuted}}function Ge(){const{t:s,selectedLocale:r,setLocale:C}=q(),{settings:p,license:a,syncConfig:N,saving:S,licenseProvider:A,licenseControlsDisabled:u,licenseSubmitting:m,licenseMessage:k,activateLicense:B,refreshLicense:f,resetLicense:P,updateHotSetting:L,updateSyncConfig:g,loading:v}=V(),[h,y]=c.useState(null),[_,x]=c.useState({}),[T,I]=c.useState(""),O=a?Me(a,s):null,w=(a==null?void 0:a.tier)==="pro",R=(a==null?void 0:a.tier)==="pro"?a.maskedKey:void 0;c.useEffect(()=>{N&&x({maxDepth:N.maxDepth,maxInstances:N.maxInstances})},[N]);const n=c.useCallback(async(i,d)=>{await L(i,d),y(i),setTimeout(()=>y(b=>b===i?null:b),2e3)},[L]),l=c.useCallback(async()=>{await g(_)},[g,_]);return v?e.jsx("div",{className:t.page,children:e.jsx("div",{className:t.loading,children:s("common.loading")})}):e.jsxs("div",{className:t.page,children:[e.jsxs("div",{"data-testid":"settings-license-card",className:[t.card,(a==null?void 0:a.tier)==="pro"?t.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:t.cardHeader,children:[e.jsx(o,{label:s("settings.license.title","License"),tooltip:s("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(j,{text:u?s("settings.license.disconnected.tooltip","Reconnect to the MCP server to manage license actions from the dashboard."):s("settings.license.live.tooltip","License actions are sent to the MCP server immediately."),children:e.jsx("span",{className:`${t.headerBadge} ${u?"":t.headerBadgeLive}`,children:u?s("settings.license.disconnected","Disconnected"):s("settings.general.liveApply","Live Apply")})})]}),e.jsxs(e.Fragment,{children:[a?e.jsxs(e.Fragment,{children:[(()=>{const i=O;return e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:t.licenseGrid,children:[e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.status","Status"),tooltip:s("settings.license.status.tooltip","Current license activation state.")})}),e.jsxs("dd",{children:[e.jsx("span",{className:`${t.statusDot} ${He(a.status)}`}),e.jsx(j,{text:(i==null?void 0:i.tooltip)??s(`settings.license.${a.status}.tooltip`,"Current license activation state."),children:(i==null?void 0:i.label)??s(`settings.license.${a.status}`,a.status)})]}),e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.tier","Tier"),tooltip:s("settings.license.tier.tooltip","Current subscription tier for available dashboard features.")})}),e.jsx("dd",{className:a.tier==="pro"?t.proBadge:"",children:e.jsx(j,{text:s(`tier.${a.tier}.tooltip`,"Available feature set for the connected license."),children:a.tier==="pro"?s("tier.pro","Pro"):s("tier.basic","Basic")})}),R&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.key","Key"),tooltip:s("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("dd",{children:e.jsx(j,{text:s("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:R})})]}),a.provider&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(o,{label:s("settings.license.provider","Provider"),tooltip:s("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("dd",{children:e.jsx(j,{text:s("settings.license.providerValue.tooltip","License provider used to validate this key."),children:a.provider})})]})]}),(i==null?void 0:i.detail)&&e.jsx("p",{className:`${t.licenseNotice} ${i.detailTone}`,children:a.refreshBlockedReason==="missing_session_token"?s("settings.license.detail.manualActivation","Manual activation required to restore Pro access."):i.detail}),a.refreshBlockedReason==="missing_session_token"&&e.jsx("p",{className:`${t.licenseNotice} ${t.licenseNoticeMuted}`,children:i==null?void 0:i.detail})]})})(),a.tier==="basic"&&e.jsx("a",{className:t.upgradeLink,href:"https://gum.co/u/din5in7h",target:"_blank",rel:"noopener noreferrer",children:s("tier.upgrade")})]}):e.jsx("div",{className:t.loading,children:s("settings.license.unavailable")}),e.jsxs("div",{className:t.licenseControls,children:[e.jsxs("div",{className:t.licenseControlRow,children:[e.jsxs("label",{className:t.licenseField,children:[e.jsx("span",{className:t.controlLabel,children:e.jsx(o,{label:s("settings.license.provider","Provider"),tooltip:s("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("select",{"aria-label":s("settings.license.provider","Provider"),className:t.select,value:A,disabled:u||m,onChange:()=>{},children:e.jsx("option",{value:"gumroad",children:"gumroad"})})]}),e.jsx("button",{type:"button",className:t.actionBtn,disabled:u||m||!w,onClick:()=>{f()},children:m?s("common.loading"):s("settings.license.refresh","Refresh License")}),e.jsx("button",{type:"button",className:t.actionBtn,disabled:u||m||!w,onClick:()=>{P()},children:m?s("common.loading"):s("settings.license.reset","Reset License")})]}),e.jsxs("div",{className:t.licenseControlRow,children:[e.jsxs("label",{className:`${t.licenseField} ${t.licenseFieldGrow}`,children:[e.jsx("span",{className:t.controlLabel,children:e.jsx(o,{label:s("settings.license.keyInput","License Key"),tooltip:s("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("input",{"aria-label":s("settings.license.keyInput","License Key"),className:t.textInput,type:"text",value:T,disabled:u||m,onChange:i=>I(i.target.value)})]}),e.jsx("button",{type:"button",className:t.actionBtn,disabled:u||m,onClick:()=>{(async()=>await B(T)&&I(""))()},children:m?s("common.loading"):s("settings.license.activate","Activate License")})]}),k&&e.jsx("p",{className:t.licenseMessage,children:k})]})]})]}),e.jsxs("div",{className:t.card,children:[e.jsxs("div",{className:t.cardHeader,children:[e.jsx(o,{label:s("settings.general.title","General Settings"),tooltip:s("settings.general.title.tooltip","Hot settings that apply immediately when changed.")}),e.jsx(j,{text:s("settings.general.liveApply.tooltip","Changes in this section are applied immediately without a separate save button."),children:e.jsx("span",{className:`${t.headerBadge} ${t.headerBadgeLive}`,children:s("settings.general.liveApply","Live Apply")})})]}),p?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.logLevel","Log Level"),tooltip:s("settings.general.logLevel.tooltip","Sets how much detail the dashboard writes to its logs.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("select",{className:t.select,value:p.hot.LOG_LEVEL,onChange:i=>n("LOG_LEVEL",i.target.value),children:Oe.map(i=>e.jsx("option",{value:i,children:i},i))}),h==="LOG_LEVEL"&&e.jsx("span",{className:t.savedIndicator,children:s("settings.general.applied")})]})]}),e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.localHistory","Tool History Recording"),tooltip:s("settings.general.localHistory.tooltip","Stores local tool execution history for the dashboard history views.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("input",{type:"checkbox",className:t.checkbox,checked:p.hot.ENABLE_LOCAL_HISTORY,onChange:i=>n("ENABLE_LOCAL_HISTORY",i.target.checked)}),h==="ENABLE_LOCAL_HISTORY"&&e.jsx("span",{className:t.savedIndicator,children:s("settings.general.applied")})]})]}),e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.localStatistics","Tool Statistics Collection"),tooltip:s("settings.general.localStatistics.tooltip","Aggregates local usage statistics for dashboard reporting.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("input",{type:"checkbox",className:t.checkbox,checked:p.hot.ENABLE_LOCAL_STATISTICS,onChange:i=>n("ENABLE_LOCAL_STATISTICS",i.target.checked)}),h==="ENABLE_LOCAL_STATISTICS"&&e.jsx("span",{className:t.savedIndicator,children:s("settings.general.applied")})]})]}),e.jsxs("div",{className:t.settingRow,children:[e.jsx("span",{className:t.settingLabel,children:e.jsx(o,{label:s("settings.general.requestTimeout","Request Timeout"),tooltip:s("settings.general.requestTimeout.tooltip","Maximum time the dashboard waits for a request before it fails.")})}),e.jsxs("div",{className:t.settingControl,children:[e.jsx("input",{type:"number",className:t.numberInput,value:p.hot.REQUEST_TIMEOUT,min:1e3,max:12e4,step:1e3,onChange:i=>{const d=parseInt(i.target.value,10);isNaN(d)||n("REQUEST_TIMEOUT",d)}}),e.jsx(j,{text:s("settings.general.requestTimeout.unit.tooltip","Request timeout is measured in milliseconds."),children:e.jsx("span",{className:t.unit,children:s("settings.general.requestTimeout.unit","ms")})}),h==="REQUEST_TIMEOUT"&&e.jsx("span",{className:t.savedIndicator,children:s("settings.general.applied","Applied")})]})]})]}):e.jsx("div",{className:t.loading,children:s("settings.unavailable")})]}),e.jsxs("div",{className:t.card,children:[e.jsxs("div",{className:t.cardHeader,children:[e.jsx(o,{label:s("settings.cold.title","Server Environment"),tooltip:s("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(j,{text:s("settings.readOnly.tooltip","This section shows values that cannot be edited from the dashboard."),children:e.jsx("span",{className:t.headerBadge,children:s("settings.readOnly","Read-only")})})]}),p?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:t.coldGrid,children:[e.jsx("dt",{children:e.jsx(o,{label:"HTTP_PORT",tooltip:s("settings.cold.httpPort.tooltip","Port number used by the MCP dashboard HTTP server.")})}),e.jsx("dd",{children:p.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(o,{label:"HTTP_HOST",tooltip:s("settings.cold.httpHost.tooltip","Host interface that the MCP dashboard HTTP server binds to.")})}),e.jsx("dd",{children:p.cold.HTTP_HOST}),e.jsx("dt",{children:e.jsx(o,{label:"DASHBOARD_AUTO_OPEN",tooltip:s("settings.cold.dashboardAutoOpen.tooltip","Controls whether the dashboard opens automatically in the browser when the server starts.")})}),e.jsx("dd",{children:e.jsx(j,{text:s("settings.cold.dashboardAutoOpen.value.tooltip","Current startup behavior for opening the dashboard in a browser."),children:String(p.cold.DASHBOARD_AUTO_OPEN)})})]}),e.jsx("p",{className:t.coldHint,children:s("settings.cold.hint","Set via environment variables to change these values.")})]}):e.jsx("div",{className:t.loading,children:s("settings.unavailable")})]}),e.jsxs("div",{className:t.card,children:[e.jsx("div",{className:t.cardHeader,children:e.jsx(o,{label:s("settings.sync.title","Sync Settings"),tooltip:s("settings.sync.title.tooltip","Saved sync limits for project file indexing and traversal.")})}),e.jsxs("div",{className:t.syncForm,children:[e.jsxs("div",{className:t.syncRow,children:[e.jsxs("div",{className:t.syncField,children:[e.jsx("label",{children:e.jsx(o,{label:s("settings.sync.maxDepth","Max Depth"),tooltip:s("settings.sync.maxDepth.tooltip","Maximum folder depth the sync scanner will traverse.")})}),e.jsx("input",{type:"number",className:t.numberInput,value:_.maxDepth??10,min:1,max:100,onChange:i=>{const d=parseInt(i.target.value,10);isNaN(d)||x(b=>({...b,maxDepth:d}))}})]}),e.jsxs("div",{className:t.syncField,children:[e.jsx("label",{children:e.jsx(o,{label:s("settings.sync.maxInstances","Max Instances"),tooltip:s("settings.sync.maxInstances.tooltip","Maximum number of Roblox instances to index during sync.")})}),e.jsx("input",{type:"number",className:t.numberInput,value:_.maxInstances??5e3,min:100,max:5e4,step:100,onChange:i=>{const d=parseInt(i.target.value,10);isNaN(d)||x(b=>({...b,maxInstances:d}))}})]})]}),e.jsx("button",{className:t.saveBtn,onClick:l,disabled:S,children:S?s("common.loading"):s("settings.sync.save","Save")})]})]}),e.jsxs("div",{className:t.card,children:[e.jsx("div",{className:t.cardHeader,children:e.jsx(o,{label:s("settings.language.title","Language"),tooltip:s("settings.language.title.tooltip","Choose how the dashboard interface text is localized.")})}),e.jsxs("div",{className:t.langRow,children:[e.jsx("label",{children:e.jsx(o,{label:s("settings.language.dashboard","Dashboard Language"),tooltip:s("settings.language.dashboard.tooltip","Overrides the dashboard language or follows the system language when set to Auto.")})}),e.jsxs("select",{className:t.select,value:r,onChange:i=>C(i.target.value),children:[e.jsx("option",{value:K,children:s("settings.language.auto","Auto")}),U.map(i=>e.jsx("option",{value:i,children:Pe[i]??i},i))]})]})]})]})}export{Ge as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._page_1dguc_2{display:flex;flex-direction:column;gap:16px;max-width:820px}._card_1dguc_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._licenseCardPro_1dguc_17{border-color:var(--pro-border);background:linear-gradient(180deg,var(--pro-bg-soft),transparent 28%),var(--bg-card);box-shadow:inset 0 1px #f3d46b2e,0 0 0 1px #8f6f1f24}._cardHeader_1dguc_28{font-family:var(--font-label);font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-secondary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between}._headerBadge_1dguc_42{font-size:10px;font-weight:400;padding:2px 8px;border-radius:4px;border:1px solid var(--border);color:var(--text-muted);text-transform:none;letter-spacing:0}._headerBadgeLive_1dguc_53{color:var(--success);border-color:var(--success)}._licenseGrid_1dguc_59{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;font-family:var(--font-code);font-size:13px}._licenseGrid_1dguc_59 dt{color:var(--text-muted)}._licenseGrid_1dguc_59 dd{color:var(--text-primary);margin:0}._statusDot_1dguc_77{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px;vertical-align:middle}._statusActive_1dguc_86{background:var(--success);box-shadow:0 0 4px var(--success)}._statusGrace_1dguc_91{background:var(--warning, #b7791f);box-shadow:0 0 4px color-mix(in srgb,var(--warning, #b7791f) 70%,transparent)}._statusInactive_1dguc_96{background:var(--text-muted)}._statusError_1dguc_100{background:var(--error)}._proBadge_1dguc_105{color:var(--pro-badge);font-weight:500}._licenseCardPro_1dguc_17 ._cardHeader_1dguc_28 span:first-child{color:var(--pro-text)}._licenseCardPro_1dguc_17 ._licenseGrid_1dguc_59 dt{color:var(--pro-badge)}._upgradeLink_1dguc_119{display:inline-block;margin-top:8px;font-family:var(--font-label);font-size:12px;color:var(--accent);cursor:pointer;text-decoration:underline}._upgradeLink_1dguc_119:hover{opacity:.8}._licenseControls_1dguc_133{display:flex;flex-direction:column;gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid var(--border)}._licenseControlRow_1dguc_142{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}._licenseField_1dguc_149{display:flex;flex-direction:column;gap:6px}._licenseFieldGrow_1dguc_155{flex:1;min-width:220px}._controlLabel_1dguc_160{font-family:var(--font-label);font-size:12px;color:var(--text-primary)}._textInput_1dguc_166{font-family:var(--font-code);font-size:12px;padding:6px 8px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);outline:none;transition:border-color var(--transition)}._textInput_1dguc_166:focus{border-color:var(--accent)}._actionBtn_1dguc_182{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--accent);background:transparent;color:var(--accent);cursor:pointer;transition:background var(--transition),color var(--transition),opacity var(--transition)}._actionBtn_1dguc_182:hover{background:var(--accent);color:var(--bg-primary)}._actionBtn_1dguc_182:disabled{opacity:.5;cursor:not-allowed}._licenseMessage_1dguc_204{margin:0;font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._licenseNotice_1dguc_211{margin:12px 0 0;padding:10px 12px;border-radius:8px;border:1px solid var(--border);font-family:var(--font-label);font-size:12px;line-height:1.5}._licenseNoticeInfo_1dguc_221{color:var(--text-primary);background:color-mix(in srgb,var(--accent) 8%,transparent);border-color:color-mix(in srgb,var(--accent) 28%,var(--border))}._licenseNoticeWarning_1dguc_227{color:var(--text-primary);background:color-mix(in srgb,var(--warning, #b7791f) 12%,transparent);border-color:color-mix(in srgb,var(--warning, #b7791f) 34%,var(--border))}._licenseNoticeMuted_1dguc_233{color:var(--text-secondary);background:var(--bg-secondary)}._settingRow_1dguc_239{display:flex;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--border);font-size:13px}._settingRow_1dguc_239:last-child{border-bottom:none}._settingLabel_1dguc_253{font-family:var(--font-label);color:var(--text-primary);flex:1}._settingControl_1dguc_260{display:flex;align-items:center;gap:8px}._select_1dguc_267{font-family:var(--font-code);font-size:12px;padding:4px 8px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;outline:none;transition:border-color var(--transition)}._select_1dguc_267:focus{border-color:var(--accent)}._numberInput_1dguc_285{font-family:var(--font-code);font-size:12px;padding:4px 8px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);width:80px;outline:none;transition:border-color var(--transition)}._numberInput_1dguc_285:focus{border-color:var(--accent)}._checkbox_1dguc_303{width:16px;height:16px;cursor:pointer;accent-color:var(--accent)}._savedIndicator_1dguc_311{font-family:var(--font-code);font-size:11px;color:var(--success);opacity:1;transition:opacity .3s ease}._savedIndicatorHidden_1dguc_319{opacity:0}._coldGrid_1dguc_324{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;font-family:var(--font-code);font-size:13px}._coldGrid_1dguc_324 dt{color:var(--text-muted)}._coldGrid_1dguc_324 dd{color:var(--text-primary);margin:0}._coldHint_1dguc_342{margin-top:10px;font-family:var(--font-label);font-size:12px;color:var(--text-muted);font-style:italic}._syncForm_1dguc_351{display:flex;flex-direction:column;gap:10px}._syncRow_1dguc_357{display:flex;align-items:center;gap:16px;flex-wrap:wrap}._syncField_1dguc_364{display:flex;align-items:center;gap:8px;font-size:13px}._syncField_1dguc_364 label{font-family:var(--font-label);color:var(--text-primary);white-space:nowrap}._saveBtn_1dguc_378{align-self:flex-end;font-family:var(--font-label);font-size:12px;padding:6px 16px;border-radius:4px;border:1px solid var(--accent);background:transparent;color:var(--accent);cursor:pointer;transition:background var(--transition),color var(--transition)}._saveBtn_1dguc_378:hover{background:var(--accent);color:var(--bg-primary)}._saveBtn_1dguc_378:disabled{opacity:.5;cursor:not-allowed}._langRow_1dguc_402{display:flex;align-items:center;gap:12px;font-size:13px}._langRow_1dguc_402 label{font-family:var(--font-label);color:var(--text-primary)}._loading_1dguc_415{color:var(--text-muted);font-family:var(--font-code);font-size:13px;padding:32px 0;text-align:center}._unit_1dguc_424{font-family:var(--font-code);font-size:11px;color:var(--text-muted)}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{r as a,b as v,D as L,u as C,a as S,d as R,j as t,T as m,f as P}from"./index-CkXvRg-O.js";import{I as u}from"./InfoLabel-vz7vtbbV.js";import{C as B}from"./ConfirmModal-CvXLNYq0.js";import{S as E}from"./StatusBadge-BMTgkxDJ.js";import{u as $,T as A}from"./tier-promo-config-B9lIKWCQ.js";import{T as O}from"./TierPromoPanel-CUrTMsXB.js";const D=5e3;function H(){const[e,i]=a.useState(null),[_,g]=a.useState(null),[l,r]=a.useState([]),[y,f]=a.useState(!0),b=a.useRef(null),h=a.useRef(null),d=a.useCallback(async()=>{try{const o=await v.get("/sync/status");i(o)}catch{}},[]),w=a.useCallback(async()=>{try{const o=await v.get("/sync/config");g(o)}catch{}},[]),n=a.useCallback(async()=>{try{const o=await v.get("/sync/history",{limit:"30"});r(o.entries??[])}catch{r([])}},[]),p=a.useCallback(async()=>{await Promise.all([d(),w(),n()]),f(!1)},[d,w,n]),j=a.useCallback(()=>{p()},[p]),T=a.useCallback(async()=>{await v.post("/api/dashboard/sync/history/clear"),r([]),d()},[d]);return a.useEffect(()=>(p(),h.current=setInterval(p,D),()=>{h.current&&clearInterval(h.current)}),[p]),a.useEffect(()=>{const o=new L;b.current=o,o.connect();const c=o.on("sync",()=>{d(),n()});return()=>{c(),o.disconnect(),b.current=null}},[d,n]),{status:e,config:_,history:l,loading:y,refresh:j,clearHistory:T}}const M="_page_xmkt1_2",F="_card_xmkt1_10",U="_cardHeader_xmkt1_17",G="_clearButton_xmkt1_29",V="_statusRow_xmkt1_39",W="_metaItem_xmkt1_46",q="_statusGrid_xmkt1_52",z="_table_xmkt1_71",Y="_directionRail_xmkt1_99",J="_endpointLabel_xmkt1_105",K="_optionRail_xmkt1_109",Q="_directionOption_xmkt1_115",X="_directionOptionActive_xmkt1_129",Z="_directionOptionInactive_xmkt1_133",ee="_direction_forward_xmkt1_139",te="_direction_bidirectional_xmkt1_143",se="_direction_reverse_xmkt1_147",ne="_lockBadge_xmkt1_152",ie="_proBadge_xmkt1_160",ce="_forwardBadge_xmkt1_174",ae="_configGrid_xmkt1_187",oe="_configItem_xmkt1_193",le="_configLabel_xmkt1_199",re="_configValue_xmkt1_207",de="_logContainer_xmkt1_214",pe="_logEntry_xmkt1_221",ue="_logTime_xmkt1_233",ye="_logType_xmkt1_239",me="_logTypeWrite_xmkt1_248",ge="_logTypeUpdate_xmkt1_252",he="_logTypeDelete_xmkt1_256",xe="_logTypeIdle_xmkt1_260",_e="_logPath_xmkt1_264",fe="_logEmpty_xmkt1_271",be="_overlay_xmkt1_278",je="_overlayTitle_xmkt1_288",ke="_overlayMessage_xmkt1_295",ve="_checklist_xmkt1_301",we="_checkItem_xmkt1_311",Te="_upgradePanel_xmkt1_327",Ne="_upgradePanelHeader_xmkt1_334",Ie="_benefitList_xmkt1_342",Le="_benefitItem_xmkt1_351",Ce="_upgradeActions_xmkt1_366",Se="_btn_xmkt1_371",Re="_btnPrimary_xmkt1_388",Pe="_disabled_xmkt1_399",s={page:M,card:F,cardHeader:U,clearButton:G,statusRow:V,metaItem:W,statusGrid:q,table:z,directionRail:Y,endpointLabel:J,optionRail:K,directionOption:Q,directionOptionActive:X,directionOptionInactive:Z,direction_forward:ee,direction_bidirectional:te,direction_reverse:se,lockBadge:ne,proBadge:ie,forwardBadge:ce,configGrid:ae,configItem:oe,configLabel:le,configValue:re,logContainer:de,logEntry:pe,logTime:ue,logType:ye,logTypeWrite:me,logTypeUpdate:ge,logTypeDelete:he,logTypeIdle:xe,logPath:_e,logEmpty:fe,overlay:be,overlayTitle:je,overlayMessage:ke,checklist:ve,checkItem:we,upgradePanel:Te,upgradePanelHeader:Ne,benefitList:Ie,benefitItem:Le,upgradeActions:Ce,btn:Se,btnPrimary:Re,disabled:Pe},Be=[{key:"forward",symbol:"←"},{key:"bidirectional",symbol:"↔"},{key:"reverse",symbol:"→"}];function Ee(e){const i=new Date(e);return`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`}function $e(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(0)}MB`}function Ae(e){switch(e){case"write":return s.logTypeWrite;case"update":return s.logTypeUpdate;case"delete":return s.logTypeDelete;default:return s.logTypeIdle}}function Oe(e){switch(e){case"syncing":return"syncing";case"initializing":return"initializing";case"idle":return"idle";default:return"offline"}}function De(e,i,_,g){const l=e(`sync.directions.cat.${i}`,i.charAt(0).toUpperCase()+i.slice(1)),r=e("sync.directions.endpoint.local","Local"),y=e("sync.directions.endpoint.studio","Studio");switch(_){case"forward":return[`${l}: ${r} <- ${y}`,e("sync.directions.tooltip.forward.body","Studio changes sync to local files only")].join(`
|
|
2
|
-
`);case"bidirectional":return[`${l}: ${r} <-> ${y}`,e("sync.directions.tooltip.bidirectional.body","Two-way sync between Local and Studio"),g?e("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
|
|
3
|
-
`);case"reverse":return[`${l}: ${r} -> ${y}`,e("sync.directions.tooltip.reverse.body","Push local file changes to Studio"),g?e("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
|
|
4
|
-
`);default:return l}}const He=["scripts","values","containers","data","services"];function Me(e,i){return i==="manual"?e("sync.directions.mode.manual","Manual"):i==="auto"?e("sync.directions.mode.auto","Auto"):"-"}function Fe(e,i){return i==="manual"?e("sync.directions.mode.manual.tooltip","Applies sync changes only when you trigger them manually."):i==="auto"?e("sync.directions.mode.auto.tooltip","Applies sync changes automatically when updates arrive."):""}function Ue(e,i){switch(i){case"write":return e("sync.log.type.write","WRITE");case"update":return e("sync.log.type.update","UPDATE");case"delete":return e("sync.log.type.delete","DELETE");default:return e("sync.log.type.idle","IDLE")}}function Ge(e,i){switch(i){case"write":return e("sync.log.type.write.tooltip","A new sync output was written to disk.");case"update":return e("sync.log.type.update.tooltip","An existing synced file or instance was updated.");case"delete":return e("sync.log.type.delete.tooltip","A synced file or instance was removed.");default:return e("sync.log.type.idle.tooltip","A sync event was recorded without a file mutation.")}}function Ke(){const{t:e}=C(),{level:i}=S(),{tier:_,loading:g}=$(),l=H(),{show:r}=R(),[y,f]=a.useState(!1),[b,h]=a.useState(!1),d=!g&&_==="basic";if(i==="L0"||i==="L1")return t.jsx("div",{className:s.page,children:t.jsx("div",{className:s.card,children:t.jsxs("div",{className:s.overlay,children:[t.jsx("div",{className:s.overlayTitle,children:e("sync.overlay.title","Roblox Studio plugin required")}),t.jsx("div",{className:s.overlayMessage,children:e("sync.overlay.message","Sync status will be available once the Roblox Studio plugin connects.")}),t.jsxs("ul",{className:s.checklist,children:[t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check1","Is Roblox Studio running?")}),t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check2","Is the Weppy MCP plugin installed?")}),t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check3","Are HTTP Requests enabled in Studio settings?")})]})]})})});const n=l.status,p=l.config,j=l.history,T=Oe(n==null?void 0:n.state),o=async()=>{h(!0);try{await l.clearHistory(),r(e("toast.clearSuccess","Cleared successfully"),"success"),f(!1)}catch{r(e("toast.clearFailed","Failed to clear data"),"error")}finally{h(!1)}};return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.card,children:[t.jsxs("div",{className:s.cardHeader,children:[t.jsx(m,{text:e("sync.status.title.tooltip","Current Studio and local file sync status for this place."),children:e("sync.status.title","Sync Status")}),d&&t.jsx(m,{text:e("sync.status.forwardOnly.tooltip","Basic tier allows Studio to local forward sync only."),children:t.jsx("span",{className:s.forwardBadge,children:e("sync.status.forwardOnly","Forward Only")})})]}),t.jsxs("div",{className:s.statusRow,children:[t.jsx(E,{status:T}),(n==null?void 0:n.placeName)&&t.jsxs("span",{className:s.metaItem,children:[t.jsx(u,{label:e("sync.status.place","Place"),tooltip:e("sync.status.place.tooltip","Connected Roblox place name and place ID.")}),": ",n.placeName,n.placeId?` (${n.placeId})`:""]})]}),t.jsxs("dl",{className:s.statusGrid,children:[(n==null?void 0:n.syncRoot)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(u,{label:e("sync.status.path","Path"),tooltip:e("sync.status.path.tooltip","Local filesystem root currently used for sync output.")})}),t.jsx("dd",{children:n.syncRoot})]}),(n==null?void 0:n.instanceCount)!=null&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(u,{label:e("sync.status.instances","Instances"),tooltip:e("sync.status.instances.tooltip","Total synced Roblox instances tracked in the local mirror.")})}),t.jsx("dd",{children:n.instanceCount})]}),(n==null?void 0:n.scriptCount)!=null&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(u,{label:e("sync.status.scripts","Scripts"),tooltip:e("sync.status.scripts.tooltip","Total synced script files currently indexed for this place.")})}),t.jsx("dd",{children:n.scriptCount})]}),(n==null?void 0:n.state)==="syncing"&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(u,{label:e("sync.status.state","State"),tooltip:e("sync.status.state.tooltip","Current runtime sync state reported by the server.")})}),t.jsx("dd",{children:e("status.syncing","Syncing")})]})]})]}),(n==null?void 0:n.directions)&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:t.jsx(m,{text:e("sync.directions.title.tooltip","Per-category sync direction and apply behavior between Local and Studio."),children:e("sync.directions.title","Sync Directions")})}),t.jsxs("table",{className:s.table,children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{children:t.jsx(u,{label:e("sync.directions.type","Type"),tooltip:e("sync.directions.type.tooltip","Sync category affected by this rule.")})}),t.jsx("th",{children:t.jsx(u,{label:e("sync.directions.direction","Direction"),tooltip:e("sync.directions.direction.tooltip","Whether each category syncs from Studio, to Studio, or both ways.")})}),t.jsx("th",{children:t.jsx(u,{label:e("sync.directions.applyMode","Apply Mode"),tooltip:e("sync.directions.applyMode.tooltip","How incoming sync changes are applied for this category.")})})]})}),t.jsx("tbody",{children:He.map(c=>{var I;const k=n.directions[c],N=(I=n.applyModes)==null?void 0:I[c];return t.jsxs("tr",{children:[t.jsx("td",{children:e(`sync.directions.cat.${c}`,c.charAt(0).toUpperCase()+c.slice(1))}),t.jsx("td",{children:t.jsxs("div",{className:s.directionRail,"aria-label":`${c}-direction-rail`,children:[t.jsx(m,{text:e("sync.directions.endpoint.local.tooltip","Local files on disk are always shown on the left side of the direction rail."),children:t.jsx("span",{className:s.endpointLabel,children:e("sync.directions.endpoint.local","Local")})}),t.jsx("span",{className:s.optionRail,children:Be.map(x=>t.jsx(P,{text:De(e,c,x.key,d),children:t.jsx("span",{className:`${s.directionOption} ${k===x.key?s.directionOptionActive:s.directionOptionInactive} ${s[`direction_${x.key}`]??""}`,"data-active":k===x.key?"true":"false",children:x.symbol})},x.key))}),t.jsx(m,{text:e("sync.directions.endpoint.studio.tooltip","Roblox Studio is always shown on the right side of the direction rail."),children:t.jsx("span",{className:s.endpointLabel,children:e("sync.directions.endpoint.studio","Studio")})})]})}),t.jsx("td",{children:t.jsx(m,{text:Fe(e,N),children:Me(e,N)})})]},c)})})]})]}),p&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("sync.config.title","Sync Config")}),t.jsxs("div",{className:s.configGrid,children:[t.jsxs("div",{className:s.configItem,children:[t.jsx("span",{className:s.configLabel,children:e("sync.config.maxDepth","Max Depth")}),t.jsx("span",{className:s.configValue,children:p.maxDepth})]}),t.jsxs("div",{className:s.configItem,children:[t.jsx("span",{className:s.configLabel,children:e("sync.config.maxInstances","Max Instances")}),t.jsx("span",{className:s.configValue,children:p.maxInstances})]}),t.jsxs("div",{className:s.configItem,children:[t.jsx("span",{className:s.configLabel,children:e("sync.config.dirLimit","Dir Limit")}),t.jsx("span",{className:s.configValue,children:$e(p.directorySizeLimit)})]})]})]}),t.jsxs("div",{className:s.card,children:[t.jsxs("div",{className:s.cardHeader,children:[t.jsx("span",{children:e("sync.log.title","Sync Log")}),t.jsx("button",{className:s.clearButton,onClick:()=>f(!0),children:e("common.clear","Clear")})]}),t.jsx("div",{className:s.logContainer,children:j.length===0?t.jsx("div",{className:s.logEmpty,children:e("sync.log.empty","No sync events yet")}):j.map((c,k)=>t.jsxs("div",{className:s.logEntry,children:[t.jsx("span",{className:s.logTime,children:Ee(c.timestamp)}),t.jsx(m,{text:Ge(e,c.type),children:t.jsx("span",{className:`${s.logType} ${Ae(c.type)}`,children:Ue(e,c.type)})}),t.jsxs("span",{className:s.logPath,children:[c.path,c.details?` — ${c.details}`:""]})]},k))})]}),d&&t.jsx(O,{title:e("sync.upgrade.title","Unlock Full Sync with Pro"),description:e("tier.banner.save","Save AI tokens with Pro!"),benefits:[e("sync.upgrade.benefit1","Bidirectional sync — edit files, auto-apply to Studio"),e("sync.upgrade.benefit2","Reverse sync — push file changes back to Studio"),e("sync.upgrade.benefit3","Full sync history and detailed change log")],upgradeLabel:e("sync.upgrade.buy","Upgrade to Pro"),upgradeHref:A.sync}),t.jsx(B,{open:y,title:e("sync.clear.title","Clear sync log?"),message:e("sync.clear.message","This permanently removes the stored sync log for the current place."),cancelLabel:e("common.cancel","Cancel"),confirmLabel:e("common.clear","Clear"),loading:b,onCancel:()=>!b&&f(!1),onConfirm:o})]})}export{Ke as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as j,r as u,g as b,h as v,j as s}from"./index-CkXvRg-O.js";import{s as e,a as N}from"./tier-promo-config-B9lIKWCQ.js";function C({icon:a,title:i,description:c,benefits:o,upgradeLabel:m,upgradeHref:d}){const{t:p}=j(),[h,r]=u.useState(!1),{trackEvent:n}=b(),{pathname:x}=v(),t=x.replace(/^\//,"").split("/")[0]||"overview";return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:e.panel,children:[a&&s.jsx("div",{className:e.panelIcon,children:a}),s.jsx("div",{className:e.panelTitle,children:i}),s.jsx("div",{className:e.panelDesc,children:c}),s.jsx("ul",{className:e.benefitList,children:o.map(l=>s.jsx("li",{className:e.benefitItem,children:l},l))}),s.jsxs("div",{className:e.actions,children:[s.jsx("button",{className:`${e.btn} ${e.btnOutline}`,onClick:()=>{n("dashboard_tier_toggle",{page:t}),r(!0)},children:p("tier.compare","Basic vs Pro")}),s.jsx("a",{className:`${e.btn} ${e.btnPrimary}`,href:d,target:"_blank",rel:"noreferrer",onClick:()=>n("dashboard_upgrade_click",{page:t}),children:m})]})]}),h&&s.jsx(N,{onClose:()=>r(!1)})]})}export{C as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as h,r as x,g,h as j,j as s}from"./index-CkXvRg-O.js";import{s as e,a as b}from"./tier-promo-config-B9lIKWCQ.js";function N({basicCalls:t,proCalls:a,totalCalls:l,proUsagePercent:c,upgradeHref:d}){const{t:r}=h(),[p,o]=x.useState(!1),{trackEvent:i}=g(),{pathname:m}=j(),n=m.replace(/^\//,"").split("/")[0]||"overview";return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:e.progressPromo,children:[s.jsxs("div",{className:e.progressMain,children:[s.jsxs("div",{className:e.progressLabel,children:[s.jsx("span",{children:r("tier.progress.label","Pro / Total")}),s.jsxs("span",{children:[a," / ",l]})]}),s.jsx("div",{className:e.progressBar,children:s.jsx("div",{className:e.progressFill,style:{width:`${Math.min(c,100)}%`}})}),s.jsxs("div",{className:e.progressLabel,children:[s.jsxs("span",{children:[r("tier.basic")," ",t]}),s.jsxs("span",{children:[r("tier.pro")," ",a]})]})]}),s.jsx("span",{className:e.progressText,children:r("tier.banner.save","Save AI tokens with Pro!")}),s.jsxs("div",{className:e.actions,children:[s.jsx("button",{className:`${e.btn} ${e.btnOutline}`,onClick:()=>{i("dashboard_tier_toggle",{page:n}),o(!0)},children:r("tier.compare","Basic vs Pro")}),s.jsx("a",{className:`${e.btn} ${e.btnPrimary}`,href:d,target:"_blank",rel:"noreferrer",onClick:()=>i("dashboard_upgrade_click",{page:n}),children:r("tier.upgrade","Upgrade to Pro")})]})]}),p&&s.jsx(b,{onClose:()=>o(!1)})]})}export{N as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s,r as l,b as R,D as Z,u as q,d as z,T as w}from"./index-CkXvRg-O.js";import{C as Q}from"./ConfirmModal-CvXLNYq0.js";import{u as X,T as Y}from"./tier-promo-config-B9lIKWCQ.js";import{T as tt}from"./TierPromoProgress-DBA-FZGE.js";const st="_wrapper_1s3lp_2",et="_table_1s3lp_7",at="_sortable_1s3lp_32",ot="_sortArrow_1s3lp_41",rt="_clickable_1s3lp_52",lt="_empty_1s3lp_57",M={wrapper:st,table:et,sortable:at,sortArrow:ot,clickable:rt,empty:lt};function it({columns:e,data:o,sortBy:T,sortDir:f="asc",onSort:g,onRowClick:S,rowKey:C,emptyMessage:v}){return s.jsx("div",{className:M.wrapper,children:s.jsxs("table",{className:M.table,children:[s.jsx("thead",{children:s.jsx("tr",{children:e.map(n=>s.jsxs("th",{style:n.width?{width:n.width}:void 0,className:n.sortable?M.sortable:void 0,onClick:n.sortable&&g?()=>g(n.key):void 0,children:[s.jsx("span",{children:n.label}),n.sortable&&T===n.key&&s.jsx("span",{className:M.sortArrow,children:f==="asc"?"▴":"▾"})]},n.key))})}),s.jsx("tbody",{children:o.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,className:M.empty,children:v||"No data"})}):o.map((n,k)=>s.jsx("tr",{className:S?M.clickable:void 0,onClick:S?()=>S(n):void 0,children:e.map(p=>s.jsx("td",{children:p.render?p.render(n):String(n[p.key]??"")},p.key))},C?C(n):k))})]})})}const V=50;function nt(){const[e,o]=l.useState(null),[T,f]=l.useState(!0),[g,S]=l.useState([]),[C,v]=l.useState(0),[n,k]=l.useState(!1),[p,N]=l.useState(!0),[x,H]=l.useState(0),[u,D]=l.useState(""),[B,E]=l.useState([]),[U,A]=l.useState(0),[O,d]=l.useState(!1),[$,F]=l.useState(!0),[b,j]=l.useState(0),L=l.useRef(null),y=l.useCallback(async()=>{f(!0);try{const m=await R.get("/api/dashboard/tool-stats");o(m)}catch{}finally{f(!1)}},[]),t=l.useCallback(async(m,_)=>{N(!0);try{const K={limit:String(V),offset:String(m)};_&&(K.tool=_);const W=await R.get("/api/dashboard/history",K);S(W.entries),v(W.total),k(W.hasMore)}catch{S([]),v(0),k(!1)}finally{N(!1)}},[]),r=l.useCallback(async m=>{F(!0);try{const _=await R.get("/api/dashboard/failures",{limit:String(V),offset:String(m)});E(_.entries),A(_.total),d(_.hasMore)}catch{E([]),A(0),d(!1)}finally{F(!1)}},[]),i=l.useCallback(()=>{y(),t(x,u),r(b)},[y,t,r,x,u,b]),h=l.useCallback(async()=>{await R.post("/api/dashboard/tools/history/clear"),t(x,u),r(b)},[t,r,x,u,b]),c=l.useCallback(async()=>{await R.post("/api/dashboard/tools/statistics/clear"),y()},[y]);return l.useEffect(()=>{y()},[y]),l.useEffect(()=>{t(x,u)},[t,x,u]),l.useEffect(()=>{r(b)},[r,b]),l.useEffect(()=>{const m=new Z;L.current=m,m.connect();const _=m.on("command",()=>{y(),t(x,u),r(b)});return()=>{_(),m.disconnect(),L.current=null}},[y,t,r,x,u,b]),{statistics:e,statsLoading:T,history:g,historyTotal:C,historyHasMore:n,historyLoading:p,historyOffset:x,historyToolFilter:u,setHistoryOffset:H,setHistoryToolFilter:D,failures:B,failuresTotal:U,failuresHasMore:O,failuresLoading:$,failuresOffset:b,setFailuresOffset:j,refresh:i,clearHistory:h,clearStatistics:c}}const ct="_page_184r6_2",dt="_tabs_184r6_10",ut="_tab_184r6_10",pt="_tabActive_184r6_34",ht="_card_184r6_40",mt="_cardToolbar_184r6_47",xt="_sectionTitle_184r6_55",bt="_dangerButton_184r6_61",ft="_proBadge_184r6_71",_t="_statusOk_184r6_85",yt="_tierBasic_184r6_91",jt="_tierPro_184r6_95",gt="_tierMixed_184r6_100",St="_filterRow_184r6_111",Tt="_filterLabel_184r6_118",Ct="_filterSelect_184r6_127",Nt="_expandedRow_184r6_138",wt="_expandedSection_184r6_146",vt="_pre_184r6_156",kt="_pagination_184r6_173",Bt="_pageInfo_184r6_181",Mt="_btn_184r6_187",Pt="_tierDistribution_184r6_210",Et="_tierBarWrap_184r6_214",Lt="_tierBarBasic_184r6_222",Rt="_tierBarPro_184r6_227",Ht="_tierLabels_184r6_232",At="_statsTableWrap_184r6_241",Ot="_statsTable_184r6_241",$t="_sortableHeader_184r6_272",Ft="_sortArrow_184r6_277",It="_statsToolRow_184r6_281",Dt="_statsActionRow_184r6_289",Ut="_expandButton_184r6_293",Wt="_expandIcon_184r6_305",Gt="_actionLabel_184r6_310",Jt="_emptyStats_184r6_317",Kt="_summaryLine_184r6_323",a={page:ct,tabs:dt,tab:ut,tabActive:pt,card:ht,cardToolbar:mt,sectionTitle:xt,dangerButton:bt,proBadge:ft,statusOk:_t,tierBasic:yt,tierPro:jt,tierMixed:gt,filterRow:St,filterLabel:Tt,filterSelect:Ct,expandedRow:Nt,expandedSection:wt,pre:vt,pagination:kt,pageInfo:Bt,btn:Mt,tierDistribution:Pt,tierBarWrap:Et,tierBarBasic:Lt,tierBarPro:Rt,tierLabels:Ht,statsTableWrap:At,statsTable:Ot,sortableHeader:$t,sortArrow:Ft,statsToolRow:It,statsActionRow:Dt,expandButton:Ut,expandIcon:Wt,actionLabel:Gt,emptyStats:Jt,summaryLine:Kt},G=50;function Vt(e){const o=new Date(e);return`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}:${String(o.getSeconds()).padStart(2,"0")}`}function I(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function J(e,o){return o===0?"-":`${Math.round(e/o*100)}%`}function P(e,o){return o==="pro"?e("tier.pro","Pro"):o==="mixed"?e("tier.mixed","Mixed"):e("tier.basic","Basic")}function Xt(){const{t:e}=q(),o=nt(),{show:T}=z(),f=X(),[g,S]=l.useState("history"),[C,v]=l.useState(null),[n,k]=l.useState(null),[p,N]=l.useState(null),[x,H]=l.useState(!1),[u,D]=l.useState("totalCalls"),[B,E]=l.useState("desc"),U=l.useCallback(t=>{D(r=>r===t?(E(i=>i==="asc"?"desc":"asc"),t):(E("desc"),t))},[]),A=l.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.keys(o.statistics.tools).sort():[]},[o.statistics]),O=l.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.values(o.statistics.tools).map(r=>{const i=Object.entries(r.actions??{}).map(([h,c])=>({toolName:r.toolName,actionName:c.action??h,tier:c.tier,totalCalls:c.totalCalls,successCount:c.successCount,failureCount:c.failureCount,totalExecutionTimeMs:c.totalExecutionTimeMs,avgExecutionTimeMs:c.avgExecutionTimeMs,firstUsed:c.firstUsed,lastUsed:c.lastUsed}));return{toolName:r.toolName,tier:r.tier,actions:i,totalCalls:r.totalCalls,successCount:r.successCount,failureCount:r.failureCount,totalExecutionTimeMs:r.totalExecutionTimeMs,avgExecutionTimeMs:r.avgExecutionTimeMs,firstUsed:r.firstUsed,lastUsed:r.lastUsed}}):[]},[o.statistics]),d=l.useCallback((t,r,i,h)=>s.jsx(w,{text:e(i,h),children:e(t,r)}),[e]),$=l.useMemo(()=>[...O].sort((r,i)=>{const h=r[u],c=i[u];if(typeof h=="number"&&typeof c=="number")return B==="asc"?h-c:c-h;const m=String(h??""),_=String(c??"");return B==="asc"?m.localeCompare(_):_.localeCompare(m)}),[O,u,B]),F=l.useMemo(()=>[{key:"timestamp",label:d("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:t=>Vt(t.timestamp)},{key:"toolName",label:d("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:t=>{var i;const r=((i=t.parameters)==null?void 0:i.action)??"";return s.jsxs("span",{children:[t.toolName,r?`.${r}`:"",t.tier==="pro"&&s.jsx(w,{text:e("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:s.jsx("span",{className:a.proBadge,children:e("tools.badge.pro","PRO")})})]})}},{key:"executionTimeMs",label:d("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:t=>I(t.executionTimeMs)},{key:"status",label:d("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"60px",render:()=>s.jsx(w,{text:e("tools.status.ok.tooltip","The tool run completed successfully."),children:s.jsx("span",{className:a.statusOk,children:e("tools.status.ok","OK")})})},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:t=>s.jsx("span",{className:t.tier==="pro"?a.tierPro:a.tierBasic,children:P(e,t.tier)})}],[e,d]),b=l.useMemo(()=>[{key:"toolName",label:d("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:d("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successRate",label:d("tools.col.okRate","OK%","tools.col.okRate.tooltip","Percentage of calls that finished successfully."),sortable:!1,width:"60px",render:t=>J(t.successCount,t.totalCalls)},{key:"avgExecutionTimeMs",label:d("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"80px",render:t=>I(t.avgExecutionTimeMs)},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"60px",render:t=>s.jsx(w,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?a.tierPro:t.tier==="mixed"?a.tierMixed:a.tierBasic,children:P(e,t.tier)})})}],[e,d]),j=l.useMemo(()=>{if(!o.statistics)return null;const t=o.statistics.tierSummary.basic.totalCalls,r=o.statistics.tierSummary.pro.totalCalls,i=t+r;if(i===0)return null;const h=Math.round(t/i*100),c=100-h;return{basic:t,pro:r,total:i,basicPct:h,proPct:c}},[o.statistics]),L=l.useCallback(t=>{k(r=>r===t?null:t)},[]),y=l.useCallback(async()=>{if(p){H(!0);try{p==="history"?await o.clearHistory():await o.clearStatistics(),T(e("toast.clearSuccess","Cleared successfully"),"success"),N(null)}catch{T(e("toast.clearFailed","Failed to clear data"),"error")}finally{H(!1)}}},[p,T,e,o]);return s.jsxs("div",{className:a.page,children:[s.jsx("div",{className:a.tabs,children:["history","statistics"].map(t=>s.jsx("button",{className:`${a.tab} ${g===t?a.tabActive:""}`,onClick:()=>S(t),children:e(`tools.tab.${t}`,t.charAt(0).toUpperCase()+t.slice(1))},t))}),g==="history"&&s.jsxs("div",{className:a.card,children:[s.jsxs("div",{className:a.cardToolbar,children:[s.jsx("div",{className:a.sectionTitle,children:e("tools.tab.history","History")}),s.jsx("button",{className:a.dangerButton,onClick:()=>N("history"),children:e("common.clear","Clear")})]}),s.jsx("div",{className:a.filterRow,children:s.jsxs("label",{className:a.filterLabel,children:[e("tools.filter.tool","Tool"),":",s.jsxs("select",{className:a.filterSelect,value:o.historyToolFilter,onChange:t=>{o.setHistoryToolFilter(t.target.value),o.setHistoryOffset(0)},children:[s.jsx("option",{value:"",children:e("tools.filter.all","All")}),A.map(t=>s.jsx("option",{value:t,children:t},t))]})]})}),s.jsx(it,{columns:F,data:o.history,rowKey:t=>t.id,onRowClick:t=>v(r=>r===t.id?null:t.id),emptyMessage:e("tools.empty.history","No history entries")}),C&&(()=>{const t=o.history.find(r=>r.id===C);return t?s.jsxs("div",{className:a.expandedRow,children:[s.jsxs("div",{className:a.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(w,{text:e("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:e("tools.detail.params","Parameters")}),":"]}),s.jsx("pre",{className:a.pre,children:JSON.stringify(t.parameters,null,2)})]}),t.result&&s.jsxs("div",{className:a.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(w,{text:e("tools.detail.result.tooltip","Returned result payload for this tool run."),children:e("tools.detail.result","Result")}),":"]}),s.jsx("pre",{className:a.pre,children:JSON.stringify(t.result,null,2)})]})]}):null})(),s.jsxs("div",{className:a.pagination,children:[s.jsx("button",{className:a.btn,disabled:o.historyOffset===0,title:e("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>o.setHistoryOffset(Math.max(0,o.historyOffset-G)),children:e("tools.page.prev","Prev")}),s.jsxs("span",{className:a.pageInfo,children:[o.historyOffset+1,"–",Math.min(o.historyOffset+G,o.historyTotal)," / ",o.historyTotal]}),s.jsx("button",{className:a.btn,disabled:!o.historyHasMore,title:e("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>o.setHistoryOffset(o.historyOffset+G),children:e("tools.page.next","Next")})]})]}),g==="statistics"&&s.jsxs("div",{className:a.card,children:[s.jsxs("div",{className:a.cardToolbar,children:[s.jsx("div",{className:a.sectionTitle,children:e("tools.tab.statistics","Statistics")}),s.jsx("button",{className:a.dangerButton,onClick:()=>N("statistics"),children:e("common.clear","Clear")})]}),j&&s.jsxs("div",{className:a.tierDistribution,children:[s.jsxs("div",{className:a.tierBarWrap,children:[s.jsx("div",{className:a.tierBarBasic,style:{width:`${j.basicPct}%`}}),s.jsx("div",{className:a.tierBarPro,style:{width:`${j.proPct}%`}})]}),s.jsxs("div",{className:a.tierLabels,children:[s.jsxs("span",{children:[P(e,"basic")," ",j.basicPct,"% (",j.basic,")"]}),s.jsxs("span",{children:[P(e,"pro")," ",j.proPct,"% (",j.pro,")"]})]})]}),s.jsx("div",{className:a.statsTableWrap,children:s.jsxs("table",{className:a.statsTable,children:[s.jsx("thead",{children:s.jsx("tr",{children:b.map(t=>s.jsxs("th",{style:t.width?{width:t.width}:void 0,className:t.sortable?a.sortableHeader:void 0,onClick:t.sortable?()=>U(t.key):void 0,children:[s.jsx("span",{children:t.label}),t.sortable&&u===t.key&&s.jsx("span",{className:a.sortArrow,children:B==="asc"?"▴":"▾"})]},t.key))})}),s.jsx("tbody",{children:$.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:b.length,className:a.emptyStats,children:e("tools.empty.stats","No tool statistics")})}):$.map(t=>{const r=n===t.toolName;return s.jsxs(l.Fragment,{children:[s.jsxs("tr",{className:a.statsToolRow,onClick:()=>L(t.toolName),children:[s.jsx("td",{children:s.jsxs("button",{type:"button",className:a.expandButton,"aria-expanded":r,"aria-label":`${t.toolName} ${r?e("common.collapse","Collapse"):e("common.expand","Expand")}`,onClick:i=>{i.stopPropagation(),L(t.toolName)},children:[s.jsx("span",{className:a.expandIcon,"aria-hidden":"true",children:r?"▾":"▸"}),s.jsx("span",{children:t.toolName})]})}),s.jsx("td",{children:t.totalCalls}),s.jsx("td",{children:J(t.successCount,t.totalCalls)}),s.jsx("td",{children:I(t.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx(w,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?a.tierPro:t.tier==="mixed"?a.tierMixed:a.tierBasic,children:P(e,t.tier)})})})]}),r&&t.actions.map(i=>s.jsxs("tr",{className:a.statsActionRow,children:[s.jsx("td",{children:s.jsx("span",{className:a.actionLabel,children:i.actionName})}),s.jsx("td",{children:i.totalCalls}),s.jsx("td",{children:J(i.successCount,i.totalCalls)}),s.jsx("td",{children:I(i.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx("span",{className:i.tier==="pro"?a.tierPro:a.tierBasic,children:P(e,i.tier)})})]},`${t.toolName}:${i.actionName}`))]},t.toolName)})})]})}),o.statistics&&s.jsxs("div",{className:a.summaryLine,children:[e("tools.summary.total","Total"),": ",o.statistics.totalCalls," ",e("tools.summary.calls","calls")," | ",e("tools.summary.sessions","Sessions"),": ",o.statistics.totalSessions]})]}),!f.loading&&f.tier==="basic"&&s.jsx(tt,{basicCalls:f.basicCalls,proCalls:f.proCalls,totalCalls:f.totalCalls,proUsagePercent:f.proUsagePercent,upgradeHref:Y.tools}),s.jsx(Q,{open:p!==null,title:p==="history"?e("tools.clear.history.title","Clear history?"):e("tools.clear.statistics.title","Clear statistics?"),message:p==="history"?e("tools.clear.history.message","This permanently removes the current place tool history and failures."):e("tools.clear.statistics.message","This permanently resets the current place tool statistics."),cancelLabel:e("common.cancel","Cancel"),confirmLabel:e("common.clear","Clear"),loading:x,onCancel:()=>!x&&N(null),onConfirm:y})]})}export{Xt as Component};
|