Refactored launcherservice

This commit is contained in:
2026-04-03 16:23:28 +02:00
parent a48f5a19f3
commit 78ad9ea312
5 changed files with 321 additions and 190 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react'
import { Cpu, MemoryStick, Save, RefreshCcw, Info, AlertTriangle } from 'lucide-react'
import { launcherService, type LauncherSettings } from '../services/LauncherService'
import { getSettings, updateSettings, type LauncherSettings } from '../services/LauncherService'
import { motion } from 'framer-motion'
const SettingsSection: React.FC = () => {
@@ -10,7 +10,7 @@ const SettingsSection: React.FC = () => {
useEffect(() => {
const loadSettings = async () => {
const s = await launcherService.getSettings()
const s = await getSettings()
setSettings(s)
}
loadSettings()
@@ -21,7 +21,7 @@ const SettingsSection: React.FC = () => {
setIsSaving(true)
setSaveStatus('Saving...')
await launcherService.updateSettings(settings)
await updateSettings(settings)
setTimeout(() => {
setIsSaving(false)