diff --git a/README.md b/README.md index 17bb9f1..bfe0e10 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A Google Workspace app that removes the password protection of **Office (DOCX/XLSX/PPTX), PDF files and compressed archives (ZIP)** whose password you already know, for archiving purposes: you can archive them under your own protection (account security, encrypted storage, access policies) instead of a sender's file password. -**Website and documentation:** . The web app runs at [`/app/`](https://nullthrone.github.io/unpassword/app/). +**Website and documentation:** . The web app runs at [`/app/`](https://unpassword.nullthrone.xyz/app/). **Zero-knowledge:** decryption and re-saving happen entirely in your browser. There is no backend. The provider of unpassword never receives your files, your passwords or the decrypted content. diff --git a/design/unpassword/png/icon-128.png b/design/unpassword/png/icon-128.png index 047be52..f1a1969 100644 Binary files a/design/unpassword/png/icon-128.png and b/design/unpassword/png/icon-128.png differ diff --git a/design/unpassword/png/icon-16.png b/design/unpassword/png/icon-16.png index 295fafc..91eda5f 100644 Binary files a/design/unpassword/png/icon-16.png and b/design/unpassword/png/icon-16.png differ diff --git a/design/unpassword/png/icon-32.png b/design/unpassword/png/icon-32.png index 17d1466..f31bf38 100644 Binary files a/design/unpassword/png/icon-32.png and b/design/unpassword/png/icon-32.png differ diff --git a/design/unpassword/png/icon-48.png b/design/unpassword/png/icon-48.png index db24ab6..d6931fe 100644 Binary files a/design/unpassword/png/icon-48.png and b/design/unpassword/png/icon-48.png differ diff --git a/design/unpassword/png/icon-96.png b/design/unpassword/png/icon-96.png index 480ccf7..f861dcc 100644 Binary files a/design/unpassword/png/icon-96.png and b/design/unpassword/png/icon-96.png differ diff --git a/docs/PRIVACY.md b/docs/PRIVACY.md index fe07387..797c790 100644 --- a/docs/PRIVACY.md +++ b/docs/PRIVACY.md @@ -27,7 +27,7 @@ unpassword's use of information received from Google APIs adheres to the [Google ## Hosting -This website and the web app are static files served by GitHub Pages, operated by GitHub, Inc., USA. To deliver the pages, GitHub processes technical access data: IP address, time, requested file and browser identification. GitHub may store this data in server logs. The logs contain no file content and no passwords. The legal basis is Art. 6(1)(f) GDPR, our legitimate interest in delivering the site securely. Details are in the [GitHub General Privacy Statement](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement). +This website and the web app are static files at `unpassword.nullthrone.xyz`, served by GitHub Pages, operated by GitHub, Inc., USA. To deliver the pages, GitHub processes technical access data: IP address, time, requested file and browser identification. GitHub may store this data in server logs. The logs contain no file content and no passwords. The legal basis is Art. 6(1)(f) GDPR, our legitimate interest in delivering the site securely. Details are in the [GitHub General Privacy Statement](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement). The documentation pages contain no scripts. The web app loads scripts only from this site, and from Google only when you choose to use Google Drive. diff --git a/docs/SETUP.md b/docs/SETUP.md index cd37da5..da9c1de 100644 --- a/docs/SETUP.md +++ b/docs/SETUP.md @@ -1,47 +1,92 @@ -# Deployment setup +# Deployment and Marketplace setup -unpassword consists of a static web app and an optional Gmail add-on. Both must belong to the **same Google Cloud project**: `drive.file` grants are per project, and that is what lets the web app open the encrypted attachment the add-on stored. +This guide takes unpassword from the repository to a public listing in the Google Workspace Marketplace. The listing contains both the web app with its Drive integration and the Gmail add-on. -These steps need a Google account with access to the Cloud console and, for Marketplace publication, a Google Workspace Marketplace developer registration. +The web app and the Gmail add-on must belong to the **same Google Cloud project**. `drive.file` grants are per project, and that is what lets the web app open the encrypted attachment the add-on stored. -## 1. Google Cloud project +| | Value | +|---|---| +| Site | `https://unpassword.nullthrone.xyz/` | +| Web app | `https://unpassword.nullthrone.xyz/app/` | +| Authorized domain | `nullthrone.xyz` | +| Developer contact | `github@nullthrone.xyz` | -1. Create a project in the [Cloud console](https://console.cloud.google.com/) and note its **project number**. That number is `VITE_GOOGLE_APP_ID`. -2. Enable the **Google Drive API**, **Google Picker API**, **Gmail API** (for the add-on) and **Google Workspace Marketplace SDK**. -3. **OAuth consent screen:** set the app name to *unpassword*, add the privacy policy URL (`docs/PRIVACY.md` on GitHub or a published copy) and the scopes: - - `https://www.googleapis.com/auth/drive.file` - - `https://www.googleapis.com/auth/gmail.addons.execute` - - `https://www.googleapis.com/auth/gmail.addons.current.message.readonly` -4. **OAuth client ID** of type *Web application*: - - Authorized JavaScript origin: `https://.github.io` (or your domain). - - This is `VITE_GOOGLE_CLIENT_ID`. -5. **API key:** restrict it to *HTTP referrers* `https://.github.io/*` (the app sends only its origin as referrer, `strict-origin`) and to the *Google Picker API*. This is `VITE_GOOGLE_API_KEY`. +## 1. Domain -None of these three values is secret. They end up in the public JavaScript bundle by design, and the restrictions above are what protect them. +The site runs on GitHub Pages under its own domain. Google verifies the ownership of every domain the OAuth consent screen names, so it must be a domain you control. `github.io` does not qualify. -## 2. Web app (GitHub Pages) +1. **DNS (GoDaddy → nullthrone.xyz → DNS):** add a `CNAME` record with name `unpassword` and value `nullthrone.github.io`. Do not add A records or forwarding for the subdomain. +2. **GitHub domain verification:** in GitHub, open organization *nullthrone* → *Settings* → *Pages* → *Add a domain* and enter `nullthrone.xyz`. Add the TXT record GitHub shows (`_github-pages-challenge-nullthrone`) at GoDaddy, then click *Verify*. This protects all subdomains from takeover. +3. **Repository:** in *Settings* → *Pages*: + - set *Source* to **GitHub Actions**; + - set *Custom domain* to `unpassword.nullthrone.xyz`; + - enable **Enforce HTTPS** once it becomes available. -1. In the repository settings, go to *Pages* and set *Source* to **GitHub Actions**. -2. In *Settings → Secrets and variables → Actions → Variables*, add `GOOGLE_CLIENT_ID`, `GOOGLE_API_KEY` and `GOOGLE_APP_ID`. -3. Push a tag `v*` (e.g. `v0.1.0`), or run the workflow manually. `.github/workflows/pages.yml` builds the web app and the documentation site, then deploys both: - - `https://.github.io/unpassword/` – documentation site (`site/`, rendered from `docs/`) - - `https://.github.io/unpassword/app/` – the web app (`web/`) - - `https://.github.io/unpassword/SHA256SUMS.txt` – checksums of every published file, also attached to the workflow run + With an Actions deployment, no `CNAME` file is needed; GitHub uses this setting. The old `nullthrone.github.io/unpassword/` address redirects. +4. **Google Search Console:** add a *Domain* property `nullthrone.xyz` and add the `google-site-verification=…` TXT record with name `@` at GoDaddy. Use an account that is owner or editor of the Cloud project. -To host elsewhere, build the same way (`site/build.mjs --app web/dist`) and serve `_site/` statically. If your server can set headers, also send the CSP from `web/vite.config.ts` as an HTTP header, plus `frame-ancestors 'none'`. +*"Domain is not eligible for HTTPS at this time"*: GitHub has not issued the certificate yet. This usually takes minutes to an hour. If it persists, remove the custom domain, wait a minute and enter it again; this starts a new certificate request. Check that `dig unpassword.nullthrone.xyz CNAME +short` returns `nullthrone.github.io.`. + +## 2. Google Cloud project + +1. Create a project in the [Cloud console](https://console.cloud.google.com/) and note its **project number**. That number is `GOOGLE_APP_ID`. +2. Enable these APIs: **Google Drive API**, **Google Picker API**, **Gmail API** and **Google Workspace Marketplace SDK**. + +## 3. OAuth consent screen + +In *Google Auth Platform* (OAuth consent screen), fill in *Branding*, *Audience* and *Data access*: + +| Field | Value | +|---|---| +| App name | `unpassword` (must match the Marketplace listing exactly) | +| User support email | `github@nullthrone.xyz` | +| App logo | `brand/icon-128.png` | +| Application home page | `https://unpassword.nullthrone.xyz/` | +| Privacy policy | `https://unpassword.nullthrone.xyz/privacy/` | +| Terms of service | `https://unpassword.nullthrone.xyz/terms/` | +| Authorized domains | `nullthrone.xyz` | +| Developer contact | `github@nullthrone.xyz` | +| Audience | External, then *Publish app* to move to production | + +Add exactly these scopes, no more: + +| Scope | Used by | Purpose | +|---|---|---| +| `https://www.googleapis.com/auth/drive.file` | Web app, add-on | Open the file the user picked, create the unlocked copy, store the encrypted attachment | +| `https://www.googleapis.com/auth/gmail.addons.execute` | Add-on | Run the add-on in Gmail | +| `https://www.googleapis.com/auth/gmail.addons.current.message.readonly` | Add-on | Read the attachments of the open message to detect password protection | -## 3. Drive "Open with" integration +`gmail.addons.current.message.readonly` is a **sensitive** scope. That triggers the verification in step 7. The console shows the classification of each scope; go by what it says. -In the Cloud console, open *Google Workspace Marketplace SDK* and then *App Configuration*: +## 4. Credentials -1. Enable **Drive app** integration. -2. **Open URL:** `https://.github.io/unpassword/app/`. Drive appends `?state={"ids":[…],"action":"open",…}`, which the app reads (`web/src/google/drive.ts` → `launchFileId`). -3. **Default MIME types:** `application/pdf`, `application/zip` - **Secondary MIME types:** `application/x-zip-compressed`, `application/octet-stream`, `application/x-ole-storage`, `application/vnd.ms-office`, `application/encrypted`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`, `application/vnd.openxmlformats-officedocument.presentationml.presentation` - **File extensions:** `pdf`, `zip`, `docx`, `xlsx`, `pptx`, `docm`, `xlsm`, `pptm` -4. Leave "Creating files" disabled. unpassword only opens existing files. +1. **OAuth client ID** of type *Web application*: + - Authorized JavaScript origin: `https://unpassword.nullthrone.xyz` + - This value is `GOOGLE_CLIENT_ID`. +2. **API key:** + - Application restriction *HTTP referrers*: `https://unpassword.nullthrone.xyz/*`. The app sends only its origin as referrer (`strict-origin`). + - API restriction: *Google Picker API* only. + - This value is `GOOGLE_API_KEY`. +3. In the repository, under *Settings* → *Secrets and variables* → *Actions* → **Variables**, add `GOOGLE_CLIENT_ID`, `GOOGLE_API_KEY` and `GOOGLE_APP_ID`. -## 4. Gmail add-on +None of these values is secret. They end up in the public JavaScript bundle by design, and the restrictions above are what protect them. + +## 5. Deploy the site and the web app + +Push a tag `v*` (e.g. `v0.1.0`), or run *Actions* → *Deploy to GitHub Pages* → *Run workflow*. `.github/workflows/pages.yml` builds the web app and the documentation site, then deploys both: + +- `/` – documentation site (`site/`, rendered from `docs/`) +- `/app/` – the web app (`web/`) +- `/SHA256SUMS.txt` – checksums of every published file, also attached to the workflow run + +Then check the deployment: + +- **Local mode:** drop a protected file and unlock it. In the browser's network panel, verify that no request leaves the page's origin. +- **Drive:** pick a protected PDF with *Choose from Google Drive*, unlock it and save it. The new file appears next to the original, or in My Drive if the folder is not writable for unpassword. + +To host elsewhere, build the same way (`site/build.mjs --app web/dist`) and serve `_site/` statically. If your server can set headers, also send the CSP from `web/vite.config.ts` as an HTTP header, plus `frame-ancestors 'none'`. + +## 6. Gmail add-on ```bash npm install -g @google/clasp @@ -51,37 +96,128 @@ clasp create --type standalone --title unpassword # or copy .clasp.json.exampl clasp push ``` -1. In the Apps Script editor, open *Project Settings* and set the **Google Cloud Platform project** to the project number from step 1 (same project as the web app). -2. Optionally, in *Project Settings → Script properties*, set `UNPASSWORD_WEB_URL` if the web app is not at `https://nullthrone.github.io/unpassword/app/`. Update `openLinkUrlPrefixes` and `logoUrl` in `appsscript.json` to match. -3. Choose *Deploy → Test deployments → Install* and open a message with a protected attachment in Gmail. -4. For Marketplace publication, add the deployment ID under *Marketplace SDK → App Configuration → Gmail add-on*. +1. In the Apps Script editor, open *Project Settings* and set the **Google Cloud Platform project** to the project number from step 2. +2. *Deploy* → *Test deployments* → *Install*. Open a message with a protected attachment in Gmail and choose *Open in unpassword*. The encrypted copy lands in the Drive folder "unpassword – Eingang", and the web app opens it. +3. *Deploy* → *New deployment* → type *Add-on*, with a description such as `v1`. This creates a **versioned** deployment; the Marketplace does not accept the HEAD deployment. Note the **deployment ID**. -## 5. Marketplace listing +The add-on's web app URL defaults to `https://unpassword.nullthrone.xyz/app/`. To use another host, set the script property `UNPASSWORD_WEB_URL` and update `openLinkUrlPrefixes` and `logoUrl` in `appsscript.json`. -The documentation site is the listing's reference. Use these values in *Marketplace SDK → Store Listing* and on the OAuth consent screen: +## 7. OAuth verification (sensitive scope) -| Field | Value | +In *Google Auth Platform* → *Verification Center*, submit the app for verification. Google asks for a justification per sensitive scope and a demo video. + +### Scope justifications + +These texts can be pasted as they are. + +**`gmail.addons.current.message.readonly`** + +> unpassword's Gmail add-on shows, for the message the user has open, which attachments are password-protected PDF, Office or ZIP files. It reads only the attachments of that open message, and only to check their format and encryption flag locally in Apps Script. When the user clicks "Open in unpassword", the add-on copies the still-encrypted attachment into a Drive folder created by the app (drive.file) and opens the unpassword web app. Decryption happens exclusively in the user's browser with a password the user types. The add-on never receives passwords or decrypted content, and no message data is sent to the developer or any third party. A narrower scope is not available, because the add-on needs the attachment bytes to detect encryption. + +**`drive.file`** (non-sensitive, for completeness) + +> Used to open files the user explicitly picks or opens with unpassword, to save the unlocked copy the user requests, and to store encrypted Gmail attachments in a folder the app creates. unpassword has no access to any other Drive file. + +**`gmail.addons.execute`** + +> Required to run the Gmail add-on, which displays the list of protected attachments in the side panel of the open message. + +### Demo video + +Upload the video to YouTube as *Unlisted*, 2–4 minutes long, in English or with English captions. Storyboard: + +1. **Consent:** start in Gmail and install or authorize the add-on. Show the OAuth consent screen with the app name **unpassword** and the URL bar containing the **client ID**. Read out the requested scopes. +2. **`gmail.addons.current.message.readonly`:** open a message with a password-protected PDF attachment. The side panel lists it as "password protected". Explain that only this open message is read. +3. **`drive.file`:** click *Open in unpassword*. Show the encrypted copy in the Drive folder "unpassword – Eingang", which the app created. Then show that unpassword cannot see other Drive files: the Picker shows them, but the app only receives what the user selects. +4. **Web app:** the app opens with the file. Enter the password and tick the entitlement checkbox. The file is unlocked in the browser. Save it to Drive and show the unlocked copy. +5. **Zero knowledge:** open the browser's network panel and show that requests go only to the site's origin and Google APIs. State that the password and the content never reach the developer. +6. **Guardrails:** enter a wrong password three times and show the cooldown. State that unpassword does not guess passwords. + +### Expectations + +- Keep the homepage, privacy policy and terms reachable, and keep them identical to the URLs on the consent screen. +- Google may ask follow-up questions by email to the developer contact. Answer from the security model (`/security/`). +- Verification of sensitive scopes takes from several days to a few weeks. + +## 8. Marketplace SDK → App Configuration + +| Setting | Value | |---|---| -| Application name | unpassword | -| Short description | Remove passwords you already know from PDF, Office and ZIP files – decrypted in your browser, zero-knowledge. | -| Category | Productivity / Utilities | -| Application homepage / Developer website | `https://nullthrone.github.io/unpassword/` | -| Privacy policy URL | `https://nullthrone.github.io/unpassword/privacy/` | -| Terms of service URL | `https://nullthrone.github.io/unpassword/terms/` | -| Support URL | `https://nullthrone.github.io/unpassword/support/` | -| Developer name / email | Nullthrone · Thomas Sprock, `github@nullthrone.xyz` (see `/imprint/`) | -| Application icons 32/48/96/128 | `brand/icon-32.png`, `icon-48.png`, `icon-96.png`, `icon-128.png` | -| Card banner 220 × 140 | `brand/banner-220x140.png` | -| Screenshots 1280 × 800 | `brand/screenshot-1-pick.png`, `-2-password.png`, `-3-result.png` | -| Authorized domain (OAuth consent) | `nullthrone.github.io` | +| App visibility | Public | +| Installation settings | Individual + Admin install | +| App integrations | **Drive app** and **Google Workspace add-on** | +| OAuth scopes | Exactly the three scopes from step 3 | +| Developer information | Nullthrone · Thomas Sprock, `github@nullthrone.xyz`, website `https://unpassword.nullthrone.xyz/` | + +**Google Workspace add-on:** enter the deployment ID from step 6. -All graphics are listed with previews on `/marketplace/`. They are generated from `design/unpassword/` by `scripts/render-brand-assets.mjs`; rerun it after changing the mark or the app's look. +**Drive app:** -- In the description, state the legitimate purpose plainly: removing **known** passwords for personal archiving. The guardrails on the homepage are written to be quoted in the review. -- Expect an OAuth verification for the Gmail scopes. `drive.file` is a non-sensitive scope. +1. **Open URL:** `https://unpassword.nullthrone.xyz/app/`. Drive appends `?state={"ids":[…],"action":"open",…}`, which the app reads (`web/src/google/drive.ts` → `launchFileId`). +2. **Default MIME types:** `application/pdf`, `application/zip`. + **Secondary MIME types:** `application/x-zip-compressed`, `application/octet-stream`, `application/x-ole-storage`, `application/vnd.ms-office`, `application/encrypted`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`, `application/vnd.openxmlformats-officedocument.presentationml.presentation`. + **File extensions:** `pdf`, `zip`, `docx`, `xlsx`, `pptx`, `docm`, `xlsm`, `pptm`. +3. Leave "Creating files" disabled. unpassword only opens existing files. +4. Icons: `brand/icon-32.png`, `brand/icon-128.png`. -## 6. Check after deployment +## 9. Store listing -- Local mode: drop a protected file and unlock it. In the browser's network panel, verify that no request leaves the page's origin. -- Drive: use "Open with → unpassword" on a protected PDF in Drive, then save. The new file should appear next to the original. -- Gmail: open a message with a protected ZIP, choose *Open in unpassword*, and confirm that the encrypted copy lands in "unpassword – Eingang" and the web app opens it. +| Field | Value | +|---|---| +| Application name | unpassword | +| Short description | see below (≤ 200 characters) | +| Detailed description | see below | +| Category | Productivity / Utilities | +| Language | English | +| Application icons | `brand/icon-32.png`, `icon-48.png`, `icon-96.png`, `icon-128.png` (transparent background) | +| Card banner 220 × 140 | `brand/banner-220x140.png` | +| Screenshots 1280 × 800 | `brand/screenshot-1-pick.png`, `brand/screenshot-2-password.png`, `brand/screenshot-3-result.png` | +| Terms of service URL | `https://unpassword.nullthrone.xyz/terms/` | +| Privacy policy URL | `https://unpassword.nullthrone.xyz/privacy/` | +| Support URL | `https://unpassword.nullthrone.xyz/support/` | +| Setup / admin documentation | `https://unpassword.nullthrone.xyz/setup/` | +| Pricing | Free | + +All graphics, with previews, are on [`/marketplace/`](https://unpassword.nullthrone.xyz/marketplace/). `scripts/render-brand-assets.mjs` generates them from `design/unpassword/`; rerun it after changing the mark or the app's look. + +**Short description** (168 characters): + +> Remove passwords you already know from PDF, Office and ZIP files to archive them your way. Decrypted in your browser – the developer never sees your files or passwords. + +**Detailed description:** + +> unpassword removes the password protection of PDF, Word, Excel, PowerPoint and ZIP files whose password you know – for example statements, payslips or reports sent to you with a password. Archive them under protection you control, such as your Google account, instead of a sender's file password. +> +> HOW IT WORKS +> • Open a protected file from Google Drive ("Open with → unpassword"), from a Gmail attachment, or from your device. +> • Enter the password you were given. +> • Download the unlocked file or save it next to the original in Drive. +> +> ZERO KNOWLEDGE +> • Decryption runs entirely in your browser. There is no unpassword server. +> • Files and passwords are never sent to the developer. +> • Drive access is limited to files you open with unpassword (drive.file). +> • The Gmail add-on reads only the open message and hands over the still-encrypted attachment. +> +> NOT A CRACKING TOOL +> • You need the current password. unpassword never guesses or bypasses passwords. +> • Failed attempts are rate-limited and locked after ten tries. +> • PDF permission restrictions stay in place unless you enter the owner password. +> +> SUPPORTED: PDF (RC4, AES-128, AES-256), DOCX/XLSX/PPTX (ECMA-376 encryption), ZIP (ZipCrypto, AES). +> +> Open source under the MIT license: https://github.com/nullthrone/unpassword + +Name Google products only descriptively ("works with Google Drive and Gmail"). Never use them in the app name, icon or banner. + +## 10. Submit and review + +1. Check that every URL in the listing loads over HTTPS and that the screenshots match the current app. +2. *Store Listing* → **Publish**. The listing goes to Marketplace review. Google says this typically takes several days. OAuth verification (step 7) must be complete or in progress. +3. Common reasons for rejection, to check beforehand: + - an app name or logo that differs between the consent screen and the listing; + - unverified authorized domains; + - broken links or test URLs; + - non-transparent or low-quality icons; + - incomplete functionality. +4. After approval, add the Marketplace link to the "Get it" section of the homepage (`site/index.html`). diff --git a/docs/TERMS.md b/docs/TERMS.md index 01dbdd3..cf643fa 100644 --- a/docs/TERMS.md +++ b/docs/TERMS.md @@ -2,7 +2,7 @@ _Last updated: 2026-10-06_ -These terms apply to the use of unpassword, which consists of the web application at `https://nullthrone.github.io/unpassword/app/` and the unpassword Gmail add-on. unpassword is provided by Thomas Sprock (Nullthrone), see the [imprint](IMPRINT.md). +These terms apply to the use of unpassword, which consists of the web application at `https://unpassword.nullthrone.xyz/app/` and the unpassword Gmail add-on. unpassword is provided by Thomas Sprock (Nullthrone), see the [imprint](IMPRINT.md). ## 1. The service diff --git a/gmail-addon/Code.js b/gmail-addon/Code.js index 269a386..21136dc 100644 --- a/gmail-addon/Code.js +++ b/gmail-addon/Code.js @@ -14,7 +14,7 @@ /** Base URL of the web app. Override with the script property UNPASSWORD_WEB_URL. */ function webAppUrl_() { var url = PropertiesService.getScriptProperties().getProperty('UNPASSWORD_WEB_URL'); - return (url || 'https://nullthrone.github.io/unpassword/app/').replace(/\/?$/, '/'); + return (url || 'https://unpassword.nullthrone.xyz/app/').replace(/\/?$/, '/'); } var INBOX_FOLDER = 'unpassword – Eingang'; diff --git a/gmail-addon/appsscript.json b/gmail-addon/appsscript.json index ddb8d1e..942a5e5 100644 --- a/gmail-addon/appsscript.json +++ b/gmail-addon/appsscript.json @@ -14,10 +14,9 @@ "addOns": { "common": { "name": "unpassword", - "logoUrl": "https://nullthrone.github.io/unpassword/brand/icon-128.png", + "logoUrl": "https://unpassword.nullthrone.xyz/brand/icon-128.png", "layoutProperties": { "primaryColor": "#141317", "secondaryColor": "#A87E2F" }, - "openLinkUrlPrefixes": ["https://nullthrone.github.io/unpassword/app/"], - "useLocaleFromApp": true + "openLinkUrlPrefixes": ["https://unpassword.nullthrone.xyz/app/"] }, "gmail": { "contextualTriggers": [{ "unconditional": {}, "onTriggerFunction": "onGmailMessageOpen" }] diff --git a/scripts/render-brand-assets.mjs b/scripts/render-brand-assets.mjs index 1fcc4b9..908da01 100644 --- a/scripts/render-brand-assets.mjs +++ b/scripts/render-brand-assets.mjs @@ -17,6 +17,7 @@ const { chromium } = require('@playwright/test'); const INK = '#141317'; const PAPER = '#F4F2EC'; const BRASS = '#C09A4B'; +const BRASS_ICON = '#A87E2F'; // --brass-500 const svg = (file) => readFileSync(join(ROOT, 'design/unpassword', file), 'utf8'); // Fonts inlined as data URIs: pages rendered via setContent may not load file:// URLs. @@ -46,11 +47,12 @@ async function shot(name, width, height, html) { console.log(` ${name}`); } -// Icons: ink square with the paper mark – legible on light and dark Marketplace backgrounds. +// Icons: brass mark on a transparent background, as the Marketplace review requires. +// Brass (an allowed mark colour) stays legible on light and dark surfaces, e.g. Gmail's dark theme. for (const size of [16, 32, 48, 96, 128]) { const file = size <= 32 ? 'mark-small.svg' : 'mark.svg'; - const pad = Math.round(size * (size <= 32 ? 0.14 : 0.18)); - const inner = `
+ const pad = Math.max(1, Math.round(size * 0.06)); + const inner = `
${svg(file).replace('`; await shot(`icon-${size}.png`, size, size, page(size, size, inner)); } diff --git a/site/build.mjs b/site/build.mjs index 8a9a1b0..00bdc93 100644 --- a/site/build.mjs +++ b/site/build.mjs @@ -16,7 +16,7 @@ import { Marked } from "marked"; const ROOT = join(import.meta.dirname, ".."); const REPO = "https://github.com/nullthrone/unpassword"; -export const SITE_URL = "https://nullthrone.github.io/unpassword/"; +export const SITE_URL = "https://unpassword.nullthrone.xyz/"; const { values: args } = parseArgs({ options: { out: { type: "string" }, app: { type: "string" } }, @@ -236,7 +236,7 @@ function marketplacePage() {

Google Workspace Marketplace

Brand assets

-

Graphics for the Marketplace listing, generated from design/unpassword by scripts/render-brand-assets.mjs. The URLs the listing references are in the setup guide.

+

Graphics for the Marketplace listing, generated from design/unpassword by scripts/render-brand-assets.mjs. The URLs the listing references are in the setup guide.

    ${rows}
@@ -292,8 +292,9 @@ export function build() { title: "Not found", description: "This page does not exist.", depth: 0, - body: `

404

This page does not exist.

Go to the overview.

`, - }).replace(/(href|src)="(?!https?:|\/|#|mailto:)/g, '$1="/unpassword/'), + active: "404", // no navigation item is current + body: `

404

This page does not exist.

Go to the overview.

`, + }).replace(/(href|src)="(?!https?:|\/|#|mailto:)/g, '$1="/'), ); write("assets/site.css", stylesheet()); diff --git a/site/check.mjs b/site/check.mjs index ff4fc00..d87e5be 100644 --- a/site/check.mjs +++ b/site/check.mjs @@ -50,6 +50,12 @@ for (const f of files) { if (!/[^<]+<\/title>/.test(html)) errors.push(`${rel}: missing <title>`); if (/<script\b/i.test(html)) errors.push(`${rel}: contains a <script>`); + // the site lives on its own domain; the github.io address only redirects + // (naming the CNAME target without a scheme is fine) + if (/https?:\/\/nullthrone\.github\.io/.test(html)) + errors.push( + `${rel}: references nullthrone.github.io instead of the custom domain`, + ); for (const m of html.matchAll( /<(img|script|source|iframe)\b[^>]*\ssrc="([^"]+)"/g, @@ -61,7 +67,7 @@ for (const f of files) { if (/^(https?:)?\/\//.test(m[1])) errors.push(`${rel}: external resource ${m[1]}`); } - if (rel === "404.html") continue; // absolute /unpassword/ links, checked via the other pages + if (rel === "404.html") continue; // root-absolute links, checked via the other pages for (const m of html.matchAll(/<a\b[^>]*\shref="([^"]+)"/g)) { const href = m[1]; if (/^(https?:|mailto:)/.test(href)) continue;