Skip to content

Commit d5e2b38

Browse files
committed
making ui config json public for runtime loading.
1 parent ab69291 commit d5e2b38

10 files changed

Lines changed: 1054 additions & 761 deletions

File tree

.github/workflows/docker-build-push.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,4 @@ jobs:
4141
provenance: false
4242
tags: |
4343
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
44-
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
45-
build-args: |
46-
BASE_URL=${{ secrets.DEPLOYMENT_URL }}
47-
client_id=${{ secrets.TRAKT_CLIENT_ID }}
44+
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }}

Dockerfile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
# Multi-stage build for efficiency
22
FROM node:18-alpine AS builder
33

4-
# Accept build arguments
5-
ARG BASE_URL
6-
ARG client_id
7-
8-
# Set environment variables during build
9-
ENV BASE_URL=$BASE_URL
10-
ENV client_id=$client_id
11-
124
WORKDIR /app
135

146
# Copy package files

manifest.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const config = require('./config.js')();
33

44
let manifest = {
55
"id": "community.trakt-tv",
6-
"version": "1.0.1",
6+
"version": "1.0.2",
77
"name": "Trakt Tv",
88
"description": "Addon for getting Trakt's public and user lists, recommendations and watch list.",
99
};
@@ -23,10 +23,18 @@ manifest = { ...manifest,
2323

2424
fs.writeFileSync('./manifest.json', JSON.stringify(manifest));
2525

26-
let oauth_configuration = {
27-
"client_id": `${config.client_id}`
26+
let client_config = {
27+
"version": `${manifest.version}`,
28+
"name": `${manifest.name}`,
29+
"description": `${manifest.description}`,
30+
"logoUrl": `${manifest.logo}`,
31+
"backgroundUrl": `${manifest.background}`,
32+
"types": manifest.types,
33+
"baseUrl": `${config.local}`,
34+
"oauthClientId": `${config.client_id}`
2835
}
2936

30-
fs.writeFileSync('./oauth_configuration.json', JSON.stringify(oauth_configuration));
37+
38+
fs.writeFileSync('./vue/public/client-config.json', JSON.stringify(client_config));
3139

3240
//module.exports = manifest;

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "community.trakt-tv",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Addon for getting Trakt's public and user lists, recommendations and watch list.",
55
"main": "server.js",
66
"scripts": {

vue/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ node_modules
1111
dist
1212
dist-ssr
1313
*.local
14+
client-config.json
1415

1516
# Editor directories and files
1617
.vscode/*

vue/package-lock.json

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vue/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"vue": "^3.2.37",
1919
"vue-dropdowns": "^1.1.2",
2020
"vue-toggles": "^2.1.0",
21-
"vuedraggable": "^4.1.0"
21+
"vuedraggable": "^4.1.0",
22+
"vue3-toastify": "^0.2.8"
2223
},
2324
"devDependencies": {
2425
"@vitejs/plugin-vue": "^3.1.0",

vue/src/App.vue

Lines changed: 1003 additions & 741 deletions
Large diffs are not rendered by default.

vue/src/main.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
import { createApp } from 'vue'
22
import { createHead } from "@vueuse/head"
3+
import Vue3Toastify, { toast } from 'vue3-toastify'
34
import './style.css'
45
import App from './App.vue'
56
import 'flowbite'
7+
import 'vue3-toastify/dist/index.css'
8+
69
const app = createApp(App)
710
const head = createHead()
811

12+
// Configure vue3-toastify
13+
// Only set what you need
14+
app.use(Vue3Toastify, {
15+
autoClose: 3000, // Auto close after 3 seconds
16+
position: 'top-right', // Position on screen
17+
// All other styles will use defaults
18+
})
19+
// Provide toast to all components
20+
app.provide('toast', toast)
21+
922
app.use(head)
1023

1124
app.mount('#app')

0 commit comments

Comments
 (0)