mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 15:48:05 +00:00
56 lines
2.0 KiB
Plaintext
56 lines
2.0 KiB
Plaintext
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = void 0;
|
|
var _configPlugins = require("@expo/config-plugins");
|
|
const withAndroidEdgeToEdgeTheme = (config, props) => {
|
|
const themes = {
|
|
Material2: "Theme.EdgeToEdge.Material2",
|
|
Material3: "Theme.EdgeToEdge.Material3"
|
|
};
|
|
const ignoreList = new Set(["android:enforceNavigationBarContrast", "android:enforceStatusBarContrast", "android:fitsSystemWindows", "android:navigationBarColor", "android:statusBarColor", "android:windowDrawsSystemBarBackgrounds", "android:windowLayoutInDisplayCutoutMode", "android:windowLightNavigationBar", "android:windowLightStatusBar", "android:windowTranslucentNavigation", "android:windowTranslucentStatus"]);
|
|
return (0, _configPlugins.withAndroidStyles)(config, config => {
|
|
const {
|
|
androidStatusBar = {},
|
|
userInterfaceStyle = "light"
|
|
} = config;
|
|
const {
|
|
barStyle
|
|
} = androidStatusBar;
|
|
const {
|
|
android = {}
|
|
} = props;
|
|
const {
|
|
parentTheme = "Default"
|
|
} = android;
|
|
config.modResults.resources.style = config.modResults.resources.style?.map(style => {
|
|
if (style.$.name === "AppTheme") {
|
|
style.$.parent = themes[parentTheme] ?? "Theme.EdgeToEdge";
|
|
if (style.item != null) {
|
|
style.item = style.item.filter(item => !ignoreList.has(item.$.name));
|
|
}
|
|
if (barStyle != null) {
|
|
style.item.push({
|
|
$: {
|
|
name: "android:windowLightStatusBar"
|
|
},
|
|
_: String(barStyle === "dark-content")
|
|
});
|
|
} else if (userInterfaceStyle !== "automatic") {
|
|
style.item.push({
|
|
$: {
|
|
name: "android:windowLightStatusBar"
|
|
},
|
|
_: String(userInterfaceStyle === "light")
|
|
});
|
|
}
|
|
}
|
|
return style;
|
|
});
|
|
return config;
|
|
});
|
|
};
|
|
var _default = exports.default = (0, _configPlugins.createRunOncePlugin)(withAndroidEdgeToEdgeTheme, "react-native-edge-to-edge");
|
|
//# sourceMappingURL=expo.js.map |