File size: 10,006 Bytes
73d203f
08ec4c0
73d203f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
08ec4c0
 
 
73d203f
 
 
 
 
 
 
 
 
08ec4c0
73d203f
 
 
 
 
 
 
08ec4c0
73d203f
 
 
 
 
 
 
 
 
 
 
 
 
08ec4c0
73d203f
 
 
 
 
 
 
08ec4c0
73d203f
 
 
 
 
 
 
08ec4c0
73d203f
 
 
 
 
 
08ec4c0
 
73d203f
 
 
 
 
 
08ec4c0
73d203f
 
 
 
 
 
 
d324dde
 
 
 
 
 
 
 
08ec4c0
73d203f
 
 
 
 
 
 
 
 
 
 
 
 
08ec4c0
73d203f
08ec4c0
73d203f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
08ec4c0
 
 
73d203f
 
 
08ec4c0
73d203f
 
 
08ec4c0
 
 
 
 
73d203f
08ec4c0
73d203f
 
 
08ec4c0
 
73d203f
 
08ec4c0
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!doctype html>
<html lang="fr">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>
            {% block title %}Administration{% endblock %} - {{ app_name }}
        </title>
        <script src="https://cdn.tailwindcss.com"></script>
        <link
            rel="stylesheet"
            href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
        />
        <style>
            body {
                font-family:
                    "Inter",
                    system-ui,
                    -apple-system,
                    sans-serif;
            }
            .sidebar-link {
                transition: all 0.2s ease;
            }
            .sidebar-link:hover {
                background-color: rgba(234, 179, 8, 0.1);
                border-left-color: #eab308;
            }
            .sidebar-link.active {
                background-color: rgba(234, 179, 8, 0.15);
                border-left-color: #eab308;
                color: #eab308;
            }
        </style>
    </head>
    <body class="bg-gray-900 text-gray-100 min-h-screen">
        <div class="flex min-h-screen">
            <!-- Sidebar -->
            <aside
                class="w-64 bg-gray-800 border-r border-gray-700 fixed h-full"
            >
                <!-- Logo/Brand -->
                <div class="p-6 border-b border-gray-700">
                    <div class="flex items-center space-x-3">
                        {% if app_logo %}
                        <img
                            src="{{ app_logo }}"
                            alt="{{ app_name }}"
                            class="w-10 h-10 rounded-lg"
                        />
                        {% else %}
                        <div
                            class="w-10 h-10 bg-gradient-to-br from-yellow-400 to-yellow-600 rounded-lg flex items-center justify-center"
                        >
                            <i class="fas fa-cog text-white text-lg"></i>
                        </div>
                        {% endif %}
                        <div>
                            <h1 class="text-lg font-bold text-yellow-400">
                                {{ app_name }}
                            </h1>
                            <p class="text-xs text-gray-400">Administration</p>
                        </div>
                    </div>
                </div>

                <!-- Navigation -->
                <nav class="p-4 space-y-2">
                    <a
                        href="{{ url_for('admin_panel.dashboard') }}"
                        class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if request.endpoint == 'admin_panel.dashboard' %}active{% endif %}"
                    >
                        <i class="fas fa-tachometer-alt w-5 mr-3"></i>
                        Tableau de Bord
                    </a>

                    <a
                        href="{{ url_for('admin_panel.users') }}"
                        class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if 'users' in request.endpoint or 'user_detail' in request.endpoint %}active{% endif %}"
                    >
                        <i class="fas fa-users w-5 mr-3"></i>
                        Utilisateurs
                    </a>

                    <a
                        href="{{ url_for('admin_panel.withdrawals') }}"
                        class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if 'withdrawal' in request.endpoint %}active{% endif %}"
                    >
                        <i class="fas fa-money-bill-wave w-5 mr-3"></i>
                        Retraits {% if pending_withdrawals_count is defined and
                        pending_withdrawals_count > 0 %}
                        <span
                            class="ml-auto bg-red-500 text-white text-xs font-bold px-2 py-1 rounded-full"
                            >{{ pending_withdrawals_count }}</span
                        >
                        {% endif %}
                    </a>

                    <a
                        href="{{ url_for('admin_panel.transactions') }}"
                        class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if request.endpoint == 'admin_panel.transactions' %}active{% endif %}"
                    >
                        <i class="fas fa-exchange-alt w-5 mr-3"></i>
                        Transactions
                    </a>

                    <a
                        href="{{ url_for('admin_panel.referral_commissions') }}"
                        class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if 'referral_commissions' in request.endpoint %}active{% endif %}"
                    >
                        <i class="fas fa-share-nodes w-5 mr-3"></i>
                        Commissions Parrainage
                    </a>

                    <a
                        href="{{ url_for('admin_panel.metals') }}"
                        class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if 'metals' in request.endpoint %}active{% endif %}"
                    >
                        <i class="fas fa-gem w-5 mr-3"></i>
                        Plans / Métaux
                    </a>

                    <div class="pt-4 mt-4 border-t border-gray-700">
                        <p
                            class="px-4 text-xs text-gray-500 uppercase tracking-wider mb-2"
                        >
                            Configuration
                        </p>

                        <a
                            href="{{ url_for('admin_panel.settings') }}"
                            class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if 'settings' in request.endpoint %}active{% endif %}"
                        >
                            <i class="fas fa-sliders-h w-5 mr-3"></i>
                            Paramètres Généraux
                        </a>

                        <a
                            href="{{ url_for('admin_tasks.list_tasks') }}"
                            class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if 'tasks' in request.endpoint %}active{% endif %}"
                        >
                            <i class="fas fa-clock w-5 mr-3"></i>
                            Tâches Planifiées
                        </a>
                    </div>
                </nav>

                <!-- Footer -->
                <div
                    class="absolute bottom-0 left-0 right-0 p-4 border-t border-gray-700"
                >
                    <a
                        href="{{ url_for('main.index') }}"
                        class="flex items-center px-4 py-2 text-gray-400 hover:text-yellow-400 transition-colors"
                    >
                        <i class="fas fa-arrow-left w-5 mr-3"></i>
                        Retour au Site
                    </a>
                </div>
            </aside>

            <!-- Main Content -->
            <div class="flex-1 ml-64">
                <!-- Top Header -->
                <header
                    class="bg-gray-800 border-b border-gray-700 px-8 py-4 sticky top-0 z-10"
                >
                    <div class="flex items-center justify-between">
                        <h2 class="text-xl font-semibold text-white">
                            {% block page_title %}Administration{% endblock %}
                        </h2>
                        <div class="flex items-center space-x-4">
                            <span class="text-sm text-gray-400">
                                <i
                                    class="fas fa-shield-alt mr-2 text-green-400"
                                ></i>
                                Accès Administration
                            </span>
                        </div>
                    </div>
                </header>

                <!-- Flash Messages -->
                {% with messages = get_flashed_messages(with_categories=true) %}
                {% if messages %}
                <div class="px-8 pt-4">
                    {% for category, message in messages %}
                    <div
                        class="mb-4 p-4 rounded-lg {% if category == 'error' %}bg-red-900/50 border border-red-600 text-red-200{% elif category == 'success' %}bg-green-900/50 border border-green-600 text-green-200{% elif category == 'warning' %}bg-yellow-900/50 border border-yellow-600 text-yellow-200{% else %}bg-blue-900/50 border border-blue-600 text-blue-200{% endif %}"
                    >
                        <div class="flex items-center">
                            <i
                                class="fas {% if category == 'error' %}fa-exclamation-circle{% elif category == 'success' %}fa-check-circle{% elif category == 'warning' %}fa-exclamation-triangle{% else %}fa-info-circle{% endif %} mr-3"
                            ></i>
                            {{ message }}
                        </div>
                    </div>
                    {% endfor %}
                </div>
                {% endif %} {% endwith %}

                <!-- Page Content -->
                <main class="p-8">{% block content %}{% endblock %}</main>
            </div>
        </div>

        {% block scripts %}{% endblock %}
    </body>
</html>