Skip to content

Commit

Permalink
Merge pull request #159 from henryk86/develop
Browse files Browse the repository at this point in the history
Some more features/improvements/updates
  • Loading branch information
SciLor authored Nov 2, 2024
2 parents 96b8844 + a20b958 commit 080a4ab
Show file tree
Hide file tree
Showing 101 changed files with 2,459 additions and 1,705 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ If none of the existing methods meet your needs, add the new request to `src/api
### Linking to other sites
If you need to link to another source / element / ..., please check if in the `constants.tsx` is already the url added. If so, use the variable instead. If not, think about to add it there as a varliable, maybe you need this url more than once, so if the url changes sometimes, you have only to adapt it once.
If you need to link to another source, element, or URL, please check if it is already defined in `constants.tsx`. If it is, use the existing variable instead of hardcoding the URL. If it isn’t, consider adding it as a variable in `constants.tsx` - you may need this URL more than once. Defining it as a variable ensures you only need to update it in one place if the URL changes in the future.
There are already the following sites added (selection):
The following URLs have already been defined (partial list):
- tonieboxDefaultImageUrl = "https://cdn.tonies.de/thumbnails/03-0009-i.png"
- telegramGroupUrl = "https://t.me/toniebox_reverse_engineering"
Expand Down Expand Up @@ -236,3 +236,9 @@ The **Open Toniebox Guide** (`src\components\tonieboxes\boxSetup\OpenBoxGuide.ts
Both guides were originally written and illustrated by [Tobias Isakeit](https://www.ifixit.com/User/828031/Tobias+Isakeit), who also created all the images used here.
Special thanks to Tobias for providing such clear and detailed instructions!
The icons used are from here:
- logo.png: https://www.flaticon.com/free-icon/dog_2829818
Thanks for the original authors for these great icons.
1,601 changes: 559 additions & 1,042 deletions package-lock.json

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
{
"name": "teddycloud-web",
"version": "0.6.2",
"version": "0.6.3",
"private": true,
"homepage": "/web",
"dependencies": {
"@ant-design/icons": "^5.4.0",
"@ant-design/icons": "^5.5.1",
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/sortable": "^8.0.0",
"@types/jest": "^29.5.12",
"@types/node": "^22.3.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/w3c-web-serial": "^1.0.6",
"@vitejs/plugin-react": "^4.3.1",
"antd": "^5.20.1",
"esptool-js": "^0.4.5",
"@types/jest": "^29.5.14",
"@types/node": "^22.8.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/w3c-web-serial": "^1.0.7",
"@vitejs/plugin-react": "^4.3.3",
"antd": "^5.21.5",
"esptool-js": "^0.4.7",
"formik": "^2.4.6",
"i18next": "^23.12.3",
"i18next": "^23.16.4",
"i18next-browser-languagedetector": "^8.0.0",
"i18next-http-backend": "^2.5.2",
"i18next-http-backend": "^2.6.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-i18next": "^15.0.1",
"react-router-dom": "^6.26.0",
"react-syntax-highlighter": "^15.5.0",
"styled-components": "^6.1.12",
"react-i18next": "^15.1.0",
"react-router-dom": "^6.27.0",
"react-syntax-highlighter": "^15.6.1",
"styled-components": "^6.1.13",
"typescript": "^4.9.5",
"vite": "^5.4.0",
"vite": "^5.4.10",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^5.0.1",
"yup": "^1.4.0"
},
"devDependencies": {
"@babel/plugin-transform-private-property-in-object": "^7.25.9",
"@types/react-syntax-highlighter": "^15.5.13",
"concurrently": "^8.2.2",
"cross-env": "^7.0.3"
},
"scripts": {
"start-http": "cross-env PORT=3000 vite",
"start-https": "cross-env HTTPS=true PORT=3443 vite",
Expand Down Expand Up @@ -59,11 +65,5 @@
"tabWidth": 4,
"printWidth": 120
},
"devDependencies": {
"@babel/plugin-transform-private-property-in-object": "^7.24.7",
"@types/react-syntax-highlighter": "^15.5.13",
"concurrently": "^8.2.2",
"cross-env": "^7.0.3"
},
"type": "module"
}
127 changes: 119 additions & 8 deletions public/translations/de.json

Large diffs are not rendered by default.

127 changes: 119 additions & 8 deletions public/translations/en.json

Large diffs are not rendered by default.

127 changes: 119 additions & 8 deletions public/translations/es.json

Large diffs are not rendered by default.

135 changes: 123 additions & 12 deletions public/translations/fr.json

Large diffs are not rendered by default.

61 changes: 32 additions & 29 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
import "./App.css";
import { Layout } from "antd";
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import { AudioProvider } from "./components/audio/AudioContext";
import { useEffect, useState } from "react";
import { Route, BrowserRouter as Router, Routes } from "react-router-dom";
import { Layout, ConfigProvider, theme } from "antd";

import { UiTest } from "./components/UiTest";
import { SettingsPage } from "./pages/settings/SettingsPage";
import { RtnlPage } from "./pages/settings/RtnlPage";
import { CertificatesPage } from "./pages/settings/certificates/CertificatesPage";
import { HomePage } from "./pages/home/HomePage";
import { Error404Page } from "./pages/Error404Page";
import { StatsPage } from "./pages/home/StatsPage";
import { StyledHeader } from "./components/header/StyledHeader";
import { BulbOutlined, MoonOutlined, SunOutlined } from "@ant-design/icons";

import { AudioProvider } from "./components/audio/AudioContext";
import { StyledFooter } from "./components/footer/StyledFooter";
import { ToniesPage } from "./pages/tonies/ToniesPage";
import { SystemSoundsPage } from "./pages/tonies/SystemSoundsPage";
import { ContentPage } from "./pages/tonies/ContentPage";
import { LibraryPage } from "./pages/tonies/LibraryPage";
import { EncoderPage } from "./pages/tonies/EncoderPage";
import { TonieAudioPlaylistsPage } from "./pages/tonies/TonieAudioPlaylistsPage";
import { TonieboxesPage } from "./pages/tonieboxes/TonieboxesPage";
import { StyledHeader } from "./components/header/StyledHeader";
import { Error404Page } from "./pages/Error404Page";
import { ChangelogPage } from "./pages/community/ChangelogPage";
import { CommunityPage } from "./pages/community/CommunityPage";
import { ContributionPage } from "./pages/community/ContributionPage";
import { ContributionToniesJsonPage } from "./pages/community/ContributionToniesJsonPage";
import { ContributorsPage } from "./pages/community/ContributorsPage";
import { ChangelogPage } from "./pages/community/ChangelogPage";
import { useState, useEffect } from "react";
import { ConfigProvider, theme } from "antd";
import { SunOutlined, MoonOutlined, BulbOutlined } from "@ant-design/icons";
import { ESP32BoxFlashingPage } from "./pages/tonieboxes/boxsetup/esp32/ESP32BoxFlashingPage";
import { TonieMeetingPage } from "./pages/home/TonieMeetingPage";
import { FAQPage } from "./pages/community/FAQPage";
import { TranslationsPage } from "./pages/community/TranslationsPage";
import { FeaturesPage } from "./pages/home/FeaturesPage";
import { CC3235BoxFlashingPage } from "./pages/tonieboxes/boxsetup/cc3235/CC3235BoxFlashingPage";
import { CC3200BoxFlashingPage } from "./pages/tonieboxes/boxsetup/cc3200/CC3200BoxFlashingPage";
import { HomePage } from "./pages/home/HomePage";
import { StatsPage } from "./pages/home/StatsPage";
import { TonieMeetingPage } from "./pages/home/TonieMeetingPage";
import { RtnlPage } from "./pages/settings/RtnlPage";
import { SettingsPage } from "./pages/settings/SettingsPage";
import { CertificatesPage } from "./pages/settings/certificates/CertificatesPage";
import { TonieboxesPage } from "./pages/tonieboxes/TonieboxesPage";
import { BoxSetupPage } from "./pages/tonieboxes/boxsetup/BoxSetupPage";
import { BoxVersionInformationPage } from "./pages/tonieboxes/boxsetup/BoxVersionInformation";
import { IdentifyBoxVersionPage } from "./pages/tonieboxes/boxsetup/IdentifyBoxVersionPage";
import { ESP32LegacyPage } from "./pages/tonieboxes/boxsetup/esp32/ESP32LegacyPage";
import { TranslationsPage } from "./pages/community/TranslationsPage";
import { OpenBoxGuidePage } from "./pages/tonieboxes/boxsetup/OpenBoxGuidePage";
import { CC3200BoxFlashingPage } from "./pages/tonieboxes/boxsetup/cc3200/CC3200BoxFlashingPage";
import { CC3235BoxFlashingPage } from "./pages/tonieboxes/boxsetup/cc3235/CC3235BoxFlashingPage";
import { ESP32BoxFlashingPage } from "./pages/tonieboxes/boxsetup/esp32/ESP32BoxFlashingPage";
import { ESP32LegacyPage } from "./pages/tonieboxes/boxsetup/esp32/ESP32LegacyPage";
import { ContentPage } from "./pages/tonies/ContentPage";
import { EncoderPage } from "./pages/tonies/EncoderPage";
import { LibraryPage } from "./pages/tonies/LibraryPage";
import { SystemSoundsPage } from "./pages/tonies/SystemSoundsPage";
import { TonieAudioPlaylistsPage } from "./pages/tonies/TonieAudioPlaylistsPage";
import { ToniesPage } from "./pages/tonies/ToniesPage";
import { detectColorScheme } from "./utils/browserUtils";

function App() {
Expand Down Expand Up @@ -125,6 +125,10 @@ function App() {
element={<IdentifyBoxVersionPage />}
/>
<Route path="/tonieboxes/boxsetup/openboxguide" element={<OpenBoxGuidePage />} />
<Route
path="/tonieboxes/boxsetup/boxversioninfo"
element={<BoxVersionInformationPage />}
/>
<Route
path="/tonieboxes/boxsetup/esp32/flashing"
element={<ESP32BoxFlashingPage />}
Expand All @@ -151,7 +155,6 @@ function App() {
<Route path="/community/contribution/translations" element={<TranslationsPage />} />
<Route path="/community/contributors" element={<ContributorsPage />} />
<Route path="/community/changelog" element={<ChangelogPage />} />
<Route path="/uitest" element={<UiTest />} />
<Route path="/*" element={<Error404Page />} />
</Routes>
</Layout>
Expand Down
12 changes: 6 additions & 6 deletions src/api/apis/TeddyCloudApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {
StatsListToJSON,
} from "../models";

import { TagTonieCard, TagsTonieCardList, TonieCardProps } from "../../components/tonies/TonieCard";
import { TonieboxCardList, TonieboxCardProps } from "../../components/tonieboxes/TonieboxCard";
import { TagTonieCard, TagTonieCardsList, TonieCardProps } from "../../types/tonieTypes";
import { TonieboxCardsList, TonieboxCardProps } from "../../types/tonieboxTypes";

export interface ApiSetCloudCacheContentPostRequest {
body: boolean;
Expand All @@ -36,9 +36,9 @@ export class TeddyCloudApi extends runtime.BaseAPI {
*/
async apiGetTonieboxesIndexRaw(
initOverrides?: RequestInit | runtime.InitOverrideFunction
): Promise<runtime.ApiResponse<TonieboxCardList>> {
): Promise<runtime.ApiResponse<TonieboxCardsList>> {
const response = await this.apiGetTeddyCloudApiRaw(`/api/getBoxes`, undefined, initOverrides);
return new runtime.JSONApiResponse<TonieboxCardList>(response);
return new runtime.JSONApiResponse<TonieboxCardsList>(response);
}

/**
Expand All @@ -57,12 +57,12 @@ export class TeddyCloudApi extends runtime.BaseAPI {
async apiGetTagIndexRaw(
overlay?: string,
initOverrides?: RequestInit | runtime.InitOverrideFunction
): Promise<runtime.ApiResponse<TagsTonieCardList>> {
): Promise<runtime.ApiResponse<TagTonieCardsList>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};

const response = await this.apiGetTeddyCloudApiRaw(`/api/getTagIndex`, overlay, initOverrides);
return new runtime.JSONApiResponse<TagsTonieCardList>(response);
return new runtime.JSONApiResponse<TagTonieCardsList>(response);
}

/**
Expand Down
Binary file added src/assets/boxSetup/01_CH341A_programmer_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/boxSetup/01_CH341A_programmer_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/boxSetup/02_CH341A_sop8_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/boxSetup/02_CH341A_sop8_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/boxSetup/02_CH341A_sop8_3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/boxSetup/02_CH341A_sop8_remove.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/boxSetup/3200_pcb_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/boxSetup/3235_pcb_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/boxSetup/esp32_pcb_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions src/components/StyledComponents.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Breadcrumb, Layout, Menu } from "antd";
import { useEffect } from "react";
import { useTranslation } from "react-i18next";

import { Breadcrumb, Layout, Menu, theme } from "antd";
import Sider from "antd/es/layout/Sider";
import Item from "antd/es/list/Item";
import styled from "styled-components";
import { theme } from "antd";
import { useEffect } from "react";
import { useTranslation } from "react-i18next";

const { useToken } = theme;
const useThemeToken = () => useToken().token;
Expand All @@ -16,6 +16,7 @@ type BreadcrumbItem = {
type BreadcrumbWrapperProps = {
items: BreadcrumbItem[];
};

export const StyledSubMenu = styled(Menu)`
height: 100%;
border-right: 0;
Expand Down
6 changes: 4 additions & 2 deletions src/components/TonieMeeting.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { useEffect, useState } from "react";
import { theme } from "antd";

import { defaultAPIConfig } from "../config/defaultApiConfig";
import { TeddyCloudApi } from "../api";
import QuestionMarkSVG from "../utils/questionMarkIcon";
import { theme } from "antd";

import QuestionMarkSVG from "./utils/QuestionMarkIcon";

const api = new TeddyCloudApi(defaultAPIConfig());
const { useToken } = theme;
Expand Down
68 changes: 0 additions & 68 deletions src/components/UiTest.tsx

This file was deleted.

Loading

0 comments on commit 080a4ab

Please sign in to comment.