mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-02-02 02:13:48 -05:00
Linting fixes (#1404)
This commit is contained in:
@@ -9,7 +9,7 @@ import { getSystemField } from '@/utils/dist/shared/models/vault';
|
||||
|
||||
import FieldHistoryModal from './FieldHistoryModal';
|
||||
|
||||
interface FieldBlockProps {
|
||||
type FieldBlockProps = {
|
||||
field: ItemField;
|
||||
itemId?: string;
|
||||
}
|
||||
@@ -42,11 +42,9 @@ const FieldBlock: React.FC<FieldBlockProps> = ({ field, itemId }) => {
|
||||
|
||||
// Check if there's actual history available
|
||||
useEffect(() => {
|
||||
console.log('[FieldBlock] useEffect triggered - hasHistoryEnabled:', hasHistoryEnabled, 'itemId:', itemId, 'fieldKey:', field.FieldKey);
|
||||
if (hasHistoryEnabled && itemId && dbContext?.sqliteClient) {
|
||||
try {
|
||||
const history = dbContext.sqliteClient.getFieldHistory(itemId, field.FieldKey);
|
||||
console.log('[FieldBlock] History retrieved:', history, 'count:', history.length);
|
||||
setHistoryCount(history.length);
|
||||
} catch (error) {
|
||||
console.error('[FieldBlock] Error checking history:', error);
|
||||
@@ -153,7 +151,6 @@ const FieldBlock: React.FC<FieldBlockProps> = ({ field, itemId }) => {
|
||||
|
||||
case 'TextArea':
|
||||
// Use NotesBlock-style rendering for multi-line text
|
||||
const formattedText = convertUrlsToLinks(value);
|
||||
return (
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
|
||||
@@ -162,7 +159,7 @@ const FieldBlock: React.FC<FieldBlockProps> = ({ field, itemId }) => {
|
||||
<div className="p-4 bg-gray-50 rounded-lg dark:bg-gray-700">
|
||||
<p
|
||||
className="text-gray-900 dark:text-gray-100 whitespace-pre-wrap"
|
||||
dangerouslySetInnerHTML={{ __html: formattedText }}
|
||||
dangerouslySetInnerHTML={{ __html: convertUrlsToLinks(value) }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useDb } from '@/entrypoints/popup/context/DbContext';
|
||||
|
||||
import type { FieldHistory, FieldType } from '@/utils/dist/shared/models/vault';
|
||||
|
||||
interface FieldHistoryModalProps {
|
||||
type FieldHistoryModalProps = {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
itemId: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from 'react';
|
||||
|
||||
interface EditableFieldLabelProps {
|
||||
type EditableFieldLabelProps = {
|
||||
htmlFor: string;
|
||||
label: string;
|
||||
onLabelChange: (newLabel: string) => void;
|
||||
|
||||
@@ -57,9 +57,6 @@ const ItemDetails: React.FC = (): React.ReactElement => {
|
||||
try {
|
||||
const result = dbContext.sqliteClient.getItemById(id);
|
||||
if (result) {
|
||||
console.log('Item loaded:', result);
|
||||
console.log('Fields:', result.Fields);
|
||||
console.log('Tags:', result.Tags);
|
||||
setItem(result);
|
||||
setIsInitialLoading(false);
|
||||
} else {
|
||||
@@ -114,9 +111,6 @@ const ItemDetails: React.FC = (): React.ReactElement => {
|
||||
// Group fields by category for organized display (excluding URLs)
|
||||
const groupedFields = groupFieldsByCategory(itemWithoutUrls);
|
||||
|
||||
console.log('Grouped fields:', groupedFields);
|
||||
console.log('Item:', item);
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
{/* Header with name, logo, and URLs */}
|
||||
|
||||
@@ -83,7 +83,7 @@ const ItemsList: React.FC = () => {
|
||||
const app = useApp();
|
||||
const navigate = useNavigate();
|
||||
const { syncVault } = useVaultSync();
|
||||
const { executeVaultMutation, isLoading: isSaving } = useVaultMutate();
|
||||
const { executeVaultMutation } = useVaultMutate();
|
||||
const { setHeaderButtons } = useHeaderButtons();
|
||||
const [items, setItems] = useState<Item[]>([]);
|
||||
const [searchTerm, setSearchTerm] = useState('');
|
||||
|
||||
Reference in New Issue
Block a user