Compare commits
2 Commits
6f7843405c
...
7276e9ff89
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7276e9ff89 | ||
|
|
99ab5cfb4f |
@@ -37,6 +37,9 @@ jobs:
|
||||
push: true
|
||||
tags: "${{ vars.DOCKER_IMAGE }}:latest,${{ vars.DOCKER_IMAGE }}:${{ steps.date.outputs.date }}"
|
||||
platforms: linux/amd64
|
||||
build-args: |
|
||||
PUBLIC_GIT_REF=${{ env.GITHUB_SHA }}
|
||||
PUBLIC_BUILD_DATE=${{ steps.date.outputs.date }}
|
||||
cache-to: "mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=${{ vars.DOCKER_IMAGE }}:cache"
|
||||
cache-from: "mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=${{ vars.DOCKER_IMAGE }}:cache"
|
||||
labels: |
|
||||
|
||||
@@ -9,6 +9,12 @@ RUN npm prune --production
|
||||
|
||||
|
||||
FROM node:22-alpine
|
||||
|
||||
ARG PUBLIC_GIT_REF
|
||||
ARG PUBLIC_BUILD_DATE
|
||||
ENV PUBLIC_GIT_REF=$PUBLIC_GIT_REF
|
||||
ENV PUBLIC_BUILD_DATE=$PUBLIC_BUILD_DATE
|
||||
|
||||
USER node:node
|
||||
WORKDIR /app
|
||||
COPY --from=builder --chown=node:node /app/build build/
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
<script lang="ts">
|
||||
import { currentStep } from '$lib/stores.js';
|
||||
import FeatureList from './splash/FeatureList.svelte';
|
||||
import { env } from '$env/dynamic/public';
|
||||
|
||||
const buildDate = env.PUBLIC_BUILD_DATE || '2025-01-01';
|
||||
const vcsRef = env.PUBLIC_VCS_REF ? env.PUBLIC_VCS_REF.substring(0, 7) : 'abcdef';
|
||||
|
||||
|
||||
function startWizard() {
|
||||
currentStep.set(1); // Move to auth step
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex min-h-screen items-center justify-center bg-gray-100 p-4">
|
||||
<div class="flex min-h-screen flex-col items-center justify-center bg-gray-100 p-4">
|
||||
<div
|
||||
class="container mx-auto max-w-4xl rounded-lg border border-gray-200 bg-white/90 p-10 text-center shadow-xl"
|
||||
>
|
||||
@@ -23,13 +28,12 @@
|
||||
>
|
||||
Card Forge
|
||||
</h1>
|
||||
<p class="mb-4 text-xl leading-relaxed font-medium text-gray-700">
|
||||
<p class="mb-4 text-xl font-medium leading-relaxed text-gray-700">
|
||||
Transform your Google Sheets into professional ESNcards with photos.
|
||||
</p>
|
||||
<p class="mb-4 text-lg leading-relaxed text-gray-600">
|
||||
<span class="font-semibold text-black-800"
|
||||
>Privacy-first</span
|
||||
>: all processing happens in your browser.
|
||||
<span class="font-semibold text-black-800">Privacy-first</span>: all processing happens in
|
||||
your browser.
|
||||
</p>
|
||||
<div class="mb-6">
|
||||
<a
|
||||
@@ -58,4 +62,11 @@
|
||||
Start Creating Cards
|
||||
</button>
|
||||
</div>
|
||||
<footer class="mt-4 text-center">
|
||||
{#if buildDate && vcsRef}
|
||||
<p class="text-xs text-gray-400">
|
||||
Build: {vcsRef} {buildDate}
|
||||
</p>
|
||||
{/if}
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -46,14 +46,6 @@
|
||||
async function forceMemoryCleanup() {
|
||||
await tf.nextFrame(); // Wait for any pending GPU operations
|
||||
|
||||
// Log memory state without aggressive cleanup
|
||||
const memInfo = tf.memory();
|
||||
console.log('Memory status:', {
|
||||
tensors: memInfo.numTensors,
|
||||
dataBuffers: memInfo.numDataBuffers,
|
||||
bytes: memInfo.numBytes
|
||||
});
|
||||
|
||||
// Only run garbage collection if available, don't dispose variables
|
||||
if (typeof window !== 'undefined' && 'gc' in window) {
|
||||
(window as any).gc();
|
||||
@@ -151,7 +143,6 @@
|
||||
|
||||
if (isGoogleDriveUrl(photo.url)) {
|
||||
// Download from Google Drive
|
||||
console.log(`Downloading from Google Drive: ${photo.name}`);
|
||||
blob = await downloadDriveImage(photo.url);
|
||||
} else {
|
||||
// For direct URLs, convert to blob
|
||||
@@ -165,7 +156,6 @@
|
||||
blob.type === 'image/heif' ||
|
||||
photo.url.toLowerCase().endsWith('.heic')
|
||||
) {
|
||||
console.log(`HEIC detected for ${photo.name}. Starting conversion in background.`);
|
||||
photo.status = 'loading'; // Visually indicate something is happening
|
||||
// Don't await this, let it run in the background
|
||||
convertHeicPhoto(index, blob);
|
||||
@@ -185,8 +175,6 @@
|
||||
async function convertHeicPhoto(index: number, blob: Blob) {
|
||||
const photo = photos[index];
|
||||
try {
|
||||
console.log(`Converting HEIC with heic-convert for ${photo.name}...`);
|
||||
|
||||
// Dynamically import the browser-specific version of the library
|
||||
const { default: convert } = await import('heic-convert/browser');
|
||||
|
||||
@@ -199,8 +187,6 @@
|
||||
|
||||
const convertedBlob = new Blob([outputBuffer], { type: 'image/jpeg' });
|
||||
|
||||
console.log(`Successfully converted HEIC for ${photo.name}`);
|
||||
|
||||
// Now that it's converted, process it like any other image
|
||||
await processLoadedBlob(index, convertedBlob);
|
||||
} catch (e) {
|
||||
@@ -229,7 +215,6 @@
|
||||
|
||||
photo.objectUrl = objectUrl;
|
||||
photo.status = 'success';
|
||||
console.log(`Photo loaded successfully: ${photo.name}`);
|
||||
|
||||
// Save blob to IndexedDB instead of the store
|
||||
await set(photo.url, blob);
|
||||
|
||||
Reference in New Issue
Block a user