diff --git a/frontend/src/package.json b/frontend/src/package.json
index 9ab9a10f..4c46e08f 100644
--- a/frontend/src/package.json
+++ b/frontend/src/package.json
@@ -43,5 +43,6 @@
"last 2 versions",
"not dead",
"not ie 11"
- ]
+ ],
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
diff --git a/frontend/src/src/components/StreamlinkUi.vue b/frontend/src/src/components/StreamlinkUi.vue
index a857e3c6..c2e71640 100644
--- a/frontend/src/src/components/StreamlinkUi.vue
+++ b/frontend/src/src/components/StreamlinkUi.vue
@@ -7,6 +7,7 @@
Start Stream
Running Streams
Cleanup
+ Settings
@@ -159,6 +160,28 @@
Cleanup
Cleanup DB and Logs
+
+
+
@@ -189,7 +212,13 @@ export default {
runningStreams: [],
detailedStreams: [],
scheduledStreams: [],
- streamsLoading: false,
+ streamsLoading: false,
+ settings: {
+ client_id: '',
+ client_secret: '',
+ base_url: '',
+ reverse_proxy: false,
+ },
};
},
computed: {
@@ -210,6 +239,9 @@ export default {
}
}
},
+ mounted() {
+ this.loadSettings();
+ },
methods: {
async startStream() {
const payload = {
@@ -348,6 +380,43 @@ export default {
this.currentView = 'list';
this.fetchRunningStreams();
},
+ saveSettings() {
+ try {
+ const apiStore = useApiStore();
+ const payload = {
+ client_id: this.settings.client_id || '',
+ client_secret: this.settings.client_secret || '',
+ base_url: this.settings.base_url || '',
+ reverse_proxy: !!this.settings.reverse_proxy,
+ };
+ localStorage.setItem('streamlink_settings', JSON.stringify(payload));
+ if (payload.base_url) {
+ apiStore.setBaseURL(payload.base_url);
+ }
+ alert('Settings saved.');
+ } catch (e) {
+ console.error('Failed to save settings', e);
+ alert('Failed to save settings.');
+ }
+ },
+ loadSettings() {
+ try {
+ const raw = localStorage.getItem('streamlink_settings');
+ if (raw) {
+ const parsed = JSON.parse(raw);
+ this.settings.client_id = parsed.client_id || '';
+ this.settings.client_secret = parsed.client_secret || '';
+ this.settings.base_url = parsed.base_url || '';
+ this.settings.reverse_proxy = !!parsed.reverse_proxy;
+ if (parsed.base_url) {
+ const apiStore = useApiStore();
+ apiStore.setBaseURL(parsed.base_url);
+ }
+ }
+ } catch (e) {
+ console.error('Failed to load settings', e);
+ }
+ },
async cleanup() {
try {
const apiStore = useApiStore();
@@ -690,4 +759,13 @@ button i {
width: auto;
max-width: 60vw;
}
-
\ No newline at end of file
+.settings-panel {
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+}
+
+.save-settings-btn {
+ width: 14rem;
+}
+
diff --git a/frontend/src/src/main.js b/frontend/src/src/main.js
index fb74d118..142e475e 100644
--- a/frontend/src/src/main.js
+++ b/frontend/src/src/main.js
@@ -7,7 +7,7 @@ const app = createApp(App);
const pinia = createPinia();
app.use(pinia);
-const apiStore = useApiStore();
+const apiStore = useApiStore(pinia);
apiStore.setBaseURL(window.config.baseURL);
-createApp(App).mount('#app')
+app.mount('#app')