mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
Add "Ironmount" prefix to page titles and display version in sidebar (#28)
* Initial plan * Initial exploration - understanding the codebase Co-authored-by: nicotsx <47644445+nicotsx@users.noreply.github.com> * Add "Ironmount - " prefix to all route titles and version in sidebar Co-authored-by: nicotsx <47644445+nicotsx@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nicotsx <47644445+nicotsx@users.noreply.github.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import { Link, NavLink } from "react-router";
|
|||||||
import {
|
import {
|
||||||
Sidebar,
|
Sidebar,
|
||||||
SidebarContent,
|
SidebarContent,
|
||||||
|
SidebarFooter,
|
||||||
SidebarGroup,
|
SidebarGroup,
|
||||||
SidebarGroupContent,
|
SidebarGroupContent,
|
||||||
SidebarHeader,
|
SidebarHeader,
|
||||||
@@ -13,6 +14,7 @@ import {
|
|||||||
} from "~/client/components/ui/sidebar";
|
} from "~/client/components/ui/sidebar";
|
||||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "~/client/components/ui/tooltip";
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "~/client/components/ui/tooltip";
|
||||||
import { cn } from "~/client/lib/utils";
|
import { cn } from "~/client/lib/utils";
|
||||||
|
import { APP_VERSION } from "~/client/lib/version";
|
||||||
|
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
@@ -85,6 +87,15 @@ export function AppSidebar() {
|
|||||||
</SidebarGroupContent>
|
</SidebarGroupContent>
|
||||||
</SidebarGroup>
|
</SidebarGroup>
|
||||||
</SidebarContent>
|
</SidebarContent>
|
||||||
|
<SidebarFooter className="p-4 border-r border-t border-border/50">
|
||||||
|
<div
|
||||||
|
className={cn("text-xs text-muted-foreground transition-all duration-200", {
|
||||||
|
"opacity-0 w-0 overflow-hidden": state === "collapsed",
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
Version {APP_VERSION}
|
||||||
|
</div>
|
||||||
|
</SidebarFooter>
|
||||||
</Sidebar>
|
</Sidebar>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
1
app/client/lib/version.ts
Normal file
1
app/client/lib/version.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export const APP_VERSION = import.meta.env.VITE_APP_VERSION || "dev";
|
||||||
@@ -16,7 +16,7 @@ export const clientMiddleware = [authMiddleware];
|
|||||||
|
|
||||||
export function meta(_: Route.MetaArgs) {
|
export function meta(_: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
{ title: "Download Recovery Key" },
|
{ title: "Ironmount - Download Recovery Key" },
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "Download your backup recovery key to ensure you can restore your data.",
|
content: "Download your backup recovery key to ensure you can restore your data.",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const clientMiddleware = [authMiddleware];
|
|||||||
|
|
||||||
export function meta(_: Route.MetaArgs) {
|
export function meta(_: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
{ title: "Login" },
|
{ title: "Ironmount - Login" },
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "Sign in to your Ironmount account.",
|
content: "Sign in to your Ironmount account.",
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export const clientMiddleware = [authMiddleware];
|
|||||||
|
|
||||||
export function meta(_: Route.MetaArgs) {
|
export function meta(_: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
{ title: "Onboarding" },
|
{ title: "Ironmount - Onboarding" },
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "Welcome to Ironmount. Create your admin account to get started.",
|
content: "Welcome to Ironmount. Create your admin account to get started.",
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export const handle = {
|
|||||||
|
|
||||||
export function meta(_: Route.MetaArgs) {
|
export function meta(_: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
{ title: "Backup Job Details" },
|
{ title: "Ironmount - Backup Job Details" },
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "View and manage backup job configuration, schedule, and snapshots.",
|
content: "View and manage backup job configuration, schedule, and snapshots.",
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export const handle = {
|
|||||||
|
|
||||||
export function meta(_: Route.MetaArgs) {
|
export function meta(_: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
{ title: "Backup Jobs" },
|
{ title: "Ironmount - Backup Jobs" },
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "Automate volume backups with scheduled jobs and retention policies.",
|
content: "Automate volume backups with scheduled jobs and retention policies.",
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export const handle = {
|
|||||||
|
|
||||||
export function meta(_: Route.MetaArgs) {
|
export function meta(_: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
{ title: "Create Backup Job" },
|
{ title: "Ironmount - Create Backup Job" },
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "Create a new automated backup job for your volumes.",
|
content: "Create a new automated backup job for your volumes.",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export const handle = {
|
|||||||
|
|
||||||
export function meta(_: Route.MetaArgs) {
|
export function meta(_: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
{ title: "Create Repository" },
|
{ title: "Ironmount - Create Repository" },
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "Create a new backup repository with encryption and compression.",
|
content: "Create a new backup repository with encryption and compression.",
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export const handle = {
|
|||||||
|
|
||||||
export function meta(_: Route.MetaArgs) {
|
export function meta(_: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
{ title: "Repositories" },
|
{ title: "Ironmount - Repositories" },
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "Manage your backup repositories with encryption and compression.",
|
content: "Manage your backup repositories with encryption and compression.",
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export const handle = {
|
|||||||
|
|
||||||
export function meta({ params }: Route.MetaArgs) {
|
export function meta({ params }: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
{ title: params.name },
|
{ title: `Ironmount - ${params.name}` },
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "View repository configuration, status, and snapshots.",
|
content: "View repository configuration, status, and snapshots.",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export const handle = {
|
|||||||
|
|
||||||
export function meta({ params }: Route.MetaArgs) {
|
export function meta({ params }: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
{ title: `Snapshot ${params.snapshotId}` },
|
{ title: `Ironmount - Snapshot ${params.snapshotId}` },
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "Browse and restore files from a backup snapshot.",
|
content: "Browse and restore files from a backup snapshot.",
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export const handle = {
|
|||||||
|
|
||||||
export function meta(_: Route.MetaArgs) {
|
export function meta(_: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
{ title: "Settings" },
|
{ title: "Ironmount - Settings" },
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "Manage your account settings and preferences.",
|
content: "Manage your account settings and preferences.",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export const handle = {
|
|||||||
|
|
||||||
export function meta(_: Route.MetaArgs) {
|
export function meta(_: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
{ title: "Create Volume" },
|
{ title: "Ironmount - Create Volume" },
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "Create a new storage volume with automatic mounting and health checks.",
|
content: "Create a new storage volume with automatic mounting and health checks.",
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export const handle = {
|
|||||||
|
|
||||||
export function meta({ params }: Route.MetaArgs) {
|
export function meta({ params }: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
{ title: params.name },
|
{ title: `Ironmount - ${params.name}` },
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "View and manage volume details, configuration, and files.",
|
content: "View and manage volume details, configuration, and files.",
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export const handle = {
|
|||||||
|
|
||||||
export function meta(_: Route.MetaArgs) {
|
export function meta(_: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
{ title: "Volumes" },
|
{ title: "Ironmount - Volumes" },
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "Create, manage, monitor, and automate your Docker volumes with ease.",
|
content: "Create, manage, monitor, and automate your Docker volumes with ease.",
|
||||||
|
|||||||
1
bun.lock
1
bun.lock
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
|
"configVersion": 0,
|
||||||
"workspaces": {
|
"workspaces": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@ironmount/client",
|
"name": "@ironmount/client",
|
||||||
|
|||||||
@@ -3,9 +3,21 @@ import tailwindcss from "@tailwindcss/vite";
|
|||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
import tsconfigPaths from "vite-tsconfig-paths";
|
import tsconfigPaths from "vite-tsconfig-paths";
|
||||||
import { reactRouterHonoServer } from "react-router-hono-server/dev";
|
import { reactRouterHonoServer } from "react-router-hono-server/dev";
|
||||||
|
import { execSync } from "node:child_process";
|
||||||
|
|
||||||
|
const getVersion = () => {
|
||||||
|
try {
|
||||||
|
return execSync("git describe --tags --always").toString().trim();
|
||||||
|
} catch {
|
||||||
|
return "dev";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [reactRouterHonoServer({ runtime: "bun" }), reactRouter(), tailwindcss(), tsconfigPaths()],
|
plugins: [reactRouterHonoServer({ runtime: "bun" }), reactRouter(), tailwindcss(), tsconfigPaths()],
|
||||||
|
define: {
|
||||||
|
"import.meta.env.VITE_APP_VERSION": JSON.stringify(getVersion()),
|
||||||
|
},
|
||||||
build: {
|
build: {
|
||||||
outDir: "dist",
|
outDir: "dist",
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user