-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add: トラック毎の書き出しを追加 #2228
Add: トラック毎の書き出しを追加 #2228
Changes from 4 commits
671f52c
d93e31b
e4b4a3f
ffa5035
74a34dd
456fa43
7a6d6c6
ed17385
f41ac76
9166ab7
ab3e0ec
02e619f
fdff200
eac3d15
9d7e724
e1c5ac6
06efbf4
d426919
5af928d
6864b52
9a0e858
5324496
30616e7
3b336e6
e9f2b7c
2cb5f55
0c64861
d1599af
153a0c3
a9c8729
145835a
c340ba8
ee1f05f
456d1d8
f91ab93
b1b3055
e2cde6d
532e2f2
9dcc8f8
423e4c3
b610fe4
a8956a2
6754aac
dd7fae6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 何度も修正&書き出しする場合、たぶん「書き出し先を固定する」とかなり相性が良さそうなのですが、どうでしょう・・・? ソング側でショートカットキーで書き出し There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 実際あったら嬉しいですね。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 組み合わせ良さそうですね!! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ですね。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!-- 編集ダイアログが開く設定項目 --> | ||
Hiroshiba marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<template> | ||
<BaseCell :title :description> | ||
<div class="q-px-sm text-ellipsis"> | ||
{{ props.currentValue }} | ||
</div> | ||
<QBtn | ||
:label="props.label || '編集する'" | ||
unelevated | ||
color="background" | ||
textColor="display" | ||
class="text-no-wrap q-mr-sm" | ||
@click="emit('click')" | ||
/> | ||
</BaseCell> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import BaseCell, { Props as BaseCellProps } from "./BaseCell.vue"; | ||
|
||
const props = defineProps< | ||
BaseCellProps & { | ||
currentValue: string; | ||
label?: string; | ||
disable?: boolean; | ||
} | ||
>(); | ||
|
||
const emit = defineEmits<{ | ||
click: []; | ||
}>(); | ||
</script> |
Hiroshiba marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
<QCardSection> | ||
<div class="text-h5">書き出しファイル名パターン</div> | ||
<div class="text-body2 text-grey-8"> | ||
「$キャラ$」のようなタグを使って書き出すファイル名をカスタマイズできます | ||
「$キャラ$」のようなタグを使って書き出すファイル名をカスタマイズできます。 | ||
</div> | ||
</QCardSection> | ||
<QCardActions class="setting-card q-px-md q-py-sm"> | ||
|
@@ -39,7 +39,7 @@ | |
</div> | ||
</div> | ||
<div class="text-body2 text-ellipsis"> | ||
出力例){{ previewFileName }} | ||
出力例:{{ previewFileName }} | ||
</div> | ||
<div class="row full-width q-my-md"> | ||
<QBtn | ||
|
@@ -78,16 +78,13 @@ | |
<script setup lang="ts"> | ||
import { computed, ref, nextTick } from "vue"; | ||
import { QInput } from "quasar"; | ||
import { useStore } from "@/store"; | ||
import { | ||
buildAudioFileNameFromRawData, | ||
DEFAULT_AUDIO_FILE_BASE_NAME_TEMPLATE, | ||
replaceTagIdToTagString, | ||
sanitizeFileName, | ||
} from "@/store/utility"; | ||
import { replaceTagIdToTagString, sanitizeFileName } from "@/store/utility"; | ||
|
||
const props = defineProps<{ | ||
openDialog: boolean; | ||
defaultTemplate: string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (ただのコメントです) こーーーーーーーこもちょっとややこしいかもですね。。 とはいえここの名称は元からそうなっていた(Templateだった)ので、このプルリクエストでの内容ではないですね。 |
||
availableTags: (keyof typeof replaceTagIdToTagString)[]; | ||
buildFileName: (pattern: string) => string; | ||
}>(); | ||
|
||
const emit = defineEmits<{ | ||
|
@@ -96,15 +93,18 @@ const emit = defineEmits<{ | |
|
||
const updateOpenDialog = (isOpen: boolean) => emit("update:openDialog", isOpen); | ||
|
||
const store = useStore(); | ||
const fileNamePattern = defineModel<string>("fileNamePattern", { | ||
sevenc-nanashi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
type: String, | ||
default: "", | ||
}); | ||
const patternInput = ref<QInput>(); | ||
const maxLength = 128; | ||
const tagStrings = Object.values(replaceTagIdToTagString); | ||
|
||
const savingSetting = computed(() => store.state.savingSetting); | ||
const tagStrings = computed(() => | ||
props.availableTags.map((tag) => replaceTagIdToTagString[tag]), | ||
); | ||
|
||
const savedBaseNamePattern = computed(() => { | ||
return savingSetting.value.fileNamePattern.replace(/\.wav$/, ""); | ||
return fileNamePattern.value.replace(/\.wav$/, ""); | ||
}); | ||
const currentBaseNamePattern = ref(savedBaseNamePattern.value); | ||
const currentNamePattern = computed( | ||
|
@@ -140,18 +140,18 @@ const errorMessage = computed(() => { | |
const hasError = computed(() => errorMessage.value !== ""); | ||
|
||
const previewFileName = computed(() => | ||
buildAudioFileNameFromRawData(currentNamePattern.value), | ||
props.buildFileName(currentNamePattern.value), | ||
); | ||
|
||
const initializeInput = () => { | ||
currentBaseNamePattern.value = savedBaseNamePattern.value; | ||
|
||
if (currentBaseNamePattern.value === "") { | ||
currentBaseNamePattern.value = DEFAULT_AUDIO_FILE_BASE_NAME_TEMPLATE; | ||
currentBaseNamePattern.value = props.defaultTemplate; | ||
} | ||
}; | ||
const resetToDefault = () => { | ||
currentBaseNamePattern.value = DEFAULT_AUDIO_FILE_BASE_NAME_TEMPLATE; | ||
currentBaseNamePattern.value = props.defaultTemplate; | ||
patternInput.value?.focus(); | ||
}; | ||
|
||
|
@@ -179,12 +179,11 @@ const insertTagToCurrentPosition = (tag: string) => { | |
}; | ||
|
||
const submit = async () => { | ||
await store.dispatch("SET_SAVING_SETTING", { | ||
data: { | ||
...savingSetting.value, | ||
fileNamePattern: currentNamePattern.value, | ||
}, | ||
}); | ||
if (hasError.value) { | ||
return; | ||
sevenc-nanashi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
fileNamePattern.value = currentNamePattern.value; | ||
updateOpenDialog(false); | ||
}; | ||
</script> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
トラックごとの書き出し機能、人によっては何度も何度も実行すると思うので、ショートカットキー実装しちゃうのどうでしょう?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ソングとトークで同じショートカットキーを設定出来ないっぽいので、それの修正と一緒に別PRでやろうとおもいます。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
うおーたすかります!!