Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

818 B
Raw Blame
"use client";

import type { LayoutConfig } from "../design/layout";
import { createContext, useContext, type ReactNode } from "react";

// Non-brand runtime config the shell core needs (kept out of Brand so brand
// stays purely presentational): the persistence namespace, so a generic appshell
// never hardcodes a consumer's localStorage key.
export type ShellConfig = {
  persistKey: string;
  layout?: LayoutConfig;
};

const ShellConfigContext = createContext<ShellConfig>({ persistKey: "appshell:layout" });

export function ShellConfigProvider({
  value,
  children,
}: {
  value: ShellConfig;
  children: ReactNode;
}) {
  return <ShellConfigContext.Provider value={value}>{children}</ShellConfigContext.Provider>;
}

export function useShellConfig(): ShellConfig {
  return useContext(ShellConfigContext);
}