Compare commits

..

No commits in common. "21174fc1ad5ee7bdd0e63ee4ba1c7879f9951e85" and "274025ed33c074ef8aaf4a1b3a2dc2e0c8c8f8c8" have entirely different histories.

9 changed files with 15 additions and 64 deletions

View file

@ -1,18 +0,0 @@
node_modules
Dockerfile*
docker-compose*
.dockerignore
.git
.gitignore
README.md
LICENSE
.vscode
Makefile
helm-charts
.editorconfig
.idea
coverage*
.svelte-kit
.storybook
tbm-m2-dev-90d717d5e58a.json
env*

4
.gitignore vendored
View file

@ -24,7 +24,3 @@ vite.config.ts.timestamp-*
*storybook.log
storybook-static
tbm-m2-dev-90d717d5e58a.json
env*

View file

@ -1,19 +0,0 @@
# Stage 1: Build
FROM oven/bun:latest AS builder
WORKDIR /app
COPY . .
RUN bun install --frozen-lockfile
RUN bun run build
# Stage 2: Production Runtime
FROM oven/bun:latest
WORKDIR /app
# Copy only necessary files from the builder
COPY --from=builder /app/build ./build
COPY --from=builder /app/package.json .
ENV PORT=3167
EXPOSE 3167
USER bun
# Run the application from the build directory
CMD ["bun", "build/index.js"]

BIN
bun.lockb

Binary file not shown.

View file

@ -27,7 +27,6 @@
"@storybook/addon-vitest": "^10.2.0",
"@storybook/sveltekit": "^10.2.0",
"@sveltejs/adapter-auto": "^7.0.0",
"@sveltejs/adapter-node": "^5.5.4",
"@sveltejs/kit": "^2.50.1",
"@sveltejs/vite-plugin-svelte": "^6.2.4",
"@tailwindcss/forms": "^0.5.11",
@ -45,7 +44,6 @@
"prettier-plugin-tailwindcss": "^0.7.2",
"storybook": "^10.2.0",
"svelte": "^5.48.0",
"svelte-adapter-bun": "^1.0.1",
"svelte-check": "^4.3.5",
"svelte-sonner": "^1.0.7",
"tailwind-merge": "^3.4.0",

View file

@ -103,7 +103,7 @@
</DropdownMenu.Item>
{/each} -->
<DropdownMenu.Separator />
<DropdownMenu.Item class="gap-2 p-2" onclick={logout}>
<DropdownMenu.Item class="gap-2 p-2">
<div class="flex size-6 items-center justify-center rounded-md border bg-transparent">
<LogOutIcon class="size-4" />
</div>

View file

@ -1,15 +1,17 @@
import { doc, getDoc } from 'firebase/firestore';
import { db } from '../client/firebase';
import { doc, getDoc } from "firebase/firestore";
import { db } from "../client/firebase";
export async function checkAllowAccess(userDomain: string): Promise<boolean> {
const docRef = doc(db, 'whitelist', 'allowedDomains');
const snapshot = await getDoc(docRef);
if (snapshot.exists()) {
let domains = snapshot.data();
// console.log(`domains: ${JSON.stringify(domains)}`);
return domains['account_email'].includes(userDomain);
}
const docRef = doc(db, "whitelist", "allowedDomains");
const snapshot = await getDoc(docRef);
return true;
}
if(snapshot.exists()){
let domains = snapshot.data();
// console.log(`domains: ${JSON.stringify(domains)}`);
return domains["account_email"].includes(userDomain);
}
return false;
};

View file

@ -3,9 +3,6 @@
import { page } from '$app/state';
import { env } from '$env/dynamic/public';
import { browser } from '$app/environment';
import { setCookieOnNonBrowser } from '$lib/helpers/cookie';
import { asset } from '$app/paths';
import TaobinLogo from '$lib/assets/logo.svelte';
import {
@ -62,11 +59,6 @@
//
console.log('login success!');
if (browser && 'cookieStore' in window) await cookieStore.set('logged_in', 'true');
else {
setCookieOnNonBrowser('logged_in', 'true');
}
goto('/entry');
}
} catch (error: any) {

View file

@ -1,4 +1,4 @@
import adapter from '@sveltejs/adapter-node';
import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */