- App.tsx: full navigation (Auth stack + Main tabs with 5 screens) - Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen - HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors - MapScreen: interactive map with layer toggles (6 layers) - MarketplaceScreen: categories (6), products (5), search - ChatScreen: AI chat with quick prompts (4), bot responses - ProfileScreen: user info, stats, menu (9 items), logout - AlertsScreen: alert list with severity, acknowledge - SensorsScreen: sensor list with type filters (6 types), search - ZonesScreen: zone cards with stats - SettingsScreen: language picker (FR/EN/ES/DE), privacy, about - Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n - Hooks: useSensors, useAlerts, useNotifications, useLocation - Components: Card, Button, LoadingSpinner, ErrorBoundary, Header - Services: iotService, notificationService (with axios API client) - Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN) - Theme: colors.ts with full design system (Blue Ocean palette) - Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
55 lines
2.2 KiB
JavaScript
55 lines
2.2 KiB
JavaScript
"use strict";
|
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.withFontsIos = void 0;
|
|
const config_plugins_1 = require("expo/config-plugins");
|
|
const path_1 = __importDefault(require("path"));
|
|
const utils_1 = require("./utils");
|
|
const withFontsIos = (config, fonts) => {
|
|
config = addFontsToTarget(config, fonts);
|
|
config = addFontsToPlist(config, fonts);
|
|
return config;
|
|
};
|
|
exports.withFontsIos = withFontsIos;
|
|
function addFontsToTarget(config, fonts) {
|
|
return (0, config_plugins_1.withXcodeProject)(config, async (config) => {
|
|
const resolvedFonts = await (0, utils_1.resolveFontPaths)(fonts, config.modRequest.projectRoot);
|
|
const project = config.modResults;
|
|
const platformProjectRoot = config.modRequest.platformProjectRoot;
|
|
config_plugins_1.IOSConfig.XcodeUtils.ensureGroupRecursively(project, 'Resources');
|
|
addResourceFile(project, platformProjectRoot, resolvedFonts);
|
|
return config;
|
|
});
|
|
}
|
|
function addFontsToPlist(config, fonts) {
|
|
return (0, config_plugins_1.withInfoPlist)(config, async (config) => {
|
|
const resolvedFonts = await (0, utils_1.resolveFontPaths)(fonts, config.modRequest.projectRoot);
|
|
const existingFonts = getUIAppFonts(config.modResults);
|
|
const fontList = resolvedFonts.map((font) => path_1.default.basename(font)) ?? [];
|
|
const allFonts = [...existingFonts, ...fontList];
|
|
config.modResults.UIAppFonts = Array.from(new Set(allFonts));
|
|
return config;
|
|
});
|
|
}
|
|
function addResourceFile(project, platformRoot, f) {
|
|
for (const font of f) {
|
|
const fontPath = path_1.default.relative(platformRoot, font);
|
|
config_plugins_1.IOSConfig.XcodeUtils.addResourceFileToGroup({
|
|
filepath: fontPath,
|
|
groupName: 'Resources',
|
|
project,
|
|
isBuildFile: true,
|
|
verbose: true,
|
|
});
|
|
}
|
|
}
|
|
function getUIAppFonts(infoPlist) {
|
|
const fonts = infoPlist['UIAppFonts'];
|
|
if (fonts != null && Array.isArray(fonts) && fonts.every((font) => typeof font === 'string')) {
|
|
return fonts;
|
|
}
|
|
return [];
|
|
}
|