mirror of
https://github.com/dyzulk/trustlab.git
synced 2026-01-27 05:51:54 +07:00
feat: implement global bundle UI, granular sync buttons, and integration with new API endpoints
This commit is contained in:
@@ -149,6 +149,51 @@ function OsGuideContent({ title, steps, selectedOs, certificates, t }: { title:
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/* Global Bundle Section (Recommendations) */}
|
||||
<div className="pt-8 border-t border-dashed border-gray-100 dark:border-gray-700">
|
||||
<div className="bg-brand-500/5 dark:bg-brand-400/5 rounded-2xl p-6 border border-brand-500/10 dark:border-brand-400/10">
|
||||
<div className="flex items-start gap-4">
|
||||
<div className="w-10 h-10 rounded-xl bg-brand-500 text-white flex items-center justify-center flex-shrink-0 shadow-lg shadow-brand-500/20">
|
||||
<svg className="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M13 10V3L4 14h7v7l9-11h-7z" />
|
||||
</svg>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h5 className="font-bold text-gray-900 dark:text-white flex items-center gap-2 mb-1">
|
||||
{t('bundle_guide_title')}
|
||||
<Badge variant="brand">Recommended</Badge>
|
||||
</h5>
|
||||
<p className="text-xs text-gray-500 dark:text-gray-400 leading-relaxed mb-4">
|
||||
{t('bundle_guide_desc')}
|
||||
</p>
|
||||
|
||||
{(selectedOs === 'linux' || selectedOs === 'windows' || selectedOs === 'macos') && (
|
||||
<div className="space-y-4">
|
||||
{(selectedOs === 'linux') && (
|
||||
<CliSnippet
|
||||
label={t('bundle_cli_label')}
|
||||
command={`curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash`}
|
||||
t={t}
|
||||
/>
|
||||
)}
|
||||
{(selectedOs === 'windows' || selectedOs === 'macos') && (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
<DownloadBtn
|
||||
href={`https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.${selectedOs === 'windows' ? 'bat' : 'mobileconfig'}`}
|
||||
label={t('download_all_bundle')}
|
||||
icon={selectedOs === 'windows' ? <WindowsIcon className="w-4 h-4" /> : <AppleIcon className="w-4 h-4" />}
|
||||
onClick={() => {}}
|
||||
variant="blue"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{selectedOs === 'linux' && (
|
||||
<div className="pt-10 border-t border-gray-100 dark:border-gray-700 space-y-6">
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user