From d3f80a328279b21de320f1f2c422bd9ba231bd4c Mon Sep 17 00:00:00 2001 From: Owais Jamil Date: Tue, 16 Jun 2026 22:36:48 -0500 Subject: [PATCH] feat: add build version to sticky note --- .changeset/sunny-clubs-check.md | 5 ++ src/lib/components/StickyNote.svelte | 83 ++++++++++++++++++++++++++++ src/routes/+layout.svelte | 50 +---------------- src/routes/docs/CHANGELOG.md | 14 +++-- svelte.config.js | 34 +++++++++++- 5 files changed, 134 insertions(+), 52 deletions(-) create mode 100644 .changeset/sunny-clubs-check.md create mode 100644 src/lib/components/StickyNote.svelte diff --git a/.changeset/sunny-clubs-check.md b/.changeset/sunny-clubs-check.md new file mode 100644 index 0000000..0aa84da --- /dev/null +++ b/.changeset/sunny-clubs-check.md @@ -0,0 +1,5 @@ +--- +'intrepid-ibex': minor +--- + +add build version to sticky note diff --git a/src/lib/components/StickyNote.svelte b/src/lib/components/StickyNote.svelte new file mode 100644 index 0000000..fe50e8e --- /dev/null +++ b/src/lib/components/StickyNote.svelte @@ -0,0 +1,83 @@ + + + + + diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 5e5e2e3..3c4a7e9 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -24,6 +24,7 @@ import NativeWindow from '$lib/components/NativeWindow.svelte'; import NotImplementedDialog from '$lib/components/NotImplementedDialog.svelte'; import SetupDialog from '$lib/components/SetupDialog.svelte'; + import StickyNote from '$lib/components/StickyNote.svelte'; import '$lib/styles/style.css'; let { children } = $props(); @@ -112,7 +113,7 @@ { label: 'Trash', icon: '/icons/humanity/places/user-trash.svg', - onactivate: () => window.open('https://tangled.org/desertthunder.dev/ibex', '_blank', 'noopener,noreferrer') + onactivate: () => window.open('https://github.com/desertthunder.dev/ibex', '_blank', 'noopener,noreferrer') } ]); @@ -378,11 +379,7 @@ {/if} {#if showStickyNote} - + (showStickyNote = false)} /> {/if} @@ -492,43 +489,6 @@ height: 100%; } - .sticky-note { - position: relative; - align-self: end; - width: min(18rem, 100%); - margin-bottom: var(--space-8); - padding: var(--space-4); - transform: rotate(1.2deg); - color: #3a250e; - background: linear-gradient(135deg, #fff1a9, #e9bf51); - border: 1px solid #946b19; - border-radius: var(--radius-2); - box-shadow: - 0 12px 24px rgb(0 0 0 / 0.25), - 0 1px 0 rgb(255 255 255 / 0.72) inset; - } - - .sticky-note button { - position: absolute; - top: var(--space-1); - right: var(--space-1); - width: 1.25rem; - height: 1.25rem; - color: #6b4a12; - font-weight: 700; - cursor: default; - } - - .sticky-note h2 { - font-size: var(--text-4); - line-height: var(--leading-tight); - } - - .sticky-note p { - margin-top: var(--space-2); - font-size: var(--text-2); - } - @media (max-width: 1000px) { .desktop-stage { grid-template-columns: 6.5rem minmax(0, 1fr); @@ -541,10 +501,6 @@ left: auto; right: var(--space-3); } - - .sticky-note { - display: none; - } } @media (max-width: 640px) { diff --git a/src/routes/docs/CHANGELOG.md b/src/routes/docs/CHANGELOG.md index f648326..8c315ee 100644 --- a/src/routes/docs/CHANGELOG.md +++ b/src/routes/docs/CHANGELOG.md @@ -1,14 +1,20 @@ # Changelog -## 1.1.0 +## 1.1.0 - 2026-06-16 ### Minor Changes -- added an identity inspector to inspect atproto identity +- Added Changesets release tracking and contributor documentation. +- Added an Identity Inspector for ATProto identity material, handle validation, services, + verification methods, and PLC rotation keys. +- Added canonical `/repos/:did/identity` routing and desktop/Nautilus launchers for the + Identity Inspector. +- Added a build version label in the sticky note linked to the project source. +- Marked the current app release as `v1.1.0`. -## [Unreleased] +--- -Target release: `v1.0.0`. +## 1.0.0 ### 2026-06-09 diff --git a/svelte.config.js b/svelte.config.js index 4cfe47a..b6b0c34 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,12 +1,44 @@ import adapter from '@sveltejs/adapter-static'; +import * as proc from 'node:child_process'; +import * as fs from 'node:fs'; import { mdsvex } from 'mdsvex'; +const packageJson = JSON.parse(fs.readFileSync(new URL('./package.json', import.meta.url), 'utf8')); +const buildVersion = buildVersionLabel(packageJson.version); + +function getVersion(v) { + const verify = gitOutput(['rev-parse', '--verify', v]); + if (verify === null) return v; + return gitOutput(['describe', '--tags', '--abbrev=0', '--match', 'v[0-9]*']); +} + +function buildVersionLabel(version) { + const versionTag = `v${version}`; + const tag = getVersion(versionTag); + const count = gitOutput(tag ? ['rev-list', '--count', `${tag}..HEAD`] : ['rev-list', '--count', 'HEAD']) ?? '0'; + + if (count === '0') { + return `v${version}`; + } + + const commit = gitOutput(['rev-parse', '--short', 'HEAD']) ?? 'unknown'; + return `v${version}-${count}+g${commit}`; +} + +function gitOutput(args) { + try { + return proc.execFileSync('git', args, { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim(); + } catch { + return null; + } +} + /** @type {import('@sveltejs/kit').Config} */ const config = { extensions: ['.svelte', '.svx', '.md'], preprocess: [mdsvex({ extensions: ['.svx', '.md'] })], compilerOptions: { runes: ({ filename }) => (filename.split(/[/\\]/).includes('node_modules') ? undefined : true) }, - kit: { adapter: adapter({ fallback: 'index.html' }) } + kit: { adapter: adapter({ fallback: 'index.html' }), version: { name: buildVersion } } }; export default config; -- 2.51.2