diff --git a/src/components/AuthGuard.tsx b/src/components/AuthGuard.tsx index bb574b0..c2902ea 100644 --- a/src/components/AuthGuard.tsx +++ b/src/components/AuthGuard.tsx @@ -36,7 +36,7 @@ export function AuthGuard({ children, requiredPermissions }: AuthGuardProps) {

Access Denied

- You don't have permission to {action} articles in the {categoryId} category. + У вас нет прав на {action} статьи в {categoryId} категории.

diff --git a/src/components/TipTapEditor.tsx b/src/components/TipTapEditor.tsx index 5b21ce6..c3ec6c6 100644 --- a/src/components/TipTapEditor.tsx +++ b/src/components/TipTapEditor.tsx @@ -16,7 +16,8 @@ import { AlignCenter, Plus, Minus, - SquareUser + SquareUser, + ImagePlus } from 'lucide-react'; import { useEffect, useState } from "react"; @@ -339,6 +340,7 @@ export function TipTapEditor({ initialContent, onContentChange }: TipTapEditorPr className={`p-1 rounded hover:bg-gray-200 ${ editor?.isActive('bold') ? 'bg-gray-200' : '' }`} + title="Выделение слов жирным шрифтом" > @@ -346,6 +348,7 @@ export function TipTapEditor({ initialContent, onContentChange }: TipTapEditorPr type="button" onClick={handleClick} className="p-1 rounded hover:bg-gray-200" + title="Автоматическое выделение жирным имен" > @@ -355,6 +358,7 @@ export function TipTapEditor({ initialContent, onContentChange }: TipTapEditorPr className={`p-1 rounded hover:bg-gray-200 ${ editor?.isActive('italic') ? 'bg-gray-200' : '' }`} + title="Выделение слов наклонным шрифтом" > @@ -362,6 +366,7 @@ export function TipTapEditor({ initialContent, onContentChange }: TipTapEditorPr type="button" onClick={() => editor?.chain().focus().setParagraph().run()} className={`p-1 rounded hover:bg-gray-200 ${editor?.isActive('paragraph') ? 'bg-gray-200' : ''}`} + title="Выравнивание по левому краю" > @@ -370,6 +375,7 @@ export function TipTapEditor({ initialContent, onContentChange }: TipTapEditorPr onClick={() => editor?.chain().focus().undo().run()} disabled={!editor?.can().chain().focus().undo().run()} className="p-1 rounded hover:bg-gray-200 disabled:opacity-50" + title="Отменить действие" > @@ -378,6 +384,7 @@ export function TipTapEditor({ initialContent, onContentChange }: TipTapEditorPr onClick={() => editor?.chain().focus().redo().run()} disabled={!editor?.can().chain().focus().redo().run()} className="p-1 rounded hover:bg-gray-200 disabled:opacity-50" + title="Вернуть действие" > @@ -387,6 +394,7 @@ export function TipTapEditor({ initialContent, onContentChange }: TipTapEditorPr className={`p-1 rounded hover:bg-gray-200 ${ editor?.isActive('bulletList') ? 'bg-gray-200' : '' }`} + title="Создать список" > @@ -396,6 +404,7 @@ export function TipTapEditor({ initialContent, onContentChange }: TipTapEditorPr className={`p-1 rounded hover:bg-gray-200 ${ editor?.isActive('orderedList') ? 'bg-gray-200' : '' }`} + title="Создать упорядоченный список" > @@ -406,6 +415,7 @@ export function TipTapEditor({ initialContent, onContentChange }: TipTapEditorPr className={`p-1 rounded hover:bg-gray-200 ${ editor?.isActive('blockquote') ? 'bg-gray-200' : '' }`} + title="Цитирование (параграф)" > @@ -416,6 +426,7 @@ export function TipTapEditor({ initialContent, onContentChange }: TipTapEditorPr className={`p-1 rounded hover:bg-gray-200 ${ editor?.getAttributes('textAlign')?.textAlign === 'center' ? 'bg-gray-200' : '' }`} + title="Выравнивание по центру" > @@ -427,8 +438,9 @@ export function TipTapEditor({ initialContent, onContentChange }: TipTapEditorPr editor?.chain().focus().setImage({ src: url }).run(); } }} + title="Вставить изображение" > - 🖼️ Фото + @@ -240,7 +246,7 @@ export function UserManagementPage() { {/* Create/Edit User Modal */} - {(showCreateModal || showEditModal) && ( + {((showCreateModal || showEditModal) && user?.permissions.isAdmin) && (
@@ -318,12 +324,13 @@ export function UserManagementPage() {
setFormData(prev => ({ ...prev, password: e.target.value }))} + placeholder={showEditModal ? 'Оставьте пустым, чтобы не менять' : ''} className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500" required={!showEditModal} />