Change title to white, add authorized-only Add button for patches

This commit is contained in:
backuppc
2025-12-02 17:29:59 +09:00
parent 67c5d2f98d
commit e53a870893

View File

@@ -1,5 +1,5 @@
import { useState, useEffect } from 'react';
import { FileText, Search, RefreshCw, Calendar, Edit3, User } from 'lucide-react';
import { FileText, Search, RefreshCw, Calendar, Edit3, User, Plus } from 'lucide-react';
import { comms } from '@/communication';
import { BoardItem } from '@/types';
@@ -138,6 +138,36 @@ export function PatchList() {
)}
</button>
<button
onClick={() => {
setEditFormData({
idx: 0,
bidx: 5,
gcode: '',
header: '',
cate: '패치',
title: '',
contents: '',
file: '',
guid: '',
url: '',
wuid: '',
wuid_name: '',
wdate: null,
project: '',
pidx: 0,
close: false,
remark: ''
});
setShowEditModal(true);
}}
disabled={!(userLevel >= 9 || userId === '395552')}
className="h-10 bg-green-500 hover:bg-green-600 text-white px-6 rounded-lg transition-colors flex items-center justify-center disabled:opacity-30 disabled:cursor-not-allowed"
>
<Plus className="w-4 h-4 mr-2" />
</button>
</div>
</div>
@@ -188,7 +218,7 @@ export function PatchList() {
</span>
)}
</div>
<h4 className="text-[#87CEEB] font-medium flex-1 min-w-0 truncate">{item.title}</h4>
<h4 className="text-white font-medium flex-1 min-w-0 truncate">{item.title}</h4>
<div className="flex items-center text-white/60 text-xs flex-shrink-0">
<Calendar className="w-3 h-3 mr-1" />
{formatDate(item.wdate)}