feat(step5): add 'New simulation' button to return to home

Adds a restart button in the action-bar-header of Step5Interaction
that navigates to '/' (home/project list). Translated in all 4 locales.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ubuntu 2026-05-04 23:23:22 +00:00
parent 2aa44760d1
commit f0f8a797ef
5 changed files with 35 additions and 0 deletions

View File

@ -88,6 +88,12 @@
<span class="action-bar-title">{{ $t('step5.interactiveTools') }}</span>
<span class="action-bar-subtitle mono">{{ $t('step5.agentsAvailable', { count: profiles.length }) }}</span>
</div>
<button class="restart-btn" @click="router.push('/')">
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="15 18 9 12 15 6"></polyline>
</svg>
{{ $t('step5.newSimulation') }}
</button>
</div>
<div class="action-bar-tabs">
<button
@ -413,9 +419,12 @@
<script setup>
import { ref, computed, watch, onMounted, onUnmounted, nextTick } from 'vue'
import { useI18n } from 'vue-i18n'
import { useRouter } from 'vue-router'
import { chatWithReport, getReport, getAgentLog } from '../api/report'
import { interviewAgents, getSimulationProfilesRealtime } from '../api/simulation'
const router = useRouter()
const { t } = useI18n()
const props = defineProps({
@ -1329,6 +1338,28 @@ watch(() => props.simulationId, (newId) => {
min-width: 160px;
}
.restart-btn {
display: inline-flex;
align-items: center;
gap: 5px;
margin-left: auto;
padding: 5px 12px;
font-size: 12px;
font-weight: 600;
border: 1px solid #E5E7EB;
border-radius: 6px;
background: #F9FAFB;
color: #374151;
cursor: pointer;
white-space: nowrap;
transition: background 0.15s, border-color 0.15s;
}
.restart-btn:hover {
background: #F3F4F6;
border-color: #D1D5DB;
}
.action-bar-icon {
color: #1F2937;
flex-shrink: 0;

View File

@ -323,6 +323,7 @@
"world2": "Món 2"
},
"step5": {
"newSimulation": "← Nova simulació",
"interactiveTools": "Eines interactives",
"agentsAvailable": "{count} agents disponibles",
"chatWithReportAgent": "Xateja amb l'Agent d'informe",

View File

@ -333,6 +333,7 @@
"statusWaiting": "Waiting"
},
"step5": {
"newSimulation": "← New simulation",
"interactiveTools": "Interactive Tools",
"agentsAvailable": "{count} agents available",
"chatWithReportAgent": "Chat with Report Agent",

View File

@ -323,6 +323,7 @@
"world2": "Mundo 2"
},
"step5": {
"newSimulation": "← Nueva simulación",
"interactiveTools": "Herramientas interactivas",
"agentsAvailable": "{count} agentes disponibles",
"chatWithReportAgent": "Chat con Report Agent",

View File

@ -333,6 +333,7 @@
"statusWaiting": "等待中"
},
"step5": {
"newSimulation": "← 新建模拟",
"interactiveTools": "Interactive Tools",
"agentsAvailable": "{count} agents available",
"chatWithReportAgent": "与Report Agent对话",