Zelyanoth commited on
Commit
f301a8d
·
1 Parent(s): 2e2a2c3

Update post creation flow and messaging

Browse files

- Change post content character limit from 280 to 3000
- Update messaging to clarify that RSS sources are optional
- Remove "No Sources" button state and simplify disabled state logic
- Update instructions for AI content generation and manual post creation

The changes allow users to create longer posts and make it clear that RSS sources are not required for manual post creation. The UI is simplified by removing the "No Sources" button state and updating the disabled state logic.

Files changed (1) hide show
  1. frontend/src/pages/Posts.jsx +4 -11
frontend/src/pages/Posts.jsx CHANGED
@@ -215,8 +215,8 @@ const Posts = () => {
215
  <div className="flex-1">
216
  <h3 className="text-base sm:text-lg font-semibold text-gray-900 mb-1 sm:mb-2">No RSS Sources Found</h3>
217
  <p className="text-xs sm:text-sm text-gray-700 leading-relaxed mb-3">
218
- You need to add at least one RSS source before generating posts.
219
- RSS sources provide the content that will be used to generate your social media posts.
220
  </p>
221
  <button
222
  onClick={() => navigate('/sources')}
@@ -314,7 +314,7 @@ const Posts = () => {
314
  aria-label="Post content"
315
  />
316
  <div className="absolute bottom-2 sm:bottom-3 right-2 sm:right-3 text-xs text-gray-400">
317
- {postContent.length}/280
318
  </div>
319
  </div>
320
  </div>
@@ -342,7 +342,7 @@ const Posts = () => {
342
  <button
343
  type="submit"
344
  className="btn btn-primary create-button bg-gradient-to-r from-gray-900 to-gray-800 text-white py-2.5 sm:py-3 px-4 sm:px-6 rounded-xl font-semibold hover:from-gray-800 hover:to-gray-900 transition-all duration-300 shadow-lg hover:shadow-xl disabled:opacity-60 disabled:cursor-not-allowed h-fit flex items-center justify-center space-x-2 touch-manipulation active:scale-95"
345
- disabled={isCreating || !selectedAccount || !postContent.trim() || sources.length === 0}
346
  aria-busy={isCreating}
347
  >
348
  {isCreating ? (
@@ -353,13 +353,6 @@ const Posts = () => {
353
  </svg>
354
  <span className="text-xs sm:text-sm">Publishing...</span>
355
  </>
356
- ) : sources.length === 0 ? (
357
- <>
358
- <svg className="w-4 h-4 sm:w-5 sm:h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
359
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
360
- </svg>
361
- <span className="text-xs sm:text-sm">No Sources</span>
362
- </>
363
  ) : (
364
  <>
365
  <svg className="w-4 h-4 sm:w-5 sm:h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
 
215
  <div className="flex-1">
216
  <h3 className="text-base sm:text-lg font-semibold text-gray-900 mb-1 sm:mb-2">No RSS Sources Found</h3>
217
  <p className="text-xs sm:text-sm text-gray-700 leading-relaxed mb-3">
218
+ You need to add at least one RSS source to enable AI content generation.
219
+ You can still manually create and publish posts without RSS sources.
220
  </p>
221
  <button
222
  onClick={() => navigate('/sources')}
 
314
  aria-label="Post content"
315
  />
316
  <div className="absolute bottom-2 sm:bottom-3 right-2 sm:right-3 text-xs text-gray-400">
317
+ {postContent.length}/3000
318
  </div>
319
  </div>
320
  </div>
 
342
  <button
343
  type="submit"
344
  className="btn btn-primary create-button bg-gradient-to-r from-gray-900 to-gray-800 text-white py-2.5 sm:py-3 px-4 sm:px-6 rounded-xl font-semibold hover:from-gray-800 hover:to-gray-900 transition-all duration-300 shadow-lg hover:shadow-xl disabled:opacity-60 disabled:cursor-not-allowed h-fit flex items-center justify-center space-x-2 touch-manipulation active:scale-95"
345
+ disabled={isCreating || !selectedAccount || !postContent.trim()}
346
  aria-busy={isCreating}
347
  >
348
  {isCreating ? (
 
353
  </svg>
354
  <span className="text-xs sm:text-sm">Publishing...</span>
355
  </>
 
 
 
 
 
 
 
356
  ) : (
357
  <>
358
  <svg className="w-4 h-4 sm:w-5 sm:h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">