Skip to content

Commit

Permalink
fix(timeline): 用户点击过快时文本为空的问题 & 返回按钮 & 生成后界面未回到首页
Browse files Browse the repository at this point in the history
  • Loading branch information
Souma-Sumire committed Nov 28, 2024
1 parent 49cca33 commit 9a99a14
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
24 changes: 14 additions & 10 deletions src/components/timeline/FflogsImport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import axios from 'axios'
import '@sweetalert2/theme-bootstrap-4/bootstrap-4.scss'
import type { Job } from 'cactbot/types/job'
import { ElMessage, ElMessageBox } from 'element-plus'
import { ElMessageBox } from 'element-plus'
import { factory } from '@/utils/timelineSpecialRules'
import type {
FFlogsApiV1ReportEvents,
Expand Down Expand Up @@ -49,6 +49,7 @@ const inputUrl = ref('')
const addTTS = ref(false)
const isLoading = ref(false)
const currentStep = ref(0)
const confirmEnabled = ref(false)
const fflogsQueryConfig = reactive({} as FFlogsQuery)
claerFFlogsQueryConfig()
Expand Down Expand Up @@ -158,6 +159,7 @@ async function handleFFlogsQueryResultFriendliesList(player: Friendlies) {
// fflogs导入第3步:通过API获取选定玩家所有casts
async function queryFFlogsReportEvents() {
confirmEnabled.value = false
const resEvents: FFlogsApiV1ReportEvents[] = []
fflogsQueryConfig.abilityFilterEvents.length = 0
async function queryFriendly(startTime: number) {
Expand Down Expand Up @@ -236,6 +238,7 @@ async function queryFFlogsReportEvents() {
fflogsQueryConfig.abilityFilterSelected
= props.filters[fflogsQueryConfig.player.icon]
}
confirmEnabled.value = true
}
// fflogs导入第4步:用户选好了过滤器
Expand Down Expand Up @@ -298,12 +301,7 @@ function handeleFFlogsQueryResultFriendiesListFilter() {
)
claerFFlogsQueryConfig()
emits('showFFlogsToggle')
ElMessage({
message: '已生成新时间轴',
type: 'success',
duration: 1500,
})
currentStep.value = 1
currentStep.value = 0
isLoading.value = false
}
Expand All @@ -329,13 +327,19 @@ function openFFLogsProfile() {
</script>

<template>
<el-button
position-absolute
z-999
:style="currentStep > 0 ? {} : { visibility: 'hidden', pointerEvent: 'none' }" type="primary" text class="guide" @click="currentStep--"
>
上一步
</el-button>
<el-steps :active="currentStep" class="steps-guide" align-center>
<el-step title="输入链接" />
<el-step title="选择玩家" />
<el-step title="过滤技能" />
<el-step title="生成时间轴" />
</el-steps>

<el-card v-if="currentStep === 0" class="input-section">
<el-form label-width="150px" class="fflogs-form">
<el-form-item label="FF logs 战斗链接">
Expand Down Expand Up @@ -431,8 +435,8 @@ function openFFLogsProfile() {
<span>{{ rule.actionName }}</span>
</el-option>
</el-select>
<el-button type="success" class="filter-confirm-btn" @click="handeleFFlogsQueryResultFriendiesListFilter">
生成时间轴
<el-button type="success" class="filter-confirm-btn" :disabled="!confirmEnabled" @click="handeleFFlogsQueryResultFriendiesListFilter">
{{ confirmEnabled ? '生成时间轴' : '加载中...' }}
</el-button>
</div>
</el-card>
Expand Down
4 changes: 2 additions & 2 deletions src/resources/actionChinese.json
Original file line number Diff line number Diff line change
Expand Up @@ -36395,10 +36395,10 @@
"40134": "雷燃爆",
"40135": "爆炸",
"40136": "大爆炸",
"40137": "罪土之刃",
"40137": "罪裁断",
"40138": "急冲刺",
"40139": "罪炎",
"40140": "罪土之刃",
"40140": "罪裁断",
"40141": "急冲刺",
"40142": "罪雷",
"40143": "弓形冲波",
Expand Down

0 comments on commit 9a99a14

Please sign in to comment.