Skip to content

Commit 1a4512a

Browse files
committed
fix: todo
1 parent 5a714c1 commit 1a4512a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • MaiChartManager/Front/src/views/Charts/MusicEdit

MaiChartManager/Front/src/views/Charts/MusicEdit/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { computed, defineComponent, onMounted, PropType, ref, watch } from "vue";
1+
import { computed, defineComponent, onMounted, PropType, provide, ref, watch } from "vue";
22
import { addVersionList, genreList, globalCapture, selectedADir, selectedMusic as info, selectMusicId, updateAddVersionList, updateGenreList, updateMusicList, selectedLevel, disableSync, gameVersion, b15ver } from "@/store/refs";
33
import { Chart, MusicXmlWithABJacket } from "@/client/apiGen";
44
import api from "@/client/api";
@@ -22,6 +22,8 @@ import { NTabPane, NTabs } from "naive-ui";
2222
const Component = defineComponent({
2323
setup() {
2424

25+
provide('disabled', computed(() => selectedADir.value === 'A000'));
26+
2527
const firstEnabledChart = info.value?.charts?.findIndex(chart => chart.enable);
2628
if (firstEnabledChart && firstEnabledChart >= 0) {
2729
selectedLevel.value = firstEnabledChart;
@@ -62,8 +64,6 @@ const Component = defineComponent({
6264
}
6365
})
6466

65-
// TODO: inject disable when A000
66-
6767
return () => info.value && <div class="flex flex-col gap-2">
6868
<div class="grid cols-[1fr_12em] gap-5">
6969
<div class="flex flex-col gap-2 relative">

0 commit comments

Comments
 (0)