-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(user): If the user information request fails, go to the login page. * feat(migrations): Add Backend-Admin、Identity、Webhooks migrations. * fix(elsa): fix endpoints version of the integrated Elsa.Server.Api project. * refactor(openiddict): refactor openiddict extension grant. * feat(saas): Add EntityVersions to Editions and Tenants entity. * fix(text-templating): fixed invalid page lookup for templates. * fix(text-templating): the cache is not refreshed after template changes. * feat(webhooks): added webhooks custom interface. * feat(webhooks): webhooks send job Sets the maximum number of failed retry attempts. * feat(account): add the user extension field. * feat(common): Update common.props file. * feat(build): Update Dicrectory.Build.props file. * feat(ui): implements the template definitions.
- Loading branch information
Showing
146 changed files
with
6,536 additions
and
337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
apps/vue/src/views/text-templating/templates/components/TemplateDefinitionModal.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<template> | ||
<BasicModal | ||
@register="registerModal" | ||
:title="L('TextTemplates')" | ||
:width="800" | ||
:min-height="400" | ||
@ok="handleSubmit" | ||
> | ||
<BasicForm @register="registerForm" /> | ||
</BasicModal> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { reactive, nextTick } from 'vue'; | ||
import { BasicForm, useForm } from '/@/components/Form'; | ||
import { BasicModal, useModalInner } from '/@/components/Modal'; | ||
import { useMessage } from '/@/hooks/web/useMessage'; | ||
import { useLocalization } from '/@/hooks/abp/useLocalization'; | ||
import { GetByNameAsyncByName, CreateAsyncByInput, UpdateAsyncByNameAndInput } from '/@/api/text-templating/definitions'; | ||
import { getModalFormSchemas } from '../datas/ModalData'; | ||
const emits = defineEmits(['register', 'change']); | ||
const state = reactive({ | ||
isEdit: false | ||
}); | ||
const { createMessage } = useMessage(); | ||
const { L } = useLocalization(['AbpTextTemplating']); | ||
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] = useForm({ | ||
labelWidth: 150, | ||
showActionButtonGroup: false, | ||
schemas: getModalFormSchemas(), | ||
}); | ||
const [registerModal, { changeLoading, changeOkLoading, closeModal }] = useModalInner((data) => { | ||
nextTick(() => { | ||
fetch(data?.name); | ||
}); | ||
}); | ||
function fetch(name?: string) { | ||
state.isEdit = false; | ||
resetFields(); | ||
if (!name) { | ||
updateSchema({ | ||
field: 'name', | ||
dynamicDisabled: state.isEdit, | ||
}); | ||
return; | ||
} | ||
changeLoading(true); | ||
changeOkLoading(true); | ||
GetByNameAsyncByName(name).then((res) => { | ||
state.isEdit = true; | ||
updateSchema({ | ||
field: 'name', | ||
dynamicDisabled: state.isEdit, | ||
}); | ||
setFieldsValue(res); | ||
if (res.formatedDisplayName) { | ||
// L:XXX,YYY | ||
const splitChars = res.formatedDisplayName.split(','); | ||
if (splitChars.length >= 2 && splitChars[0].startsWith('L:')) { | ||
const resource = splitChars[0].substring(2); | ||
setFieldsValue({ | ||
resource: resource, | ||
text: splitChars[1], | ||
}); | ||
} | ||
} | ||
}).finally(() => { | ||
changeLoading(false); | ||
changeOkLoading(false); | ||
}); | ||
} | ||
function handleSubmit() { | ||
validate().then((input) => { | ||
input.displayName = `L:${input.resource},${input.text}`; | ||
changeLoading(true); | ||
changeOkLoading(true); | ||
const submitApi = state.isEdit | ||
? UpdateAsyncByNameAndInput(input.name, input) | ||
: CreateAsyncByInput(input); | ||
submitApi.then((res) => { | ||
setFieldsValue(res); | ||
createMessage.success(L('Successful')); | ||
emits('change', res); | ||
closeModal(); | ||
}).finally(() => { | ||
changeLoading(false); | ||
changeOkLoading(false); | ||
}); | ||
}); | ||
} | ||
</script> | ||
|
||
<style lang="less" scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.