Добавлены типы файлов в диалог загрузки

This commit is contained in:
Book Pauk
2022-07-02 13:57:44 +07:00
parent f203d453a4
commit 5ae3ea94e4
3 changed files with 14 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ class Misc {
async loadConfig() {
const query = {params: [
'name', 'version', 'mode', 'maxUploadFileSize', 'useExternalBookConverter', 'branch',
'name', 'version', 'mode', 'maxUploadFileSize', 'useExternalBookConverter', 'acceptFileExt', 'branch',
]};
try {

View File

@@ -21,7 +21,12 @@
</template>
</q-input>
<input id="file" ref="file" type="file" style="display: none;" @change="loadFile" />
<input
id="file" ref="file" type="file"
style="display: none;"
:accept="acceptFileExt"
@change="loadFile"
/>
<div class="q-my-sm"></div>
<q-btn no-caps dense class="q-px-sm" color="primary" size="13px" @click="loadFileClick">
@@ -131,6 +136,10 @@ class LoaderPage {
return this.$store.state.config.version;
}
get acceptFileExt() {
return this.$store.state.config.acceptFileExt;
}
get isExternalConverter() {
return this.$store.state.config.useExternalBookConverter;
}