adding 'open in fredy'

This commit is contained in:
orangecoding
2026-04-21 19:42:39 +02:00
parent 8c5607e20b
commit c78472bd19
26 changed files with 345 additions and 58 deletions

View File

@@ -61,6 +61,7 @@ const GeneralSettings = function GeneralSettings() {
const [demoMode, setDemoMode] = React.useState(null);
const [analyticsEnabled, setAnalyticsEnabled] = React.useState(null);
const [sqlitePath, setSqlitePath] = React.useState(null);
const [baseUrl, setBaseUrl] = React.useState('');
const fileInputRef = React.useRef(null);
const [restoreModalVisible, setRestoreModalVisible] = React.useState(false);
const [precheckInfo, setPrecheckInfo] = React.useState(null);
@@ -94,6 +95,7 @@ const GeneralSettings = function GeneralSettings() {
setAnalyticsEnabled(settings?.analyticsEnabled || false);
setDemoMode(settings?.demoMode || false);
setSqlitePath(settings?.sqlitepath);
setBaseUrl(settings?.baseUrl ?? '');
}
init();
@@ -137,6 +139,7 @@ const GeneralSettings = function GeneralSettings() {
demoMode,
analyticsEnabled,
sqlitepath: sqlitePath,
baseUrl,
});
} catch (exception) {
console.error(exception);
@@ -266,6 +269,13 @@ const GeneralSettings = function GeneralSettings() {
/>
</SegmentPart>
<SegmentPart
name="Base URL"
helpText="Public URL where Fredy is reachable (e.g. http://192.168.1.10:9998). Used for 'Open in Fredy' links in notifications."
>
<Input type="text" placeholder="Base-Url" value={baseUrl} onChange={(value) => setBaseUrl(value)} />
</SegmentPart>
<SegmentPart
name="SQLite Database Path"
helpText="The directory where Fredy stores its SQLite database files."