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:
parent
2aa44760d1
commit
f0f8a797ef
|
|
@ -88,6 +88,12 @@
|
||||||
<span class="action-bar-title">{{ $t('step5.interactiveTools') }}</span>
|
<span class="action-bar-title">{{ $t('step5.interactiveTools') }}</span>
|
||||||
<span class="action-bar-subtitle mono">{{ $t('step5.agentsAvailable', { count: profiles.length }) }}</span>
|
<span class="action-bar-subtitle mono">{{ $t('step5.agentsAvailable', { count: profiles.length }) }}</span>
|
||||||
</div>
|
</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>
|
||||||
<div class="action-bar-tabs">
|
<div class="action-bar-tabs">
|
||||||
<button
|
<button
|
||||||
|
|
@ -413,9 +419,12 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, watch, onMounted, onUnmounted, nextTick } from 'vue'
|
import { ref, computed, watch, onMounted, onUnmounted, nextTick } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
import { chatWithReport, getReport, getAgentLog } from '../api/report'
|
import { chatWithReport, getReport, getAgentLog } from '../api/report'
|
||||||
import { interviewAgents, getSimulationProfilesRealtime } from '../api/simulation'
|
import { interviewAgents, getSimulationProfilesRealtime } from '../api/simulation'
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -1329,6 +1338,28 @@ watch(() => props.simulationId, (newId) => {
|
||||||
min-width: 160px;
|
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 {
|
.action-bar-icon {
|
||||||
color: #1F2937;
|
color: #1F2937;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
|
||||||
|
|
@ -323,6 +323,7 @@
|
||||||
"world2": "Món 2"
|
"world2": "Món 2"
|
||||||
},
|
},
|
||||||
"step5": {
|
"step5": {
|
||||||
|
"newSimulation": "← Nova simulació",
|
||||||
"interactiveTools": "Eines interactives",
|
"interactiveTools": "Eines interactives",
|
||||||
"agentsAvailable": "{count} agents disponibles",
|
"agentsAvailable": "{count} agents disponibles",
|
||||||
"chatWithReportAgent": "Xateja amb l'Agent d'informe",
|
"chatWithReportAgent": "Xateja amb l'Agent d'informe",
|
||||||
|
|
|
||||||
|
|
@ -333,6 +333,7 @@
|
||||||
"statusWaiting": "Waiting"
|
"statusWaiting": "Waiting"
|
||||||
},
|
},
|
||||||
"step5": {
|
"step5": {
|
||||||
|
"newSimulation": "← New simulation",
|
||||||
"interactiveTools": "Interactive Tools",
|
"interactiveTools": "Interactive Tools",
|
||||||
"agentsAvailable": "{count} agents available",
|
"agentsAvailable": "{count} agents available",
|
||||||
"chatWithReportAgent": "Chat with Report Agent",
|
"chatWithReportAgent": "Chat with Report Agent",
|
||||||
|
|
|
||||||
|
|
@ -323,6 +323,7 @@
|
||||||
"world2": "Mundo 2"
|
"world2": "Mundo 2"
|
||||||
},
|
},
|
||||||
"step5": {
|
"step5": {
|
||||||
|
"newSimulation": "← Nueva simulación",
|
||||||
"interactiveTools": "Herramientas interactivas",
|
"interactiveTools": "Herramientas interactivas",
|
||||||
"agentsAvailable": "{count} agentes disponibles",
|
"agentsAvailable": "{count} agentes disponibles",
|
||||||
"chatWithReportAgent": "Chat con Report Agent",
|
"chatWithReportAgent": "Chat con Report Agent",
|
||||||
|
|
|
||||||
|
|
@ -333,6 +333,7 @@
|
||||||
"statusWaiting": "等待中"
|
"statusWaiting": "等待中"
|
||||||
},
|
},
|
||||||
"step5": {
|
"step5": {
|
||||||
|
"newSimulation": "← 新建模拟",
|
||||||
"interactiveTools": "Interactive Tools",
|
"interactiveTools": "Interactive Tools",
|
||||||
"agentsAvailable": "{count} agents available",
|
"agentsAvailable": "{count} agents available",
|
||||||
"chatWithReportAgent": "与Report Agent对话",
|
"chatWithReportAgent": "与Report Agent对话",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue