Add synchronization support for guidelines and AI guidelines
- Implemented syncing for `GuideLine` and `AIGuideLine` entities with encryption and decryption workflows. - Refined `GuidelineRepo` methods to check existence and update/insert records for both guideline types. - Updated timestamp handling in `GuideLine` and `AIGuideLine` models for accurate tracking. - Corrected QuillSense localization keys for labels and descriptions. - Improved database queries and modularized logic for consistency.
This commit is contained in:
@@ -66,13 +66,13 @@ const QuillSenseSetting = forwardRef(function QuillSenseSetting(props, ref) {
|
||||
lang
|
||||
);
|
||||
if (updateResult) {
|
||||
successMessage(t('quillsenseSetting.saveSuccess'));
|
||||
successMessage(t('quillSenseSetting.successSave'));
|
||||
// Mettre a jour le contexte du livre
|
||||
if (setBook && book) {
|
||||
setBook({...book, quillsenseEnabled: quillsenseEnabled});
|
||||
}
|
||||
} else {
|
||||
errorMessage(t('quillsenseSetting.saveError'));
|
||||
errorMessage(t('quillSenseSetting.errorSave'));
|
||||
}
|
||||
} catch (e: unknown) {
|
||||
if (e instanceof Error) {
|
||||
@@ -94,7 +94,7 @@ const QuillSenseSetting = forwardRef(function QuillSenseSetting(props, ref) {
|
||||
<div className="bg-secondary/20 rounded-xl p-5 shadow-inner border border-secondary/30">
|
||||
<InputField
|
||||
icon={faToggleOn}
|
||||
fieldName={t('quillsenseSetting.enableQuillsense')}
|
||||
fieldName={t('quillSenseSetting.enableLabel')}
|
||||
input={
|
||||
<ToggleSwitch
|
||||
checked={quillsenseEnabled}
|
||||
@@ -103,24 +103,24 @@ const QuillSenseSetting = forwardRef(function QuillSenseSetting(props, ref) {
|
||||
}
|
||||
/>
|
||||
<p className="text-muted text-sm mt-2">
|
||||
{t('quillsenseSetting.enableDescription')}
|
||||
{t('quillSenseSetting.enableDescription')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-secondary/20 rounded-xl p-5 shadow-inner border border-secondary/30">
|
||||
<InputField
|
||||
icon={faMagicWandSparkles}
|
||||
fieldName={t('quillsenseSetting.advancedPrompt')}
|
||||
fieldName={t('quillSenseSetting.advancedPromptLabel')}
|
||||
input={
|
||||
<TexteAreaInput
|
||||
value={advancedPrompt}
|
||||
setValue={(e: ChangeEvent<HTMLTextAreaElement>): void => setAdvancedPrompt(e.target.value)}
|
||||
placeholder={t('quillsenseSetting.advancedPromptPlaceholder')}
|
||||
placeholder={t('quillSenseSetting.advancedPromptPlaceholder')}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
<p className="text-muted text-sm mt-2">
|
||||
{t('quillsenseSetting.advancedPromptDescription')}
|
||||
{t('quillSenseSetting.advancedPromptHint')}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user