Skip to content

Commit

Permalink
Export transparency coremod functions
Browse files Browse the repository at this point in the history
  • Loading branch information
EastArctica committed Jan 16, 2025
1 parent b0bd3a8 commit e18ff13
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/renderer/coremods/transparency/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { Logger } from "@replugged";
import { generalSettings } from "../settings/pages/General";
import { type GeneralSettings, defaultSettings } from "src/types";
import * as settings from "../../apis/settings";

const generalSettings = await settings.init<GeneralSettings, keyof typeof defaultSettings>(
"dev.replugged.Settings",
defaultSettings,
);

let observer: MutationObserver;

Expand All @@ -17,7 +23,7 @@ function getRootStringProperty(property: string): string {

const logger = Logger.coremod("Transparency");

async function updateBackgroundMaterial(): Promise<void> {
export async function updateBackgroundMaterial(): Promise<void> {
if (generalSettings.get("overrideWindowBackgroundMaterial")) return;

Check failure on line 27 in src/renderer/coremods/transparency/index.ts

View workflow job for this annotation

GitHub Actions / Run TypeScript

Argument of type '"overrideWindowBackgroundMaterial"' is not assignable to parameter of type 'keyof GeneralSettings'.

const backgroundMaterial = getRootStringProperty("--window-background-material");
Expand All @@ -28,7 +34,7 @@ async function updateBackgroundMaterial(): Promise<void> {
}
}

async function updateBackgroundColor(): Promise<void> {
export async function updateBackgroundColor(): Promise<void> {
if (generalSettings.get("overrideWindowBackgroundColor")) return;

Check failure on line 38 in src/renderer/coremods/transparency/index.ts

View workflow job for this annotation

GitHub Actions / Run TypeScript

Argument of type '"overrideWindowBackgroundColor"' is not assignable to parameter of type 'keyof GeneralSettings'.

const backgroundColor = getRootProperty("--window-background-color");
Expand All @@ -38,7 +44,7 @@ async function updateBackgroundColor(): Promise<void> {
}
}

async function updateVibrancy(): Promise<void> {
export async function updateVibrancy(): Promise<void> {
if (generalSettings.get("overrideWindowBackgroundMaterial")) return;

Check failure on line 48 in src/renderer/coremods/transparency/index.ts

View workflow job for this annotation

GitHub Actions / Run TypeScript

Argument of type '"overrideWindowBackgroundMaterial"' is not assignable to parameter of type 'keyof GeneralSettings'.

const vibrancy = getRootStringProperty("--window-vibrancy");
Expand Down

0 comments on commit e18ff13

Please sign in to comment.