Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions infrastructure/control-panel/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,5 @@ Thumbs.db
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

# Paraglide
src/lib/paraglide

*storybook.log
storybook-static
29 changes: 12 additions & 17 deletions infrastructure/control-panel/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
import type { StorybookConfig } from '@storybook/sveltekit';

import { join, dirname } from "path"
import { join, dirname } from 'path';

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')))
return dirname(require.resolve(join(value, 'package.json')));
}
const config: StorybookConfig = {
"stories": [
"../src/**/*.mdx",
"../src/**/*.stories.@(js|ts|svelte)"
],
"addons": [
getAbsolutePath('@storybook/addon-svelte-csf')
],
"framework": {
"name": getAbsolutePath('@storybook/sveltekit'),
"options": {}
}
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'],
addons: [getAbsolutePath('@storybook/addon-svelte-csf')],
framework: {
name: getAbsolutePath('@storybook/sveltekit'),
options: {}
}
};
export default config;
export default config;
22 changes: 11 additions & 11 deletions infrastructure/control-panel/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import type { Preview } from '@storybook/sveltekit'
import "../src/app.css";
import type { Preview } from '@storybook/sveltekit';
import '../src/app.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
};

export default preview;
export default preview;
3 changes: 0 additions & 3 deletions infrastructure/control-panel/biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@
"extends": ["../../biome.json"],
"organizeImports": {
"include": ["src/**/*.ts", "src/**/*.svelte"]
},
"files": {
"ignore": ["src/lib/paraglide/*"]
}
}
3 changes: 0 additions & 3 deletions infrastructure/control-panel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,5 @@
"typescript": "^5.0.0",
"typescript-eslint": "^8.20.0",
"vite": "^7.0.4"
},
"dependencies": {
"@inlang/paraglide-js": "^2.0.0"
}
}
57 changes: 28 additions & 29 deletions infrastructure/control-panel/src/app.css
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
@import 'tailwindcss';


@theme {
/* Custom theme */
--color-primary: #8e52ff;
--color-primary-100: #e8dcff;
--color-primary-200: #d2baff;
--color-primary-300: #bb97ff;
--color-primary-400: #a575ff;
--color-primary-500: #8e52ff;
/* Custom theme */
--color-primary: #8e52ff;
--color-primary-100: #e8dcff;
--color-primary-200: #d2baff;
--color-primary-300: #bb97ff;
--color-primary-400: #a575ff;
--color-primary-500: #8e52ff;

--color-secondary: #73efd5;
--color-secondary-100: #e3fcf7;
--color-secondary-200: #c7f9ee;
--color-secondary-300: #abf6e6;
--color-secondary-400: #8ff2dd;
--color-secondary-500: #73efd5;
--color-secondary: #73efd5;
--color-secondary-100: #e3fcf7;
--color-secondary-200: #c7f9ee;
--color-secondary-300: #abf6e6;
--color-secondary-400: #8ff2dd;
--color-secondary-500: #73efd5;

--color-white: #ffffff;
--color-gray: #f5f5f5;
--color-white: #ffffff;
--color-gray: #f5f5f5;

--color-black: #1f1f1f;
--color-black-100: #d2d2d2;
--color-black-300: #a5a5a5;
--color-black-500: #797979;
--color-black-700: #4c4c4c;
--color-black-900: #1f1f1f;
--color-black: #1f1f1f;
--color-black-100: #d2d2d2;
--color-black-300: #a5a5a5;
--color-black-500: #797979;
--color-black-700: #4c4c4c;
--color-black-900: #1f1f1f;

--color-danger: #ff5255;
--color-danger-100: #ffdcdd;
--color-danger-200: #ffb1a7;
--color-danger-300: #ff968e;
--color-danger-400: #ff7b77;
--color-danger-500: #ff5255;
}
--color-danger: #ff5255;
--color-danger-100: #ffdcdd;
--color-danger-200: #ffb1a7;
--color-danger-300: #ff968e;
--color-danger-400: #ff7b77;
--color-danger-500: #ff5255;
}
2 changes: 1 addition & 1 deletion infrastructure/control-panel/src/app.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="%paraglide.lang%">
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.svg" />
Expand Down
13 changes: 0 additions & 13 deletions infrastructure/control-panel/src/hooks.server.ts

This file was deleted.

3 changes: 0 additions & 3 deletions infrastructure/control-panel/src/hooks.ts

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 2 additions & 10 deletions infrastructure/control-panel/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import { paraglideVitePlugin } from '@inlang/paraglide-js';
import tailwindcss from '@tailwindcss/vite';
import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'vite';

export default defineConfig({
plugins: [
tailwindcss(),
sveltekit(),
paraglideVitePlugin({
project: './project.inlang',
outdir: './src/lib/paraglide'
})
]
plugins: [tailwindcss(), sveltekit()]
});
3 changes: 2 additions & 1 deletion platforms/blabsy/src/components/chat/chat-window.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ export function ChatWindow(): JSX.Element {
void Promise.all(
unreadMessages.map((message) => markAsRead(message.id))
);
}});
}
});

const handleSubmit = async (e: React.FormEvent): Promise<void> => {
e.preventDefault();
Expand Down
10 changes: 5 additions & 5 deletions platforms/blabsy/src/lib/hooks/useRequireAuth.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { useAuth } from "@lib/context/auth-context";
import type { User } from "@lib/types/user";
import { useRouter } from "next/router";
import { useEffect } from "react";
import { useAuth } from '@lib/context/auth-context';
import type { User } from '@lib/types/user';
import { useRouter } from 'next/router';
import { useEffect } from 'react';

export function useRequireAuth(redirectUrl?: string): User | null {
const { user, loading } = useAuth();
const { replace } = useRouter();

useEffect(() => {
if (!loading && !user) void replace(redirectUrl ?? "/");
if (!loading && !user) void replace(redirectUrl ?? '/');
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [user, loading]);

Expand Down
2 changes: 1 addition & 1 deletion platforms/pictique/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ export type GroupInfo = {
id: string;
name: string;
avatar: string;
};
};
Loading
Loading