feat(settings): display app version, link

This commit is contained in:
ItzCrazyKns
2025-12-06 15:22:06 +05:30
parent 4fc810d976
commit 65ef299d72
2 changed files with 51 additions and 28 deletions

View File

@@ -1,3 +1,5 @@
import pkg from './package.json' with { type: 'json' };
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
@@ -9,6 +11,9 @@ const nextConfig = {
],
},
serverExternalPackages: ['pdf-parse'],
env: {
NEXT_PUBLIC_VERSION: pkg.version,
},
};
export default nextConfig;

View File

@@ -3,6 +3,7 @@ import {
ArrowLeft,
BrainCog,
ChevronLeft,
ExternalLink,
Search,
Sliders,
ToggleRight,
@@ -115,7 +116,8 @@ const SettingsDialogue = ({
</div>
) : (
<div className="flex flex-1 inset-0 h-full overflow-hidden">
<div className="hidden lg:flex flex-col w-[240px] border-r border-white-200 dark:border-dark-200 h-full px-3 pt-3 overflow-y-auto">
<div className="hidden lg:flex flex-col justify-between w-[240px] border-r border-white-200 dark:border-dark-200 h-full px-3 pt-3 overflow-y-auto">
<div className="flex flex-col">
<button
onClick={() => setIsOpen(false)}
className="group flex flex-row items-center hover:bg-light-200 hover:dark:bg-dark-200 p-2 rounded-lg"
@@ -128,6 +130,7 @@ const SettingsDialogue = ({
Back
</p>
</button>
<div className="flex flex-col items-start space-y-1 mt-8">
{sections.map((section) => (
<button
@@ -146,6 +149,21 @@ const SettingsDialogue = ({
))}
</div>
</div>
<div className="flex flex-col space-y-1 py-[18px] px-2">
<p className="text-xs text-black/70 dark:text-white/70">
Version: {process.env.NEXT_PUBLIC_VERSION}
</p>
<a
href="https://github.com/itzcrazykns/perplexica"
target="_blank"
rel="noopener noreferrer"
className="text-xs text-black/70 dark:text-white/70 flex flex-row space-x-1 items-center transition duration-200 hover:text-black/90 hover:dark:text-white/90"
>
<span>GitHub</span>
<ExternalLink size={12} />
</a>
</div>
</div>
<div className="w-full flex flex-col overflow-hidden">
<div className="flex flex-row lg:hidden w-full justify-between px-[20px] my-4 flex-shrink-0">
<button