diff --git a/.github/workflows/build_pull_request.yml b/.github/workflows/build_pull_request.yml index 8b90130..4bb92fb 100644 --- a/.github/workflows/build_pull_request.yml +++ b/.github/workflows/build_pull_request.yml @@ -55,7 +55,7 @@ jobs: with: path: | **/react/node_modules - key: ${{ runner.os }}-${{ hashFiles('**/react/yarn.lock') }} + key: ${{ runner.os }}-${{ hashFiles('**/webUI/yarn.lock') }} - name: Build and copy webUI, Build Jar uses: eskatos/gradle-command-action@v1 diff --git a/.github/workflows/build_push.yml b/.github/workflows/build_push.yml index 8c6251a..954b9f0 100644 --- a/.github/workflows/build_push.yml +++ b/.github/workflows/build_push.yml @@ -57,7 +57,7 @@ jobs: with: path: | **/react/node_modules - key: ${{ runner.os }}-${{ hashFiles('**/react/yarn.lock') }} + key: ${{ runner.os }}-${{ hashFiles('**/webUI/yarn.lock') }} - name: Build and copy webUI, Build Jar uses: eskatos/gradle-command-action@v1 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 37495b8..11f7a97 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -56,7 +56,7 @@ jobs: with: path: | **/react/node_modules - key: ${{ runner.os }}-${{ hashFiles('**/react/yarn.lock') }} + key: ${{ runner.os }}-${{ hashFiles('**/react/webUI.lock') }} - name: Build and copy webUI, Build Jar uses: eskatos/gradle-command-action@v1 diff --git a/.gitignore b/.gitignore index 931397a..8d85ed7 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ gradle.properties # Ignore Gradle build output directory build -server/src/main/resources/react +server/src/main/resources/webUI server/tmp/ server/tachiserver-data/ diff --git a/server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt index be351f2..abe53b6 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt @@ -35,12 +35,12 @@ object JavalinSetup { val app = Javalin.create { config -> try { // if the bellow line throws an exception then webUI is not bundled - this::class.java.getResource("/react/index.html") + this::class.java.getResource("/webUI/index.html") // no exception so we can tell javalin to serve webUI hasWebUiBundled = true - config.addStaticFiles("/react") - config.addSinglePageRoot("/", "/react/index.html") + config.addStaticFiles("/webUI") + config.addSinglePageRoot("/", "/webUI/index.html") } catch (e: RuntimeException) { logger.warn("react build files are missing.") hasWebUiBundled = false diff --git a/webUI/build.gradle.kts b/webUI/build.gradle.kts index 3a3897d..267789a 100644 --- a/webUI/build.gradle.kts +++ b/webUI/build.gradle.kts @@ -2,7 +2,7 @@ plugins { id("com.github.node-gradle.node") version "3.0.1" } -val nodeRoot = "${project.projectDir}/react" +val nodeRoot = "${project.projectDir}/src" node { nodeProjectDir.set(file(nodeRoot)) } @@ -10,7 +10,7 @@ node { tasks { register("copyBuild") { from(file("$nodeRoot/build")) - into(file("$rootDir/server/src/main/resources/react")) + into(file("$rootDir/server/src/main/resources/webUI")) dependsOn("yarn_build") } diff --git a/webUI/react/.eslintignore b/webUI/src/.eslintignore similarity index 100% rename from webUI/react/.eslintignore rename to webUI/src/.eslintignore diff --git a/webUI/react/.eslintrc.js b/webUI/src/.eslintrc.js similarity index 100% rename from webUI/react/.eslintrc.js rename to webUI/src/.eslintrc.js diff --git a/webUI/react/.gitignore b/webUI/src/.gitignore similarity index 100% rename from webUI/react/.gitignore rename to webUI/src/.gitignore diff --git a/webUI/react/README.md b/webUI/src/README.md similarity index 100% rename from webUI/react/README.md rename to webUI/src/README.md diff --git a/webUI/react/package.json b/webUI/src/package.json similarity index 100% rename from webUI/react/package.json rename to webUI/src/package.json diff --git a/webUI/react/public/favicon.ico b/webUI/src/public/favicon.ico similarity index 100% rename from webUI/react/public/favicon.ico rename to webUI/src/public/favicon.ico diff --git a/webUI/react/public/favicon.png b/webUI/src/public/favicon.png similarity index 100% rename from webUI/react/public/favicon.png rename to webUI/src/public/favicon.png diff --git a/webUI/react/public/index.html b/webUI/src/public/index.html similarity index 100% rename from webUI/react/public/index.html rename to webUI/src/public/index.html diff --git a/webUI/react/public/manifest.json b/webUI/src/public/manifest.json similarity index 100% rename from webUI/react/public/manifest.json rename to webUI/src/public/manifest.json diff --git a/webUI/react/public/robots.txt b/webUI/src/public/robots.txt similarity index 100% rename from webUI/react/public/robots.txt rename to webUI/src/public/robots.txt diff --git a/webUI/react/src/App.tsx b/webUI/src/src/App.tsx similarity index 100% rename from webUI/react/src/App.tsx rename to webUI/src/src/App.tsx diff --git a/webUI/react/src/components/LoadingPlaceholder.tsx b/webUI/src/src/components/LoadingPlaceholder.tsx similarity index 100% rename from webUI/react/src/components/LoadingPlaceholder.tsx rename to webUI/src/src/components/LoadingPlaceholder.tsx diff --git a/webUI/react/src/components/SpinnerImage.tsx b/webUI/src/src/components/SpinnerImage.tsx similarity index 100% rename from webUI/react/src/components/SpinnerImage.tsx rename to webUI/src/src/components/SpinnerImage.tsx diff --git a/webUI/react/src/components/TemporaryDrawer.tsx b/webUI/src/src/components/TemporaryDrawer.tsx similarity index 100% rename from webUI/react/src/components/TemporaryDrawer.tsx rename to webUI/src/src/components/TemporaryDrawer.tsx diff --git a/webUI/react/src/components/Toast.tsx b/webUI/src/src/components/Toast.tsx similarity index 100% rename from webUI/react/src/components/Toast.tsx rename to webUI/src/src/components/Toast.tsx diff --git a/webUI/react/src/components/anime/AnimeCard.tsx b/webUI/src/src/components/anime/AnimeCard.tsx similarity index 100% rename from webUI/react/src/components/anime/AnimeCard.tsx rename to webUI/src/src/components/anime/AnimeCard.tsx diff --git a/webUI/react/src/components/anime/AnimeDetails.tsx b/webUI/src/src/components/anime/AnimeDetails.tsx similarity index 100% rename from webUI/react/src/components/anime/AnimeDetails.tsx rename to webUI/src/src/components/anime/AnimeDetails.tsx diff --git a/webUI/react/src/components/anime/AnimeGrid.tsx b/webUI/src/src/components/anime/AnimeGrid.tsx similarity index 100% rename from webUI/react/src/components/anime/AnimeGrid.tsx rename to webUI/src/src/components/anime/AnimeGrid.tsx diff --git a/webUI/react/src/components/anime/EpisodeCard.tsx b/webUI/src/src/components/anime/EpisodeCard.tsx similarity index 100% rename from webUI/react/src/components/anime/EpisodeCard.tsx rename to webUI/src/src/components/anime/EpisodeCard.tsx diff --git a/webUI/react/src/components/anime/ExtensionCard.tsx b/webUI/src/src/components/anime/ExtensionCard.tsx similarity index 100% rename from webUI/react/src/components/anime/ExtensionCard.tsx rename to webUI/src/src/components/anime/ExtensionCard.tsx diff --git a/webUI/react/src/components/anime/SourceCard.tsx b/webUI/src/src/components/anime/SourceCard.tsx similarity index 100% rename from webUI/react/src/components/anime/SourceCard.tsx rename to webUI/src/src/components/anime/SourceCard.tsx diff --git a/webUI/react/src/components/manga/CategorySelect.tsx b/webUI/src/src/components/manga/CategorySelect.tsx similarity index 100% rename from webUI/react/src/components/manga/CategorySelect.tsx rename to webUI/src/src/components/manga/CategorySelect.tsx diff --git a/webUI/react/src/components/manga/ChapterCard.tsx b/webUI/src/src/components/manga/ChapterCard.tsx similarity index 100% rename from webUI/react/src/components/manga/ChapterCard.tsx rename to webUI/src/src/components/manga/ChapterCard.tsx diff --git a/webUI/react/src/components/manga/ExtensionCard.tsx b/webUI/src/src/components/manga/ExtensionCard.tsx similarity index 100% rename from webUI/react/src/components/manga/ExtensionCard.tsx rename to webUI/src/src/components/manga/ExtensionCard.tsx diff --git a/webUI/react/src/components/manga/ExtensionLangSelect.tsx b/webUI/src/src/components/manga/ExtensionLangSelect.tsx similarity index 100% rename from webUI/react/src/components/manga/ExtensionLangSelect.tsx rename to webUI/src/src/components/manga/ExtensionLangSelect.tsx diff --git a/webUI/react/src/components/manga/MangaCard.tsx b/webUI/src/src/components/manga/MangaCard.tsx similarity index 100% rename from webUI/react/src/components/manga/MangaCard.tsx rename to webUI/src/src/components/manga/MangaCard.tsx diff --git a/webUI/react/src/components/manga/MangaDetails.tsx b/webUI/src/src/components/manga/MangaDetails.tsx similarity index 100% rename from webUI/react/src/components/manga/MangaDetails.tsx rename to webUI/src/src/components/manga/MangaDetails.tsx diff --git a/webUI/react/src/components/manga/MangaGrid.tsx b/webUI/src/src/components/manga/MangaGrid.tsx similarity index 100% rename from webUI/react/src/components/manga/MangaGrid.tsx rename to webUI/src/src/components/manga/MangaGrid.tsx diff --git a/webUI/react/src/components/manga/SourceCard.tsx b/webUI/src/src/components/manga/SourceCard.tsx similarity index 100% rename from webUI/react/src/components/manga/SourceCard.tsx rename to webUI/src/src/components/manga/SourceCard.tsx diff --git a/webUI/react/src/components/manga/reader/DoublePage.tsx b/webUI/src/src/components/manga/reader/DoublePage.tsx similarity index 100% rename from webUI/react/src/components/manga/reader/DoublePage.tsx rename to webUI/src/src/components/manga/reader/DoublePage.tsx diff --git a/webUI/react/src/components/manga/reader/Page.tsx b/webUI/src/src/components/manga/reader/Page.tsx similarity index 100% rename from webUI/react/src/components/manga/reader/Page.tsx rename to webUI/src/src/components/manga/reader/Page.tsx diff --git a/webUI/react/src/components/manga/reader/PageNumber.tsx b/webUI/src/src/components/manga/reader/PageNumber.tsx similarity index 100% rename from webUI/react/src/components/manga/reader/PageNumber.tsx rename to webUI/src/src/components/manga/reader/PageNumber.tsx diff --git a/webUI/react/src/components/manga/reader/pager/DoublePagedPager.tsx b/webUI/src/src/components/manga/reader/pager/DoublePagedPager.tsx similarity index 100% rename from webUI/react/src/components/manga/reader/pager/DoublePagedPager.tsx rename to webUI/src/src/components/manga/reader/pager/DoublePagedPager.tsx diff --git a/webUI/react/src/components/manga/reader/pager/HorizontalPager.tsx b/webUI/src/src/components/manga/reader/pager/HorizontalPager.tsx similarity index 100% rename from webUI/react/src/components/manga/reader/pager/HorizontalPager.tsx rename to webUI/src/src/components/manga/reader/pager/HorizontalPager.tsx diff --git a/webUI/react/src/components/manga/reader/pager/PagedPager.tsx b/webUI/src/src/components/manga/reader/pager/PagedPager.tsx similarity index 100% rename from webUI/react/src/components/manga/reader/pager/PagedPager.tsx rename to webUI/src/src/components/manga/reader/pager/PagedPager.tsx diff --git a/webUI/react/src/components/manga/reader/pager/VerticalPager.tsx b/webUI/src/src/components/manga/reader/pager/VerticalPager.tsx similarity index 100% rename from webUI/react/src/components/manga/reader/pager/VerticalPager.tsx rename to webUI/src/src/components/manga/reader/pager/VerticalPager.tsx diff --git a/webUI/react/src/components/navbar/NavBar.tsx b/webUI/src/src/components/navbar/NavBar.tsx similarity index 100% rename from webUI/react/src/components/navbar/NavBar.tsx rename to webUI/src/src/components/navbar/NavBar.tsx diff --git a/webUI/react/src/components/navbar/ReaderNavBar.tsx b/webUI/src/src/components/navbar/ReaderNavBar.tsx similarity index 100% rename from webUI/react/src/components/navbar/ReaderNavBar.tsx rename to webUI/src/src/components/navbar/ReaderNavBar.tsx diff --git a/webUI/react/src/context/DarkTheme.tsx b/webUI/src/src/context/DarkTheme.tsx similarity index 100% rename from webUI/react/src/context/DarkTheme.tsx rename to webUI/src/src/context/DarkTheme.tsx diff --git a/webUI/react/src/context/NavbarContext.tsx b/webUI/src/src/context/NavbarContext.tsx similarity index 100% rename from webUI/react/src/context/NavbarContext.tsx rename to webUI/src/src/context/NavbarContext.tsx diff --git a/webUI/react/src/index.css b/webUI/src/src/index.css similarity index 100% rename from webUI/react/src/index.css rename to webUI/src/src/index.css diff --git a/webUI/react/src/index.tsx b/webUI/src/src/index.tsx similarity index 100% rename from webUI/react/src/index.tsx rename to webUI/src/src/index.tsx diff --git a/webUI/react/src/react-app-env.d.ts b/webUI/src/src/react-app-env.d.ts similarity index 100% rename from webUI/react/src/react-app-env.d.ts rename to webUI/src/src/react-app-env.d.ts diff --git a/webUI/react/src/screens/Settings.tsx b/webUI/src/src/screens/Settings.tsx similarity index 100% rename from webUI/react/src/screens/Settings.tsx rename to webUI/src/src/screens/Settings.tsx diff --git a/webUI/react/src/screens/anime/Anime.tsx b/webUI/src/src/screens/anime/Anime.tsx similarity index 100% rename from webUI/react/src/screens/anime/Anime.tsx rename to webUI/src/src/screens/anime/Anime.tsx diff --git a/webUI/react/src/screens/anime/AnimeExtensions.tsx b/webUI/src/src/screens/anime/AnimeExtensions.tsx similarity index 100% rename from webUI/react/src/screens/anime/AnimeExtensions.tsx rename to webUI/src/src/screens/anime/AnimeExtensions.tsx diff --git a/webUI/react/src/screens/anime/AnimeSources.tsx b/webUI/src/src/screens/anime/AnimeSources.tsx similarity index 100% rename from webUI/react/src/screens/anime/AnimeSources.tsx rename to webUI/src/src/screens/anime/AnimeSources.tsx diff --git a/webUI/react/src/screens/anime/Player.tsx b/webUI/src/src/screens/anime/Player.tsx similarity index 100% rename from webUI/react/src/screens/anime/Player.tsx rename to webUI/src/src/screens/anime/Player.tsx diff --git a/webUI/react/src/screens/anime/SourceAnimes.tsx b/webUI/src/src/screens/anime/SourceAnimes.tsx similarity index 100% rename from webUI/react/src/screens/anime/SourceAnimes.tsx rename to webUI/src/src/screens/anime/SourceAnimes.tsx diff --git a/webUI/react/src/screens/manga/DownloadQueue.tsx b/webUI/src/src/screens/manga/DownloadQueue.tsx similarity index 100% rename from webUI/react/src/screens/manga/DownloadQueue.tsx rename to webUI/src/src/screens/manga/DownloadQueue.tsx diff --git a/webUI/react/src/screens/manga/Library.tsx b/webUI/src/src/screens/manga/Library.tsx similarity index 100% rename from webUI/react/src/screens/manga/Library.tsx rename to webUI/src/src/screens/manga/Library.tsx diff --git a/webUI/react/src/screens/manga/Manga.tsx b/webUI/src/src/screens/manga/Manga.tsx similarity index 100% rename from webUI/react/src/screens/manga/Manga.tsx rename to webUI/src/src/screens/manga/Manga.tsx diff --git a/webUI/react/src/screens/manga/MangaExtensions.tsx b/webUI/src/src/screens/manga/MangaExtensions.tsx similarity index 100% rename from webUI/react/src/screens/manga/MangaExtensions.tsx rename to webUI/src/src/screens/manga/MangaExtensions.tsx diff --git a/webUI/react/src/screens/manga/MangaSources.tsx b/webUI/src/src/screens/manga/MangaSources.tsx similarity index 100% rename from webUI/react/src/screens/manga/MangaSources.tsx rename to webUI/src/src/screens/manga/MangaSources.tsx diff --git a/webUI/react/src/screens/manga/Reader.tsx b/webUI/src/src/screens/manga/Reader.tsx similarity index 100% rename from webUI/react/src/screens/manga/Reader.tsx rename to webUI/src/src/screens/manga/Reader.tsx diff --git a/webUI/react/src/screens/manga/SearchSingle.tsx b/webUI/src/src/screens/manga/SearchSingle.tsx similarity index 100% rename from webUI/react/src/screens/manga/SearchSingle.tsx rename to webUI/src/src/screens/manga/SearchSingle.tsx diff --git a/webUI/react/src/screens/manga/SourceMangas.tsx b/webUI/src/src/screens/manga/SourceMangas.tsx similarity index 100% rename from webUI/react/src/screens/manga/SourceMangas.tsx rename to webUI/src/src/screens/manga/SourceMangas.tsx diff --git a/webUI/react/src/screens/settings/About.tsx b/webUI/src/src/screens/settings/About.tsx similarity index 100% rename from webUI/react/src/screens/settings/About.tsx rename to webUI/src/src/screens/settings/About.tsx diff --git a/webUI/react/src/screens/settings/Backup.tsx b/webUI/src/src/screens/settings/Backup.tsx similarity index 100% rename from webUI/react/src/screens/settings/Backup.tsx rename to webUI/src/src/screens/settings/Backup.tsx diff --git a/webUI/react/src/screens/settings/Categories.tsx b/webUI/src/src/screens/settings/Categories.tsx similarity index 100% rename from webUI/react/src/screens/settings/Categories.tsx rename to webUI/src/src/screens/settings/Categories.tsx diff --git a/webUI/react/src/typings.d.ts b/webUI/src/src/typings.d.ts similarity index 100% rename from webUI/react/src/typings.d.ts rename to webUI/src/src/typings.d.ts diff --git a/webUI/react/src/util/ListItemLink.tsx b/webUI/src/src/util/ListItemLink.tsx similarity index 100% rename from webUI/react/src/util/ListItemLink.tsx rename to webUI/src/src/util/ListItemLink.tsx diff --git a/webUI/react/src/util/client.tsx b/webUI/src/src/util/client.tsx similarity index 100% rename from webUI/react/src/util/client.tsx rename to webUI/src/src/util/client.tsx diff --git a/webUI/react/src/util/cloneObject.tsx b/webUI/src/src/util/cloneObject.tsx similarity index 100% rename from webUI/react/src/util/cloneObject.tsx rename to webUI/src/src/util/cloneObject.tsx diff --git a/webUI/react/src/util/language.tsx b/webUI/src/src/util/language.tsx similarity index 100% rename from webUI/react/src/util/language.tsx rename to webUI/src/src/util/language.tsx diff --git a/webUI/react/src/util/localStorage.tsx b/webUI/src/src/util/localStorage.tsx similarity index 100% rename from webUI/react/src/util/localStorage.tsx rename to webUI/src/src/util/localStorage.tsx diff --git a/webUI/react/src/util/useLocalStorage.tsx b/webUI/src/src/util/useLocalStorage.tsx similarity index 100% rename from webUI/react/src/util/useLocalStorage.tsx rename to webUI/src/src/util/useLocalStorage.tsx diff --git a/webUI/react/tsconfig.json b/webUI/src/tsconfig.json similarity index 100% rename from webUI/react/tsconfig.json rename to webUI/src/tsconfig.json diff --git a/webUI/react/yarn.lock b/webUI/src/yarn.lock similarity index 100% rename from webUI/react/yarn.lock rename to webUI/src/yarn.lock