chore: homepage w package.json; __APP_HOMEPAGE__ w Vite; użycie w shareUtils

This commit is contained in:
2026-02-12 15:00:00 +01:00
parent b3e08b53fc
commit 4dab0e2c63
3 changed files with 5 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ export function buildShareCanvas(data, t, formattedTime) {
const { grid, size, currentDensity, guideUsageCount } = data;
if (!grid || !grid.length) return null;
const appUrl = 'https://nonograms.7u.pl/';
const appUrl = typeof __APP_HOMEPAGE__ !== 'undefined' ? __APP_HOMEPAGE__ : '';
const maxBoard = 640;
const cellSize = Math.max(8, Math.floor(maxBoard / size));
const boardSize = cellSize * size;
@@ -119,7 +119,7 @@ export function buildShareSVG(data, t, formattedTime) {
const { grid, size, currentDensity, guideUsageCount } = data;
if (!grid || !grid.length) return null;
const appUrl = 'https://nonograms.7u.pl/';
const appUrl = typeof __APP_HOMEPAGE__ !== 'undefined' ? __APP_HOMEPAGE__ : '';
const maxBoard = 640;
const cellSize = Math.max(8, Math.floor(maxBoard / size));
const boardSize = cellSize * size;