Skip to content

Commit

Permalink
add replacements to directory config and input
Browse files Browse the repository at this point in the history
related to #494
  • Loading branch information
MrBrax committed Apr 16, 2024
1 parent 638e363 commit d32923f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion client-vue/src/components/vod/ExportModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,15 @@
<div v-if="exporter == 'file' || exporter == 'sftp' || exporter == 'ftp' || exporter == 'rclone'" class="field">
<label class="label">{{ t("vod.export.directory") }}</label>
<div class="control">
<input v-model="exportVodSettings.directory" class="input" type="text" />
<input id="directory_template" v-model="exportVodSettings.directory" class="input" type="text" />
<ul class="template-replacements">
<li v-for="(v, k) in ExporterFilenameFields" :key="k">
{{ k }}
</li>
</ul>
<p class="template-preview">
{{ templatePreview(exportVodSettings.directory || "") }}
</p>
<p class="input-help">The folder where you want the file to end up in. Both local and remote.</p>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion common/ServerConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,8 @@ export const settingsFields: Record<string, SettingField> = {
"exporter.default.directory": {
group: "Exporter",
text: "Default directory",
type: "string",
type: "template",
replacements: ExporterFilenameFields,
},
"exporter.default.host": {
group: "Exporter",
Expand Down

0 comments on commit d32923f

Please sign in to comment.