Skip to content

Commit c91dc91

Browse files
committed
Migrating frontend to dark-mode as website (not completed)
1 parent 6ebae5a commit c91dc91

File tree

14 files changed

+55
-65
lines changed

14 files changed

+55
-65
lines changed

frontend/src/app.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
@tailwind base;
22
@tailwind components;
3-
@tailwind utilities;
3+
@tailwind utilities;
4+
5+
body {
6+
@apply bg-gray-900
7+
}

frontend/src/lib/i18n/LanguageSelector.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
<section
1515
id="tutorial-language"
1616
class="
17-
min-w-full p-4 bg-white border border-gray-200 rounded-lg shadow sm:p-6 md:p-8 dark:bg-gray-800 dark:border-gray-700"
17+
min-w-full p-4 bg-white border border-gray-200 rounded-lg shadow sm:p-6 md:p-8"
1818
>
19-
<label for="helper-text" class="text-xl font-medium text-gray-900 dark:text-white"
19+
<label for="helper-text" class="text-xl font-medium text-gray-900"
2020
>{$_('language-selector-title')}</label
2121
>
2222

frontend/src/lib/layout/icons/DeleteIcon.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
stroke-width="2"
99
stroke-linecap="round"
1010
stroke-linejoin="round"
11-
class="hover:stroke-red-500 hover:scale-110 transition-transform dark:stroke-white stroke-gray-900"
11+
class="hover:stroke-red-500 hover:scale-110 transition-transform stroke-gray-900"
1212
><circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg
1313
>

frontend/src/lib/layout/icons/PencilIcon.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
stroke-width="2"
99
stroke-linecap="round"
1010
stroke-linejoin="round"
11-
class="lucide lucide-pencil dark:stroke-white stroke-gray-900"
11+
class="lucide lucide-pencil stroke-gray-900"
1212
><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" /><path d="m15 5 4 4" /></svg
1313
>

frontend/src/lib/layout/icons/TrashIcon.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
stroke-width="2"
99
stroke-linecap="round"
1010
stroke-linejoin="round"
11-
class="hover:stroke-red-500 hover:scale-110 transition-transform dark:stroke-white stroke-gray-900"
11+
class="hover:stroke-red-500 hover:scale-110 transition-transform stroke-gray-900"
1212
><path d="M3 6h18" /><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" /><path
1313
d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"
1414
/><line x1="10" x2="10" y1="11" y2="17" /><line x1="14" x2="14" y1="11" y2="17" /></svg

frontend/src/lib/webrtc/ICEServerManager.svelte

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,12 @@
102102
let newserverToAdd: string | undefined = $state();
103103
</script>
104104

105-
<h2 class="text-center text-[clamp(2rem,6vw,4.2rem)] font-black leading-[1.1] xl:text-left">
106-
<span
107-
class="[&amp;::selection]:text-base-content text-transparent relative col-start-1 row-start-1 bg-clip-text bg-gradient-to-r from-blue-700 via-blue-800 to-gray-900"
108-
>
109-
{#if type === 'stun'}
110-
{$_('stun-servers-title')}
111-
{:else}
112-
{$_('turn-servers-title')}
113-
{/if}
114-
</span>
105+
<h2 class="text-center text-primary text-[clamp(2rem,6vw,4.2rem)] font-black leading-[1.1] xl:text-left">
106+
{#if type === 'stun'}
107+
{$_('stun-servers-title')}
108+
{:else}
109+
{$_('turn-servers-title')}
110+
{/if}
115111
</h2>
116112

117113
<section>
@@ -137,15 +133,15 @@
137133
e.preventDefault()
138134
groupToCreate = '';
139135
}}
140-
class="flex flex-col gap-4 items-center justify-center sm:w-[30vw] w-[75vw] p-4 my-4 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700"
136+
class="flex flex-col gap-4 items-center justify-center sm:w-[30vw] w-[75vw] p-4 my-4 bg-white border border-gray-200 rounded-lg shadow"
141137
>
142-
<label for="group" class="block mb-2 font-medium text-gray-900 dark:text-white"
138+
<label for="group" class="block mb-2 font-medium text-gray-900"
143139
>{$_('create_group')}</label
144140
>
145141
<input
146142
type="text"
147143
id="group"
148-
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
144+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5"
149145
placeholder="Group"
150146
required
151147
bind:value={groupToCreate}
@@ -164,7 +160,7 @@
164160
</p>
165161
{/if}
166162
{#each Object.keys($servers) as server_group, i}
167-
<li class="w-[75vw] p-4 my-4 border rounded-lg shadow sm:p-6 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700">
163+
<li class="w-[75vw] p-4 my-4 border rounded-lg shadow sm:p-6 bg-white border-gray-200">
168164
<div class="flex justify-end h-0 mb-4 lg:mb-1">
169165
<button
170166
type="button"
@@ -187,7 +183,7 @@
187183
</button>
188184

189185
<h4
190-
class="w-11/12 text-lg font-medium text-gray-900 dark:text-white mb-2 focus"
186+
class="w-11/12 text-lg font-medium text-gray-900 mb-2 focus"
191187
contenteditable="false"
192188
id="group-{server_group}-{i}"
193189
oninput={(e) =>
@@ -205,13 +201,13 @@
205201
newserverToAdd = '';
206202
}}
207203
>
208-
<label for="domain" class="block mb-2 text-sm font-medium text-gray-400 dark:text-white"
204+
<label for="domain" class="block mb-2 text-sm font-medium text-gray-600"
209205
>{$_('new_server')}</label
210206
>
211207
<input
212208
type="text"
213209
id="domain"
214-
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg mb-2 focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
210+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg mb-2 focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5"
215211
placeholder="domain:port // ip:port"
216212
required
217213
bind:value={newserverToAdd}
@@ -240,7 +236,7 @@
240236
<li class="pb-3 sm:pb-4">
241237
<div class="flex items-center space-x-4 rtl:space-x-reverse">
242238
<div class="flex-1 min-w-0">
243-
<p class="text-lg truncate text-gray-400 dark:text-white">
239+
<p class="text-lg truncate text-gray-400">
244240
{#if type === 'stun'}
245241
{server.split('stun:')[1]}
246242
{:else}
@@ -250,7 +246,7 @@
250246
</div>
251247
<button
252248
onclick={() => removeServerFromGroup(server_group, server)}
253-
class="h-5 w-5 mx-10 text-gray-400 cursor-pointer"
249+
class="h-5 w-5 mx-10 text-gray-600 cursor-pointer"
254250
>
255251
<TrashIcon />
256252
</button>
@@ -263,13 +259,13 @@
263259
<form action="">
264260
<label
265261
for="user-{i}"
266-
class="block mb-2 text-sm font-medium text-gray-400 dark:text-white"
262+
class="block mb-2 text-sm font-medium text-gray-600"
267263
>{$_('username')}</label
268264
>
269265
<input
270266
type="text"
271267
id="user-{i}"
272-
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
268+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5"
273269
placeholder="username"
274270
required
275271
value={$servers[server_group]?.username ?? ''}
@@ -278,14 +274,14 @@
278274

279275
<label
280276
for="password"
281-
class="block mb-2 text-sm font-medium text-gray-400 dark:text-white"
277+
class="block mb-2 text-sm font-medium text-gray-600"
282278
>{$_('password')}</label
283279
>
284280

285281
<input
286282
type="password"
287283
id="password"
288-
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
284+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5"
289285
placeholder="•••••••••"
290286
required
291287
value={$servers[server_group]?.credential ?? ''}

frontend/src/routes/+layout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
</Tooltip>
7272
7373
<PageTransition key={page.url.toString()} duration={750}>
74-
<div class="hero min-h-[calc(100vh-4rem)] bg-base-200">
74+
<div class="hero min-h-[calc(100vh-4rem)] bg-gray-900">
7575
<div class="hero-content flex-col">
7676
{@render children?.()}
7777
</div>

frontend/src/routes/+page.svelte

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,35 @@
1414
{$_('tutorial_btn')}
1515
</button>
1616

17-
<h2 class="text-center text-[clamp(2rem,6vw,4.2rem)] font-black leading-[1.1] xl:text-left">
17+
<h2 class="text-center text-white text-[clamp(2rem,6vw,4.2rem)] font-black leading-[1.1] xl:text-left">
1818
<span
19-
class="[&amp;::selection]:text-base-content text-transparent relative col-start-1 row-start-1 bg-clip-text bg-gradient-to-r from-blue-700 via-blue-800 to-gray-900"
19+
class="text-primary"
2020
>{$_('main_title_choose')}
2121
</span>
2222
{$_('main_title_your')}
23-
2423
<span
25-
class="[&amp;::selection]:text-base-content text-transparent relative col-start-1 row-start-1 bg-clip-text bg-gradient-to-r from-blue-700 via-blue-800 to-gray-900"
24+
class="text-primary"
2625
>{$_('main_title_role')}</span
2726
>
2827
</h2>
2928
<div id="tutorial-play" class="flex gap-4 mt-4 md:flex-row flex-col">
3029
{#if !onwebsite}
3130
<div
32-
class="card md:w-96 md:h-52 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700"
31+
class="card md:w-96 md:h-52 bg-white rounded-lg shadow border-gray-200 border"
3332
>
3433
<div class="card-body">
35-
<h2 class="card-title dark:text-white text-gray-800">{$_('host_card_title')}</h2>
36-
<p class="text-gray-400">{$_('host_card_description')}</p>
34+
<h2 class="card-title text-gray-800">{$_('host_card_title')}</h2>
35+
<p class="text-gray-600">{$_('host_card_description')}</p>
3736
<a href="/mode/host" class="btn btn-primary text-white">{$_('host_card_cta')}</a>
3837
</div>
3938
</div>
4039
{/if}
4140
<div
42-
class="card md:w-96 md:h-52 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700"
41+
class="card md:w-96 md:h-52 bg-white border border-gray-200 rounded-lg shadow"
4342
>
4443
<div class="card-body">
45-
<h2 class="card-title dark:text-white text-gray-800">{$_('client_card_title')}</h2>
46-
<p class="text-gray-400">{$_('client_card_description')}</p>
44+
<h2 class="card-title text-gray-800">{$_('client_card_title')}</h2>
45+
<p class="text-gray-600">{$_('client_card_description')}</p>
4746
<a href="/mode/client" class="btn btn-primary text-white">{$_('client_card_cta')}</a>
4847
</div>
4948
</div>

frontend/src/routes/mode/client/+page.svelte

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,8 @@
3636
}
3737
</script>
3838

39-
<h2 class="text-center text-[clamp(2rem,6vw,4.2rem)] font-black leading-[1.1] xl:text-left">
40-
<span
41-
class="[&amp;::selection]:text-base-content text-transparent relative col-start-1 row-start-1 bg-clip-text bg-gradient-to-r from-blue-700 via-blue-800 to-gray-900"
42-
>{$_('client_card_title')}
43-
</span>
39+
<h2 class="text-center text-primary text-[clamp(2rem,6vw,4.2rem)] font-black leading-[1.1] xl:text-left">
40+
{$_('client_card_title')}
4441
</h2>
4542

4643
<div

frontend/src/routes/mode/config/+page.svelte

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@
77
import TurnServers from './TurnServers.svelte';
88
</script>
99

10-
<h2 class="text-center text-[clamp(2rem,6vw,4.2rem)] font-black leading-[1.1] xl:text-left">
11-
<span
12-
class="[&amp;::selection]:text-base-content text-transparent relative col-start-1 row-start-1 bg-clip-text bg-gradient-to-r from-blue-700 via-blue-800 to-gray-900"
13-
>{$_('config_title')}
14-
</span>
10+
<h2 class="text-center text-primary text-[clamp(2rem,6vw,4.2rem)] font-black leading-[1.1] xl:text-left">
11+
{$_('config_title')}
1512
</h2>
1613

1714
<div class="grid gap-28 w-full md:grid-cols-3 py-12 xl:[&>*]:w-80 lg:[&>*]:w-72 md:[&>*]:w-60 [&>*]:w-72">

0 commit comments

Comments
 (0)