Modernise the interface#50
Closed
miglen wants to merge 2 commits into
Closed
Conversation
Refreshes the look without changing any flows, form fields, or class names. Same forms, same options menu, same buttons — just modern. - files/css/index.css rewritten as the single source of truth: CSS custom properties for palette, system font stack, automatic prefers-color-scheme dark mode, mobile-first responsive, subtle shadows, accessible focus rings (3px accent halo on inputs), accent-color on checkboxes - files/php/index.inc.php switched from XHTML 1.0 Transitional to HTML5; inline <style> block removed in favour of <link rel="stylesheet"> to the shared sheet; deprecated <center> tag dropped; <ul> wrapper added to the options list; autofocus + autocomplete hints on the URL field; Username/Password fields get type="text" / type="password" with correct autocomplete tokens; footer moved to a styled .footer class - edit.php given the HTML5 doctype + viewport meta and points at the same stylesheet so it visually matches the entry form; user-agent labels tidied - Mini URL bar injected by index.php when include_form is on is restyled as a scoped dark slate bar with all:initial scoping, z-index:2147483647, flexbox layout for the URL field + Go button, and clean checkboxes for inline flag toggles. Self-contained inline styles only so the target page's CSS can't bleed into it Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Layout now mirrors a single-card-per-section model with a top app bar: PHProxy. [sun/moon SVG] ┌─────────────────────────────────────────────┐ │ [https://www.example.com/ ] [Proxify ] │ └─────────────────────────────────────────────┘ ┌─────────────────────────────────────────────┐ │ Options Cookies Headers │ │ ───────── │ │ ☐ Include Form ☐ Remove Scripts ... │ └─────────────────────────────────────────────┘ - CSS-only tabs (radio inputs + sibling selectors, no JS dependency). Options is the default tab. - Cookies tab enumerates non-settings $_COOKIE entries the proxy is holding for proxied sites, with a "Clear all cookies" action that POSTs ?action=clear-cookies. The handler in index.php sends an expired Set-Cookie for each (under both / and .HTTP_HOST domains) and redirects back. Settings cookies (flags, userAgent, PHPSESSID) are preserved. - Headers tab moves the User-Agent picker inline (with a tighter, modern UA list). The Save button submits via formaction="edit.php" formnovalidate so the existing edit.php handler keeps working — edit.php is unchanged for backward compatibility. - Theme toggle: 36x36 ghost button in the app bar with two inline SVGs (sun/moon, currentColor stroke). Click flips a data-theme attribute on <html> between light/dark and persists in localStorage. An early inline <script> in <head> reads localStorage before paint to avoid a flash of the wrong theme. - CSS: introduces --surface-2, --border-strong, --font-mono custom properties; ghost button variant; cookie-list styled with mono font and dashed-border empty state. URL input keeps autofocus (carried over from previous commit), so the page is immediately ready for typing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Visual refresh of the entry, settings, error, and auth views, plus a tabbed control panel and a manual theme toggle.
Closes the spirit of the user's own long-standing wish #4 (Better interface).
Independent of #49 — disjoint files.
Layout
What changed
files/css/index.css— single source of truthprefers-color-scheme: dark, overridable via[data-theme="dark"]/[data-theme="light"]on<html>(toggle wins, otherwise system pref)accent-coloron checkboxesfiles/php/index.inc.php— entry / error / auth template$_COOKIEentries the proxy is holding for proxied sites, with a Clear all cookies action that POSTs?action=clear-cookiesand redirects back. Settings cookies (flags,userAgent,PHPSESSID) are preserved.formaction="edit.php"so the existingedit.phphandler keeps workingautofocusandautocomplete="off"autocompletetokens<center>dropped (replaced by styled.footer)index.php— clear-cookies handlerRight after
functions.inc.phpis loaded, a small handler responds toPOST /?action=clear-cookies. It iterates$_COOKIE, sends an expiredSet-Cookiefor each non-settings entry (under both/and.$HTTP_HOSTto clean up under either domain scope), then redirects to the entry form.index.php—include_formmini URL bar (still in this PR)Restyled as a scoped dark slate bar with
all:initial,z-index:2147483647, flexbox URL field + Go button, clean inline checkboxes. Self-contained inline styles only.Theme toggle (new)
<script>in<head>readslocalStorage['phproxy-theme']and setsdata-themebefore paint — no flash of wrong theme on reloadlocalStoragetry/catchso private-mode browsers without storage still workTest plan
Verified inside
php:8.5-apache(PHP 8.5.6):php -lclean on every*.phpdata-themeflip + localStorage persistence verifiedSet-Cookiefor non-settings cookies only (verifiedflags,userAgent,PHPSESSIDare preserved)edit.phpwhich still works.card+p.errorstylesedit.phpstill works standalone for backward compatibility (HTTP 200)include_formflag on: restyled scoped mini bar injects correctlyerror_reporting(E_ALL) + display_errors=1: zero deprecations / warnings / noticesPreview at
http://localhost:8080/if the dev container is up. Switch your OS dark mode or click the toggle to test theming.🤖 Generated with Claude Code