Skip to content

Commit b1dbcab

Browse files
committed
v2.4 (Tutorial added & translations)
1 parent 62710d3 commit b1dbcab

File tree

11 files changed

+208
-50
lines changed

11 files changed

+208
-50
lines changed

Taskfile.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,13 @@ tasks:
1414
- wails build -platform=linux/amd64,linux/arm64
1515
desc: Build the application for Linux
1616
build-wasm-front-linux:
17+
dir: frontend/static/wasm
1718
cmds:
18-
- cd frontend
19-
- cd static
20-
- cd wasm
2119
- GOOS=js GOARCH=wasm go build -o signal.wasm
2220
desc: Build the frontend wasm for Linux
2321
build-wasm-front-win:
22+
dir: frontend/static/wasm
2423
cmds:
25-
- cd frontend
26-
- cd static
27-
- cd wasm
2824
- powershell.exe -Command { $env:GOOS="js";$env:GOARCH="wasm"; go build -o signal.wasm }
2925
desc: Build the frontend wasm for Windows
3026
dev-all:
@@ -33,12 +29,12 @@ tasks:
3329
desc: Run the application in development mode
3430

3531
dev-front:
32+
dir: frontend
3633
cmds:
37-
- cd frontend
3834
- pnpm run dev
3935
desc: Run the frontend in development mode
4036
test:
37+
dir: frontend
4138
cmds:
42-
- cd frontend
4339
- pnpm run test
4440
desc: Run the frontend tests

frontend/src/lib/i18n/en.json

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"stun-servers-title": "STUN Servers",
1212
"server-list-link": "Server List",
1313
"add": "Add",
14-
"get-your-host-code": "Get your host code",
14+
"get-your-host-code": "Get your client code",
1515
"connect-to-client": "Connect to Client",
1616
"paste-here-code": "Paste here code",
1717
"start-streaming": "Start Streaming",
@@ -62,5 +62,21 @@
6262
"connection-established-successfully": "Connection established successfully",
6363
"tutorial_btn": "Tutorial",
6464
"tutorial_language_title": "Choose a language",
65-
"tutorial_language_description": "There are different languages available"
65+
"tutorial_language_description": "There are different languages available",
66+
"tutorial_config_title": "Go to config",
67+
"tutorial_config_description": "You can normally do it by clicking on the button",
68+
"tutorial_stun_title": "See the STUN servers",
69+
"tutorial_stun_description": "STUN servers are important to stablish connections",
70+
"tutorial_group_server_title": "Edit your STUN config",
71+
"tutorial_group_server_description": "You can add more or edit/remove the existing servers",
72+
"tutorial_go_back_title": "Go back",
73+
"tutorial_go_back_description": "Let's go back to the previous menu",
74+
"tutorial_turn_title": "Here are the TURN servers",
75+
"tutorial_turn_description": "The TURN servers are important if you want to stablish connections behind stricts firewalls or using mobile internet",
76+
"tutorial_done_text": "Done",
77+
"tutorial_next_text": "Next",
78+
"tutorial_prev_text": "Previous",
79+
"tutorial_play_title": "You are ready to play",
80+
"tutorial_play_description": "Now select your prefered mode to play (in web there is only one) and follow the instructions inside",
81+
"share-the-code-with-your-client": "Share the code with your client"
6682
}

frontend/src/lib/i18n/es.json

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"stun-servers-title": "Servidores STUN",
1212
"server-list-link": "Lista de servidores",
1313
"add": "Añadir",
14-
"get-your-host-code": "Obtén tu código de anfitrión",
14+
"get-your-host-code": "Obtén el código de tu cliente",
1515
"connect-to-client": "Conectar con el cliente",
1616
"paste-here-code": "Pegue el código aquí",
1717
"start-streaming": "Empezar retransmisión",
@@ -62,5 +62,21 @@
6262
"connection-established-successfully": "Conexión satisfactoria",
6363
"tutorial_btn": "Tutorial",
6464
"tutorial_language_title": "Escoge un idioma",
65-
"tutorial_language_description": "Tienes disponibles idiomas a tu elección"
65+
"tutorial_language_description": "Tienes disponibles idiomas a tu elección",
66+
"tutorial_config_title": "Ve a la configuración",
67+
"tutorial_config_description": "Normalmente puedes hacerlo haciendo clic en el botón",
68+
"tutorial_stun_title": "Mira los servidores STUN",
69+
"tutorial_stun_description": "Los servidores STUN son importantes para establecer conexiones.",
70+
"tutorial_group_server_title": "Edita tu configuración STUN",
71+
"tutorial_group_server_description": "Puede agregar más o editar/eliminar los servidores existentes",
72+
"tutorial_go_back_title": "Vuelve atrás",
73+
"tutorial_go_back_description": "Volvamos al menú anterior.",
74+
"tutorial_turn_title": "Aquí están los servidores TURN",
75+
"tutorial_turn_description": "Los servidores TURN son importantes si desea establecer conexiones detrás de estrictos cortafuegos o utilizando Internet móvil.",
76+
"tutorial_done_text": "Terminar",
77+
"tutorial_next_text": "Siguiente",
78+
"tutorial_prev_text": "Anterior",
79+
"tutorial_play_title": "Estas listo para jugar",
80+
"tutorial_play_description": "Ahora selecciona tu modo preferido para jugar (en la web solo hay uno) y sigue las instrucciones que aparecen dentro",
81+
"share-the-code-with-your-client": "Comparte el código con tu cliente."
6682
}

frontend/src/lib/i18n/gl.json

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"stun-servers-title": "Servidores STUN",
1212
"server-list-link": "Listaxe de servidores",
1313
"add": "Engadir",
14-
"get-your-host-code": "Obtén o teu código de anfitrión",
14+
"get-your-host-code": "Obtén o código do teu cliente",
1515
"connect-to-client": "Conectar co cliente",
1616
"paste-here-code": "Pegue o código aquí",
1717
"start-streaming": "Comezar retransmisión",
@@ -62,5 +62,21 @@
6262
"connection-established-successfully": "Conexión satisfactoria",
6363
"tutorial_btn": "Titorial",
6464
"tutorial_language_description": "Tes disponíbeis idiomas a tua elección",
65-
"tutorial_language_title": "Escolle un idioma"
65+
"tutorial_language_title": "Escolle un idioma",
66+
"tutorial_config_title": "Vai á configuración",
67+
"tutorial_config_description": "Normalmente pode facelo facendo clic no botón",
68+
"tutorial_stun_title": "Consulta os servidores STUN",
69+
"tutorial_stun_description": "Os servidores STUN son importantes para establecer conexións",
70+
"tutorial_group_server_title": "Edita a túa configuración de STUN",
71+
"tutorial_group_server_description": "Podes engadir máis ou editar/eliminar os servidores existentes",
72+
"tutorial_go_back_title": "Volve atrás",
73+
"tutorial_go_back_description": "Volvamos ao menú anterior",
74+
"tutorial_turn_title": "Aquí están os servidores TURN",
75+
"tutorial_turn_description": "Os servidores TURN son importantes se queres establecer conexións detrás de cortalumes estritos ou usar internet móbil",
76+
"tutorial_done_text": "Rematar",
77+
"tutorial_next_text": "Seguinte",
78+
"tutorial_prev_text": "Anterior",
79+
"tutorial_play_title": "Estás listo para xogar",
80+
"tutorial_play_description": "Agora selecciona o teu modo preferido para xogar (na web só hai un) e sigue as instrucións que hai dentro",
81+
"share-the-code-with-your-client": "Comparte o código co teu cliente"
6682
}

frontend/src/lib/i18n/ru.json

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"error-stopping-streaming": "Ошибка остановки потоковой передачи",
3232
"first-step": "Первый шаг",
3333
"get-the-code-from-your-host": "Получите код от вашего хостера",
34-
"get-your-host-code": "Получите код хоста",
34+
"get-your-host-code": "Получите ваш клиентский код",
3535
"host-code-copied-to-clipboard": "Код хоста скопирован в буфер обмена.",
3636
"host_card_cta": "Запустить хост",
3737
"host_card_description": "Делитесь своей игрой с клиентами и транслируйте ее в потоковом режиме",
@@ -62,5 +62,21 @@
6262
"unknown-connection-state": "Неизвестное состояние соединения",
6363
"username": "Имя пользователя",
6464
"waiting-for-client-to-connect": "Ожидание подключения клиента",
65-
"you-are-now-disconnected": "Вы сейчас отключены"
65+
"you-are-now-disconnected": "Вы сейчас отключены",
66+
"tutorial_config_title": "Перейти к конфигурации",
67+
"tutorial_config_description": "Обычно это можно сделать, нажав кнопку",
68+
"tutorial_stun_title": "Посмотрите STUN-серверы",
69+
"tutorial_stun_description": "Серверы STUN важны для установления соединений.",
70+
"tutorial_group_server_title": "Отредактируйте конфигурацию STUN",
71+
"tutorial_group_server_description": "Вы можете добавить больше или отредактировать/удалить существующие серверы.",
72+
"tutorial_go_back_title": "Возвращаться",
73+
"tutorial_go_back_description": "Вернёмся в предыдущее меню",
74+
"tutorial_turn_title": "Вот серверы TURN",
75+
"tutorial_turn_description": "Серверы TURN важны, если вы хотите установить соединения за строгими брандмауэрами или использовать мобильный Интернет.",
76+
"tutorial_done_text": "Сделанный",
77+
"tutorial_next_text": "Следующий",
78+
"tutorial_prev_text": "Предыдущий",
79+
"tutorial_play_title": "Вы готовы играть",
80+
"tutorial_play_description": "Теперь выберите предпочитаемый режим игры (в сети он только один) и следуйте инструкциям внутри.",
81+
"share-the-code-with-your-client": "Поделитесь кодом с вашим клиентом"
6682
}

frontend/src/lib/layout/BackwardButton.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
</script>
1414

15-
<button on:click={handleClick} class="fixed top-28 md:right-28 right-20 p-3 rounded-full bg-white shadow-lg">
15+
<button id="tutorial-back-btn" on:click={handleClick} class="fixed top-28 md:right-28 right-20 p-3 rounded-full bg-white shadow-lg">
1616
<svg
1717
xmlns="http://www.w3.org/2000/svg"
1818
class="h-6 w-6"

frontend/src/lib/tutorial/driver.ts

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { goto } from '$app/navigation';
22
import { driver } from 'driver.js';
3-
import type { Driver } from 'driver.js';
3+
import type { Driver, DriveStep } from 'driver.js';
44
import 'driver.js/dist/driver.css';
55
import { _ } from 'svelte-i18n';
66
import { get } from 'svelte/store';
@@ -20,10 +20,13 @@ export function StartTutorial(selectedStep: number = 0) {
2020
animate: true,
2121
smoothScroll: true,
2222
stagePadding: 1,
23-
stageRadius: 1
23+
stageRadius: 1,
24+
doneBtnText: get(_)('tutorial_done_text'),
25+
nextBtnText: get(_)('tutorial_next_text'),
26+
prevBtnText: get(_)('tutorial_prev_text')
2427
});
2528

26-
const driverSteps = [
29+
const driverSteps: DriveStep[] = [
2730
{
2831
element: '#tutorial-config-btn',
2932
popover: {
@@ -69,11 +72,64 @@ export function StartTutorial(selectedStep: number = 0) {
6972
goto('/mode/config');
7073
goPrevTutorial();
7174
},
75+
onNextClick: () => {
76+
goNextTutorial();
77+
}
78+
}
79+
},
80+
{
81+
element: '#tutorial-back-btn',
82+
popover: {
83+
title: get(_)('tutorial_go_back_title'),
84+
description: get(_)('tutorial_go_back_description'),
85+
onPrevClick: () => {
86+
goPrevTutorial();
87+
},
7288
onNextClick: () => {
7389
goto('/mode/config');
7490
goNextTutorial();
7591
}
7692
}
93+
},
94+
{
95+
element: '#tutorial-turn-card',
96+
popover: {
97+
title: get(_)('tutorial_turn_title'),
98+
description: get(_)('tutorial_turn_description'),
99+
onPrevClick: () => {
100+
goto('/mode/config/advanced/stun');
101+
goPrevTutorial();
102+
},
103+
onNextClick: () => {
104+
goNextTutorial();
105+
}
106+
}
107+
},
108+
{
109+
element: '#tutorial-back-btn',
110+
popover: {
111+
title: get(_)('tutorial_go_back_title'),
112+
description: get(_)('tutorial_go_back_description'),
113+
onPrevClick: () => {
114+
goPrevTutorial();
115+
},
116+
onNextClick: () => {
117+
goto('/');
118+
goNextTutorial();
119+
}
120+
}
121+
},
122+
{
123+
element: '#tutorial-play',
124+
popover: {
125+
title: get(_)('tutorial_play_title'),
126+
description: get(_)('tutorial_play_description'),
127+
onPrevClick: () => {
128+
goto("/mode/config")
129+
goPrevTutorial();
130+
},
131+
}
132+
77133
}
78134
];
79135

frontend/src/routes/+layout.svelte

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
99
import GamepadSVG from '$lib/assets/gamepad.svg?raw';
1010
import Loading from '$lib/loading/Loading.svelte';
11-
import onwebsite from '$lib/detection/onwebsite';
1211
</script>
1312

1413
<svelte:head>
@@ -19,22 +18,11 @@
1918
<nav class="navbar bg-primary text-primary-content">
2019
<div class="flex-1">
2120
<h1>
22-
{#if onwebsite}
23-
<a
24-
href="https://remote-controller.vercel.app/"
25-
class="btn btn-ghost normal-case text-xl items-start content-center"
26-
>
27-
{@html GamepadSVG}
28-
29-
<div class="hidden md:block">Remote Controller</div>
30-
</a>
31-
{:else}
3221
<a href="/" class="btn btn-ghost normal-case text-xl items-start content-center">
3322
{@html GamepadSVG}
3423

3524
<div class="hidden md:block">Remote Controller</div>
3625
</a>
37-
{/if}
3826
</h1>
3927
</div>
4028
<div class="flex-none">

frontend/src/routes/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
>{$_('main_title_role')}</span
2828
>
2929
</h2>
30-
<div class="flex gap-4 mt-4 md:flex-row flex-col">
30+
<div id="tutorial-play" class="flex gap-4 mt-4 md:flex-row flex-col">
3131
{#if !onwebsite}
3232
<div
3333
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"

frontend/src/routes/mode/config/TurnServers.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
</script>
44

55
<section
6+
id="tutorial-turn-card"
67
class="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"
78
>
89
<form class="max-w-lg mx-auto space-y-6" method="get" action="/mode/config/advanced/turn">

0 commit comments

Comments
 (0)