|
@@ -164,6 +164,11 @@ interface AgentPromptResult {
|
|
|
</button>
|
|
</button>
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ <button type="button" class="console-button" (click)="openMicroserviceConsole()">
|
|
|
|
|
+ 进入微服控制台
|
|
|
|
|
+ <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg>
|
|
|
|
|
+ </button>
|
|
|
|
|
+
|
|
|
<button type="button" class="secondary-button full" [disabled]="refreshBusy() || retryBusy()" (click)="refreshStatus()">
|
|
<button type="button" class="secondary-button full" [disabled]="refreshBusy() || retryBusy()" (click)="refreshStatus()">
|
|
|
@if (refreshBusy()) { <span class="spinner light"></span> }
|
|
@if (refreshBusy()) { <span class="spinner light"></span> }
|
|
|
刷新状态
|
|
刷新状态
|
|
@@ -220,7 +225,7 @@ interface AgentPromptResult {
|
|
|
.billing-note{margin:16px 0 0;color:#6f7b7f;font-size:10px;line-height:1.6;text-align:center}
|
|
.billing-note{margin:16px 0 0;color:#6f7b7f;font-size:10px;line-height:1.6;text-align:center}
|
|
|
.result-block{text-align:center}.result-icon{width:44px;height:44px;margin:20px auto 12px;display:grid;place-items:center;border-radius:8px;background:#123024;color:#60dda5}.result-icon svg{width:20px}.price-main{margin-top:6px;color:#fff;font-size:26px;line-height:1;font-weight:780}.price-caption{margin-top:8px;color:#7f8c90;font-size:12px;line-height:1.6}
|
|
.result-block{text-align:center}.result-icon{width:44px;height:44px;margin:20px auto 12px;display:grid;place-items:center;border-radius:8px;background:#123024;color:#60dda5}.result-icon svg{width:20px}.price-main{margin-top:6px;color:#fff;font-size:26px;line-height:1;font-weight:780}.price-caption{margin-top:8px;color:#7f8c90;font-size:12px;line-height:1.6}
|
|
|
.config-lines{margin:24px 0 0;text-align:left;border-top:1px solid #2a3338}.config-lines>div{padding:12px 0;border-bottom:1px solid #252e33}.config-lines dt{color:#849196;font-size:11px;margin-bottom:5px}.config-lines dd{margin:0;color:#dbe3e1;font-size:12px}.mono{font-family:Consolas,Menlo,monospace;overflow-wrap:anywhere;word-break:break-all}
|
|
.config-lines{margin:24px 0 0;text-align:left;border-top:1px solid #2a3338}.config-lines>div{padding:12px 0;border-bottom:1px solid #252e33}.config-lines dt{color:#849196;font-size:11px;margin-bottom:5px}.config-lines dd{margin:0;color:#dbe3e1;font-size:12px}.mono{font-family:Consolas,Menlo,monospace;overflow-wrap:anywhere;word-break:break-all}
|
|
|
- .agent-prompt-block{margin-top:20px;padding-top:18px;border-top:1px solid #2a3338;text-align:left}.agent-prompt-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.agent-prompt-heading strong{color:#e7f4ef;font-size:12px}.agent-prompt-heading span{color:#7f9a90;font-size:10px}.agent-prompt-preview{height:150px;margin-top:10px;padding:10px;overflow:auto;border:1px solid #2e383d;border-radius:6px;background:#090c0e}.agent-prompt-preview pre{margin:0;color:#aebcba;font:10px/1.55 Consolas,Menlo,monospace;white-space:pre-wrap;overflow-wrap:anywhere}.copy-button{width:100%;min-height:40px;margin-top:10px;border:1px solid #25b983;border-radius:6px;background:#25b983;color:#06140f;font-size:12px;font-weight:800}.copy-button:hover{background:#35ca94}
|
|
|
|
|
|
|
+ .agent-prompt-block{margin-top:20px;padding-top:18px;border-top:1px solid #2a3338;text-align:left}.agent-prompt-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.agent-prompt-heading strong{color:#e7f4ef;font-size:12px}.agent-prompt-heading span{color:#7f9a90;font-size:10px}.agent-prompt-preview{height:150px;margin-top:10px;padding:10px;overflow:auto;border:1px solid #2e383d;border-radius:6px;background:#090c0e}.agent-prompt-preview pre{margin:0;color:#aebcba;font:10px/1.55 Consolas,Menlo,monospace;white-space:pre-wrap;overflow-wrap:anywhere}.copy-button,.console-button{width:100%;min-height:40px;margin-top:10px;border-radius:6px;font-size:12px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:8px}.copy-button{border:1px solid #25b983;background:#25b983;color:#06140f}.copy-button:hover{background:#35ca94}.console-button{border:1px solid #3d5259;background:#182126;color:#dbe8e4}.console-button:hover{border-color:#55d6a8;color:#fff;background:#1d2b29}.console-button svg{width:15px;height:15px}
|
|
|
.flow-error{margin-top:18px;padding:10px 11px;border-left:3px solid #ef7359;background:#291713;color:#ffbaa9;font-size:12px;line-height:1.5;text-align:left}.pending-notice{margin-top:18px;padding:10px 12px;border-left:3px solid #55d6a8;background:#10211b;color:#9fc8b9;font-size:12px;line-height:1.6;text-align:left}
|
|
.flow-error{margin-top:18px;padding:10px 11px;border-left:3px solid #ef7359;background:#291713;color:#ffbaa9;font-size:12px;line-height:1.5;text-align:left}.pending-notice{margin-top:18px;padding:10px 12px;border-left:3px solid #55d6a8;background:#10211b;color:#9fc8b9;font-size:12px;line-height:1.6;text-align:left}
|
|
|
.spinner{width:17px;height:17px;display:inline-block;border:2px solid #3c484d;border-top-color:#55d6a8;border-radius:50%;animation:spin .75s linear infinite}.spinner.light{border-color:rgba(0,0,0,.25);border-top-color:#06140f}@keyframes spin{to{transform:rotate(360deg)}}
|
|
.spinner{width:17px;height:17px;display:inline-block;border:2px solid #3c484d;border-top-color:#55d6a8;border-radius:50%;animation:spin .75s linear infinite}.spinner.light{border-color:rgba(0,0,0,.25);border-top-color:#06140f}@keyframes spin{to{transform:rotate(360deg)}}
|
|
|
@media(max-width:880px){.purchase-layout{grid-template-columns:1fr;gap:38px;align-items:start}.configuration{max-width:none}.order-summary{min-height:0}}
|
|
@media(max-width:880px){.purchase-layout{grid-template-columns:1fr;gap:38px;align-items:start}.configuration{max-width:none}.order-summary{min-height:0}}
|
|
@@ -459,6 +464,24 @@ export class EnterpriseTrialComponent implements OnInit, OnDestroy {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ openMicroserviceConsole(): void {
|
|
|
|
|
+ const backend = this.backend();
|
|
|
|
|
+ if (!backend?.serverURL || !backend.appId || !backend.masterKey || !this.sessionToken) {
|
|
|
|
|
+ this.errorMessage.set('微服务配置或登录凭据尚未就绪,请刷新状态后重试。');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const url = new URL('https://app.fmode.cn/dev/studio/dashboard');
|
|
|
|
|
+ url.searchParams.set('enterprise', '1');
|
|
|
|
|
+ url.searchParams.set('serverURL', backend.serverURL);
|
|
|
|
|
+ url.searchParams.set('appId', backend.appId);
|
|
|
|
|
+ url.searchParams.set('masterKey', backend.masterKey);
|
|
|
|
|
+ url.searchParams.set('name', this.result()?.company?.name || `企业服务 · ${backend.appId}`);
|
|
|
|
|
+ if (backend.functionsURL) url.searchParams.set('functionsURL', backend.functionsURL);
|
|
|
|
|
+ url.searchParams.set('session', this.sessionToken);
|
|
|
|
|
+ window.location.assign(url.toString());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private setResult(data: TrialResult): void {
|
|
private setResult(data: TrialResult): void {
|
|
|
this.result.set(data);
|
|
this.result.set(data);
|
|
|
const backend = data.backend || data.subscription?.backend;
|
|
const backend = data.backend || data.subscription?.backend;
|