Add QuillSense support with settings and integration
- Introduced new "QuillSense" feature for AI-assisted book creation. - Added QuillSense settings panel with advanced options and disable/enable functionality. - Updated GhostWriter and TextEditor components to respect QuillSense settings. - Extended models and repositories to track and manage QuillSense state per book. - Localized new strings for English and French.
This commit is contained in:
@@ -260,19 +260,25 @@ export default function GhostWriter() {
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasAccess) {
|
||||
if (!hasAccess || !book?.quillsenseEnabled) {
|
||||
return (
|
||||
<div className="flex items-center justify-center h-full">
|
||||
<div
|
||||
className="bg-tertiary/90 backdrop-blur-sm p-10 rounded-2xl shadow-2xl text-center border border-secondary/50 max-w-md">
|
||||
<h2 className="text-2xl font-['ADLaM_Display'] text-text-primary mb-4">{t("ghostWriter.title")}</h2>
|
||||
<p className="text-muted mb-6 text-lg leading-relaxed">{t("ghostWriter.subscriptionRequired")}</p>
|
||||
<button
|
||||
onClick={(): string => window.location.href = '/pricing'}
|
||||
className="px-6 py-3 bg-primary text-text-primary rounded-xl hover:bg-primary-dark transition-all duration-200 hover:scale-105 shadow-md hover:shadow-lg font-semibold"
|
||||
>
|
||||
{t("ghostWriter.subscribe")}
|
||||
</button>
|
||||
<p className="text-muted mb-6 text-lg leading-relaxed">
|
||||
{!book?.quillsenseEnabled
|
||||
? t("ghostWriter.quillsenseDisabled")
|
||||
: t("ghostWriter.subscriptionRequired")}
|
||||
</p>
|
||||
{hasAccess && !book?.quillsenseEnabled ? null : (
|
||||
<button
|
||||
onClick={(): string => window.location.href = '/pricing'}
|
||||
className="px-6 py-3 bg-primary text-text-primary rounded-xl hover:bg-primary-dark transition-all duration-200 hover:scale-105 shadow-md hover:shadow-lg font-semibold"
|
||||
>
|
||||
{t("ghostWriter.subscribe")}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user