improve markdown readme's & and adding ability to send telegram messages to a topic in a supergroup

This commit is contained in:
orangecoding
2025-10-30 12:42:03 +01:00
parent e3c62d4696
commit db3702ed33
18 changed files with 149 additions and 68 deletions

View File

@@ -21,7 +21,7 @@ const sortAdapter = (a, b) => {
const validate = (selectedAdapter) => {
const results = [];
for (let uiElement of Object.values(selectedAdapter.fields || [])) {
if (uiElement.value == null) {
if (uiElement.value == null && !uiElement.optional) {
results.push('All fields are mandatory and must be set.');
continue;
}
@@ -36,7 +36,7 @@ const validate = (selectedAdapter) => {
results.push('A boolean field cannot be of a different type.');
continue;
}
if (typeof uiElement.value === 'string' && uiElement.value.length === 0) {
if (typeof uiElement.value === 'string' && uiElement.value.length === 0 && !uiElement.optional) {
results.push('All fields are mandatory and must be set.');
}
}

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { Banner } from '@douyinfe/semi-ui';
import { Banner, MarkdownRender } from '@douyinfe/semi-ui';
export default function Help({ readme }) {
return (
@@ -8,7 +8,7 @@ export default function Help({ readme }) {
type="info"
closeIcon={null}
title={<div style={{ fontWeight: 600, fontSize: '14px', lineHeight: '20px' }}>Information</div>}
description={<p dangerouslySetInnerHTML={{ __html: readme }} />}
description={<MarkdownRender raw={readme} />}
/>
);
}