feat: adicionar versão na sidebar e atualizar documentação
- Exibir versão (v1.2.5) ao lado do logo na sidebar - Adicionar link do repositório Companion na aba de configurações - Atualizar README com documentação completa do OpenSheets Companion - Atualizar versões das dependências e estrutura do banco de dados - Adicionar logo do Creditas - Remover fontes não utilizadas - Atualizar logo_text.png Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
"use client";
|
||||
|
||||
import type { ReactNode } from "react";
|
||||
import {
|
||||
RiAndroidLine,
|
||||
RiDownload2Line,
|
||||
RiExternalLinkLine,
|
||||
RiNotification3Line,
|
||||
RiQrCodeLine,
|
||||
RiShieldCheckLine,
|
||||
@@ -25,11 +27,28 @@ interface CompanionTabProps {
|
||||
tokens: ApiToken[];
|
||||
}
|
||||
|
||||
const steps = [
|
||||
const steps: {
|
||||
icon: typeof RiDownload2Line;
|
||||
title: string;
|
||||
description: ReactNode;
|
||||
}[] = [
|
||||
{
|
||||
icon: RiDownload2Line,
|
||||
title: "Instale o app",
|
||||
description: "Instale o APK.",
|
||||
description: (
|
||||
<>
|
||||
Baixe o APK no{" "}
|
||||
<a
|
||||
href="https://github.com/felipegcoutinho/opensheets-companion"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex items-center gap-0.5 text-primary hover:underline"
|
||||
>
|
||||
GitHub
|
||||
<RiExternalLinkLine className="h-3 w-3" />
|
||||
</a>
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
icon: RiQrCodeLine,
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
import Image from "next/image";
|
||||
import { cn } from "@/lib/utils/ui";
|
||||
import { version } from "@/package.json";
|
||||
|
||||
interface LogoProps {
|
||||
variant?: "full" | "small";
|
||||
className?: string;
|
||||
showVersion?: boolean;
|
||||
}
|
||||
|
||||
export function Logo({ variant = "full", className }: LogoProps) {
|
||||
export function Logo({
|
||||
variant = "full",
|
||||
className,
|
||||
showVersion = false,
|
||||
}: LogoProps) {
|
||||
if (variant === "small") {
|
||||
return (
|
||||
<Image
|
||||
@@ -21,7 +27,7 @@ export function Logo({ variant = "full", className }: LogoProps) {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={cn("flex items-center py-4", className)}>
|
||||
<div className={cn("flex items-center gap-1.5 py-4", className)}>
|
||||
<Image
|
||||
src="/logo_small.png"
|
||||
alt="Opensheets"
|
||||
@@ -38,6 +44,11 @@ export function Logo({ variant = "full", className }: LogoProps) {
|
||||
className="object-contain dark:invert"
|
||||
priority
|
||||
/>
|
||||
{showVersion && (
|
||||
<span className="text-[10px] font-medium text-muted-foreground">
|
||||
v{version}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,13 +11,13 @@ interface ReturnButtonProps {
|
||||
const ReturnButton = React.memo(({ disabled, onClick }: ReturnButtonProps) => {
|
||||
return (
|
||||
<Button
|
||||
className="w-28 h-6 rounded-sm"
|
||||
className="w-32 h-6 rounded-sm lowercase"
|
||||
size="sm"
|
||||
disabled={disabled}
|
||||
onClick={onClick}
|
||||
aria-label="Retornar para o mês atual"
|
||||
>
|
||||
Mês Atual
|
||||
Ir para Mês Atual
|
||||
</Button>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -53,7 +53,7 @@ export function AppSidebar({
|
||||
<SidebarMenuItem>
|
||||
<SidebarMenuButton
|
||||
asChild
|
||||
className="data-[slot=sidebar-menu-button]:px-1.5! hover:bg-transparent active:bg-transparent pt-4 justify-center hover:scale-105 transition-all duration-200"
|
||||
className="data-[slot=sidebar-menu-button]:px-1.5! hover:bg-transparent active:bg-transparent pt-8 py-6 justify-center hover:scale-120 scale-110 transition-all duration-200"
|
||||
>
|
||||
<a href="/dashboard">
|
||||
<LogoContent />
|
||||
@@ -77,5 +77,10 @@ function LogoContent() {
|
||||
const { state } = useSidebar();
|
||||
const isCollapsed = state === "collapsed";
|
||||
|
||||
return <Logo variant={isCollapsed ? "small" : "full"} />;
|
||||
return (
|
||||
<Logo
|
||||
variant={isCollapsed ? "small" : "full"}
|
||||
showVersion={!isCollapsed}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
RiInboxLine,
|
||||
RiNoCreditCardLine,
|
||||
RiPriceTag3Line,
|
||||
RiSettingsLine,
|
||||
RiSettings2Line,
|
||||
RiSparklingLine,
|
||||
RiTodoLine,
|
||||
} from "@remixicon/react";
|
||||
@@ -199,7 +199,7 @@ export function createSidebarNavData(
|
||||
{
|
||||
title: "Ajustes",
|
||||
url: "/ajustes",
|
||||
icon: RiSettingsLine,
|
||||
icon: RiSettings2Line,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user