mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-05-03 03:53:10 +02:00
Add some info and attribution
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
# Stage 1: Build frontend
|
||||
FROM node:20-slim AS frontend-builder
|
||||
|
||||
ARG COMMIT_HASH=unknown
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
COPY frontend/package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
RUN VITE_COMMIT_HASH=${COMMIT_HASH} npm run build
|
||||
|
||||
|
||||
# Stage 2: Python runtime
|
||||
|
||||
@@ -80,7 +80,8 @@ frontend/src/
|
||||
│ │ ├── SettingsMqttSection.tsx # MQTT broker config, TLS, publish toggles
|
||||
│ │ ├── SettingsDatabaseSection.tsx # DB size, cleanup, auto-decrypt, local label
|
||||
│ │ ├── SettingsBotSection.tsx # Bot list, code editor, add/delete/reset
|
||||
│ │ └── SettingsStatisticsSection.tsx # Read-only mesh network stats
|
||||
│ │ ├── SettingsStatisticsSection.tsx # Read-only mesh network stats
|
||||
│ │ └── SettingsAboutSection.tsx # Version, author, license, links
|
||||
│ ├── repeater/
|
||||
│ │ ├── repeaterPaneShared.tsx # Shared: RepeaterPane, KvRow, format helpers
|
||||
│ │ ├── RepeaterTelemetryPane.tsx # Battery, airtime, packet counts
|
||||
|
||||
@@ -16,6 +16,7 @@ import { SettingsMqttSection } from './settings/SettingsMqttSection';
|
||||
import { SettingsDatabaseSection } from './settings/SettingsDatabaseSection';
|
||||
import { SettingsBotSection } from './settings/SettingsBotSection';
|
||||
import { SettingsStatisticsSection } from './settings/SettingsStatisticsSection';
|
||||
import { SettingsAboutSection } from './settings/SettingsAboutSection';
|
||||
|
||||
interface SettingsModalBaseProps {
|
||||
open: boolean;
|
||||
@@ -77,6 +78,7 @@ export function SettingsModal(props: SettingsModalProps) {
|
||||
database: false,
|
||||
bot: false,
|
||||
statistics: false,
|
||||
about: false,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -267,6 +269,13 @@ export function SettingsModal(props: SettingsModalProps) {
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{shouldRenderSection('about') && (
|
||||
<div className={sectionWrapperClass}>
|
||||
{renderSectionHeader('about')}
|
||||
{isSectionVisible('about') && <SettingsAboutSection className={sectionContentClass} />}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
108
frontend/src/components/settings/SettingsAboutSection.tsx
Normal file
108
frontend/src/components/settings/SettingsAboutSection.tsx
Normal file
@@ -0,0 +1,108 @@
|
||||
import { Separator } from '../ui/separator';
|
||||
|
||||
const GITHUB_URL = 'https://github.com/jkingsman/Remote-Terminal-for-MeshCore';
|
||||
|
||||
export function SettingsAboutSection({ className }: { className?: string }) {
|
||||
const version = __APP_VERSION__;
|
||||
const commit = __COMMIT_HASH__;
|
||||
|
||||
return (
|
||||
<div className={className}>
|
||||
<div className="space-y-6">
|
||||
{/* Version */}
|
||||
<div className="text-center space-y-1">
|
||||
<h3 className="text-lg font-semibold">RemoteTerm for MeshCore</h3>
|
||||
<div className="text-sm text-muted-foreground">
|
||||
v{version}
|
||||
<span className="mx-1.5">·</span>
|
||||
<span className="font-mono text-xs">{commit}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Separator />
|
||||
|
||||
{/* Author & License */}
|
||||
<div className="text-sm text-center space-y-2">
|
||||
<p>
|
||||
Made with love and open source by{' '}
|
||||
<a
|
||||
href="https://jacksbrain.com"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-primary hover:underline"
|
||||
>
|
||||
Jack Kingsman
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
Licensed under the{' '}
|
||||
<a
|
||||
href={`${GITHUB_URL}/blob/main/LICENSE.md`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-primary hover:underline"
|
||||
>
|
||||
MIT License
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<Separator />
|
||||
|
||||
{/* Links */}
|
||||
<div className="flex justify-center gap-4 text-sm">
|
||||
<a
|
||||
href={GITHUB_URL}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-primary hover:underline"
|
||||
>
|
||||
GitHub
|
||||
</a>
|
||||
<a
|
||||
href={`${GITHUB_URL}/issues`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-primary hover:underline"
|
||||
>
|
||||
Report a Bug
|
||||
</a>
|
||||
<a
|
||||
href={`${GITHUB_URL}/blob/main/CHANGELOG.md`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-primary hover:underline"
|
||||
>
|
||||
Changelog
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<Separator />
|
||||
|
||||
{/* Acknowledgements */}
|
||||
<div className="text-sm text-center text-muted-foreground space-y-2">
|
||||
<p>With great appreciation to those who have made the tools upon which this is built:</p>
|
||||
<p>
|
||||
<a
|
||||
href="https://github.com/meshcore-dev/MeshCore"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-primary hover:underline"
|
||||
>
|
||||
MeshCore
|
||||
</a>
|
||||
<span className="mx-1.5">·</span>
|
||||
<a
|
||||
href="https://github.com/meshcore-dev/meshcore_py"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-primary hover:underline"
|
||||
>
|
||||
meshcore_py
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -5,7 +5,8 @@ export type SettingsSection =
|
||||
| 'mqtt'
|
||||
| 'database'
|
||||
| 'bot'
|
||||
| 'statistics';
|
||||
| 'statistics'
|
||||
| 'about';
|
||||
|
||||
export const SETTINGS_SECTION_ORDER: SettingsSection[] = [
|
||||
'radio',
|
||||
@@ -15,6 +16,7 @@ export const SETTINGS_SECTION_ORDER: SettingsSection[] = [
|
||||
'database',
|
||||
'bot',
|
||||
'statistics',
|
||||
'about',
|
||||
];
|
||||
|
||||
export const SETTINGS_SECTION_LABELS: Record<SettingsSection, string> = {
|
||||
@@ -25,4 +27,5 @@ export const SETTINGS_SECTION_LABELS: Record<SettingsSection, string> = {
|
||||
database: '🗄️ Database & Interface',
|
||||
bot: '🤖 Bot',
|
||||
statistics: '📊 Statistics',
|
||||
about: 'About',
|
||||
};
|
||||
|
||||
2
frontend/src/types/globals.d.ts
vendored
Normal file
2
frontend/src/types/globals.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
declare const __APP_VERSION__: string;
|
||||
declare const __COMMIT_HASH__: string;
|
||||
@@ -1,9 +1,24 @@
|
||||
import path from "path"
|
||||
import { execSync } from "child_process"
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
function getCommitHash(): string {
|
||||
// Docker builds pass VITE_COMMIT_HASH as an env var
|
||||
if (process.env.VITE_COMMIT_HASH) return process.env.VITE_COMMIT_HASH;
|
||||
try {
|
||||
return execSync('git rev-parse --short HEAD', { encoding: 'utf-8' }).trim();
|
||||
} catch {
|
||||
return 'unknown';
|
||||
}
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
define: {
|
||||
__APP_VERSION__: JSON.stringify(process.env.npm_package_version ?? 'unknown'),
|
||||
__COMMIT_HASH__: JSON.stringify(getCommitHash()),
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
|
||||
@@ -153,7 +153,8 @@ GIT_HASH=$(git rev-parse --short HEAD)
|
||||
|
||||
# Build docker image
|
||||
echo -e "${YELLOW}Building Docker image...${NC}"
|
||||
docker build -t jkingsman/remoteterm-meshcore:latest \
|
||||
docker build --build-arg COMMIT_HASH=$GIT_HASH \
|
||||
-t jkingsman/remoteterm-meshcore:latest \
|
||||
-t jkingsman/remoteterm-meshcore:$VERSION \
|
||||
-t jkingsman/remoteterm-meshcore:$GIT_HASH .
|
||||
echo -e "${GREEN}Docker build complete!${NC}"
|
||||
|
||||
Reference in New Issue
Block a user