Skip to content

Commit

Permalink
feat: 文件支持 nunjucks 模板(后端 > 2.14.154)
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Jan 14, 2024
1 parent fbded33 commit 43b3d8a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store-front-end",
"version": "2.14.47",
"version": "2.14.48",
"private": true,
"scripts": {
"dev": "vite --host",
Expand Down
3 changes: 3 additions & 0 deletions src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ export default {
ignoreFailedRemoteFile: {
label: 'Ignore failed remote file(s)'
},
isTpl: {
label: 'Enable template rendering'
},
},
// subscription management page
subPage: {
Expand Down
3 changes: 3 additions & 0 deletions src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ export default {
ignoreFailedRemoteFile: {
label: '忽略失败的远程文件'
},
isTpl: {
label: '启用模板渲染'
},
},
// 订阅管理页
subPage: {
Expand Down
10 changes: 10 additions & 0 deletions src/views/FileEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@
</nut-radiogroup>
</div>
</nut-form-item>
<nut-form-item
:label="$t(`filePage.isTpl.label`)"
prop="isTpl"
class="ignore-failed-wrapper"
>
<div class="swtich-wrapper">
<nut-switch v-model="form.isTpl"/>
</div>
</nut-form-item>
<nut-form-item
:label="$t(`filePage.ignoreFailedRemoteFile.label`)"
prop="ignoreFailedRemoteFile"
Expand Down Expand Up @@ -270,6 +279,7 @@
form.mergeSources = sourceData.mergeSources;
form.content = sourceData.content;
form.ignoreFailedRemoteFile = sourceData.ignoreFailedRemoteFile;
form.isTpl = sourceData.isTpl;
const newProcess = JSON.parse(JSON.stringify(sourceData.process));
form.process = newProcess;
if (sourceData.process.length > 0) {
Expand Down

0 comments on commit 43b3d8a

Please sign in to comment.