| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- 'use client';
- import { FileText, LifeBuoy, MessageSquare, Settings, LucideIcon, Mail } from 'lucide-react';
- import { useLanguage } from '@/lib/i18n/LanguageContext';
- const TelegramIcon = ({ className }: { className?: string }) => (
- <svg viewBox="0 0 24 24" fill="currentColor" className={className}>
- <path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 11.944 0zm4.925 8.531l-1.97 9.28c-.145.658-.537.818-1.084.508l-3-2.21-1.446 1.394c-.16.16-.295.295-.605.295l.213-3.054 5.56-5.022c.242-.213-.054-.333-.373-.121l-6.869 4.326-2.96-.924c-.643-.204-.657-.643.136-.953l11.57-4.458c.535-.196 1.006.128.832.941z"/>
- </svg>
- );
- const WhatsAppIcon = ({ className }: { className?: string }) => (
- <svg viewBox="0 0 24 24" fill="currentColor" className={className}>
- <path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.008-.57-.008-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 0 0-3.48-8.413z"/>
- </svg>
- );
- interface SidebarProps {
- activeTab: string;
- setActiveTab: (tab: string) => void;
- }
- interface MenuItem {
- id: string;
- label: string;
- icon: LucideIcon;
- }
- export default function Sidebar({ activeTab, setActiveTab }: SidebarProps) {
- const { t } = useLanguage();
-
- const TELEGRAM_USERNAME = "STRATA Support";
- const TELEGRAM_NUMBER = "+8617386033451";
- const WHATSAPP_NUMBER = "8617386033451";
- const menuItems: MenuItem[] = [
- { id: 'orders', label: t('sidebar.orders'), icon: FileText },
- { id: 'tickets', label: t('sidebar.tickets'), icon: LifeBuoy },
- { id: 'settings', label: t('sidebar.settings'), icon: Settings },
- ];
- return (
- <div className="space-y-4 font-mono">
- {/* 导航菜单实体按键组 */}
- <div className="space-y-2 select-none">
- {menuItems.map((item) => {
- const Icon = item.icon;
- const isActive = activeTab === item.id;
- return (
- <button
- key={item.id}
- onClick={() => setActiveTab(item.id)}
- className={`w-full flex items-center gap-2.5 px-4 py-3 border-2 border-black text-xs font-black uppercase transition active:translate-x-0.5 active:translate-y-0.5 active:shadow-none
- ${isActive
- ? 'bg-amber-300 text-black shadow-[4px_4px_0px_#000]'
- : 'bg-white text-neutral-800 shadow-[2px_2px_0px_#000] hover:bg-neutral-50'
- }`}
- >
- <Icon size={16} className="text-black shrink-0" />
- <span>[ {item.label} ]</span>
- </button>
- );
- })}
- </div>
- {/* 复古客服支持档案卡 */}
- <div className="bg-neutral-50 border-2 border-black p-4 shadow-[4px_4px_0px_#000] space-y-3">
- <div className="border-b-2 border-black pb-2 flex items-center justify-between text-xs font-black uppercase text-black">
- <span className="flex items-center gap-1.5">
- <MessageSquare size={14} className="text-black" />
- <span>[ {t('sidebar.contact_support')} ]</span>
- </span>
- <span className="text-[10px] bg-neutral-200 px-1 border border-black">24/7</span>
- </div>
-
- <p className="text-[11px] text-neutral-600 font-sans leading-relaxed">
- {t('sidebar.contact_desc')}
- </p>
-
- {/* 联系方式列表 */}
- <ul className="text-xs text-neutral-800 space-y-2 font-mono">
-
- {/* Email */}
- <li className="flex items-center gap-2 bg-white border border-black p-1.5 shadow-[1px_1px_0px_#000]">
- <Mail size={12} className="text-black shrink-0" />
- <a href="mailto:support@text.skin" className="hover:underline truncate text-[11px]">
- support@text.skin
- </a>
- </li>
- {/* Telegram */}
- <li className="flex items-center gap-2 bg-white border border-black p-1.5 shadow-[1px_1px_0px_#000]">
- <TelegramIcon className="w-3 h-3 text-black shrink-0" />
- <a
- href={`https://t.me/${TELEGRAM_NUMBER}`}
- target="_blank"
- rel="noopener noreferrer"
- className="hover:underline truncate text-[11px]"
- >
- @{TELEGRAM_USERNAME}
- </a>
- </li>
- {/* WhatsApp */}
- <li className="flex items-center gap-2 bg-white border border-black p-1.5 shadow-[1px_1px_0px_#000]">
- <WhatsAppIcon className="w-3 h-3 text-black shrink-0" />
- <a
- href={`https://wa.me/${WHATSAPP_NUMBER}`}
- target="_blank"
- rel="noopener noreferrer"
- className="hover:underline truncate text-[11px]"
- >
- WhatsApp
- </a>
- </li>
- </ul>
- </div>
- </div>
- );
- }
|