mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-17 22:27:19 +00:00
Stabilize build: add Capacitor deps, TS target, stubs and guards
This commit is contained in:
parent
6f15448197
commit
0f68fcb57e
5 changed files with 1463 additions and 6 deletions
|
|
@ -235,9 +235,12 @@ export default function Notifications() {
|
||||||
<Check className="w-4 h-4" />
|
<Check className="w-4 h-4" />
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{notification.actionUrl && (
|
{(notification.actionUrl || (notification as any).action_url) && (
|
||||||
<Button
|
<Button
|
||||||
onClick={() => window.location.href = notification.actionUrl!}
|
onClick={() => {
|
||||||
|
const url = notification.actionUrl ?? (notification as any).action_url;
|
||||||
|
if (typeof url === 'string') window.location.href = url;
|
||||||
|
}}
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
size="sm"
|
||||||
className="h-8 px-3 text-cyan-400 hover:bg-cyan-500/10"
|
className="h-8 px-3 text-cyan-400 hover:bg-cyan-500/10"
|
||||||
|
|
|
||||||
|
|
@ -249,7 +249,7 @@ export default function Projects() {
|
||||||
|
|
||||||
{/* Technologies */}
|
{/* Technologies */}
|
||||||
<div className="flex flex-wrap gap-2 mb-4">
|
<div className="flex flex-wrap gap-2 mb-4">
|
||||||
{project.technologies.slice(0, 3).map((tech) => (
|
{(Array.isArray(project.technologies) ? project.technologies : []).slice(0, 3).map((tech) => (
|
||||||
<span
|
<span
|
||||||
key={tech}
|
key={tech}
|
||||||
className="bg-slate-700 text-cyan-300 text-xs px-2 py-1 rounded"
|
className="bg-slate-700 text-cyan-300 text-xs px-2 py-1 rounded"
|
||||||
|
|
@ -257,9 +257,9 @@ export default function Projects() {
|
||||||
{tech}
|
{tech}
|
||||||
</span>
|
</span>
|
||||||
))}
|
))}
|
||||||
{project.technologies.length > 3 && (
|
{Array.isArray(project.technologies) && project.technologies.length > 3 && (
|
||||||
<span className="text-slate-400 text-xs px-2 py-1">
|
<span className="text-slate-400 text-xs px-2 py-1">
|
||||||
+{project.technologies.length - 3}
|
+{(project.technologies.length - 3)}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
40
client/src/shared/app-registry.ts
Normal file
40
client/src/shared/app-registry.ts
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
// Minimal app registry stub to satisfy imports and provide types
|
||||||
|
export type AppId = string;
|
||||||
|
|
||||||
|
export interface AppDefinition {
|
||||||
|
id: AppId;
|
||||||
|
name: string;
|
||||||
|
route?: string;
|
||||||
|
icon?: string;
|
||||||
|
roles?: string[];
|
||||||
|
capabilities?: string[];
|
||||||
|
hidden?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const AppRegistry: Record<AppId, AppDefinition> = {};
|
||||||
|
|
||||||
|
export function getAppById(id: AppId): AppDefinition | undefined {
|
||||||
|
return AppRegistry[id];
|
||||||
|
}
|
||||||
|
|
||||||
|
export function listApps(): AppDefinition[] {
|
||||||
|
return Object.values(AppRegistry);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Basic enums to satisfy mode/realm references
|
||||||
|
export enum Mode {
|
||||||
|
Web = "web",
|
||||||
|
Desktop = "desktop",
|
||||||
|
Mobile = "mobile"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum Realm {
|
||||||
|
Foundation = "foundation",
|
||||||
|
Studio = "studio",
|
||||||
|
Network = "network"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Minimal route access check placeholder (always allows)
|
||||||
|
export function canAccessRoute(_user: unknown, _route: string): boolean {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
1414
package-lock.json
generated
1414
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -6,6 +6,8 @@
|
||||||
"tsBuildInfoFile": "./node_modules/typescript/tsbuildinfo",
|
"tsBuildInfoFile": "./node_modules/typescript/tsbuildinfo",
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
|
"target": "ES2017",
|
||||||
|
"downlevelIteration": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"lib": ["esnext", "dom", "dom.iterable"],
|
"lib": ["esnext", "dom", "dom.iterable"],
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue