forked from OctoWoW/OctoLauncher
Sync launcher: stop phantom update prompt, forum News panel, hardware-aware render distance
Squashed sync from upstream. Highlights: - Updater no longer reports already-applied deletes as a pending update on every launch (guard the del branch on the target still existing) - Derive the packaged CSP image origin from the configured server URL - Forum Announcements panel + News tab; hardware-aware farClip recommendation; parchment UI; localization and tweak updates - Addon source refresh; schema and mod-state fixes Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -5,11 +5,21 @@ import { z } from 'zod';
|
||||
import { mainWindow } from '~main/index';
|
||||
import Preferences from '~main/modules/preferences';
|
||||
import { addDefenderExclusions } from '~main/modules/defender';
|
||||
import { detectHardware, recommendFarClip } from '~main/modules/hardware';
|
||||
|
||||
import { createTRPCRouter, publicProcedure } from '../trpc';
|
||||
|
||||
export const generalRouter = createTRPCRouter({
|
||||
appVersion: publicProcedure.query(() => app.getVersion()),
|
||||
hardware: publicProcedure.query(() => {
|
||||
const hardware = Preferences.data.hardware ?? null;
|
||||
return { hardware, recommendedFarClip: recommendFarClip(hardware) };
|
||||
}),
|
||||
redetectHardware: publicProcedure.mutation(async () => {
|
||||
const hardware = await detectHardware();
|
||||
Preferences.data = { hardware };
|
||||
return { hardware, recommendedFarClip: recommendFarClip(hardware) };
|
||||
}),
|
||||
quit: publicProcedure.mutation(() => app.quit()),
|
||||
minimize: publicProcedure.mutation(() => mainWindow?.minimize()),
|
||||
openLink: publicProcedure
|
||||
|
||||
Reference in New Issue
Block a user