feat: Refactor icon components to support filled and outlined states

- Updated Add.vue to handle filled and outlined states, merging AddFilled.vue functionality.
- Refactored Bell.vue and BellFilled.vue into a single component with filled state support.
- Created Credit.vue for credit card icon with filled and outlined states.
- Refactored Home.vue and HomeFilled.vue into a single component with filled state support.
- Refactored Layout.vue and LayoutFilled.vue into a single component with filled state support.
- Refactored Upload.vue and UploadFilled.vue into a single component with filled state support.
- Refactored Video.vue and VideoFilled.vue into a single component with filled state support.
- Enhanced index.tsx to include nonce for security in SSR.
- Updated main.ts to handle application data from SSR.
- Improved auth layout to include meta description for SEO.
- Updated routes to include meta information for head management.
- Simplified auth store methods for better readability and error handling.
- Updated UnoCSS configuration to include class prefix for better utility management.
This commit is contained in:
2026-01-05 18:27:35 +07:00
parent 61509b794b
commit a6f5ba8c90
23 changed files with 190 additions and 100 deletions

View File

@@ -224,11 +224,11 @@ async function getCSRFToken() {
const payload = await verify(token, JWT_SECRET) as any;
const stored = csrfTokens.get(payload.sessionId);
if (!stored) {
throw new Error('CSRF token not found');
}
// if (!stored) {
// throw new Error('CSRF token not found');
// }
return { csrfToken: stored.token };
return { csrfToken: stored?.token || null };
}
export const authMethods = {

View File

@@ -6,7 +6,7 @@ import {
import { tinyassert } from "@hiogawa/utils";
import { MiddlewareHandler, type Context, type Next } from "hono";
import { getContext } from "hono/context-storage";
import { register } from "module";
import { csrf } from 'hono/csrf'
import { z } from "zod";
import { authMethods } from "./auth";
import { jwt } from "hono/jwt";
@@ -320,7 +320,9 @@ export const rpcServer = async (c: Context, next: Next) => {
if (c.req.path !== endpoint && !c.req.path.startsWith(endpoint + "/")) {
return await next();
}
// c.get("redis").has(`auth_token:${}`)
const cert = c.req.header()
console.log("RPC Request Path:", c.req.raw.cf);
// if (!cert) return c.text('Forbidden', 403)
const handler = exposeTinyRpc({
routes,
adapter: httpServerAdapter({ endpoint }),