chore: restart the repository with a clean history
CI / Docker image (push) Successful in 12s
CI / Server (push) Successful in 25s
CI / CLI (push) Successful in 13s
Development image / Development image (push) Successful in 21s
CI / CLI (windows) (push) Successful in 57s
CI / CLI (linux-arm64, static) (push) Successful in 1m37s
Release / Prepare release (push) Successful in 2s
Release / Server (linux-x64) (push) Successful in 53s
Release / CLI (linux-arm64, static) (push) Successful in 1m32s
Release / Docker image (push) Successful in 2m48s
Release / Server (windows-x64) (push) Successful in 6m20s
Release / CLI (windows-x64) (push) Successful in 6m48s
Release / CLI (linux-x64) (push) Successful in 7m8s
Release / Publish release (push) Successful in 1s
CI / Docker image (push) Successful in 12s
CI / Server (push) Successful in 25s
CI / CLI (push) Successful in 13s
Development image / Development image (push) Successful in 21s
CI / CLI (windows) (push) Successful in 57s
CI / CLI (linux-arm64, static) (push) Successful in 1m37s
Release / Prepare release (push) Successful in 2s
Release / Server (linux-x64) (push) Successful in 53s
Release / CLI (linux-arm64, static) (push) Successful in 1m32s
Release / Docker image (push) Successful in 2m48s
Release / Server (windows-x64) (push) Successful in 6m20s
Release / CLI (windows-x64) (push) Successful in 6m48s
Release / CLI (linux-x64) (push) Successful in 7m8s
Release / Publish release (push) Successful in 1s
Squash the tree into one commit, drop docs/architecture.html, reset the version line to 0.3.0, consolidate the changelog, enable Renovate automerge for non-major updates and add AGENTS.md.
This commit is contained in:
438 files changed
+45070
No files matched your search
@@ -0,0 +1,83 @@
|
||||
import "./styles.sass";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Heart } from "lucide-react";
|
||||
import { useUser } from "@/common/contexts/user.js";
|
||||
import { AUTHOR_URL, FORK_URL, GITHUB_URL } from "@/App.jsx";
|
||||
|
||||
const RELEASES_API = "https://git.fristy.net/api/v1/repos/fristy/frislit/releases/latest";
|
||||
const CACHE_KEY = "frislit.latestRelease";
|
||||
const CACHE_TTL = 6 * 60 * 60 * 1000;
|
||||
|
||||
const parseVersion = version => String(version || "").replace(/^v/, "").split("-")[0].split(".").map(Number);
|
||||
|
||||
const isNewer = (candidate, current) => {
|
||||
const a = parseVersion(candidate), b = parseVersion(current);
|
||||
if (a.some(Number.isNaN) || b.some(Number.isNaN)) return false;
|
||||
for (let i = 0; i < Math.max(a.length, b.length); i++) {
|
||||
if ((a[i] || 0) !== (b[i] || 0)) return (a[i] || 0) > (b[i] || 0);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const useLatestRelease = () => {
|
||||
const [latest, setLatest] = useState(null);
|
||||
|
||||
useEffect(() => {
|
||||
let cancelled = false;
|
||||
try {
|
||||
const cached = JSON.parse(localStorage.getItem(CACHE_KEY));
|
||||
if (cached && Date.now() - cached.at < CACHE_TTL) return setLatest(cached.version);
|
||||
} catch {
|
||||
setLatest(null);
|
||||
}
|
||||
|
||||
fetch(RELEASES_API, { headers: { Accept: "application/json" } })
|
||||
.then(response => response.ok ? response.json() : null)
|
||||
.then(release => {
|
||||
if (cancelled || !release?.tag_name) return;
|
||||
setLatest(release.tag_name);
|
||||
try {
|
||||
localStorage.setItem(CACHE_KEY, JSON.stringify({ version: release.tag_name, at: Date.now() }));
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
})
|
||||
.catch(() => null);
|
||||
return () => { cancelled = true; };
|
||||
}, []);
|
||||
|
||||
return latest;
|
||||
};
|
||||
|
||||
export const Footer = () => {
|
||||
const { serverInfo } = useUser();
|
||||
const latest = useLatestRelease();
|
||||
const version = serverInfo?.version;
|
||||
const update = version && latest && isNewer(latest, version) ? latest : null;
|
||||
|
||||
return (
|
||||
<footer className="app-footer">
|
||||
<div className="app-footer-inner">
|
||||
<div className="app-footer-group">
|
||||
<span className="app-footer-brand wordmark">fris<em>lit</em></span>
|
||||
{version && (
|
||||
<a className="app-footer-version" href={`${GITHUB_URL}/releases/tag/v${version}`} target="_blank"
|
||||
rel="noreferrer" title="Release notes">v{version}</a>
|
||||
)}
|
||||
{update && (
|
||||
<a className="app-footer-update" href={`${GITHUB_URL}/releases/latest`} target="_blank" rel="noreferrer">
|
||||
{update.startsWith("v") ? update : `v${update}`} available
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<span className="app-footer-group app-footer-made">
|
||||
Made with <Heart size={12} fill="currentColor" /> by{" "}
|
||||
<a href={AUTHOR_URL} target="_blank" rel="noreferrer">GNM</a>
|
||||
{" · "}forked by{" "}
|
||||
<a href={FORK_URL} target="_blank" rel="noreferrer">fristy</a>
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
export { Footer as default } from "./Footer.jsx";
|
||||
@@ -0,0 +1,68 @@
|
||||
@use "@/common/styles/colors"
|
||||
@use "@/common/styles/breakpoints"
|
||||
|
||||
.app-footer
|
||||
flex-shrink: 0
|
||||
border-top: 1px solid colors.$border
|
||||
color: colors.$muted
|
||||
font-size: 0.75rem
|
||||
|
||||
.app-footer-inner
|
||||
max-width: 68rem
|
||||
margin: 0 auto
|
||||
padding: 0.625rem 2rem
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: space-between
|
||||
gap: 1rem
|
||||
|
||||
@media (max-width: breakpoints.$mobile)
|
||||
padding: 0.75rem 1rem
|
||||
flex-direction: column
|
||||
gap: 0.5rem
|
||||
|
||||
.app-footer-group
|
||||
display: flex
|
||||
align-items: center
|
||||
gap: 0.5rem
|
||||
min-width: 0
|
||||
|
||||
.app-footer-brand
|
||||
color: colors.$subtext
|
||||
font-weight: 700
|
||||
letter-spacing: -0.02em
|
||||
|
||||
.app-footer-version
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace
|
||||
color: colors.$muted
|
||||
transition: color 0.15s ease
|
||||
|
||||
&:hover
|
||||
color: colors.$text
|
||||
|
||||
.app-footer-update
|
||||
padding: 0.0625rem 0.45rem
|
||||
border-radius: 0.375rem
|
||||
background-color: colors.$primary-tint
|
||||
color: colors.$primary-bright
|
||||
font-weight: 600
|
||||
transition: background-color 0.15s ease, color 0.15s ease
|
||||
|
||||
&:hover
|
||||
background-color: colors.$primary
|
||||
color: colors.$on-primary
|
||||
|
||||
.app-footer-made
|
||||
gap: 0.3125rem
|
||||
white-space: nowrap
|
||||
|
||||
svg
|
||||
color: colors.$error
|
||||
|
||||
a
|
||||
color: colors.$subtext
|
||||
font-weight: 600
|
||||
transition: color 0.15s ease
|
||||
|
||||
&:hover
|
||||
color: colors.$text
|
||||
Reference in new issue
Block a user