Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
055d130bc3 | ||
|
|
57d52c6658 | ||
|
|
8a601d6366 | ||
|
|
cc77006502 | ||
|
|
cb82a38b6a | ||
|
|
d19d6edf7d | ||
|
|
f2eaed3c86 | ||
|
|
b6cdc32d52 | ||
|
|
5047ce86b0 | ||
|
|
45f3f8dbc0 | ||
|
|
a52a4b6462 | ||
|
|
b8bed150d0 | ||
|
|
56be19e3a9 | ||
|
|
b256e9b9fd | ||
|
|
b4be99002d | ||
|
|
9447c3a75c | ||
|
|
3deda78d54 | ||
|
|
c76f76ffb7 |
No files matched your search
@@ -47,6 +47,14 @@ jobs:
|
||||
with:
|
||||
go-version: 1.25.x
|
||||
cache: false
|
||||
- name: Install Emscripten
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git clone --depth 1 https://github.com/emscripten-core/emsdk.git "$HOME/emsdk"
|
||||
"$HOME/emsdk/emsdk" install latest
|
||||
"$HOME/emsdk/emsdk" activate latest
|
||||
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
|
||||
- name: Test CLI and generator
|
||||
run: go test ./...
|
||||
- name: Build browser app
|
||||
@@ -56,8 +64,31 @@ jobs:
|
||||
test -s build/site/index.html
|
||||
test -s build/site/app/index.html
|
||||
test -s build/site/app/pass.wasm
|
||||
test -s build/site/app/index.wasm
|
||||
- name: Check formatting
|
||||
run: test -z "$(find . -path ./vendor -prune -o -name '*.go' -type f -print | xargs gofmt -l)"
|
||||
- name: Check fastlane metadata
|
||||
run: |
|
||||
set -eu
|
||||
meta=fastlane/metadata/android/en-US
|
||||
limit() {
|
||||
n=$(wc -m < "$1")
|
||||
if [ "$n" -gt "$2" ]; then
|
||||
echo "::error::$1 is $n characters (max $2)"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
limit "$meta/title.txt" 30
|
||||
limit "$meta/short_description.txt" 80
|
||||
limit "$meta/full_description.txt" 4000
|
||||
for f in "$meta"/changelogs/*.txt; do
|
||||
limit "$f" 500
|
||||
done
|
||||
code=$(sed -n 's/^[[:space:]]*versionCode \([0-9][0-9]*\)$/\1/p' droid/app/build.gradle | head -n 1)
|
||||
test -n "$code"
|
||||
test -s "$meta/changelogs/$code.txt"
|
||||
test -s "$meta/images/icon.png"
|
||||
echo "fastlane metadata ok (versionCode $code)"
|
||||
|
||||
build-gui:
|
||||
name: GUI (${{ matrix.arch }})
|
||||
|
||||
@@ -146,7 +146,7 @@ jobs:
|
||||
test -n "$KEYSTORE_BASE64" || { echo "::error::KEYSTORE_BASE64 secret is empty or missing"; exit 1; }
|
||||
mkdir -p "$HOME/.android"
|
||||
printf '%s' "$KEYSTORE_BASE64" | base64 -d > "$HOME/.android/pass-release.keystore"
|
||||
- name: Build release APK
|
||||
- name: Build release APKs
|
||||
env:
|
||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
||||
@@ -156,27 +156,42 @@ jobs:
|
||||
test -n "$KEY_ALIAS" || { echo "::error::KEY_ALIAS secret is empty or missing"; exit 1; }
|
||||
chmod +x droid/gradlew
|
||||
./droid/gradlew -p droid assembleRelease \
|
||||
-PsplitApks=true \
|
||||
-Pkeystore.path="$HOME/.android/pass-release.keystore" \
|
||||
-Pkeystore.alias="$KEY_ALIAS" \
|
||||
-Pkeystore.password="$KEYSTORE_PASSWORD" \
|
||||
--stacktrace
|
||||
mkdir -p build/release
|
||||
cp droid/app/build/outputs/apk/release/app-release.apk build/release/pass-android.apk
|
||||
cp droid/app/build/outputs/apk/release/app-universal-release.apk build/release/pass-android.apk
|
||||
cp droid/app/build/outputs/apk/release/app-arm64-v8a-release.apk build/release/pass-android-arm64-v8a.apk
|
||||
cp droid/app/build/outputs/apk/release/app-armeabi-v7a-release.apk build/release/pass-android-armeabi-v7a.apk
|
||||
test -s build/release/pass-android.apk
|
||||
test -s build/release/pass-android-arm64-v8a.apk
|
||||
test -s build/release/pass-android-armeabi-v7a.apk
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: android
|
||||
path: build/release/pass-android.apk
|
||||
path: build/release/pass-android*.apk
|
||||
if-no-files-found: error
|
||||
|
||||
web:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.24.x
|
||||
cache: false
|
||||
- name: Install Emscripten
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git clone --depth 1 https://github.com/emscripten-core/emsdk.git "$HOME/emsdk"
|
||||
"$HOME/emsdk/emsdk" install latest
|
||||
"$HOME/emsdk/emsdk" activate latest
|
||||
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
|
||||
- run: make site
|
||||
- run: cd build/site && zip -qr ../pass-web.zip .
|
||||
- uses: actions/upload-artifact@v4
|
||||
@@ -212,13 +227,6 @@ jobs:
|
||||
else
|
||||
echo "released=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
- name: Create release tag
|
||||
if: steps.version.outputs.released == 'true'
|
||||
run: |
|
||||
git config user.name github-actions[bot]
|
||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||
git tag -a "${{ steps.version.outputs.tag }}" -m "Release ${{ steps.version.outputs.tag }}"
|
||||
git push origin "${{ steps.version.outputs.tag }}"
|
||||
- name: Generate Update Appcast
|
||||
if: steps.version.outputs.released == 'true'
|
||||
run: |
|
||||
@@ -256,6 +264,20 @@ jobs:
|
||||
--changelog CHANGELOG.md \
|
||||
--out build/artifacts/appcast.json \
|
||||
"${channels[@]}"
|
||||
- name: Publish checksums
|
||||
if: steps.version.outputs.released == 'true'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cd build/artifacts
|
||||
# The glob expands before the redirect creates SHA256SUMS itself.
|
||||
sha256sum -- * > SHA256SUMS
|
||||
- name: Create release tag
|
||||
if: steps.version.outputs.released == 'true'
|
||||
run: |
|
||||
git config user.name github-actions[bot]
|
||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||
git tag -a "${{ steps.version.outputs.tag }}" -m "Release ${{ steps.version.outputs.tag }}"
|
||||
git push origin "${{ steps.version.outputs.tag }}"
|
||||
- name: Publish GitHub release
|
||||
if: steps.version.outputs.released == 'true'
|
||||
uses: softprops/action-gh-release@v2
|
||||
|
||||
@@ -18,10 +18,20 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.24.x
|
||||
cache: false
|
||||
- name: Install Emscripten
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git clone --depth 1 https://github.com/emscripten-core/emsdk.git "$HOME/emsdk"
|
||||
"$HOME/emsdk/emsdk" install latest
|
||||
"$HOME/emsdk/emsdk" activate latest
|
||||
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
|
||||
- name: Build Site
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -29,6 +39,7 @@ jobs:
|
||||
test -s build/site/index.html
|
||||
test -s build/site/app/index.html
|
||||
test -s build/site/app/pass.wasm
|
||||
test -s build/site/app/index.wasm
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pass-site
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
# Changelog
|
||||
|
||||
## [0.2.4] - 2026-08-22
|
||||
|
||||
- Save and reuse Android master-password defaults, with fingerprint unlock
|
||||
available from the generator and settings screens.
|
||||
- Clear unlocked master-password text and generated passwords from the Android
|
||||
screen after a short timeout.
|
||||
- Autosave Android generator defaults when length, counter, character classes,
|
||||
excluded characters, or biometric display settings change.
|
||||
- Keep Android form fields visible while the keyboard is open, with better
|
||||
spacing around settings and excluded-character controls.
|
||||
- Run the real Pass app at pass.waozi.xyz/app through the Kryon canvas UI,
|
||||
replacing the standalone browser form.
|
||||
- Publish Android releases as a universal APK plus per-ABI APKs.
|
||||
|
||||
## [0.2.3] - 2026-08-21
|
||||
|
||||
- Verify every download: releases now ship a SHA256SUMS file covering the
|
||||
command-line, desktop, Android, and browser downloads.
|
||||
- The Android app now builds entirely from source with no developer signing
|
||||
key, clearing the way for F-Droid distribution.
|
||||
|
||||
## [0.2.2] - 2026-08-20
|
||||
|
||||
- Install pass on Android: a signed APK is now downloadable from
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.PHONY: all cli gui native run test native-test web site install install-cli uninstall-cli install-gui uninstall-gui package-deb package-appimage android-debug
|
||||
.PHONY: all cli gui native run test native-test web web-canvas site install install-cli uninstall-cli install-gui uninstall-gui package-deb package-appimage android-debug
|
||||
|
||||
BIN_DIR ?= $(HOME)/bin
|
||||
DATA_DIR ?= $(if $(XDG_DATA_HOME),$(XDG_DATA_HOME),$(HOME)/.local/share)
|
||||
@@ -6,6 +6,21 @@ DATA_DIR ?= $(if $(XDG_DATA_HOME),$(XDG_DATA_HOME),$(HOME)/.local/share)
|
||||
KRYON_ARCH ?= $(shell uname -m)
|
||||
KRYON_BUILD_DIR := vendor/kryon/build/linux-$(KRYON_ARCH)
|
||||
KRYON_RUNTIME_SOURCES := $(shell find vendor/kryon/src vendor/kryon/include -type f)
|
||||
WEB_EMSDK_BIN ?= $(HOME)/emsdk/upstream/emscripten
|
||||
WEB_CC ?= $(if $(wildcard $(WEB_EMSDK_BIN)/emcc),$(WEB_EMSDK_BIN)/emcc,emcc)
|
||||
ifneq ($(wildcard $(WEB_EMSDK_BIN)/emcc),)
|
||||
export PATH := $(WEB_EMSDK_BIN):$(PATH)
|
||||
endif
|
||||
WEB_APP_BUILD_DIR := build/web-app
|
||||
WEB_APP_TARGET := $(WEB_APP_BUILD_DIR)/index.html
|
||||
WEB_APP_EMBEDDED_ASSETS_C := build/web/pass_embedded_assets.c
|
||||
WEB_APP_ASSETS := vendor/kryon/fonts/noto/NotoSans-Regular.ttf gui/assets/emoji.ttf
|
||||
KRYON_ICON_ASSETS_C := vendor/kryon/src/ui/ui_icon_assets.c
|
||||
KRYON_WEB_SRCS_ALL := $(filter-out $(KRYON_ICON_ASSETS_C),$(shell find vendor/kryon/src -type f -name '*.c' | LC_ALL=C sort)) $(KRYON_ICON_ASSETS_C)
|
||||
KRYON_WEB_SRCS := $(filter-out vendor/kryon/src/file_dialog/file_dialog.c vendor/kryon/src/ksync/% vendor/kryon/src/runtime_assets/% vendor/kryon/src/notification/% vendor/kryon/src/scene/physics_world.c vendor/kryon/src/scene/node_body2d.c vendor/kryon/src/scene/node_area2d.c vendor/kryon/src/scene/node_collision_shape2d.c,$(KRYON_WEB_SRCS_ALL))
|
||||
PASS_WEB_SRCS := droid/app/src/main/cpp/main.c droid/app/src/main/cpp/pass_app.c droid/app/src/main/cpp/android_bridge.c native/pass_core.c $(WEB_APP_EMBEDDED_ASSETS_C)
|
||||
WEB_CFLAGS := -Wall -Wextra -std=gnu99 -Os -DPLATFORM_WEB -DGRAPHICS_API_OPENGL_ES2 -D_DEFAULT_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DUI_EMBEDDED_ONLY=1 -DKRYON_WITH_PHYSICS=0 -Ivendor/kryon/include -Ivendor/kryon/src -Inative
|
||||
WEB_LDFLAGS := -sASYNCIFY -sASYNCIFY_STACK_SIZE=1048576 -sFORCE_FILESYSTEM=1 -sFETCH=1 -sALLOW_MEMORY_GROWTH=1 -sINITIAL_MEMORY=134217728 -sSTACK_SIZE=16777216 -lidbfs.js -lm
|
||||
|
||||
all: cli gui
|
||||
|
||||
@@ -55,16 +70,36 @@ ANDROID_DIR := droid
|
||||
ANDROID_ABIS ?= armeabi-v7a,arm64-v8a
|
||||
|
||||
android-debug:
|
||||
cd $(ANDROID_DIR) && ./gradlew assembleDebug -Pabi=$(ANDROID_ABIS)
|
||||
cd $(ANDROID_DIR) && ./gradlew assembleDebug -Pabi=$(ANDROID_ABIS) -PsplitApks=true
|
||||
mkdir -p build
|
||||
cp $(ANDROID_DIR)/app/build/outputs/apk/debug/app-debug.apk build/pass-android-debug.apk
|
||||
cp $(ANDROID_DIR)/app/build/outputs/apk/debug/app-universal-debug.apk build/pass-android-debug.apk
|
||||
cp $(ANDROID_DIR)/app/build/outputs/apk/debug/app-arm64-v8a-debug.apk build/pass-android-arm64-v8a-debug.apk
|
||||
cp $(ANDROID_DIR)/app/build/outputs/apk/debug/app-armeabi-v7a-debug.apk build/pass-android-armeabi-v7a-debug.apk
|
||||
|
||||
web:
|
||||
./web/build.sh
|
||||
|
||||
web-canvas: $(WEB_APP_TARGET)
|
||||
|
||||
$(WEB_APP_BUILD_DIR) build/web:
|
||||
mkdir -p $@
|
||||
|
||||
$(WEB_APP_EMBEDDED_ASSETS_C): $(WEB_APP_ASSETS) vendor/kryon/scripts/embed-assets.sh | build/web
|
||||
sh vendor/kryon/scripts/embed-assets.sh $@ $(WEB_APP_ASSETS)
|
||||
|
||||
$(WEB_APP_TARGET): Makefile $(PASS_WEB_SRCS) $(KRYON_WEB_SRCS) web/site/app/index.html web/site/app/app.js | $(WEB_APP_BUILD_DIR)
|
||||
$(WEB_CC) $(WEB_CFLAGS) \
|
||||
-o $(WEB_APP_BUILD_DIR)/index.js \
|
||||
$(PASS_WEB_SRCS) \
|
||||
$(KRYON_WEB_SRCS) \
|
||||
$(WEB_LDFLAGS)
|
||||
cp web/site/app/index.html $(WEB_APP_TARGET)
|
||||
cp web/site/app/app.js $(WEB_APP_BUILD_DIR)/app.js
|
||||
|
||||
site: web
|
||||
test -f build/site/index.html
|
||||
test -f build/site/app/pass.wasm
|
||||
test -f build/site/app/index.wasm
|
||||
|
||||
package-deb: gui
|
||||
./scripts/package-deb.sh
|
||||
|
||||
@@ -109,6 +109,15 @@ make gui
|
||||
./build/pass-gui
|
||||
```
|
||||
|
||||
## Android
|
||||
|
||||
The Android app runs on Android 5.0 (API 21) and newer. Install the signed
|
||||
APK (`pass-android.apk`) from [pass.waozi.xyz](https://pass.waozi.xyz/#downloads)
|
||||
or the [releases page](https://github.com/waozixyz/pass/releases/latest). It
|
||||
uses the same generation algorithm as the desktop app, computes everything
|
||||
locally, and declares no Internet permission at all — the only permissions it
|
||||
requests are for the optional fingerprint unlock.
|
||||
|
||||
## Library
|
||||
|
||||
```go
|
||||
|
||||
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,39 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="512" height="512" shape-rendering="crispEdges">
|
||||
<rect width="64" height="64" fill="none"/>
|
||||
|
||||
<rect x="10" y="8" width="44" height="48" fill="#1b3942"/>
|
||||
<rect x="8" y="10" width="48" height="44" fill="#1b3942"/>
|
||||
<rect x="12" y="12" width="40" height="40" fill="#8fcfc8"/>
|
||||
<rect x="12" y="12" width="40" height="8" fill="#b9e5dc"/>
|
||||
<rect x="12" y="44" width="40" height="8" fill="#5aa59f"/>
|
||||
<rect x="16" y="16" width="32" height="32" fill="#6ebdb6"/>
|
||||
|
||||
<rect x="22" y="24" width="20" height="22" fill="#14262d"/>
|
||||
<rect x="20" y="26" width="24" height="18" fill="#14262d"/>
|
||||
<rect x="24" y="26" width="18" height="16" fill="#f3e7c0"/>
|
||||
<rect x="22" y="28" width="20" height="16" fill="#d6c48d"/>
|
||||
<rect x="24" y="28" width="16" height="12" fill="#f7edcf"/>
|
||||
<rect x="28" y="32" width="8" height="4" fill="#17303a"/>
|
||||
<rect x="30" y="36" width="4" height="6" fill="#17303a"/>
|
||||
|
||||
<rect x="24" y="16" width="16" height="4" fill="#14262d"/>
|
||||
<rect x="22" y="20" width="4" height="8" fill="#14262d"/>
|
||||
<rect x="38" y="20" width="4" height="8" fill="#14262d"/>
|
||||
<rect x="26" y="18" width="12" height="4" fill="#e9f2ed"/>
|
||||
<rect x="24" y="22" width="4" height="6" fill="#e9f2ed"/>
|
||||
<rect x="36" y="22" width="4" height="6" fill="#b8c5bf"/>
|
||||
|
||||
<rect x="38" y="38" width="16" height="4" fill="#14262d"/>
|
||||
<rect x="50" y="34" width="6" height="6" fill="#14262d"/>
|
||||
<rect x="52" y="32" width="4" height="4" fill="#14262d"/>
|
||||
<rect x="40" y="40" width="14" height="4" fill="#f0bd52"/>
|
||||
<rect x="52" y="36" width="4" height="4" fill="#f0bd52"/>
|
||||
<rect x="44" y="44" width="4" height="4" fill="#f0bd52"/>
|
||||
<rect x="48" y="44" width="4" height="4" fill="#f0bd52"/>
|
||||
<rect x="42" y="38" width="10" height="2" fill="#ffe28a"/>
|
||||
<rect x="54" y="34" width="2" height="2" fill="#ffe28a"/>
|
||||
|
||||
<rect x="14" y="14" width="6" height="4" fill="#e4f2e9"/>
|
||||
<rect x="14" y="46" width="10" height="2" fill="#407f7b"/>
|
||||
<rect x="44" y="18" width="4" height="4" fill="#4a918c"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -23,12 +23,23 @@ android {
|
||||
|
||||
def releasePassword = project.findProperty('keystore.password') ?: ""
|
||||
|
||||
def releaseKeystorePath = getKeystorePath()
|
||||
def releaseKeystore = releaseKeystorePath ? file(releaseKeystorePath) : null
|
||||
// Sign release builds only when a keystore is actually available: CI and
|
||||
// local release builds pass -Pkeystore.* properties, while clean checkouts
|
||||
// (for example an F-Droid builder) produce an unsigned APK instead.
|
||||
def signRelease = !project.hasProperty('fDroidBuild') \
|
||||
&& releaseKeystore != null && releaseKeystore.exists() \
|
||||
&& releasePassword != ""
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile getKeystorePath() ? file(getKeystorePath()) : null
|
||||
storePassword releasePassword
|
||||
keyAlias getKeystoreAlias()
|
||||
keyPassword releasePassword
|
||||
if (signRelease) {
|
||||
storeFile releaseKeystore
|
||||
storePassword releasePassword
|
||||
keyAlias getKeystoreAlias()
|
||||
keyPassword releasePassword
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,8 +47,8 @@ android {
|
||||
applicationId 'xyz.waozi.pass'
|
||||
minSdk 21
|
||||
targetSdk 36
|
||||
versionCode 3
|
||||
versionName "0.2.2"
|
||||
versionCode 5
|
||||
versionName "0.2.4"
|
||||
// Default to the two realistic phone targets; override with
|
||||
// -Pabi=x86_64 etc. for emulator builds.
|
||||
def abis = project.findProperty('abi') ?: 'armeabi-v7a,arm64-v8a'
|
||||
@@ -46,9 +57,18 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
splits {
|
||||
abi {
|
||||
enable = (project.findProperty('splitApks') ?: 'false').toString().toBoolean()
|
||||
reset()
|
||||
include 'armeabi-v7a', 'arm64-v8a'
|
||||
universalApk true
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig project.hasProperty('fDroidBuild') ? null : signingConfigs.release
|
||||
signingConfig signRelease ? signingConfigs.release : null
|
||||
minifyEnabled false
|
||||
}
|
||||
debug {
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "android_bridge.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#if ANDROID_BUILD
|
||||
|
||||
#include "kryon.h"
|
||||
@@ -28,6 +30,7 @@ extern struct android_app *GetAndroidApp(void);
|
||||
static pthread_mutex_t bridge_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
static int insets_status_bar = 0;
|
||||
static int insets_nav_bar = 0;
|
||||
static int insets_ime_bottom = 0;
|
||||
static int insets_cutout_top = 0;
|
||||
static int insets_cutout_bottom = 0;
|
||||
static int insets_ready = 0;
|
||||
@@ -83,6 +86,7 @@ android_bridge_init(void)
|
||||
pthread_mutex_lock(&bridge_mutex);
|
||||
insets_status_bar = 0;
|
||||
insets_nav_bar = 0;
|
||||
insets_ime_bottom = 0;
|
||||
insets_cutout_top = 0;
|
||||
insets_cutout_bottom = 0;
|
||||
insets_ready = 0;
|
||||
@@ -175,11 +179,12 @@ android_bridge_top_reserved(void)
|
||||
int
|
||||
android_bridge_bottom_reserved(void)
|
||||
{
|
||||
int nav, cutout, bottom, ready;
|
||||
int nav, ime, cutout, bottom, ready;
|
||||
float density;
|
||||
|
||||
pthread_mutex_lock(&bridge_mutex);
|
||||
nav = insets_nav_bar;
|
||||
ime = insets_ime_bottom;
|
||||
cutout = insets_cutout_bottom;
|
||||
density = device_density;
|
||||
ready = insets_ready;
|
||||
@@ -188,6 +193,8 @@ android_bridge_bottom_reserved(void)
|
||||
if(!ready)
|
||||
return 48; /* conservative nav-bar guess until Java reports */
|
||||
bottom = nav > cutout ? nav : cutout;
|
||||
if(ime > bottom)
|
||||
bottom = ime;
|
||||
return scaled_inset(bottom, density);
|
||||
}
|
||||
|
||||
@@ -417,6 +424,7 @@ done:
|
||||
JNIEXPORT void JNICALL
|
||||
Java_xyz_waozi_pass_MainActivity_nativeSetInsets(JNIEnv *env, jobject thiz,
|
||||
jint status_bar, jint nav_bar,
|
||||
jint ime_bottom,
|
||||
jint cutout_left, jint cutout_top,
|
||||
jint cutout_right, jint cutout_bottom)
|
||||
{
|
||||
@@ -428,6 +436,7 @@ Java_xyz_waozi_pass_MainActivity_nativeSetInsets(JNIEnv *env, jobject thiz,
|
||||
pthread_mutex_lock(&bridge_mutex);
|
||||
insets_status_bar = status_bar;
|
||||
insets_nav_bar = nav_bar;
|
||||
insets_ime_bottom = ime_bottom;
|
||||
insets_cutout_top = cutout_top;
|
||||
insets_cutout_bottom = cutout_bottom;
|
||||
insets_ready = 1;
|
||||
|
||||
@@ -82,6 +82,8 @@ int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
PassApp *app;
|
||||
int window_width = 720;
|
||||
int window_height = 740;
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
@@ -91,9 +93,14 @@ main(int argc, char **argv)
|
||||
android_bridge_init();
|
||||
if(chdir("/data/user/0/xyz.waozi.pass/files") != 0)
|
||||
TraceLog(LOG_WARNING, "PASS: failed to switch to files directory");
|
||||
window_width = 0;
|
||||
window_height = 0;
|
||||
#elif defined(PLATFORM_WEB)
|
||||
SetConfigFlags(GetWebWindowFlags());
|
||||
GetWebViewportSize(window_width, window_height, &window_width, &window_height);
|
||||
#endif
|
||||
|
||||
InitWindow(0, 0, "pass");
|
||||
InitWindow(window_width, window_height, "Pass");
|
||||
if(!IsWindowReady()) {
|
||||
TraceLog(LOG_ERROR, "PASS: InitWindow failed");
|
||||
return 1;
|
||||
@@ -102,8 +109,9 @@ main(int argc, char **argv)
|
||||
SetThemeStyle(THEME_STYLE_MATERIAL);
|
||||
SetCurrentTheme(GetDefaultThemeForThemeStyle(THEME_STYLE_MATERIAL), 0);
|
||||
android_bridge_apply_system_theme();
|
||||
SetThemeSource(THEME_SOURCE_SYSTEM);
|
||||
SetThemeMode(THEME_MODE_SYSTEM);
|
||||
SetThemeSource(THEME_SOURCE_SYSTEM);
|
||||
ApplyCurrentUITheme();
|
||||
setup_ui_font();
|
||||
setup_emoji_font();
|
||||
setup_shapes_texture();
|
||||
@@ -111,12 +119,19 @@ main(int argc, char **argv)
|
||||
SetTargetFPS(60);
|
||||
|
||||
app = pass_app();
|
||||
TraceLog(LOG_INFO, "PASS: app ready");
|
||||
while(!WindowShouldClose()) {
|
||||
int width = GetScreenWidth();
|
||||
int height = GetScreenHeight();
|
||||
Vector2 scale = GetWindowScaleDPI();
|
||||
float dpi = scale.x > 0.0f ? scale.x : 1.0f;
|
||||
|
||||
#if defined(PLATFORM_WEB)
|
||||
SyncWebWindowSize();
|
||||
width = GetScreenWidth();
|
||||
height = GetScreenHeight();
|
||||
#endif
|
||||
|
||||
BeginDrawing();
|
||||
BeginUIFrame(width, height, dpi);
|
||||
pass_app_draw(app, width, height, dpi,
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "ui_scroll.h"
|
||||
#include "ui_scaling.h"
|
||||
#include "ui_text.h"
|
||||
#include "ui_color.h"
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -20,6 +21,7 @@
|
||||
#include <time.h>
|
||||
|
||||
#define CLIPBOARD_LIFETIME_MS 20000
|
||||
#define SECRET_FIELD_LIFETIME_MS 20000
|
||||
#define MAX_PROFILES 32
|
||||
#define MASTER_EMOJI_COUNT 4
|
||||
|
||||
@@ -54,6 +56,10 @@ typedef struct {
|
||||
int clear_after_seconds;
|
||||
int show_fingerprint;
|
||||
int use_biometric;
|
||||
int length;
|
||||
int counter;
|
||||
int lower, upper, digits, symbols;
|
||||
char exclude[128];
|
||||
} AppSettings;
|
||||
|
||||
static const int master_emoji_codepoints[] = {
|
||||
@@ -115,6 +121,7 @@ struct PassApp {
|
||||
char message[160];
|
||||
AppView view;
|
||||
AppSettings settings;
|
||||
AppSettings persisted_settings;
|
||||
SavedProfile profiles[MAX_PROFILES];
|
||||
int profile_count;
|
||||
int selected_profile;
|
||||
@@ -124,6 +131,8 @@ struct PassApp {
|
||||
char clip_value[136];
|
||||
int64_t clip_expires_ms;
|
||||
int clip_has_value;
|
||||
int64_t master_expires_ms;
|
||||
int64_t generated_expires_ms;
|
||||
int scroll_offset;
|
||||
};
|
||||
|
||||
@@ -154,6 +163,10 @@ default_settings(AppSettings *settings)
|
||||
settings->clear_after_seconds = 20;
|
||||
settings->show_fingerprint = 1;
|
||||
settings->use_biometric = 0;
|
||||
settings->length = 16;
|
||||
settings->counter = 1;
|
||||
settings->lower = settings->upper = settings->digits = settings->symbols = 1;
|
||||
settings->exclude[0] = '\0';
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -183,16 +196,46 @@ load_settings(PassApp *a)
|
||||
a->settings.show_fingerprint = atoi(value) != 0;
|
||||
else if(strcmp(key, "use_biometric") == 0)
|
||||
a->settings.use_biometric = atoi(value) != 0;
|
||||
else if(strcmp(key, "length") == 0)
|
||||
a->settings.length = atoi(value);
|
||||
else if(strcmp(key, "counter") == 0)
|
||||
a->settings.counter = atoi(value);
|
||||
else if(strcmp(key, "lower") == 0)
|
||||
a->settings.lower = atoi(value) != 0;
|
||||
else if(strcmp(key, "upper") == 0)
|
||||
a->settings.upper = atoi(value) != 0;
|
||||
else if(strcmp(key, "digits") == 0)
|
||||
a->settings.digits = atoi(value) != 0;
|
||||
else if(strcmp(key, "symbols") == 0)
|
||||
a->settings.symbols = atoi(value) != 0;
|
||||
else if(strcmp(key, "exclude") == 0)
|
||||
copy_sanitized(a->settings.exclude, sizeof(a->settings.exclude), value);
|
||||
}
|
||||
fclose(f);
|
||||
if(a->settings.clear_after_seconds < 0)
|
||||
a->settings.clear_after_seconds = 0;
|
||||
if(a->settings.clear_after_seconds > 3600)
|
||||
a->settings.clear_after_seconds = 3600;
|
||||
if(a->settings.length <= 0)
|
||||
a->settings.length = 16;
|
||||
if(a->settings.length > 128)
|
||||
a->settings.length = 128;
|
||||
if(a->settings.counter <= 0)
|
||||
a->settings.counter = 1;
|
||||
if(a->settings.counter > 999999)
|
||||
a->settings.counter = 999999;
|
||||
a->length = a->settings.length;
|
||||
a->counter = a->settings.counter;
|
||||
a->lower = a->settings.lower;
|
||||
a->upper = a->settings.upper;
|
||||
a->digits = a->settings.digits;
|
||||
a->symbols = a->settings.symbols;
|
||||
field_set(&a->exclude, a->settings.exclude);
|
||||
a->persisted_settings = a->settings;
|
||||
}
|
||||
|
||||
static void
|
||||
save_settings(PassApp *a)
|
||||
write_settings(PassApp *a, int announce)
|
||||
{
|
||||
FILE *f = fopen("settings.cfg", "w");
|
||||
|
||||
@@ -200,12 +243,63 @@ save_settings(PassApp *a)
|
||||
snprintf(a->message, sizeof(a->message), "%s", "Could not save settings");
|
||||
return;
|
||||
}
|
||||
a->settings.length = a->length;
|
||||
a->settings.counter = a->counter;
|
||||
a->settings.lower = a->lower;
|
||||
a->settings.upper = a->upper;
|
||||
a->settings.digits = a->digits;
|
||||
a->settings.symbols = a->symbols;
|
||||
copy_sanitized(a->settings.exclude, sizeof(a->settings.exclude), field_text(&a->exclude));
|
||||
fprintf(f, "auto_copy=%d\n", a->settings.auto_copy ? 1 : 0);
|
||||
fprintf(f, "clear_after_seconds=%d\n", a->settings.clear_after_seconds);
|
||||
fprintf(f, "show_fingerprint=%d\n", a->settings.show_fingerprint ? 1 : 0);
|
||||
fprintf(f, "use_biometric=%d\n", a->settings.use_biometric ? 1 : 0);
|
||||
fprintf(f, "length=%d\n", a->settings.length);
|
||||
fprintf(f, "counter=%d\n", a->settings.counter);
|
||||
fprintf(f, "lower=%d\n", a->settings.lower ? 1 : 0);
|
||||
fprintf(f, "upper=%d\n", a->settings.upper ? 1 : 0);
|
||||
fprintf(f, "digits=%d\n", a->settings.digits ? 1 : 0);
|
||||
fprintf(f, "symbols=%d\n", a->settings.symbols ? 1 : 0);
|
||||
fprintf(f, "exclude=%s\n", a->settings.exclude);
|
||||
fclose(f);
|
||||
snprintf(a->message, sizeof(a->message), "%s", "Settings saved");
|
||||
a->persisted_settings = a->settings;
|
||||
#if defined(PLATFORM_WEB)
|
||||
ScheduleWebStorageSync(250, 0);
|
||||
#endif
|
||||
if(announce)
|
||||
snprintf(a->message, sizeof(a->message), "%s", "Settings saved");
|
||||
}
|
||||
|
||||
static void
|
||||
save_settings(PassApp *a)
|
||||
{
|
||||
write_settings(a, 1);
|
||||
}
|
||||
|
||||
static int
|
||||
settings_match_current(PassApp *a)
|
||||
{
|
||||
char exclude[128];
|
||||
|
||||
copy_sanitized(exclude, sizeof(exclude), field_text(&a->exclude));
|
||||
return a->persisted_settings.length == a->length &&
|
||||
a->persisted_settings.counter == a->counter &&
|
||||
a->persisted_settings.lower == a->lower &&
|
||||
a->persisted_settings.upper == a->upper &&
|
||||
a->persisted_settings.digits == a->digits &&
|
||||
a->persisted_settings.symbols == a->symbols &&
|
||||
a->persisted_settings.auto_copy == a->settings.auto_copy &&
|
||||
a->persisted_settings.clear_after_seconds == a->settings.clear_after_seconds &&
|
||||
a->persisted_settings.show_fingerprint == a->settings.show_fingerprint &&
|
||||
a->persisted_settings.use_biometric == a->settings.use_biometric &&
|
||||
strcmp(a->persisted_settings.exclude, exclude) == 0;
|
||||
}
|
||||
|
||||
static void
|
||||
autosave_settings(PassApp *a)
|
||||
{
|
||||
if(!settings_match_current(a))
|
||||
write_settings(a, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -276,6 +370,9 @@ save_profiles(PassApp *a)
|
||||
p->digits ? 1 : 0, p->symbols ? 1 : 0, p->exclude);
|
||||
}
|
||||
fclose(f);
|
||||
#if defined(PLATFORM_WEB)
|
||||
ScheduleWebStorageSync(250, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -418,6 +515,49 @@ clipboard_clear(PassApp *a)
|
||||
a->clip_value[0] = '\0';
|
||||
}
|
||||
|
||||
static void
|
||||
clear_generated(PassApp *a)
|
||||
{
|
||||
memset(a->generated, 0, sizeof(a->generated));
|
||||
a->generated_expires_ms = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
arm_master_timeout(PassApp *a)
|
||||
{
|
||||
if(a->master.buffer[0] == '\0')
|
||||
a->master_expires_ms = 0;
|
||||
else
|
||||
a->master_expires_ms = now_ms() + SECRET_FIELD_LIFETIME_MS;
|
||||
}
|
||||
|
||||
static void
|
||||
arm_generated_timeout(PassApp *a)
|
||||
{
|
||||
if(a->generated[0] == '\0')
|
||||
a->generated_expires_ms = 0;
|
||||
else
|
||||
a->generated_expires_ms = now_ms() + SECRET_FIELD_LIFETIME_MS;
|
||||
}
|
||||
|
||||
static void
|
||||
secret_tick(PassApp *a)
|
||||
{
|
||||
int64_t now = now_ms();
|
||||
|
||||
if(a->master_expires_ms > 0 && now >= a->master_expires_ms) {
|
||||
field_clear(&a->master);
|
||||
a->master_expires_ms = 0;
|
||||
a->reveal = 0;
|
||||
snprintf(a->message, sizeof(a->message), "%s", "Master password cleared");
|
||||
}
|
||||
if(a->generated_expires_ms > 0 && now >= a->generated_expires_ms) {
|
||||
clear_generated(a);
|
||||
if(a->message[0] == '\0' || strcmp(a->message, "Master password cleared") != 0)
|
||||
snprintf(a->message, sizeof(a->message), "%s", "Generated password cleared");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
generate(PassApp *a)
|
||||
{
|
||||
@@ -437,10 +577,12 @@ generate(PassApp *a)
|
||||
field_text(&a->master), &options,
|
||||
a->generated, sizeof(a->generated),
|
||||
err, sizeof(err)) != 0) {
|
||||
a->generated[0] = '\0';
|
||||
clear_generated(a);
|
||||
snprintf(a->message, sizeof(a->message), "%s", err);
|
||||
return;
|
||||
}
|
||||
arm_master_timeout(a);
|
||||
arm_generated_timeout(a);
|
||||
if(a->settings.auto_copy) {
|
||||
clipboard_copy_for(a, a->generated, a->settings.clear_after_seconds);
|
||||
if(a->settings.clear_after_seconds > 0)
|
||||
@@ -468,14 +610,18 @@ poll_secure_result(PassApp *a)
|
||||
if(status == 2) {
|
||||
if(a->secure_action == 1) {
|
||||
field_set(&a->master, result);
|
||||
arm_master_timeout(a);
|
||||
snprintf(a->message, sizeof(a->message), "%s", "Master password unlocked");
|
||||
} else {
|
||||
field_clear(&a->master);
|
||||
a->master_expires_ms = 0;
|
||||
snprintf(a->message, sizeof(a->message), "%s", result);
|
||||
}
|
||||
} else if(status == 3) {
|
||||
snprintf(a->message, sizeof(a->message), "%s", result[0] != '\0' ? result : "Secure storage failed");
|
||||
}
|
||||
a->secure_action = 0;
|
||||
memset(result, 0, sizeof(result));
|
||||
}
|
||||
|
||||
static UITextInputStyle
|
||||
@@ -516,6 +662,13 @@ draw_field(Field *f, Rectangle bounds, int font, UITextInputStyle style)
|
||||
return DrawUITextField(props);
|
||||
}
|
||||
|
||||
static void
|
||||
keep_focused_field_visible(UIScrollArea area, Field *f, Rectangle bounds)
|
||||
{
|
||||
if(f != NULL && f->focused)
|
||||
EnsureUIScrollRectVisible(area, bounds, ScaleUIPx(28));
|
||||
}
|
||||
|
||||
static int
|
||||
button(int x, int y, int w, int h, const char *label, UIButtonStyle style, int disabled)
|
||||
{
|
||||
@@ -524,6 +677,72 @@ button(int x, int y, int w, int h, const char *label, UIButtonStyle style, int d
|
||||
return DrawUIGenericButton(x, y, w, h, label, style, disabled, &hover);
|
||||
}
|
||||
|
||||
static int
|
||||
can_biometric_unlock_master(void)
|
||||
{
|
||||
return android_bridge_master_saved() && android_bridge_master_biometric() &&
|
||||
android_bridge_biometric_available();
|
||||
}
|
||||
|
||||
static const char *
|
||||
fingerprint_unavailable_message(void)
|
||||
{
|
||||
if(!android_bridge_biometric_available()) {
|
||||
if(android_bridge_biometric_setup_required())
|
||||
return "Set up Android fingerprint first";
|
||||
return "Fingerprint unlock is not available";
|
||||
}
|
||||
if(!android_bridge_master_saved())
|
||||
return "Save master with fingerprint in Settings first";
|
||||
if(!android_bridge_master_biometric())
|
||||
return "Saved master does not require fingerprint";
|
||||
return "Fingerprint unlock is not ready";
|
||||
}
|
||||
|
||||
static int
|
||||
should_show_fingerprint_button(void)
|
||||
{
|
||||
return can_biometric_unlock_master();
|
||||
}
|
||||
|
||||
static int
|
||||
fingerprint_button(PassApp *a, int x, int y, int size, int disabled)
|
||||
{
|
||||
UIMaterialScheme scheme = GetUIMaterialScheme();
|
||||
Rectangle bounds = (Rectangle){(float)x, (float)y, (float)size, (float)size};
|
||||
Color background = disabled ? scheme.surface_variant : scheme.primary;
|
||||
Color border = disabled ? scheme.outline : LightenUIColor(scheme.outline, 18);
|
||||
Color icon = disabled ? scheme.on_surface_variant : WHITE;
|
||||
int clicked;
|
||||
|
||||
DrawRectangleRounded((Rectangle){bounds.x, bounds.y + (float)ScaleUIPx(2), bounds.width, bounds.height}, 0.18f, 10, DarkenUIColor(background, 16));
|
||||
DrawRectangleRounded(bounds, 0.18f, 10, background);
|
||||
DrawRectangleRoundedLinesEx(bounds, 0.18f, 10, 1.0f, border);
|
||||
|
||||
clicked = DrawUIIconButton((IconButtonProps){
|
||||
.bounds = bounds,
|
||||
.icon = a->icons[UI_ICON_TYPE_FINGERPRINT],
|
||||
.icon_size = size - ScaleUIPx(16),
|
||||
.icon_padding = ScaleUIPx(8),
|
||||
.disabled = 0,
|
||||
.background = BLANK,
|
||||
.hover_background = BLANK,
|
||||
.icon_color = icon,
|
||||
.border = BLANK,
|
||||
.radius = 0.18f,
|
||||
});
|
||||
if(clicked) {
|
||||
if(disabled) {
|
||||
snprintf(a->message, sizeof(a->message), "%s", fingerprint_unavailable_message());
|
||||
} else {
|
||||
android_bridge_set_soft_keyboard(0);
|
||||
a->secure_action = 1;
|
||||
android_bridge_unlock_master();
|
||||
}
|
||||
}
|
||||
return clicked;
|
||||
}
|
||||
|
||||
static void
|
||||
checkbox(int x, int y, const char *label, int *value)
|
||||
{
|
||||
@@ -592,6 +811,7 @@ draw_wide(PassApp *a, int width, int height, int top_reserved)
|
||||
int content_w = width - 64;
|
||||
int x, y;
|
||||
|
||||
(void)height;
|
||||
if(content_w > 720)
|
||||
content_w = 720;
|
||||
x = (width - content_w) / 2;
|
||||
@@ -610,7 +830,15 @@ draw_wide(PassApp *a, int width, int height, int top_reserved)
|
||||
y += 76;
|
||||
label_text("Master password", x + 24, y, 14, text);
|
||||
a->master.secure = !a->reveal;
|
||||
draw_field(&a->master, scaled_rect((float)x + 24, (float)y + 24, (float)content_w - 150, 38), 16, style);
|
||||
{
|
||||
int fp = should_show_fingerprint_button();
|
||||
int fp_disabled = !can_biometric_unlock_master();
|
||||
int field_w = content_w - (fp ? 196 : 150);
|
||||
|
||||
draw_field(&a->master, scaled_rect((float)x + 24, (float)y + 24, (float)field_w, 38), 16, style);
|
||||
if(fp)
|
||||
fingerprint_button(a, ScaleUIPx(x + content_w - 158), ScaleUIPx(y + 24), ScaleUIPx(38), fp_disabled);
|
||||
}
|
||||
if(button(ScaleUIPx(x + content_w - 112), ScaleUIPx(y + 24), ScaleUIPx(88), ScaleUIPx(38),
|
||||
a->reveal ? "Hide" : "Reveal", UI_BUTTON_STYLE_SECONDARY, 0))
|
||||
a->reveal = !a->reveal;
|
||||
@@ -646,13 +874,13 @@ draw_wide(PassApp *a, int width, int height, int top_reserved)
|
||||
}
|
||||
draw_field(&a->exclude, scaled_rect((float)x + 340, (float)y + 24, (float)content_w - 364, 38), 16, style);
|
||||
label_text("Excluded characters", x + 340, y, 14, text);
|
||||
y += 76;
|
||||
y += 86;
|
||||
|
||||
checkbox(ScaleUIPx(x + 24), ScaleUIPx(y), "Lowercase", &a->lower);
|
||||
checkbox(ScaleUIPx(x + 174), ScaleUIPx(y), "Uppercase", &a->upper);
|
||||
checkbox(ScaleUIPx(x + 324), ScaleUIPx(y), "Digits", &a->digits);
|
||||
checkbox(ScaleUIPx(x + 444), ScaleUIPx(y), "Symbols", &a->symbols);
|
||||
y += 48;
|
||||
y += 58;
|
||||
|
||||
if(button(ScaleUIPx(x + 24), ScaleUIPx(y), ScaleUIPx(150), ScaleUIPx(42),
|
||||
"Generate", UI_BUTTON_STYLE_PRIMARY, 0))
|
||||
@@ -665,7 +893,8 @@ draw_wide(PassApp *a, int width, int height, int top_reserved)
|
||||
if(button(ScaleUIPx(x + 356), ScaleUIPx(y), ScaleUIPx(120), ScaleUIPx(42),
|
||||
"Clear", UI_BUTTON_STYLE_SECONDARY, 0)) {
|
||||
field_clear(&a->master);
|
||||
a->generated[0] = '\0';
|
||||
a->master_expires_ms = 0;
|
||||
clear_generated(a);
|
||||
snprintf(a->message, sizeof(a->message), "%s", "Cleared");
|
||||
}
|
||||
y += 56;
|
||||
@@ -760,7 +989,24 @@ fingerprint_emoji(const char *master, char *out, size_t out_size)
|
||||
}
|
||||
|
||||
static int
|
||||
draw_generate_page(PassApp *a, int cx, int cy, int inner_w, int y)
|
||||
draw_master_fingerprint_symbols(PassApp *a, int x, int y)
|
||||
{
|
||||
UIMaterialScheme scheme = GetUIMaterialScheme();
|
||||
char fp[64];
|
||||
int font_token;
|
||||
|
||||
if(a == NULL || !a->settings.show_fingerprint || a->master.buffer[0] == '\0')
|
||||
return 0;
|
||||
|
||||
fingerprint_emoji(a->master.buffer, fp, sizeof(fp));
|
||||
font_token = PushUIFont("pass-emoji");
|
||||
label_text_px(fp, x, y, 20, scheme.on_surface_variant);
|
||||
PopUIFont(font_token);
|
||||
return 30;
|
||||
}
|
||||
|
||||
static int
|
||||
draw_generate_page(PassApp *a, UIScrollArea area, int cx, int cy, int inner_w, int y)
|
||||
{
|
||||
UIMaterialScheme scheme = GetUIMaterialScheme();
|
||||
Color text = GetThemeText();
|
||||
@@ -769,32 +1015,38 @@ draw_generate_page(PassApp *a, int cx, int cy, int inner_w, int y)
|
||||
int half_w = (inner_w - 12) / 2;
|
||||
|
||||
label_text_px("Site", cx, cy + ScaleUIPx(y), 14, text);
|
||||
draw_field(&a->site, (Rectangle){(float)cx, (float)(cy + ScaleUIPx(y + 22)), (float)ScaleUIPx(inner_w), (float)ScaleUIPx(38)}, 16, style);
|
||||
{
|
||||
Rectangle field = (Rectangle){(float)cx, (float)(cy + ScaleUIPx(y + 22)), (float)ScaleUIPx(inner_w), (float)ScaleUIPx(38)};
|
||||
draw_field(&a->site, field, 16, style);
|
||||
keep_focused_field_visible(area, &a->site, field);
|
||||
}
|
||||
y += 66;
|
||||
label_text_px("Login", cx, cy + ScaleUIPx(y), 14, text);
|
||||
draw_field(&a->login, (Rectangle){(float)cx, (float)(cy + ScaleUIPx(y + 22)), (float)ScaleUIPx(inner_w), (float)ScaleUIPx(38)}, 16, style);
|
||||
{
|
||||
Rectangle field = (Rectangle){(float)cx, (float)(cy + ScaleUIPx(y + 22)), (float)ScaleUIPx(inner_w), (float)ScaleUIPx(38)};
|
||||
draw_field(&a->login, field, 16, style);
|
||||
keep_focused_field_visible(area, &a->login, field);
|
||||
}
|
||||
y += 66;
|
||||
|
||||
label_text_px("Master password", cx, cy + ScaleUIPx(y), 14, text);
|
||||
a->master.secure = !a->reveal;
|
||||
{
|
||||
int field_w = inner_w - 80;
|
||||
draw_field(&a->master, (Rectangle){(float)cx, (float)(cy + ScaleUIPx(y + 22)), (float)ScaleUIPx(field_w), (float)ScaleUIPx(38)}, 16, style);
|
||||
if(button(cx + ScaleUIPx(field_w + 8), cy + ScaleUIPx(y + 22), ScaleUIPx(72), ScaleUIPx(38),
|
||||
int fp = should_show_fingerprint_button();
|
||||
int fp_disabled = !can_biometric_unlock_master();
|
||||
int field_w = inner_w - (fp ? 130 : 80);
|
||||
Rectangle field = (Rectangle){(float)cx, (float)(cy + ScaleUIPx(y + 22)), (float)ScaleUIPx(field_w), (float)ScaleUIPx(38)};
|
||||
|
||||
draw_field(&a->master, field, 16, style);
|
||||
keep_focused_field_visible(area, &a->master, field);
|
||||
if(fp)
|
||||
fingerprint_button(a, cx + ScaleUIPx(field_w + 8), cy + ScaleUIPx(y + 22), ScaleUIPx(42), fp_disabled);
|
||||
if(button(cx + ScaleUIPx(field_w + (fp ? 58 : 8)), cy + ScaleUIPx(y + 22), ScaleUIPx(72), ScaleUIPx(38),
|
||||
a->reveal ? "Hide" : "Reveal", UI_BUTTON_STYLE_SECONDARY, 0))
|
||||
a->reveal = !a->reveal;
|
||||
}
|
||||
y += 64;
|
||||
if(a->settings.show_fingerprint && a->master.buffer[0] != '\0') {
|
||||
char fp[64];
|
||||
int font_token;
|
||||
|
||||
fingerprint_emoji(a->master.buffer, fp, sizeof(fp));
|
||||
font_token = PushUIFont("pass-emoji");
|
||||
label_text_px(fp, cx, cy + ScaleUIPx(y), 20, scheme.on_surface_variant);
|
||||
PopUIFont(font_token);
|
||||
y += 30;
|
||||
}
|
||||
y += draw_master_fingerprint_symbols(a, cx, cy + ScaleUIPx(y));
|
||||
|
||||
y += 6;
|
||||
label_text_px("Length", cx, cy + ScaleUIPx(y), 14, text);
|
||||
@@ -821,18 +1073,22 @@ draw_generate_page(PassApp *a, int cx, int cy, int inner_w, int y)
|
||||
props.value = &a->counter;
|
||||
Spinbox(props);
|
||||
}
|
||||
y += 62;
|
||||
y += 76;
|
||||
|
||||
label_text_px("Excluded characters", cx, cy + ScaleUIPx(y), 14, text);
|
||||
draw_field(&a->exclude, (Rectangle){(float)cx, (float)(cy + ScaleUIPx(y + 22)), (float)ScaleUIPx(inner_w), (float)ScaleUIPx(38)}, 16, style);
|
||||
y += 66;
|
||||
{
|
||||
Rectangle field = (Rectangle){(float)cx, (float)(cy + ScaleUIPx(y + 22)), (float)ScaleUIPx(inner_w), (float)ScaleUIPx(38)};
|
||||
draw_field(&a->exclude, field, 16, style);
|
||||
keep_focused_field_visible(area, &a->exclude, field);
|
||||
}
|
||||
y += 78;
|
||||
|
||||
checkbox(cx, cy + ScaleUIPx(y), "Lowercase", &a->lower);
|
||||
checkbox(cx + ScaleUIPx(half_w + 12), cy + ScaleUIPx(y), "Uppercase", &a->upper);
|
||||
y += 36;
|
||||
checkbox(cx, cy + ScaleUIPx(y), "Digits", &a->digits);
|
||||
checkbox(cx + ScaleUIPx(half_w + 12), cy + ScaleUIPx(y), "Symbols", &a->symbols);
|
||||
y += 44;
|
||||
y += 56;
|
||||
|
||||
if(button(cx, cy + ScaleUIPx(y), ScaleUIPx(inner_w), ScaleUIPx(42), "Generate", UI_BUTTON_STYLE_PRIMARY, 0))
|
||||
generate(a);
|
||||
@@ -843,7 +1099,8 @@ draw_generate_page(PassApp *a, int cx, int cy, int inner_w, int y)
|
||||
}
|
||||
if(button(cx + ScaleUIPx(half_w + 12), cy + ScaleUIPx(y), ScaleUIPx(half_w), ScaleUIPx(42), "Clear", UI_BUTTON_STYLE_SECONDARY, 0)) {
|
||||
field_clear(&a->master);
|
||||
a->generated[0] = '\0';
|
||||
a->master_expires_ms = 0;
|
||||
clear_generated(a);
|
||||
snprintf(a->message, sizeof(a->message), "%s", "Cleared");
|
||||
}
|
||||
y += 50;
|
||||
@@ -859,7 +1116,7 @@ draw_generate_page(PassApp *a, int cx, int cy, int inner_w, int y)
|
||||
}
|
||||
|
||||
static int
|
||||
draw_profiles_page(PassApp *a, int cx, int cy, int inner_w, int y)
|
||||
draw_profiles_page(PassApp *a, UIScrollArea area, int cx, int cy, int inner_w, int y)
|
||||
{
|
||||
UIMaterialScheme scheme = GetUIMaterialScheme();
|
||||
Color text = GetThemeText();
|
||||
@@ -870,7 +1127,11 @@ draw_profiles_page(PassApp *a, int cx, int cy, int inner_w, int y)
|
||||
label_text_px("PROFILE", cx, cy + ScaleUIPx(y), 12, scheme.primary);
|
||||
y += 20;
|
||||
label_text_px("Name", cx, cy + ScaleUIPx(y), 14, text);
|
||||
draw_field(&a->profile_name, (Rectangle){(float)cx, (float)(cy + ScaleUIPx(y + 22)), (float)ScaleUIPx(inner_w), (float)ScaleUIPx(38)}, 16, style);
|
||||
{
|
||||
Rectangle field = (Rectangle){(float)cx, (float)(cy + ScaleUIPx(y + 22)), (float)ScaleUIPx(inner_w), (float)ScaleUIPx(38)};
|
||||
draw_field(&a->profile_name, field, 16, style);
|
||||
keep_focused_field_visible(area, &a->profile_name, field);
|
||||
}
|
||||
y += 70;
|
||||
if(button(cx, cy + ScaleUIPx(y), ScaleUIPx(half_w), ScaleUIPx(42), "Save Current", UI_BUTTON_STYLE_PRIMARY, 0))
|
||||
save_current_profile(a);
|
||||
@@ -905,52 +1166,110 @@ draw_profiles_page(PassApp *a, int cx, int cy, int inner_w, int y)
|
||||
}
|
||||
|
||||
static int
|
||||
draw_settings_page(PassApp *a, int cx, int cy, int inner_w, int y)
|
||||
draw_settings_page(PassApp *a, UIScrollArea area, int cx, int cy, int inner_w, int y)
|
||||
{
|
||||
UIMaterialScheme scheme = GetUIMaterialScheme();
|
||||
Color text = GetThemeText();
|
||||
UITextInputStyle style = input_style();
|
||||
int half_w = (inner_w - 12) / 2;
|
||||
|
||||
label_text_px("BEHAVIOR", cx, cy + ScaleUIPx(y), 12, scheme.primary);
|
||||
label_text_px("PASSWORD DEFAULTS", cx, cy + ScaleUIPx(y), 12, scheme.primary);
|
||||
y += 24;
|
||||
checkbox(cx, cy + ScaleUIPx(y), "Auto-copy after Generate", &a->settings.auto_copy);
|
||||
y += 40;
|
||||
checkbox(cx, cy + ScaleUIPx(y), "Show master fingerprint", &a->settings.show_fingerprint);
|
||||
y += 44;
|
||||
label_text_px("Clipboard seconds", cx, cy + ScaleUIPx(y), 14, text);
|
||||
label_text_px("Length", cx, cy + ScaleUIPx(y), 14, text);
|
||||
{
|
||||
SpinboxProps props;
|
||||
memset(&props, 0, sizeof(props));
|
||||
props.bounds = (Rectangle){(float)cx, (float)(cy + ScaleUIPx(y + 22)), (float)ScaleUIPx(half_w), (float)ScaleUIPx(38)};
|
||||
props.id = 501;
|
||||
props.min = 0;
|
||||
props.max = 3600;
|
||||
props.step = 5;
|
||||
props.value = &a->settings.clear_after_seconds;
|
||||
props.bounds = (Rectangle){(float)cx, (float)(cy + ScaleUIPx(y + 20)), (float)ScaleUIPx(half_w), (float)ScaleUIPx(38)};
|
||||
props.id = 511;
|
||||
props.min = 1;
|
||||
props.max = 128;
|
||||
props.step = 1;
|
||||
props.value = &a->length;
|
||||
Spinbox(props);
|
||||
}
|
||||
y += 74;
|
||||
label_text_px("Counter", cx + ScaleUIPx(half_w + 12), cy + ScaleUIPx(y), 14, text);
|
||||
{
|
||||
SpinboxProps props;
|
||||
memset(&props, 0, sizeof(props));
|
||||
props.bounds = (Rectangle){(float)(cx + ScaleUIPx(half_w + 12)), (float)(cy + ScaleUIPx(y + 20)), (float)ScaleUIPx(half_w), (float)ScaleUIPx(38)};
|
||||
props.id = 512;
|
||||
props.min = 1;
|
||||
props.max = 999999;
|
||||
props.step = 1;
|
||||
props.value = &a->counter;
|
||||
Spinbox(props);
|
||||
}
|
||||
y += 62;
|
||||
label_text_px("Excluded characters", cx, cy + ScaleUIPx(y), 14, text);
|
||||
{
|
||||
Rectangle field = (Rectangle){(float)cx, (float)(cy + ScaleUIPx(y + 22)), (float)ScaleUIPx(inner_w), (float)ScaleUIPx(38)};
|
||||
draw_field(&a->exclude, field, 16, style);
|
||||
keep_focused_field_visible(area, &a->exclude, field);
|
||||
}
|
||||
y += 78;
|
||||
checkbox(cx, cy + ScaleUIPx(y), "Lowercase", &a->lower);
|
||||
checkbox(cx + ScaleUIPx(half_w + 12), cy + ScaleUIPx(y), "Uppercase", &a->upper);
|
||||
y += 36;
|
||||
checkbox(cx, cy + ScaleUIPx(y), "Digits", &a->digits);
|
||||
checkbox(cx + ScaleUIPx(half_w + 12), cy + ScaleUIPx(y), "Symbols", &a->symbols);
|
||||
y += 62;
|
||||
|
||||
if(button(cx, cy + ScaleUIPx(y), ScaleUIPx(inner_w), ScaleUIPx(42), "Save Settings", UI_BUTTON_STYLE_PRIMARY, 0))
|
||||
save_settings(a);
|
||||
y += 64;
|
||||
|
||||
label_text_px("MASTER PASSWORD", cx, cy + ScaleUIPx(y), 12, scheme.primary);
|
||||
y += 24;
|
||||
checkbox(cx, cy + ScaleUIPx(y), "Require biometric unlock", &a->settings.use_biometric);
|
||||
y += 42;
|
||||
label_text_px("Master password", cx, cy + ScaleUIPx(y), 14, text);
|
||||
a->master.secure = !a->reveal;
|
||||
{
|
||||
int fp = should_show_fingerprint_button();
|
||||
int fp_disabled = !can_biometric_unlock_master();
|
||||
int field_w = inner_w - (fp ? 130 : 80);
|
||||
Rectangle field = (Rectangle){(float)cx, (float)(cy + ScaleUIPx(y + 22)), (float)ScaleUIPx(field_w), (float)ScaleUIPx(38)};
|
||||
|
||||
draw_field(&a->master, field, 16, style);
|
||||
keep_focused_field_visible(area, &a->master, field);
|
||||
if(fp)
|
||||
fingerprint_button(a, cx + ScaleUIPx(field_w + 8), cy + ScaleUIPx(y + 22), ScaleUIPx(42), fp_disabled);
|
||||
if(button(cx + ScaleUIPx(field_w + (fp ? 58 : 8)), cy + ScaleUIPx(y + 22), ScaleUIPx(72), ScaleUIPx(38),
|
||||
a->reveal ? "Hide" : "Reveal", UI_BUTTON_STYLE_SECONDARY, 0))
|
||||
a->reveal = !a->reveal;
|
||||
}
|
||||
y += 82;
|
||||
y += draw_master_fingerprint_symbols(a, cx, cy + ScaleUIPx(y));
|
||||
if(a->settings.show_fingerprint && a->master.buffer[0] != '\0')
|
||||
y += 12;
|
||||
checkbox(cx, cy + ScaleUIPx(y), "Use fingerprint unlock", &a->settings.use_biometric);
|
||||
y += 44;
|
||||
checkbox(cx, cy + ScaleUIPx(y), "Show master fingerprint", &a->settings.show_fingerprint);
|
||||
y += 48;
|
||||
if(!android_bridge_biometric_available())
|
||||
label_text_px(android_bridge_biometric_setup_required()
|
||||
? "Set up Android screen lock and fingerprint first"
|
||||
? "Android fingerprint setup required"
|
||||
: "Biometric unlock is not available on this device",
|
||||
cx, cy + ScaleUIPx(y), 12, scheme.on_surface_variant);
|
||||
else if(android_bridge_master_saved())
|
||||
label_text_px(android_bridge_master_biometric() ? "Saved master uses biometric unlock" : "Saved master unlocks without biometric",
|
||||
label_text_px(android_bridge_master_biometric() ? "Saved master uses fingerprint unlock" : "Saved master unlocks without fingerprint",
|
||||
cx, cy + ScaleUIPx(y), 12, scheme.on_surface_variant);
|
||||
else
|
||||
label_text_px("No saved master password", cx, cy + ScaleUIPx(y), 12, scheme.on_surface_variant);
|
||||
y += 32;
|
||||
if(button(cx, cy + ScaleUIPx(y), ScaleUIPx(half_w), ScaleUIPx(42), "Save Master", UI_BUTTON_STYLE_PRIMARY, 0)) {
|
||||
y += 36;
|
||||
if(button(cx, cy + ScaleUIPx(y), ScaleUIPx(inner_w), ScaleUIPx(42), "Save With Fingerprint", UI_BUTTON_STYLE_PRIMARY, !android_bridge_biometric_available())) {
|
||||
android_bridge_set_soft_keyboard(0);
|
||||
a->settings.use_biometric = 1;
|
||||
a->secure_action = 2;
|
||||
android_bridge_save_master(a->master.buffer, a->settings.use_biometric);
|
||||
android_bridge_save_master(a->master.buffer, 1);
|
||||
}
|
||||
if(button(cx + ScaleUIPx(half_w + 12), cy + ScaleUIPx(y), ScaleUIPx(half_w), ScaleUIPx(42), "Unlock Master", UI_BUTTON_STYLE_SECONDARY, !android_bridge_master_saved())) {
|
||||
y += 50;
|
||||
if(button(cx, cy + ScaleUIPx(y), ScaleUIPx(half_w), ScaleUIPx(42), "Save Without", UI_BUTTON_STYLE_SECONDARY, 0)) {
|
||||
android_bridge_set_soft_keyboard(0);
|
||||
a->settings.use_biometric = 0;
|
||||
a->secure_action = 2;
|
||||
android_bridge_save_master(a->master.buffer, 0);
|
||||
}
|
||||
if(button(cx + ScaleUIPx(half_w + 12), cy + ScaleUIPx(y), ScaleUIPx(half_w), ScaleUIPx(42), "Unlock", UI_BUTTON_STYLE_SECONDARY, !android_bridge_master_saved())) {
|
||||
android_bridge_set_soft_keyboard(0);
|
||||
a->secure_action = 1;
|
||||
android_bridge_unlock_master();
|
||||
}
|
||||
@@ -960,6 +1279,8 @@ draw_settings_page(PassApp *a, int cx, int cy, int inner_w, int y)
|
||||
if(button(cx + ScaleUIPx(half_w + 12), cy + ScaleUIPx(y), ScaleUIPx(half_w), ScaleUIPx(42), "Forget Master", UI_BUTTON_STYLE_SECONDARY, !android_bridge_master_saved())) {
|
||||
a->secure_action = 2;
|
||||
android_bridge_clear_master();
|
||||
field_clear(&a->master);
|
||||
a->master_expires_ms = 0;
|
||||
}
|
||||
y += 58;
|
||||
if(a->message[0] != '\0') {
|
||||
@@ -975,7 +1296,6 @@ draw_narrow(PassApp *a, int width, int height, int top_reserved, int bottom_rese
|
||||
{
|
||||
UIScrollArea area;
|
||||
UIScrollView view;
|
||||
int margin = 0;
|
||||
int card_x = 0;
|
||||
int card_y = top_reserved + 8;
|
||||
int card_w = width;
|
||||
@@ -992,13 +1312,13 @@ draw_narrow(PassApp *a, int width, int height, int top_reserved, int bottom_rese
|
||||
card_h = 200;
|
||||
switch(a->view) {
|
||||
case VIEW_PROFILES:
|
||||
content_h = 190 + a->profile_count * 50 + pad;
|
||||
content_h = 210 + a->profile_count * 50 + pad;
|
||||
break;
|
||||
case VIEW_SETTINGS:
|
||||
content_h = 420 + pad;
|
||||
content_h = 880 + pad;
|
||||
break;
|
||||
default:
|
||||
content_h = 620 + pad;
|
||||
content_h = 650 + pad;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1012,17 +1332,17 @@ draw_narrow(PassApp *a, int width, int height, int top_reserved, int bottom_rese
|
||||
view = BeginUIScrollContainer(area);
|
||||
cx = view.content_x;
|
||||
cy = view.content_y;
|
||||
y = 0;
|
||||
y = 20;
|
||||
|
||||
switch(a->view) {
|
||||
case VIEW_PROFILES:
|
||||
draw_profiles_page(a, cx, cy, inner_w, y);
|
||||
draw_profiles_page(a, area, cx, cy, inner_w, y);
|
||||
break;
|
||||
case VIEW_SETTINGS:
|
||||
draw_settings_page(a, cx, cy, inner_w, y);
|
||||
draw_settings_page(a, area, cx, cy, inner_w, y);
|
||||
break;
|
||||
default:
|
||||
draw_generate_page(a, cx, cy, inner_w, y);
|
||||
draw_generate_page(a, area, cx, cy, inner_w, y);
|
||||
break;
|
||||
}
|
||||
EndUIScrollContainer(area, view);
|
||||
@@ -1038,11 +1358,13 @@ pass_app_draw(PassApp *a, int surface_w, int surface_h, float dpi,
|
||||
(void)ui_h;
|
||||
Background(GetThemeBackground());
|
||||
clipboard_tick(a);
|
||||
secret_tick(a);
|
||||
poll_secure_result(a);
|
||||
if(ui_w >= 760 && ui_w > ui_h)
|
||||
draw_wide(a, ui_w, ui_h, top_reserved);
|
||||
else
|
||||
draw_narrow(a, ui_w, ui_h, top_reserved, bottom_reserved);
|
||||
autosave_settings(a);
|
||||
draw_bottom_nav(a, surface_w, surface_h, ScaleUIPx(bottom_reserved));
|
||||
}
|
||||
|
||||
@@ -1053,6 +1375,6 @@ pass_app_shutdown(PassApp *a)
|
||||
return;
|
||||
field_clear(&a->master);
|
||||
clipboard_clear(a);
|
||||
a->generated[0] = '\0';
|
||||
clear_generated(a);
|
||||
UnloadAllUIIconTextures(a->icons);
|
||||
}
|
||||
@@ -6,11 +6,13 @@ import android.content.SharedPreferences;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Insets;
|
||||
import android.graphics.Rect;
|
||||
import android.hardware.biometrics.BiometricPrompt;
|
||||
import android.hardware.fingerprint.FingerprintManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.CancellationSignal;
|
||||
import android.security.keystore.UserNotAuthenticatedException;
|
||||
import android.security.keystore.KeyGenParameterSpec;
|
||||
import android.security.keystore.KeyProperties;
|
||||
import android.util.TypedValue;
|
||||
@@ -37,10 +39,13 @@ import javax.crypto.spec.GCMParameterSpec;
|
||||
*/
|
||||
public class MainActivity extends NativeActivity {
|
||||
private static final String SECURE_PREFS = "pass_secure";
|
||||
private static final String KEY_ALIAS = "pass_master_key";
|
||||
private static final String KEY_ALIAS_LEGACY = "pass_master_key";
|
||||
private static final String KEY_ALIAS_PLAIN = "pass_master_key_plain";
|
||||
private static final String KEY_ALIAS_AUTH = "pass_master_key_auth";
|
||||
private static final String PREF_CIPHERTEXT = "master_ciphertext";
|
||||
private static final String PREF_IV = "master_iv";
|
||||
private static final String PREF_BIOMETRIC = "master_biometric";
|
||||
private static final String PREF_KEY_ALIAS = "master_key_alias";
|
||||
private static final int SECURE_IDLE = 0;
|
||||
private static final int SECURE_PENDING = 1;
|
||||
private static final int SECURE_OK = 2;
|
||||
@@ -57,7 +62,7 @@ public class MainActivity extends NativeActivity {
|
||||
private int secureStatus = SECURE_IDLE;
|
||||
private String secureResult = "";
|
||||
|
||||
private native void nativeSetInsets(int status, int nav,
|
||||
private native void nativeSetInsets(int status, int nav, int ime,
|
||||
int cutoutLeft, int cutoutTop, int cutoutRight, int cutoutBottom);
|
||||
private native void nativeSetDeviceDensity(float density);
|
||||
private native void nativeTextInputCommit(int codepoint);
|
||||
@@ -220,24 +225,10 @@ public class MainActivity extends NativeActivity {
|
||||
setSecureError(biometricUnavailableMessage());
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
|
||||
cipher.init(Cipher.ENCRYPT_MODE, getOrCreateMasterKey());
|
||||
byte[] encrypted = cipher.doFinal(master.getBytes(StandardCharsets.UTF_8));
|
||||
byte[] iv = cipher.getIV();
|
||||
if (iv == null || iv.length == 0) {
|
||||
setSecureError("Save failed: missing encryption IV");
|
||||
return;
|
||||
}
|
||||
|
||||
SharedPreferences.Editor editor = getSharedPreferences(SECURE_PREFS, MODE_PRIVATE).edit();
|
||||
editor.putString(PREF_IV, b64(iv));
|
||||
editor.putString(PREF_CIPHERTEXT, b64(encrypted));
|
||||
editor.putBoolean(PREF_BIOMETRIC, requireBiometric);
|
||||
editor.apply();
|
||||
setSecureOk("Master password saved");
|
||||
} catch (Exception e) {
|
||||
setSecureError("Save failed: " + e.getMessage());
|
||||
if (requireBiometric) {
|
||||
authenticateThenSave(master);
|
||||
} else {
|
||||
encryptAndStoreMaster(master, false);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -261,6 +252,31 @@ public class MainActivity extends NativeActivity {
|
||||
}
|
||||
|
||||
private void authenticateThenDecrypt() {
|
||||
promptForBiometric("Unlock master password",
|
||||
"Use your fingerprint",
|
||||
"pass will decrypt the saved master password after unlock",
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
decryptStoredMaster();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void authenticateThenSave(final String master) {
|
||||
promptForBiometric("Save master password",
|
||||
"Use your fingerprint",
|
||||
"pass will require fingerprint unlock for the saved master password",
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
encryptAndStoreMaster(master, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void promptForBiometric(String title, String subtitle, String description,
|
||||
final Runnable onSuccess) {
|
||||
if (!isBiometricAvailable()) {
|
||||
setSecureError(biometricUnavailableMessage());
|
||||
return;
|
||||
@@ -283,16 +299,16 @@ public class MainActivity extends NativeActivity {
|
||||
}
|
||||
};
|
||||
BiometricPrompt prompt = new BiometricPrompt.Builder(MainActivity.this)
|
||||
.setTitle("Unlock master password")
|
||||
.setSubtitle("Use your fingerprint or device credential")
|
||||
.setDescription("pass will decrypt the saved master password after unlock")
|
||||
.setTitle(title)
|
||||
.setSubtitle(subtitle)
|
||||
.setDescription(description)
|
||||
.setNegativeButton("Cancel", executor, (dialog, which) -> setSecureError("Unlock canceled"))
|
||||
.build();
|
||||
prompt.authenticate(new CancellationSignal(), executor,
|
||||
new BiometricPrompt.AuthenticationCallback() {
|
||||
@Override
|
||||
public void onAuthenticationSucceeded(BiometricPrompt.AuthenticationResult result) {
|
||||
decryptStoredMaster();
|
||||
onSuccess.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -309,6 +325,31 @@ public class MainActivity extends NativeActivity {
|
||||
});
|
||||
}
|
||||
|
||||
private void encryptAndStoreMaster(String master, boolean requireBiometric) {
|
||||
try {
|
||||
Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
|
||||
cipher.init(Cipher.ENCRYPT_MODE, getOrCreateMasterKey(requireBiometric));
|
||||
byte[] encrypted = cipher.doFinal(master.getBytes(StandardCharsets.UTF_8));
|
||||
byte[] iv = cipher.getIV();
|
||||
if (iv == null || iv.length == 0) {
|
||||
setSecureError("Save failed: missing encryption IV");
|
||||
return;
|
||||
}
|
||||
|
||||
SharedPreferences.Editor editor = getSharedPreferences(SECURE_PREFS, MODE_PRIVATE).edit();
|
||||
editor.putString(PREF_IV, b64(iv));
|
||||
editor.putString(PREF_CIPHERTEXT, b64(encrypted));
|
||||
editor.putBoolean(PREF_BIOMETRIC, requireBiometric);
|
||||
editor.putString(PREF_KEY_ALIAS, requireBiometric ? KEY_ALIAS_AUTH : KEY_ALIAS_PLAIN);
|
||||
editor.apply();
|
||||
setSecureOk(requireBiometric ? "Master password saved with fingerprint" : "Master password saved");
|
||||
} catch (UserNotAuthenticatedException e) {
|
||||
setSecureError("Unlock with fingerprint first");
|
||||
} catch (Exception e) {
|
||||
setSecureError("Save failed: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private void decryptStoredMaster() {
|
||||
try {
|
||||
SharedPreferences prefs = getSharedPreferences(SECURE_PREFS, MODE_PRIVATE);
|
||||
@@ -319,28 +360,53 @@ public class MainActivity extends NativeActivity {
|
||||
return;
|
||||
}
|
||||
Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
|
||||
cipher.init(Cipher.DECRYPT_MODE, getOrCreateMasterKey(), new GCMParameterSpec(128, unb64(ivText)));
|
||||
cipher.init(Cipher.DECRYPT_MODE, getStoredMasterKey(), new GCMParameterSpec(128, unb64(ivText)));
|
||||
byte[] decrypted = cipher.doFinal(unb64(encryptedText));
|
||||
setSecureOk(new String(decrypted, StandardCharsets.UTF_8));
|
||||
} catch (UserNotAuthenticatedException e) {
|
||||
setSecureError("Unlock with fingerprint first");
|
||||
} catch (Exception e) {
|
||||
setSecureError("Unlock failed: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private SecretKey getOrCreateMasterKey() throws Exception {
|
||||
private SecretKey getStoredMasterKey() throws Exception {
|
||||
SharedPreferences prefs = getSharedPreferences(SECURE_PREFS, MODE_PRIVATE);
|
||||
String alias = prefs.getString(PREF_KEY_ALIAS, KEY_ALIAS_LEGACY);
|
||||
boolean requireAuth = KEY_ALIAS_AUTH.equals(alias);
|
||||
return getOrCreateMasterKey(alias, requireAuth);
|
||||
}
|
||||
|
||||
private SecretKey getOrCreateMasterKey(boolean requireAuth) throws Exception {
|
||||
return getOrCreateMasterKey(requireAuth ? KEY_ALIAS_AUTH : KEY_ALIAS_PLAIN, requireAuth);
|
||||
}
|
||||
|
||||
private SecretKey getOrCreateMasterKey(String alias, boolean requireAuth) throws Exception {
|
||||
KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore");
|
||||
keyStore.load(null);
|
||||
if (keyStore.containsAlias(KEY_ALIAS)) {
|
||||
return (SecretKey)keyStore.getKey(KEY_ALIAS, null);
|
||||
if (keyStore.containsAlias(alias)) {
|
||||
return (SecretKey)keyStore.getKey(alias, null);
|
||||
}
|
||||
KeyGenerator generator = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES, "AndroidKeyStore");
|
||||
KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder(
|
||||
KEY_ALIAS, KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT)
|
||||
KeyGenParameterSpec.Builder spec = new KeyGenParameterSpec.Builder(
|
||||
alias, KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT)
|
||||
.setBlockModes(KeyProperties.BLOCK_MODE_GCM)
|
||||
.setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE)
|
||||
.setRandomizedEncryptionRequired(true)
|
||||
.build();
|
||||
generator.init(spec);
|
||||
.setRandomizedEncryptionRequired(true);
|
||||
if (requireAuth) {
|
||||
spec.setUserAuthenticationRequired(true);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
spec.setUserAuthenticationParameters(30,
|
||||
KeyProperties.AUTH_BIOMETRIC_STRONG | KeyProperties.AUTH_DEVICE_CREDENTIAL);
|
||||
} else {
|
||||
spec.setUserAuthenticationValidityDurationSeconds(30);
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
spec.setInvalidatedByBiometricEnrollment(true);
|
||||
}
|
||||
}
|
||||
KeyGenParameterSpec builtSpec = spec.build();
|
||||
generator.init(builtSpec);
|
||||
return generator.generateKey();
|
||||
}
|
||||
|
||||
@@ -441,7 +507,8 @@ public class MainActivity extends NativeActivity {
|
||||
}
|
||||
});
|
||||
|
||||
// Startup safety net: catch the initial layout pass.
|
||||
// Keep the native UI updated when the soft keyboard changes the
|
||||
// visible frame on API levels where IME insets are not reported.
|
||||
decorView.getViewTreeObserver().addOnGlobalLayoutListener(
|
||||
new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
@Override
|
||||
@@ -452,7 +519,6 @@ public class MainActivity extends NativeActivity {
|
||||
updateInsets(insets);
|
||||
}
|
||||
}
|
||||
decorView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -471,16 +537,20 @@ public class MainActivity extends NativeActivity {
|
||||
|
||||
int statusBar = 0;
|
||||
int navBar = 0;
|
||||
int imeBottom = 0;
|
||||
int cLeft = 0, cTop = 0, cRight = 0, cBottom = 0;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
Insets systemBars = insets.getInsetsIgnoringVisibility(
|
||||
WindowInsets.Type.systemBars());
|
||||
Insets ime = insets.getInsets(WindowInsets.Type.ime());
|
||||
statusBar = systemBars.top;
|
||||
navBar = systemBars.bottom;
|
||||
imeBottom = ime.bottom;
|
||||
} else {
|
||||
statusBar = insets.getSystemWindowInsetTop();
|
||||
navBar = insets.getSystemWindowInsetBottom();
|
||||
imeBottom = inferImeBottom(navBar);
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
@@ -493,6 +563,17 @@ public class MainActivity extends NativeActivity {
|
||||
}
|
||||
}
|
||||
|
||||
nativeSetInsets(statusBar, navBar, cLeft, cTop, cRight, cBottom);
|
||||
nativeSetInsets(statusBar, navBar, imeBottom, cLeft, cTop, cRight, cBottom);
|
||||
}
|
||||
|
||||
private int inferImeBottom(int navBar) {
|
||||
View decorView = getWindow().getDecorView();
|
||||
Rect visible = new Rect();
|
||||
decorView.getWindowVisibleDisplayFrame(visible);
|
||||
int rootHeight = decorView.getRootView().getHeight();
|
||||
int hiddenBottom = rootHeight - visible.bottom;
|
||||
|
||||
if (hiddenBottom <= navBar) return 0;
|
||||
return hiddenBottom;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 614 B |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 598 B |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 627 B |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 681 B |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 746 B |
@@ -0,0 +1 @@
|
||||
Initial release: deterministic, LessPass-compatible password generation with configurable length, counter, character classes, and excluded characters. Everything is computed locally; nothing is stored or uploaded.
|
||||
@@ -0,0 +1 @@
|
||||
New clipboard handling, vault support, and named profiles in the CLI, plus self-update checks in the desktop app. Android keeps the same local, stateless generator.
|
||||
@@ -0,0 +1,2 @@
|
||||
- Install pass on Android: a signed APK is now downloadable from pass.waozi.xyz alongside the desktop, terminal, and browser downloads.
|
||||
- Fix the Android master-password fingerprint and secure storage so the stored master password unlocks reliably across launches.
|
||||
@@ -0,0 +1,2 @@
|
||||
- Verify every download: releases now ship a SHA256SUMS file covering the command-line, desktop, Android, and browser downloads.
|
||||
- The Android app now builds entirely from source with no developer signing key, clearing the way for F-Droid distribution.
|
||||
@@ -0,0 +1,6 @@
|
||||
- Save and reuse Android master-password defaults with fingerprint unlock.
|
||||
- Clear unlocked master text and generated passwords after a timeout.
|
||||
- Autosave length, counter, character classes, excluded characters, and biometric display settings.
|
||||
- Keep Android fields visible while the keyboard is open.
|
||||
- Run the real Pass app at pass.waozi.xyz/app.
|
||||
- Publish universal and per-ABI Android APKs.
|
||||
@@ -0,0 +1,17 @@
|
||||
pass derives strong, repeatable passwords on your device. The same site, login, master password, and settings always produce the same result, so there is no password database to back up, sync, or lose.
|
||||
|
||||
Everything is computed locally. The app makes no network requests, keeps no accounts, and tracks nothing.
|
||||
|
||||
Features:
|
||||
|
||||
• Deterministic, LessPass-compatible password generation
|
||||
• Configurable length, counter, character classes, and excluded characters
|
||||
• Optional fingerprint unlock with the master password held in secure storage
|
||||
• No analytics, no tracking, no network access
|
||||
|
||||
pass is an independent implementation of the LessPass algorithm. Compatibility does not imply endorsement by or affiliation with the LessPass project.
|
||||
|
||||
Source code: https://github.com/waozixyz/pass
|
||||
Website: https://pass.waozi.xyz
|
||||
|
||||
Licensed under BSD-3-Clause.
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 66 KiB |
@@ -0,0 +1 @@
|
||||
Deterministic passwords from site, login, and one master password.
|
||||
@@ -0,0 +1 @@
|
||||
pass
|
||||
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -11,5 +11,5 @@
|
||||
<launchable type="desktop-id">xyz.waozi.pass.desktop</launchable>
|
||||
<url type="homepage">https://github.com/waozixyz/pass</url>
|
||||
<provides><binary>pass-gui</binary></provides>
|
||||
<releases><release version="0.2.2" date="2026-08-20"/><release version="0.2.1" date="2026-08-19"/><release version="0.2.0" date="2026-08-18"/><release version="0.1.3" date="2026-08-17"/><release version="0.1.2" date="2026-08-17"/><release version="0.1.1" date="2026-08-17"/><release version="0.1.0" date="2026-08-17"/></releases>
|
||||
<releases><release version="0.2.4" date="2026-08-22"/><release version="0.2.3" date="2026-08-21"/><release version="0.2.2" date="2026-08-20"/><release version="0.2.1" date="2026-08-19"/><release version="0.2.0" date="2026-08-18"/><release version="0.1.3" date="2026-08-17"/><release version="0.1.2" date="2026-08-17"/><release version="0.1.1" date="2026-08-17"/><release version="0.1.0" date="2026-08-17"/></releases>
|
||||
</component>
|
||||
|
After Width: | Height: | Size: 1.4 MiB |
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"slug": "pass",
|
||||
"name": "Pass",
|
||||
"summary": "Deterministic password generator with CLI, desktop, Android, and browser builds.",
|
||||
"repository": {
|
||||
"platform": "github",
|
||||
"url": "https://github.com/waozixyz/pass",
|
||||
"owner": "waozixyz",
|
||||
"name": "pass"
|
||||
},
|
||||
"homepage": "https://pass.waozi.xyz",
|
||||
"banner": "showcase/banner.png",
|
||||
"tags": ["security", "passwords", "desktop", "mobile", "web"],
|
||||
"featured": true
|
||||
}
|
||||
@@ -39,3 +39,38 @@ grep -F "const Version = \"$release_version\"" version.go >/dev/null
|
||||
grep -F "versionName \"$release_version\"" "$gradle_file" >/dev/null
|
||||
grep -E "^[[:space:]]*versionCode $release_code$" "$gradle_file" >/dev/null
|
||||
grep -F "<release version=\"$release_version\" date=\"$release_date\"" "$metainfo" >/dev/null
|
||||
|
||||
# Generate the Fastlane changelog for the Android versionCode being built.
|
||||
# Fastlane file names are versionCode values, not changelog positions, and
|
||||
# store listings cap changelogs at 500 characters.
|
||||
changelog_dir=fastlane/metadata/android/en-US/changelogs
|
||||
mkdir -p "$changelog_dir"
|
||||
changelog=$(awk -v ver="$release_version" '
|
||||
BEGIN { in_section = 0; buf = "" }
|
||||
/^## \[/ {
|
||||
if (in_section) exit
|
||||
if (index($0, "[" ver "]") > 0) {
|
||||
in_section = 1
|
||||
next
|
||||
}
|
||||
}
|
||||
in_section {
|
||||
if ($0 == "") next
|
||||
if (/^- /) {
|
||||
if (buf != "") print buf
|
||||
buf = $0
|
||||
next
|
||||
}
|
||||
if (buf != "") {
|
||||
line = $0
|
||||
sub(/^[ \t]+/, "", line)
|
||||
buf = buf " " line
|
||||
}
|
||||
}
|
||||
END { if (buf != "") print buf }
|
||||
' CHANGELOG.md)
|
||||
if [ -z "$changelog" ]; then
|
||||
echo "No changelog bullets found for $release_version in CHANGELOG.md" >&2
|
||||
exit 1
|
||||
fi
|
||||
printf '%s\n' "$changelog" | head -c 500 > "$changelog_dir/$release_code.txt"
|
||||
@@ -1,4 +1,4 @@
|
||||
package pass
|
||||
|
||||
// Version is the current application version.
|
||||
const Version = "0.2.2"
|
||||
const Version = "0.2.4"
|
||||
@@ -7,7 +7,14 @@ goroot=$(go env GOROOT)
|
||||
|
||||
rm -rf "$out_dir"
|
||||
mkdir -p "$out_dir/app"
|
||||
cp "$root_dir/web/site/index.html" "$out_dir/index.html"
|
||||
# Versioned asset names (AppImage, .deb) are templated into index.html from
|
||||
# version.go so the site always links the current release.
|
||||
version=$(sed -n 's/^const Version = "\([^"]*\)"$/\1/p' "$root_dir/version.go")
|
||||
if [ -z "$version" ]; then
|
||||
echo "Could not read the version from version.go" >&2
|
||||
exit 1
|
||||
fi
|
||||
sed "s/\${version}/$version/g" "$root_dir/web/site/index.html" > "$out_dir/index.html"
|
||||
cp "$root_dir/web/site/styles.css" "$out_dir/styles.css"
|
||||
cp "$root_dir/web/site/home.js" "$out_dir/home.js"
|
||||
cp "$root_dir/web/site/app/index.html" "$out_dir/app/index.html"
|
||||
@@ -20,10 +27,16 @@ cp "$root_dir/web/site/manifest.webmanifest" "$out_dir/manifest.webmanifest"
|
||||
cp -R "$root_dir/web/site/icons" "$out_dir/icons"
|
||||
cp -R "$root_dir/web/site/app/icons" "$out_dir/app/icons"
|
||||
cp "$root_dir/web/site/app/sw.js" "$out_dir/app/sw.js"
|
||||
"${MAKE:-make}" -C "$root_dir" web-canvas
|
||||
cp "$root_dir/build/web-app/index.html" "$out_dir/app/index.html"
|
||||
cp "$root_dir/build/web-app/app.js" "$out_dir/app/app.js"
|
||||
cp "$root_dir/build/web-app/index.js" "$out_dir/app/index.js"
|
||||
cp "$root_dir/build/web-app/index.wasm" "$out_dir/app/index.wasm"
|
||||
cp "$goroot/lib/wasm/wasm_exec.js" "$out_dir/app/wasm_exec.js" 2>/dev/null || \
|
||||
cp "$goroot/misc/wasm/wasm_exec.js" "$out_dir/app/wasm_exec.js"
|
||||
(cd "$root_dir/web/wasm" && GOOS=js GOARCH=wasm go build -o "$out_dir/app/pass.wasm" .)
|
||||
|
||||
test -s "$out_dir/app/pass.wasm"
|
||||
test -s "$out_dir/app/index.wasm"
|
||||
test -s "$out_dir/home.js"
|
||||
printf 'built site at %s\n' "$out_dir"
|
||||
@@ -1,17 +1,88 @@
|
||||
(() => {
|
||||
if ('serviceWorker' in navigator) navigator.serviceWorker.register('/app/sw.js', {scope: '/app/'}).then(registration => registration.update()).catch(() => {});
|
||||
const byId = id => document.getElementById(id);
|
||||
const generate = byId('generate'), copy = byId('copy'), result = byId('result'), message = byId('message');
|
||||
let copied = '', clearTimer = 0;
|
||||
document.addEventListener('pass-ready', () => { byId('runtime-status').textContent = 'Ready · runs locally'; generate.disabled = false; });
|
||||
const go = new Go();
|
||||
WebAssembly.instantiateStreaming(fetch('pass.wasm'), go.importObject).then(instance => go.run(instance.instance)).catch(error => { byId('runtime-status').textContent = 'Generator failed to load'; message.textContent = error; });
|
||||
byId('reveal').addEventListener('click', () => { const master = byId('master'); master.type = master.type === 'password' ? 'text' : 'password'; byId('reveal').textContent = master.type === 'password' ? 'Reveal' : 'Hide'; });
|
||||
generate.addEventListener('click', () => {
|
||||
const response = window.passGenerate(byId('site').value, byId('login').value, byId('master').value, Number(byId('length').value), Number(byId('counter').value), byId('lower').checked, byId('upper').checked, byId('digits').checked, byId('symbols').checked, byId('exclude').value);
|
||||
if (response.error) { result.textContent = 'Unable to generate'; message.textContent = response.error; copy.disabled = true; return; }
|
||||
result.textContent = response.password; message.textContent = 'Generated locally in this tab'; copy.disabled = false;
|
||||
var statusElement = document.getElementById('status');
|
||||
var loadingScreen = document.getElementById('loading-screen');
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('sw.js').catch(function() {});
|
||||
}
|
||||
|
||||
function setStatus(text) {
|
||||
if (statusElement) statusElement.textContent = text || '';
|
||||
}
|
||||
|
||||
function hideLoadingScreen() {
|
||||
if (!loadingScreen) return;
|
||||
window.requestAnimationFrame(function() {
|
||||
loadingScreen.classList.add('is-hidden');
|
||||
});
|
||||
copy.addEventListener('click', async () => { await navigator.clipboard.writeText(result.textContent); copied = result.textContent; message.textContent = 'Copied; clipboard clears in 20 seconds'; clearTimeout(clearTimer); clearTimer = setTimeout(async () => { try { const current = await navigator.clipboard.readText(); if (current === copied) await navigator.clipboard.writeText(''); } catch (_) {} copied = ''; }, 20000); });
|
||||
byId('clear').addEventListener('click', () => { ['site','login','master','exclude'].forEach(id => byId(id).value = ''); result.textContent = 'Your generated password appears here'; message.textContent = 'Cleared'; copy.disabled = true; byId('master').focus(); });
|
||||
})();
|
||||
}
|
||||
|
||||
function hideWhenCanvasPaints() {
|
||||
var checks = 0;
|
||||
var timer = setInterval(function() {
|
||||
checks += 1;
|
||||
if (window.__kryCanvas && window.__kryCanvas.frames > 1) {
|
||||
hideLoadingScreen();
|
||||
clearInterval(timer);
|
||||
} else if (checks > 300) {
|
||||
clearInterval(timer);
|
||||
}
|
||||
}, 50);
|
||||
}
|
||||
|
||||
function scheduleStorageSync(delay, logSuccess) {
|
||||
if (typeof FS === 'undefined' || typeof FS.syncfs !== 'function') return;
|
||||
Module.__kryonStorageSyncPending = true;
|
||||
Module.__kryonStorageSyncLogSuccess = Module.__kryonStorageSyncLogSuccess || !!logSuccess;
|
||||
if (Module.__kryonStorageSyncTimer) clearTimeout(Module.__kryonStorageSyncTimer);
|
||||
Module.__kryonStorageSyncTimer = setTimeout(function() {
|
||||
Module.__kryonStorageSyncTimer = 0;
|
||||
Module.__kryonStorageSyncing = true;
|
||||
Module.__kryonStorageSyncPending = false;
|
||||
FS.syncfs(false, function(err) {
|
||||
Module.__kryonStorageSyncing = false;
|
||||
if (err) console.error('Pass storage sync failed:', err);
|
||||
else if (Module.__kryonStorageSyncLogSuccess) console.log('Pass storage synced');
|
||||
Module.__kryonStorageSyncLogSuccess = false;
|
||||
});
|
||||
}, Math.max(0, delay || 0));
|
||||
}
|
||||
|
||||
var Module = {
|
||||
canvas: document.getElementById('canvas'),
|
||||
preRun: [function() {
|
||||
if (typeof FS === 'undefined' || typeof IDBFS === 'undefined') return;
|
||||
FS.mkdir('/pass-data');
|
||||
FS.mount(IDBFS, {}, '/pass-data');
|
||||
FS.chdir('/pass-data');
|
||||
Module.addRunDependency('pass-idbfs');
|
||||
FS.syncfs(true, function(err) {
|
||||
if (err) console.error('Pass storage load failed:', err);
|
||||
Module.removeRunDependency('pass-idbfs');
|
||||
});
|
||||
}],
|
||||
setStatus: setStatus,
|
||||
print: function(text) {
|
||||
if (/PASS: app ready/.test(text || '')) hideLoadingScreen();
|
||||
console.log(text);
|
||||
},
|
||||
printErr: function(text) {
|
||||
console.error(text);
|
||||
}
|
||||
};
|
||||
|
||||
Module.__kryonScheduleStorageSync = scheduleStorageSync;
|
||||
Module.__kryonFlushStorageSync = function(logSuccess) {
|
||||
scheduleStorageSync(0, logSuccess);
|
||||
};
|
||||
|
||||
window.addEventListener('error', function(event) {
|
||||
setStatus('App failed to load');
|
||||
console.error(event.error || event.message);
|
||||
});
|
||||
|
||||
var script = document.createElement('script');
|
||||
script.async = true;
|
||||
script.src = 'index.js';
|
||||
script.onload = function() { setStatus('Starting app...'); hideWhenCanvasPaints(); };
|
||||
script.onerror = function() { setStatus('App failed to load'); };
|
||||
document.body.appendChild(script);
|
||||
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 746 B |
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -1,12 +1,90 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="theme-color" content="#f3f1ea"><title>Generate — pass</title><meta name="description" content="Generate a deterministic password locally in your browser."><link rel="manifest" href="/manifest.webmanifest"><link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32.png"><link rel="apple-touch-icon" href="/icons/apple-touch-icon.png"><link rel="stylesheet" href="/styles.css"></head>
|
||||
<body class="app-page"><header class="site-header"><div class="site-header-inner"><a class="brand" href="/"><img src="/icons/icon-192.png" alt="">PASS</a><nav class="header-nav"><a href="/">Home</a><span id="runtime-status">Loading secure generator…</span></nav></div></header>
|
||||
<main class="generator-shell"><section class="generator-card"><p class="eyebrow">LOCAL PASSWORD GENERATOR</p><h1>Generate a password</h1><div class="form-grid">
|
||||
<label>Site<input id="site" autocomplete="off" placeholder="example.org"></label><label>Login<input id="login" autocomplete="username" placeholder="[email protected]"></label>
|
||||
<label class="wide">Master password<span class="password-wrap"><input id="master" type="password" autocomplete="current-password"><button id="reveal" type="button" class="inline">Reveal</button></span></label>
|
||||
<label>Length<input id="length" type="number" min="1" max="128" value="16"></label><label>Counter<input id="counter" type="number" min="1" value="1"></label><label>Excluded characters<input id="exclude" autocomplete="off"></label>
|
||||
<fieldset class="wide"><legend>Character classes</legend><label><input id="lower" type="checkbox" checked> Lowercase</label><label><input id="upper" type="checkbox" checked> Uppercase</label><label><input id="digits" type="checkbox" checked> Digits</label><label><input id="symbols" type="checkbox" checked> Symbols</label></fieldset>
|
||||
<div class="wide actions"><button id="generate" class="button" disabled>Generate</button><button id="copy" class="button secondary" disabled>Copy</button><button id="clear" class="button ghost">Clear</button></div>
|
||||
<output id="result" class="wide" aria-live="polite">Your generated password appears here</output><p id="message" class="wide status"></p>
|
||||
</div></section></main><script src="wasm_exec.js"></script><script src="app.js"></script></body></html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<title>Pass</title>
|
||||
<meta name="theme-color" content="#f3f1ea">
|
||||
<link rel="manifest" href="/manifest.webmanifest">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32.png">
|
||||
<link rel="apple-touch-icon" href="/icons/apple-touch-icon.png">
|
||||
<style>
|
||||
html, body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
background: #f3f1ea;
|
||||
color: #2a3b40;
|
||||
font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
|
||||
}
|
||||
.canvas-stage, .canvas-frame {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
overflow: hidden;
|
||||
background: #f3f1ea;
|
||||
}
|
||||
canvas.emscripten {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
background: #f3f1ea;
|
||||
}
|
||||
.loading-screen {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 4;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 24px;
|
||||
box-sizing: border-box;
|
||||
background: #f3f1ea;
|
||||
transition: opacity 180ms ease, visibility 180ms ease;
|
||||
}
|
||||
.loading-screen.is-hidden {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
.loading-panel {
|
||||
display: grid;
|
||||
justify-items: center;
|
||||
gap: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
.loading-panel img {
|
||||
width: 76px;
|
||||
height: 76px;
|
||||
border-radius: 8px;
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
#status {
|
||||
min-height: 20px;
|
||||
color: #5d6f74;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="loading-screen" id="loading-screen" role="status" aria-live="polite">
|
||||
<div class="loading-panel">
|
||||
<img src="/icons/icon-192.png" alt="" width="76" height="76">
|
||||
<strong>Pass</strong>
|
||||
<div id="status">Loading app...</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="canvas-stage">
|
||||
<div class="canvas-frame" id="canvas-frame">
|
||||
<canvas class="emscripten" id="canvas" width="720" height="740" oncontextmenu="event.preventDefault()" tabindex="-1"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<script src="app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +1,5 @@
|
||||
const cacheName = 'pass-app-v2';
|
||||
const appFiles = ['/app/', '/app/app.js', '/app/wasm_exec.js', '/app/pass.wasm', '/styles.css', '/manifest.webmanifest', '/icons/icon-192.png', '/icons/icon-512.png'];
|
||||
const cacheName = 'pass-app-v3';
|
||||
const appFiles = ['/app/', '/app/app.js', '/app/index.js', '/app/index.wasm', '/app/wasm_exec.js', '/app/pass.wasm', '/manifest.webmanifest', '/icons/icon-192.png', '/icons/icon-512.png'];
|
||||
self.addEventListener('install', event => {
|
||||
self.skipWaiting();
|
||||
event.waitUntil(caches.open(cacheName).then(cache => cache.addAll(appFiles)));
|
||||
|
||||
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 726 B |
|
After Width: | Height: | Size: 170 B |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 574 B |
|
After Width: | Height: | Size: 268 B |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 746 B |
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -3,8 +3,8 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>pass — deterministic passwords</title>
|
||||
<meta name="description" content="Generate deterministic passwords locally with the BSD-licensed pass CLI, desktop app, or browser app.">
|
||||
<title>Pass — deterministic passwords</title>
|
||||
<meta name="description" content="Generate deterministic passwords locally with the BSD-licensed Pass CLI, desktop app, or browser app.">
|
||||
<link rel="canonical" href="https://pass.waozi.xyz/">
|
||||
<meta name="theme-color" content="#f3f1ea">
|
||||
<link rel="manifest" href="/manifest.webmanifest">
|
||||
@@ -13,10 +13,10 @@
|
||||
<link rel="stylesheet" href="/styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header"><div class="site-header-inner"><a class="brand" href="/"><img src="/icons/icon-192.png" alt="">PASS</a><nav class="header-nav"><a href="#downloads">Downloads</a><a href="#privacy">Privacy</a><a href="https://waozi.xyz">Waozi ↗</a><a class="button small" href="/app/">Run Web</a></nav></div></header>
|
||||
<header class="site-header"><div class="site-header-inner"><a class="brand" href="/"><img src="/icons/icon-192.png" alt="">Pass</a><nav class="header-nav"><a href="#downloads">Downloads</a><a href="#privacy">Privacy</a><a href="https://waozi.xyz">Waozi ↗</a><a class="button small" href="/app/">Run Web</a></nav></div></header>
|
||||
<main>
|
||||
<section class="hero">
|
||||
<div><p class="eyebrow">Stateless · local · open source</p><img class="hero-icon" src="/icons/icon-192.png" alt="pass"><h1>One master password.<br><span>Every site covered.</span></h1><p class="lede">pass derives strong, repeatable passwords on your device. Nothing is stored, uploaded, or tracked.</p><div class="actions"><a class="button primary" href="/app/">Run Web</a><a class="button" href="#downloads">Download apps</a></div></div>
|
||||
<div><p class="eyebrow">Stateless · local · open source</p><img class="hero-icon" src="/icons/icon-192.png" alt="Pass"><h1>One master password.<br><span>Every site covered.</span></h1><p class="lede">Pass derives strong, repeatable passwords on your device. Nothing is stored, uploaded, or tracked.</p><div class="actions"><a class="button primary" href="/app/">Run Web</a><a class="button" href="#downloads">Download apps</a></div></div>
|
||||
<div class="preview" id="generator"><div class="preview-head"><i></i><i></i><i></i><span>generated locally</span></div><div class="preview-body"><div class="form-grid">
|
||||
<label>Site<input id="site" autocomplete="off" placeholder="example.org"></label><label>Login<input id="login" autocomplete="username" placeholder="[email protected]"></label>
|
||||
<label class="wide">Master password<span class="password-wrap"><input id="master" type="password" autocomplete="current-password"><button id="reveal" type="button" class="inline">Reveal</button></span></label>
|
||||
@@ -27,11 +27,11 @@
|
||||
</div><div class="privacy-line">No network requests. No password database.</div></div></div>
|
||||
</section>
|
||||
<section id="downloads"><p class="eyebrow">DOWNLOADS</p><h2>Choose your interface</h2><div class="cards">
|
||||
<article><span class="tag">ANDROID</span><h3>APK</h3><p>Native Android app with the same generator and biometric-protected master password storage.</p><div class="links"><a href="/downloads/pass-android.apk">Download APK</a></div></article>
|
||||
<article><span class="tag">DESKTOP</span><h3>GUI</h3><p>Visual controls, secure masked input, and clipboard clearing.</p><div class="links"><a href="/downloads/pass-gui-linux-amd64.tar.gz">Linux x86_64</a><a href="/downloads/pass-gui-linux-arm64.tar.gz">Linux ARM64</a></div></article>
|
||||
<article><span class="tag">TERMINAL</span><h3>CLI</h3><p>Small, scriptable binaries for servers and workstations.</p><div class="links"><a href="/downloads/pass-cli-linux-amd64.tar.gz">Linux</a><a href="/downloads/pass-cli-darwin-arm64.tar.gz">macOS</a><a href="/downloads/pass-cli-windows-amd64.zip">Windows</a></div></article>
|
||||
<article><span class="tag">BROWSER</span><h3>Web app</h3><p>The same Go generator compiled to WebAssembly. Runs entirely in your tab.</p><div class="links"><a href="/app/">Open web app</a></div></article>
|
||||
</div></section>
|
||||
<article><span class="tag">ANDROID</span><h3>Android</h3><p>Native app with the same generator and biometric-protected master password storage. Android 5.0 and newer; no Internet permission.</p><div class="links"><a class="channel" href="/downloads/pass-android.apk"><img src="/icons/droid.png" alt="" width="16" height="16">Direct APK</a><a class="channel" href="https://f-droid.org/packages/xyz.waozi.pass/"><img src="/icons/fdroid.png" alt="" width="16" height="16">F-Droid</a></div></article>
|
||||
<article><span class="tag">DESKTOP</span><h3>Desktop GUI</h3><p>Visual controls, secure masked input, built-in self-updates, and clipboard clearing.</p><div class="links"><a href="https://github.com/waozixyz/pass/releases/latest/download/pass-${version}-x86_64.AppImage">AppImage x86_64</a><a href="https://github.com/waozixyz/pass/releases/latest/download/pass-${version}-aarch64.AppImage">AppImage ARM64</a><a href="https://github.com/waozixyz/pass/releases/latest/download/pass_${version}_amd64.deb">.deb amd64</a><a href="https://github.com/waozixyz/pass/releases/latest/download/pass_${version}_arm64.deb">.deb arm64</a><a href="/downloads/pass-gui-linux-amd64.tar.gz">Tarball x86_64</a><a href="/downloads/pass-gui-linux-arm64.tar.gz">Tarball ARM64</a></div></article>
|
||||
<article><span class="tag">TERMINAL</span><h3>CLI</h3><p>Small, scriptable binaries for servers and workstations.</p><div class="links"><a href="/downloads/pass-cli-linux-amd64.tar.gz">Linux x86_64</a><a href="/downloads/pass-cli-linux-arm64.tar.gz">Linux ARM64</a><a href="/downloads/pass-cli-darwin-amd64.tar.gz">macOS Intel</a><a href="/downloads/pass-cli-darwin-arm64.tar.gz">macOS ARM</a><a href="/downloads/pass-cli-windows-amd64.zip">Windows x86_64</a><a href="/downloads/pass-cli-freebsd-amd64.tar.gz">FreeBSD</a></div></article>
|
||||
<article><span class="tag">BROWSER</span><h3>Web app</h3><p>The real Pass app compiled to WebAssembly with Kryon's canvas backend. Runs entirely in your tab.</p><div class="links"><a href="/app/">Open web app</a></div></article>
|
||||
</div><p class="downloads-note">Every download is covered by the release <a href="https://github.com/waozixyz/pass/releases/latest/download/SHA256SUMS">SHA256SUMS</a> checksums.</p></section>
|
||||
<section class="privacy" id="privacy"><p class="eyebrow">PRIVACY</p><h2>Your master password stays yours.</h2><p>The desktop and browser apps derive passwords locally. The website has no analytics, accounts, cookies, or backend API. Source and releases remain available under BSD-3-Clause.</p></section>
|
||||
</main>
|
||||
<footer><span>© 2026 <a href="https://waozi.xyz">Waozi</a></span></footer>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pass",
|
||||
"short_name": "pass",
|
||||
"name": "Pass",
|
||||
"short_name": "Pass",
|
||||
"description": "Generate deterministic passwords locally.",
|
||||
"start_url": "/app/",
|
||||
"scope": "/app/",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
:root{--bg:#f3f1ea;--surface:#fdfcf8;--control:#eae6da;--control-hi:#fff;--ink:#2a3b40;--muted:#5d6f74;--line:rgba(42,59,64,.20);--line-strong:rgba(42,59,64,.30);--accent:#65558f;--accent-deep:#433668;--accent-soft:rgba(101,85,143,.10);--card:#f7f4ec;--radius:10px;--radius-sm:6px;--maxw:1080px;--font:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;--bevel:0 1px 0 var(--control-hi),inset 1px 1px 0 var(--control-hi),0 2px 10px rgba(0,0,0,.04)}
|
||||
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:72px}body{margin:0;min-height:100vh;background:var(--bg);color:var(--ink);font:15px/1.6 var(--font);-webkit-font-smoothing:antialiased}body:before{content:"";position:fixed;inset:0;z-index:-1;background-image:linear-gradient(45deg,rgba(42,59,64,.028) 25%,transparent 25%),linear-gradient(-45deg,rgba(42,59,64,.028) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(42,59,64,.028) 75%),linear-gradient(-45deg,transparent 75%,rgba(42,59,64,.028) 75%);background-position:0 0,0 16px,16px -16px,-16px 0;background-size:32px 32px;opacity:.18}a{color:var(--accent);font-weight:700;text-decoration:none}a:hover{color:var(--accent-deep)}a:active,.button:active{position:relative;top:1px;left:1px}.site-header{position:sticky;top:0;z-index:50;background:rgba(243,241,234,.92);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}.site-header-inner{max-width:var(--maxw);margin:auto;padding:10px 20px;display:flex;align-items:center;gap:16px}.brand{display:flex;align-items:center;gap:8px;color:var(--ink);font-size:15px;letter-spacing:.04em}.brand img{width:22px;height:22px;border-radius:5px;image-rendering:pixelated}.header-nav{display:flex;align-items:center;gap:18px;margin-left:auto}.header-nav>a,.header-nav span{color:var(--muted);font-size:13px}.header-nav .button{color:#fffdf8}.button,button.button{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 14px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--control);box-shadow:var(--bevel);color:var(--ink);font:700 13px var(--font);cursor:pointer}.button:hover{background:var(--surface);color:var(--accent)}.button.primary,.header-nav .button{background:var(--accent);border-color:var(--accent-deep);color:#fff}.button.secondary{background:var(--control)}.button.ghost{background:transparent}.button.small{padding:7px 12px}button:disabled{opacity:.45;cursor:not-allowed}
|
||||
.hero{max-width:var(--maxw);min-height:calc(100vh - 64px);margin:auto;padding:48px 20px 40px;display:grid;grid-template-columns:minmax(0,.9fr) minmax(360px,.8fr);gap:44px;align-items:center}.hero-icon{width:96px;height:96px;margin:4px 0 0;border:1px solid var(--line-strong);border-radius:8px;box-shadow:var(--bevel);image-rendering:pixelated}.eyebrow{display:flex;align-items:center;gap:8px;margin:0 0 12px;color:var(--accent);font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.eyebrow:before{content:"";width:8px;height:8px;background:var(--accent);border:1px solid var(--accent-deep);border-radius:2px;box-shadow:1px 1px 0 rgba(0,0,0,.12)}h1,h2,h3{margin:0;color:var(--ink);line-height:1.15}h1{margin:14px 0 16px;font-size:clamp(42px,7vw,74px);line-height:.98}h1 span{color:var(--accent)}h2{margin-bottom:16px;font-size:clamp(26px,4vw,40px)}h3{font-size:16px}.lede{max-width:700px;color:var(--muted);font-size:17px}.actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}.preview,.generator-card{overflow:hidden;background:var(--surface);border:1px solid var(--line-strong);border-radius:var(--radius);box-shadow:0 1px 0 var(--control-hi),inset 1px 1px 0 var(--control-hi),0 18px 46px rgba(0,0,0,.10)}.preview-head{display:flex;align-items:center;gap:8px;padding:10px 12px;background:var(--control);border-bottom:1px solid var(--line)}.preview-head i{width:10px;height:10px;background:var(--accent);border:1px solid var(--accent-deep);border-radius:3px}.preview-head span{margin-left:6px;color:var(--muted);font-size:12px}.preview-body{padding:16px}.generator-card>label{display:block;margin:12px 0 6px;color:var(--muted);font-size:13px}output{padding:12px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius-sm);box-shadow:var(--bevel)}.privacy-line{margin-top:16px;color:var(--muted);font-size:12px}
|
||||
main>section:not(.hero){max-width:var(--maxw);margin:0 auto;padding:56px 20px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}.cards article,.privacy{padding:16px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius-sm);box-shadow:var(--bevel)}.cards h3{margin:8px 0}.cards p,.privacy p{color:var(--muted);font-size:14px}.tag{color:var(--accent);font-size:12px;font-weight:700}.links{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}footer{max-width:var(--maxw);margin:auto;padding:16px 20px 28px;text-align:center;color:var(--muted);font-size:13px}.generator-shell{max-width:820px;margin:48px auto;padding:0 20px}.generator-card{padding:24px}.generator-card h1{font-size:clamp(34px,6vw,52px)}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.form-grid label,fieldset legend{color:var(--muted);font-size:13px}.form-grid input:not([type=checkbox]){display:block;width:100%;margin-top:7px;padding:11px 12px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius-sm);color:var(--ink);font:inherit;outline:none}.form-grid input:focus{border-color:var(--accent)}.wide{grid-column:1/-1}.password-wrap{display:flex;gap:8px}.password-wrap input{flex:1}.inline{margin-top:7px;border:1px solid var(--line);background:var(--control);border-radius:var(--radius-sm);color:var(--ink);font:inherit;padding:0 12px}fieldset{display:flex;gap:20px;border:0;padding:0}fieldset legend{margin-bottom:10px}fieldset label{color:var(--ink)!important}output{display:block;min-height:68px;font-size:17px;overflow-wrap:anywhere}.status{min-height:20px;margin:0;color:var(--muted)}#runtime-status{font-size:12px}
|
||||
main>section:not(.hero){max-width:var(--maxw);margin:0 auto;padding:56px 20px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}.cards article,.privacy{padding:16px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius-sm);box-shadow:var(--bevel)}.cards h3{margin:8px 0}.cards p,.privacy p{color:var(--muted);font-size:14px}.tag{color:var(--accent);font-size:12px;font-weight:700}.links{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}.channel{display:inline-flex;align-items:center;gap:7px}.channel img{width:16px;height:16px;image-rendering:pixelated}.downloads-note{margin:18px 2px 0;color:var(--muted);font-size:13px}footer{max-width:var(--maxw);margin:auto;padding:16px 20px 28px;text-align:center;color:var(--muted);font-size:13px}.generator-shell{max-width:820px;margin:48px auto;padding:0 20px}.generator-card{padding:24px}.generator-card h1{font-size:clamp(34px,6vw,52px)}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.form-grid label,fieldset legend{color:var(--muted);font-size:13px}.form-grid input:not([type=checkbox]){display:block;width:100%;margin-top:7px;padding:11px 12px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius-sm);color:var(--ink);font:inherit;outline:none}.form-grid input:focus{border-color:var(--accent)}.wide{grid-column:1/-1}.password-wrap{display:flex;gap:8px}.password-wrap input{flex:1}.inline{margin-top:7px;border:1px solid var(--line);background:var(--control);border-radius:var(--radius-sm);color:var(--ink);font:inherit;padding:0 12px}fieldset{display:flex;gap:20px;border:0;padding:0}fieldset legend{margin-bottom:10px}fieldset label{color:var(--ink)!important}output{display:block;min-height:68px;font-size:17px;overflow-wrap:anywhere}.status{min-height:20px;margin:0;color:var(--muted)}#runtime-status{font-size:12px}
|
||||
.preview .form-grid{grid-template-columns:1fr 1fr;gap:14px}.preview fieldset{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px}.preview fieldset legend{grid-column:1/-1;margin-bottom:2px}.preview .actions{margin-top:0;gap:10px}.preview .actions .button{flex:1}.preview output{min-height:52px;font-size:15px}
|
||||
@media(max-width:760px){.header-nav>a:not(.button){display:none}.hero{grid-template-columns:1fr;min-height:0;gap:36px}.cards{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr 1fr}}@media(max-width:520px){.site-header-inner{padding:10px 14px}.hero,.generator-shell{padding-left:14px;padding-right:14px}.form-grid,.preview .form-grid{grid-template-columns:1fr}.wide{grid-column:1}fieldset{display:grid;grid-template-columns:1fr 1fr}.actions .button{flex:1}.generator-card{padding:18px}}
|
||||