Files
modern-glance/docs/glance.yml
T
uhlwoogiandClaude Opus 4.7 4b8a34a2ae Add in-place dashboard edit mode
A toggle on the dashboard flips into edit mode where widgets get
drag/edit/delete handles and a "+ Add widget" button per column. Most
edits no longer require touching YAML.

- Drag-drop reorder via SortableJS, persisted through a bulk-layout
  endpoint that rebuilds each column's widgets sequence in the
  yaml.Node tree.
- Inline form dialog driven by per-widget field schemas
  (admin-schemas.go) covering 25 widget types. Surgical updates apply
  changed fields to the widget node so untouched keys and comments
  survive. Falls back to the existing YAML editor for group and
  split-column (those need a recursive nested-widget UI).
- Per-column "+ Add widget" picker that opens the dialog pre-filled
  with sensible defaults for the chosen type.
- Field validation and autocomplete for weather location (Open-Meteo
  geocoding), market symbol (Yahoo Finance), and RSS feed URL
  (gofeed). Network failures soft-pass for weather/markets so the
  save isn't blocked when external APIs are unreachable.
- Picking a market suggestion auto-fills the company name field via
  per-suggestion `extra` fields.
- Edit mode persists across reloads via localStorage so saves don't
  drop the user back into view mode.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 16:51:52 +00:00

88 lines
2.6 KiB
YAML

# --- Edit access ---
# /edit is locked down by default. Pick ONE of the two blocks below.
#
# Option A (recommended): require login.
# Generate values with:
# go run . secret:make
# go run . password:hash <your-password>
#
# auth:
# secret-key: <paste base64 secret here>
# users:
# yourname:
# password-hash: <paste bcrypt hash here>
#
# Option B: open /edit without authentication. ONLY on a trusted network —
# anyone who can reach this server can rewrite your config.
# (The config key is still named `admin` for backward compatibility.)
#
admin:
allow-without-auth: true
pages:
- name: Home
# Optionally, if you only have a single page you can hide the desktop navigation for a cleaner look
# hide-desktop-navigation: true
columns:
- size: small
widgets:
- type: calendar
first-day-of-week: monday
- type: rss
limit: 10
collapse-after: 3
cache: 12h
feeds:
- url: https://www.techmeme.com/feed.xml
title: TechMeme
- type: server-stats
- size: full
widgets:
- type: group
widgets:
- type: hacker-news
- type: videos
channels:
- UCXuqSBlHAE6Xw-yeJA0Tunw # Linus Tech Tips
- UCR-DXc1voovS8nhAvccRZhg # Jeff Geerling
- UCsBjURrPoezykLs9EqgamOA # Fireship
- UCBJycsmduvYEL83R_U4JriQ # Marques Brownlee
- UCHnyfMqiRRG1u-2MsSQLbXA # Veritasium
- type: group
widgets:
- type: reddit
subreddit: technology
show-thumbnails: true
- type: reddit
subreddit: selfhosted
show-thumbnails: true
- size: small
widgets:
- type: weather
location: Houston, US
units: imperial
hour-format: 12h
# Optionally hide the location from being displayed in the widget
# hide-location: true
hide-location: true
show-area-name: false
- type: markets
markets:
- symbol: AMZN
name: Amazon.com, Inc.
# Add more pages here:
# - name: Your page name
# columns:
# - size: small
# widgets:
# # Add widgets here
# - size: full
# widgets:
# # Add widgets here
# - size: small
# widgets:
# # Add widgets here