From aac7a2c62803a5526adaddec3cf2ad5fc3eba824 Mon Sep 17 00:00:00 2001 From: Manuel <30572287+manuel-rw@users.noreply.github.com> Date: Wed, 8 Mar 2023 09:41:55 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20web=20client=20(#108)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/assets/css/index.css | 0 client/index.html | 52 +++++++++++++++++++++++++++++++++++++ client/tailwind.config.js | 8 ++++++ package.json | 1 + src/app.module.ts | 11 +++++--- yarn.lock | 12 +++++++++ 6 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 client/assets/css/index.css create mode 100644 client/index.html create mode 100644 client/tailwind.config.js diff --git a/client/assets/css/index.css b/client/assets/css/index.css new file mode 100644 index 0000000..e69de29 diff --git a/client/index.html b/client/index.html new file mode 100644 index 0000000..feb96f4 --- /dev/null +++ b/client/index.html @@ -0,0 +1,52 @@ + + + + + + + + + + + 🎉 Jellyfin Discord Bot + + +
+ + +
+

+ Jellyfin Discord Bot +

+

+ Congratulations, your bot is up and running! +

+
+
+ + diff --git a/client/tailwind.config.js b/client/tailwind.config.js new file mode 100644 index 0000000..a0cebb6 --- /dev/null +++ b/client/tailwind.config.js @@ -0,0 +1,8 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ["./src/**/*.{html,js}"], + theme: { + extend: {}, + }, + plugins: [], +} \ No newline at end of file diff --git a/package.json b/package.json index 6425eef..3d93698 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "@nestjs/event-emitter": "^1.3.1", "@nestjs/platform-express": "^9.0.0", "@nestjs/schedule": "^2.1.0", + "@nestjs/serve-static": "^3.0.1", "@nestjs/terminus": "^9.1.4", "date-fns": "^2.29.3", "discord.js": "^14.7.1", diff --git a/src/app.module.ts b/src/app.module.ts index 7a96634..f860303 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -7,13 +7,15 @@ import { ScheduleModule } from '@nestjs/schedule'; import * as Joi from 'joi'; +import { ServeStaticModule } from '@nestjs/serve-static'; +import { join } from 'path'; +import { DiscordConfigService } from './clients/discord/discord.config.service'; +import { DiscordClientModule } from './clients/discord/discord.module'; +import { JellyfinClientModule } from './clients/jellyfin/jellyfin.module'; import { CommandModule } from './commands/command.module'; import { HealthModule } from './health/health.module'; import { PlaybackModule } from './playback/playback.module'; import { UpdatesModule } from './updates/updates.module'; -import { DiscordConfigService } from './clients/discord/discord.config.service'; -import { DiscordClientModule } from './clients/discord/discord.module'; -import { JellyfinClientModule } from './clients/jellyfin/jellyfin.module'; @Module({ imports: [ @@ -30,6 +32,9 @@ import { JellyfinClientModule } from './clients/jellyfin/jellyfin.module'; PORT: Joi.number().min(1), }), }), + ServeStaticModule.forRoot({ + rootPath: join(__dirname, '..', 'client'), + }), ScheduleModule.forRoot(), DiscordModule.forRootAsync({ useClass: DiscordConfigService, diff --git a/yarn.lock b/yarn.lock index bf8e96b..90faa3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -875,6 +875,13 @@ jsonc-parser "3.2.0" pluralize "8.0.0" +"@nestjs/serve-static@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@nestjs/serve-static/-/serve-static-3.0.1.tgz#d7d736b47171923d9e87262e19cc58ade8f4ba56" + integrity sha512-i766UJPYOqvQ2BbRKh0/+Mmq5NkJnmKcShjWV1i5qpXyeM0KDZTn0n7g7ykWq/3LbQgjpMzrhYtGv35GX7GVQw== + dependencies: + path-to-regexp "0.2.5" + "@nestjs/terminus@^9.1.4": version "9.2.1" resolved "https://registry.yarnpkg.com/@nestjs/terminus/-/terminus-9.2.1.tgz#f173ba807bbab6ed2ee892e859455553274a725e" @@ -4281,6 +4288,11 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== +path-to-regexp@0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.2.5.tgz#0b426991e387fc4c675de23557f358715eb66fb0" + integrity sha512-l6qtdDPIkmAmzEO6egquYDfqQGPMRNGjYtrU13HAXb3YSRrt7HSb1sJY0pKp6o2bAa86tSB6iwaW2JbthPKr7Q== + path-to-regexp@3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-3.2.0.tgz#fa7877ecbc495c601907562222453c43cc204a5f"