-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTutorial.tsx
More file actions
120 lines (114 loc) · 4.8 KB
/
Tutorial.tsx
File metadata and controls
120 lines (114 loc) · 4.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import React from 'react';
import { ArrowLeft, BookOpen, User, Settings, Info, Menu, Star, Bell, BarChart2, Coins, Search } from 'lucide-react';
import { GlassCard } from './GlassCard';
import { useLanguage } from '../hooks/useLanguage';
interface TutorialProps {
onBack: () => void;
}
export const Tutorial: React.FC<TutorialProps> = ({ onBack }) => {
const { currentLanguage } = useLanguage();
const content = {
en: {
title: "How to use the app",
sections: [
{
title: "Navigation",
items: [
{ icon: BookOpen, text: "Articles - Read and save interesting articles" },
{ icon: User, text: "Profile - View your Telegram profile" },
{ icon: Settings, text: "Settings - Customize app appearance and language" },
{ icon: Info, text: "About - App information and updates" },
{ icon: Menu, text: "Menu - Access additional features" }
]
},
{
title: "Menu Features",
items: [
{ icon: Star, text: "Favorites - Access your saved articles" },
{ icon: Bell, text: "Notifications - Manage notification settings" },
{ icon: BarChart2, text: "Statistics - View your reading statistics" },
{ icon: Coins, text: "Cryptocurrencies - Track crypto prices" }
]
},
{
title: "Article Features",
items: [
{ icon: Star, text: "Save articles to favorites" },
{ icon: Search, text: "Search through articles and cryptocurrencies" },
{ icon: Bell, text: "Get notified about new articles" }
]
}
]
},
ru: {
title: "Как пользоваться приложением",
sections: [
{
title: "Навигация",
items: [
{ icon: BookOpen, text: "Статьи - Читайте и сохраняйте интересные статьи" },
{ icon: User, text: "Профиль - Просмотр вашего профиля Telegram" },
{ icon: Settings, text: "Настройки - Настройка внешнего вида и языка" },
{ icon: Info, text: "О приложении - Информация и обновления" },
{ icon: Menu, text: "Меню - Доступ к дополнительным функциям" }
]
},
{
title: "Функции меню",
items: [
{ icon: Star, text: "Избранное - Доступ к сохранённым статьям" },
{ icon: Bell, text: "Уведомления - Управление настройками уведомлений" },
{ icon: BarChart2, text: "Статистика - Просмотр статистики чтения" },
{ icon: Coins, text: "Криптовалюты - Отслеживание курсов криптовалют" }
]
},
{
title: "Функции статей",
items: [
{ icon: Star, text: "Сохраняйте статьи в избранное" },
{ icon: Search, text: "Поиск по статьям и криптовалютам" },
{ icon: Bell, text: "Получайте уведомления о новых статьях" }
]
}
]
}
};
const { title, sections } = content[currentLanguage] || content.en;
return (
<div className="min-h-screen p-4 pb-24">
<div className="sticky top-0 z-50 bg-black/80 backdrop-blur-lg -mx-4 px-4 py-3 mb-6">
<div className="flex items-center space-x-4">
<button
onClick={onBack}
className="p-2 rounded-full hover:bg-white/5 transition-colors"
>
<ArrowLeft className="text-white" size={24} />
</button>
<h2 className="text-2xl font-bold">{title}</h2>
</div>
</div>
<div className="max-w-2xl mx-auto space-y-8">
{sections.map((section, index) => (
<div key={index}>
<h3 className="text-xl font-semibold mb-4">{section.title}</h3>
<div className="space-y-4">
{section.items.map((item, itemIndex) => {
const Icon = item.icon;
return (
<GlassCard key={itemIndex} variant="settings" className="p-4">
<div className="flex items-center space-x-4">
<div className="p-2 bg-white/5 rounded-xl">
<Icon className="w-5 h-5" />
</div>
<p className="text-sm">{item.text}</p>
</div>
</GlassCard>
);
})}
</div>
</div>
))}
</div>
</div>
);
};