|
@@ -1,55 +1,60 @@
|
|
|
<template>
|
|
|
<div class="explanation-settings" app-border dir-left>
|
|
|
- <div class="title">
|
|
|
- {{$i18n.t("explanation.explanation_settings")}}
|
|
|
- <i class="iconfont icon-material_prompt tool-tip-for-editor" v-tooltip="$i18n.t('explanation.explanation_tips')"/>
|
|
|
- </div>
|
|
|
- <button
|
|
|
- v-if="!currentScene.explanation.audioId"
|
|
|
- class="ui-button submit"
|
|
|
- :class="{
|
|
|
- disable: !currentScene || currentScene.type ==='4dkk',
|
|
|
- }"
|
|
|
- @click="isShowSelectionWindow = true"
|
|
|
- >
|
|
|
- <i class="iconfont icon-editor_add"></i>
|
|
|
- {{$i18n.t("explanation.add_audio")}}
|
|
|
- </button>
|
|
|
- <template v-else>
|
|
|
- <div class="music-display" @click.self="onClickCurrentMusic">
|
|
|
- <Audio ref="my-audio" class="audio-control" :backgroundColor="'#1A1B1D'" :myAudioUrl="currentScene.explanation.audioUrl"></Audio>
|
|
|
- <div class="name" :key="currentScene.explanation.audioName" v-title="currentScene.explanation.audioName" @click="onClickCurrentMusic">{{currentScene.explanation.audioName}}</div>
|
|
|
- <i class="iconfont icon-editor_list_delete" @click.stop="onClickDeleteMusicBtn"></i>
|
|
|
+ <template v-if="currentScene.type !== '4dkk'">
|
|
|
+ <div class="title">
|
|
|
+ {{$i18n.t("explanation.explanation_settings")}}
|
|
|
+ <i class="iconfont icon-material_prompt tool-tip-for-editor" v-tooltip="$i18n.t('explanation.explanation_tips')"/>
|
|
|
</div>
|
|
|
- <button class="ui-button" @click="isShowSelectionWindow = true">
|
|
|
- <i class="iconfont icon-editor_update"></i>
|
|
|
- {{$i18n.t("explanation.change_audio")}}
|
|
|
+ <button
|
|
|
+ v-if="!currentScene.explanation.audioId"
|
|
|
+ class="ui-button submit"
|
|
|
+ :class="{
|
|
|
+ disable: !currentScene || currentScene.type ==='4dkk',
|
|
|
+ }"
|
|
|
+ @click="isShowSelectionWindow = true"
|
|
|
+ >
|
|
|
+ <i class="iconfont icon-editor_add"></i>
|
|
|
+ {{$i18n.t("explanation.add_audio")}}
|
|
|
</button>
|
|
|
- </template>
|
|
|
+ <template v-else>
|
|
|
+ <div class="music-display" @click.self="onClickCurrentMusic">
|
|
|
+ <Audio ref="my-audio" class="audio-control" :backgroundColor="'#1A1B1D'" :myAudioUrl="currentScene.explanation.audioUrl"></Audio>
|
|
|
+ <div class="name" :key="currentScene.explanation.audioName" v-title="currentScene.explanation.audioName" @click="onClickCurrentMusic">{{currentScene.explanation.audioName}}</div>
|
|
|
+ <i class="iconfont icon-editor_list_delete" @click.stop="onClickDeleteMusicBtn"></i>
|
|
|
+ </div>
|
|
|
+ <button class="ui-button" @click="isShowSelectionWindow = true">
|
|
|
+ <i class="iconfont icon-editor_update"></i>
|
|
|
+ {{$i18n.t("explanation.change_audio")}}
|
|
|
+ </button>
|
|
|
+ </template>
|
|
|
|
|
|
- <div class="switch-wrapper">
|
|
|
- <span class="label">{{$i18n.t("explanation.default_open")}}</span>
|
|
|
- <Switcher
|
|
|
- :disable="!currentScene || currentScene.type ==='4dkk'"
|
|
|
- :value="currentScene.explanation.openByDefault" @change="currentScene.explanation.openByDefault = !currentScene.explanation.openByDefault"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="switch-wrapper">
|
|
|
- <span class="label">{{$i18n.t("explanation.loop")}}</span>
|
|
|
- <Switcher
|
|
|
- :disable="!currentScene || currentScene.type ==='4dkk'"
|
|
|
- :value="currentScene.explanation.repeat" @change="currentScene.explanation.repeat = !currentScene.explanation.repeat"
|
|
|
- />
|
|
|
- </div>
|
|
|
+ <div class="switch-wrapper">
|
|
|
+ <span class="label">{{$i18n.t("explanation.default_open")}}</span>
|
|
|
+ <Switcher
|
|
|
+ :disable="!currentScene || currentScene.type ==='4dkk'"
|
|
|
+ :value="currentScene.explanation.openByDefault" @change="currentScene.explanation.openByDefault = !currentScene.explanation.openByDefault"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="switch-wrapper">
|
|
|
+ <span class="label">{{$i18n.t("explanation.loop")}}</span>
|
|
|
+ <Switcher
|
|
|
+ :disable="!currentScene || currentScene.type ==='4dkk'"
|
|
|
+ :value="currentScene.explanation.repeat" @change="currentScene.explanation.repeat = !currentScene.explanation.repeat"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="dialog" style="z-index: 2000" v-if="isShowSelectionWindow">
|
|
|
- <MaterialSelector
|
|
|
- :title="$i18n.t('gather.select_material')"
|
|
|
- @cancle="isShowSelectionWindow = false"
|
|
|
- @submit="handleSubmitFromMaterialSelector"
|
|
|
- :selectableType="['audio']"
|
|
|
- initialMaterialType="audio"
|
|
|
- />
|
|
|
+ <div class="dialog" style="z-index: 2000" v-if="isShowSelectionWindow">
|
|
|
+ <MaterialSelector
|
|
|
+ :title="$i18n.t('gather.select_material')"
|
|
|
+ @cancle="isShowSelectionWindow = false"
|
|
|
+ @submit="handleSubmitFromMaterialSelector"
|
|
|
+ :selectableType="['audio']"
|
|
|
+ initialMaterialType="audio"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div class="disabled-tip" v-if="currentScene.type === '4dkk'">
|
|
|
+ {{$i18n.t('explanation.disabled_tip')}}
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -199,5 +204,11 @@ export default {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .disabled-tip {
|
|
|
+ text-align: center;
|
|
|
+ color: rgba(255, 255, 255, 0.6);
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|