mirror of
https://github.com/wasp-lang/open-saas.git
synced 2025-11-20 13:47:05 +01:00
i run patch on main, checked out this branch, run prettier format, and then run diff
This commit is contained in:
@@ -1,43 +1,44 @@
|
||||
--- template/app/src/client/components/NavBar/Announcement.tsx
|
||||
+++ opensaas-sh/app/src/client/components/NavBar/Announcement.tsx
|
||||
@@ -1,32 +1,33 @@
|
||||
-const ANNOUNCEMENT_URL = 'https://github.com/wasp-lang/wasp';
|
||||
+const ANNOUNCEMENT_URL = 'https://x.com/hot_town/status/1950117243246821770';
|
||||
@@ -1,32 +1,34 @@
|
||||
-const ANNOUNCEMENT_URL = "https://github.com/wasp-lang/wasp";
|
||||
+const ANNOUNCEMENT_URL = "https://x.com/hot_town/status/1950117243246821770";
|
||||
|
||||
export function Announcement() {
|
||||
+ const launchDate = new Date('2025-07-29T00:00:00-07:00');
|
||||
+ const launchDate = new Date("2025-07-29T00:00:00-07:00");
|
||||
+ const today = new Date();
|
||||
+ const hasLaunched = today.toISOString().slice(0, 10) >= launchDate.toISOString().slice(0, 10);
|
||||
+ const hasLaunched =
|
||||
+ today.toISOString().slice(0, 10) >= launchDate.toISOString().slice(0, 10);
|
||||
+
|
||||
return (
|
||||
- <div className='relative flex justify-center items-center gap-3 p-3 w-full bg-gradient-to-r from-accent to-secondary font-semibold text-primary-foreground text-center'>
|
||||
+ <div className='relative flex justify-center items-center gap-3 p-3 w-full bg-gradient-to-r from-accent to-secondary font-semibold text-primary-foreground text-center tracking-wider z-[51]'>
|
||||
- <div className="from-accent to-secondary text-primary-foreground relative flex w-full items-center justify-center gap-3 bg-gradient-to-r p-3 text-center font-semibold">
|
||||
+ <div className="from-accent to-secondary text-primary-foreground relative z-[51] flex w-full items-center justify-center gap-3 bg-gradient-to-r p-3 text-center font-semibold tracking-wider">
|
||||
<a
|
||||
href={ANNOUNCEMENT_URL}
|
||||
target='_blank'
|
||||
- rel='noopener noreferrer'
|
||||
- className='hidden lg:block cursor-pointer hover:opacity-90 hover:drop-shadow transition-opacity'
|
||||
+ className='hidden lg:block hover:opacity-90 hover:drop-shadow transition-opacity'
|
||||
target="_blank"
|
||||
- rel="noopener noreferrer"
|
||||
- className="hidden cursor-pointer transition-opacity hover:opacity-90 hover:drop-shadow lg:block"
|
||||
+ className="hidden transition-opacity hover:opacity-90 hover:drop-shadow lg:block"
|
||||
>
|
||||
- Support Open-Source Software!
|
||||
+ 🚀 Open SaaS v2.0 {hasLaunched ? 'is here!' : 'launches tomorrow!'}
|
||||
+ 🚀 Open SaaS v2.0 {hasLaunched ? "is here!" : "launches tomorrow!"}
|
||||
</a>
|
||||
<div className='hidden lg:block self-stretch w-0.5 bg-primary-foreground/20'></div>
|
||||
<div className="bg-primary-foreground/20 hidden w-0.5 self-stretch lg:block"></div>
|
||||
<a
|
||||
href={ANNOUNCEMENT_URL}
|
||||
target='_blank'
|
||||
- rel='noopener noreferrer'
|
||||
- className='hidden lg:block cursor-pointer rounded-full bg-background/20 px-2.5 py-1 text-xs hover:bg-background/30 transition-colors tracking-wider'
|
||||
+ className='hidden lg:block opacity-95 cursor-pointer rounded-full bg-background/20 px-2.5 py-1 hover:bg-background/30 transition-colors tracking-wider'
|
||||
target="_blank"
|
||||
- rel="noopener noreferrer"
|
||||
- className="bg-background/20 hover:bg-background/30 hidden cursor-pointer rounded-full px-2.5 py-1 text-xs tracking-wider transition-colors lg:block"
|
||||
+ className="bg-background/20 hover:bg-background/30 hidden cursor-pointer rounded-full px-2.5 py-1 tracking-wider opacity-95 transition-colors lg:block"
|
||||
>
|
||||
- Star Our Repo on Github ⭐️ →
|
||||
+ {hasLaunched ? 'Check out the Launch 🎉' : 'Get notified! 📆'} →
|
||||
+ {hasLaunched ? "Check out the Launch 🎉" : "Get notified! 📆"} →
|
||||
</a>
|
||||
<a
|
||||
href={ANNOUNCEMENT_URL}
|
||||
target='_blank'
|
||||
- rel='noopener noreferrer'
|
||||
className='lg:hidden cursor-pointer rounded-full bg-background/20 px-2.5 py-1 text-xs hover:bg-background/30 transition-colors'
|
||||
target="_blank"
|
||||
- rel="noopener noreferrer"
|
||||
className="bg-background/20 hover:bg-background/30 cursor-pointer rounded-full px-2.5 py-1 text-xs transition-colors lg:hidden"
|
||||
>
|
||||
- ⭐️ Star the Our Repo and Support Open-Source! ⭐️
|
||||
+ 🎉 The Open SaaS v2.0 Launch is Live! 🚀
|
||||
|
||||
@@ -1,57 +1,52 @@
|
||||
--- template/app/src/client/components/NavBar/NavBar.tsx
|
||||
+++ opensaas-sh/app/src/client/components/NavBar/NavBar.tsx
|
||||
@@ -3,6 +3,7 @@
|
||||
import { Link as ReactRouterLink } from 'react-router-dom';
|
||||
import { useAuth } from 'wasp/client/auth';
|
||||
import { Link as WaspRouterLink, routes } from 'wasp/client/router';
|
||||
+import { Button } from '../../../components/ui/button';
|
||||
import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from '../../../components/ui/sheet';
|
||||
import { cn } from '../../../lib/utils';
|
||||
import { throttleWithTrailingInvocation } from '../../../shared/utils';
|
||||
@@ -11,6 +12,7 @@
|
||||
import { useIsLandingPage } from '../../hooks/useIsLandingPage';
|
||||
import logo from '../../static/logo.webp';
|
||||
import DarkModeSwitcher from '../DarkModeSwitcher';
|
||||
+import RepoInfo from '../RepoInfo';
|
||||
import { Announcement } from './Announcement';
|
||||
import { Link as ReactRouterLink } from "react-router-dom";
|
||||
import { useAuth } from "wasp/client/auth";
|
||||
import { Link as WaspRouterLink, routes } from "wasp/client/router";
|
||||
+import { Button } from "../../../components/ui/button";
|
||||
import {
|
||||
Sheet,
|
||||
SheetContent,
|
||||
@@ -17,6 +18,7 @@
|
||||
import { useIsLandingPage } from "../../hooks/useIsLandingPage";
|
||||
import logo from "../../static/logo.webp";
|
||||
import DarkModeSwitcher from "../DarkModeSwitcher";
|
||||
+import RepoInfo from "../RepoInfo";
|
||||
import { Announcement } from "./Announcement";
|
||||
|
||||
export interface NavigationItem {
|
||||
@@ -38,7 +40,12 @@
|
||||
return (
|
||||
<>
|
||||
{isLandingPage && <Announcement />}
|
||||
- <header className={cn('sticky top-0 z-50 transition-all duration-300', isScrolled && 'top-4')}>
|
||||
+ <header
|
||||
+ className={cn(
|
||||
+ 'sticky top-0 z-50 transition-all duration-300',
|
||||
+ isScrolled && 'top-4 mx-4 xl:mx-30 lg:mx-10'
|
||||
+ )}
|
||||
+ >
|
||||
@@ -51,7 +53,7 @@
|
||||
<header
|
||||
className={cn(
|
||||
"sticky top-0 z-50 transition-all duration-300",
|
||||
- isScrolled && "top-4",
|
||||
+ isScrolled && "xl:mx-30 top-4 mx-4 lg:mx-10",
|
||||
)}
|
||||
>
|
||||
<div
|
||||
className={cn('transition-all duration-300', {
|
||||
'mx-4 md:mx-20 pr-2 lg:pr-0 rounded-full shadow-lg bg-background/90 backdrop-blur-lg border border-border':
|
||||
@@ -48,7 +55,7 @@
|
||||
>
|
||||
<nav
|
||||
className={cn('flex items-center justify-between transition-all duration-300', {
|
||||
- 'p-3 lg:px-6': isScrolled,
|
||||
+ 'p-3 px-4 lg:p-4 lg:px-5': isScrolled,
|
||||
'p-6 lg:px-8': !isScrolled,
|
||||
})}
|
||||
aria-label='Global'
|
||||
@@ -65,7 +72,7 @@
|
||||
'ml-2 text-xs': isScrolled,
|
||||
})}
|
||||
@@ -66,7 +68,7 @@
|
||||
className={cn(
|
||||
"flex items-center justify-between transition-all duration-300",
|
||||
{
|
||||
- "p-3 lg:px-6": isScrolled,
|
||||
+ "p-3 px-4 lg:p-4 lg:px-5": isScrolled,
|
||||
"p-6 lg:px-8": !isScrolled,
|
||||
},
|
||||
)}
|
||||
@@ -87,7 +89,7 @@
|
||||
},
|
||||
)}
|
||||
>
|
||||
- Your SaaS
|
||||
+ Open SaaS
|
||||
</span>
|
||||
</WaspRouterLink>
|
||||
|
||||
@@ -88,7 +95,12 @@
|
||||
@@ -113,7 +115,12 @@
|
||||
return (
|
||||
<div className='hidden lg:flex lg:flex-1 gap-3 justify-end items-center'>
|
||||
<ul className='flex justify-center items-center gap-2 sm:gap-4'>
|
||||
<div className="hidden items-center justify-end gap-3 lg:flex lg:flex-1">
|
||||
<ul className="flex items-center justify-center gap-2 sm:gap-4">
|
||||
- <DarkModeSwitcher />
|
||||
+ <li>
|
||||
+ <RepoInfo />
|
||||
@@ -62,48 +57,48 @@
|
||||
</ul>
|
||||
{isUserLoading ? null : !user ? (
|
||||
<WaspRouterLink
|
||||
@@ -98,10 +110,11 @@
|
||||
'text-xs': isScrolled,
|
||||
})}
|
||||
@@ -126,10 +133,11 @@
|
||||
},
|
||||
)}
|
||||
>
|
||||
- <div className='flex items-center duration-300 ease-in-out text-foreground hover:text-primary transition-colors'>
|
||||
+ <div className='flex items-center duration-300 gap-1 ease-in-out text-foreground hover:text-primary transition-colors'>
|
||||
- <div className="text-foreground hover:text-primary flex items-center transition-colors duration-300 ease-in-out">
|
||||
+ <div className="text-foreground hover:text-primary flex items-center gap-1 transition-colors duration-300 ease-in-out">
|
||||
+ <span>Demo App</span>
|
||||
Log in{' '}
|
||||
Log in{" "}
|
||||
<LogIn
|
||||
- size={isScrolled ? '1rem' : '1.1rem'}
|
||||
+ size='1rem'
|
||||
className={cn('transition-all duration-300', {
|
||||
'ml-1 mt-[0.1rem]': !isScrolled,
|
||||
'ml-1': isScrolled,
|
||||
@@ -152,7 +165,7 @@
|
||||
- size={isScrolled ? "1rem" : "1.1rem"}
|
||||
+ size="1rem"
|
||||
className={cn("transition-all duration-300", {
|
||||
"ml-1 mt-[0.1rem]": !isScrolled,
|
||||
"ml-1": isScrolled,
|
||||
@@ -180,7 +188,7 @@
|
||||
<SheetHeader>
|
||||
<SheetTitle className='flex items-center'>
|
||||
<SheetTitle className="flex items-center">
|
||||
<WaspRouterLink to={routes.LandingPageRoute.to}>
|
||||
- <span className='sr-only'>Your SaaS</span>
|
||||
+ <span className='sr-only'>Open SaaS</span>
|
||||
- <span className="sr-only">Your SaaS</span>
|
||||
+ <span className="sr-only">Open SaaS</span>
|
||||
<NavLogo isScrolled={false} />
|
||||
</WaspRouterLink>
|
||||
</SheetTitle>
|
||||
@@ -163,9 +176,9 @@
|
||||
<div className='py-6'>
|
||||
@@ -193,9 +201,9 @@
|
||||
<div className="py-6">
|
||||
{isUserLoading ? null : !user ? (
|
||||
<WaspRouterLink to={routes.LoginRoute.to}>
|
||||
- <div className='flex justify-end items-center duration-300 ease-in-out text-foreground hover:text-primary transition-colors'>
|
||||
- Log in <LogIn size='1.1rem' className='ml-1' />
|
||||
- <div className="text-foreground hover:text-primary flex items-center justify-end transition-colors duration-300 ease-in-out">
|
||||
- Log in <LogIn size="1.1rem" className="ml-1" />
|
||||
- </div>
|
||||
+ <Button variant='outline'>
|
||||
+ <span>Demo App</span> <LogIn className='ml-1' />
|
||||
+ <Button variant="outline">
|
||||
+ <span>Demo App</span> <LogIn className="ml-1" />
|
||||
+ </Button>
|
||||
</WaspRouterLink>
|
||||
) : (
|
||||
<ul className='space-y-2'>
|
||||
@@ -174,7 +187,14 @@
|
||||
<ul className="space-y-2">
|
||||
@@ -207,7 +215,14 @@
|
||||
)}
|
||||
</div>
|
||||
<div className='py-6'>
|
||||
<div className="py-6">
|
||||
- <DarkModeSwitcher />
|
||||
+ <ul className='flex items-center justify-between gap-4'>
|
||||
+ <ul className="flex items-center justify-between gap-4">
|
||||
+ <li>
|
||||
+ <DarkModeSwitcher />
|
||||
+ </li>
|
||||
@@ -114,11 +109,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -218,6 +238,6 @@
|
||||
'size-7': isScrolled,
|
||||
@@ -251,6 +266,6 @@
|
||||
"size-7": isScrolled,
|
||||
})}
|
||||
src={logo}
|
||||
- alt='Your SaaS App'
|
||||
+ alt='Open SaaS App'
|
||||
- alt="Your SaaS App"
|
||||
+ alt="Open SaaS App"
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
export const marketingNavigationItems: NavigationItem[] = [
|
||||
{ name: 'Features', to: '/#features' },
|
||||
- { name: 'Pricing', to: routes.PricingPageRoute.to },
|
||||
{ name: "Features", to: "/#features" },
|
||||
- { name: "Pricing", to: routes.PricingPageRoute.to },
|
||||
...staticNavigationItems,
|
||||
] as const;
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
--- template/app/src/client/components/RepoInfo.tsx
|
||||
+++ opensaas-sh/app/src/client/components/RepoInfo.tsx
|
||||
@@ -0,0 +1,40 @@
|
||||
+import { useEffect, useState } from 'react';
|
||||
+import { FaGithub } from 'react-icons/fa';
|
||||
+import { Button } from '../../components/ui/button';
|
||||
+import { formatNumber } from '../../lib/utils';
|
||||
@@ -0,0 +1,48 @@
|
||||
+import { useEffect, useState } from "react";
|
||||
+import { FaGithub } from "react-icons/fa";
|
||||
+import { Button } from "../../components/ui/button";
|
||||
+import { formatNumber } from "../../lib/utils";
|
||||
+
|
||||
+const RepoInfo = () => {
|
||||
+ const [repoInfo, setRepoInfo] = useState<null | any>(null);
|
||||
@@ -14,11 +14,13 @@
|
||||
+ const fetchRepoInfo = async () => {
|
||||
+ try {
|
||||
+ setIsLoading(true);
|
||||
+ const response = await fetch('https://api.github.com/repos/wasp-lang/open-saas');
|
||||
+ const response = await fetch(
|
||||
+ "https://api.github.com/repos/wasp-lang/open-saas",
|
||||
+ );
|
||||
+ const data = await response.json();
|
||||
+ setRepoInfo(data);
|
||||
+ } catch (error) {
|
||||
+ console.error('Error fetching repo info', error);
|
||||
+ console.error("Error fetching repo info", error);
|
||||
+ } finally {
|
||||
+ setIsLoading(false);
|
||||
+ }
|
||||
@@ -31,10 +33,16 @@
|
||||
+ }
|
||||
+
|
||||
+ return (
|
||||
+ <a href='https://github.com/wasp-lang/open-saas' target='_blank' rel='noopener noreferrer'>
|
||||
+ <Button variant='ghost' className='rounded-full py-0 pl-2 pr-3 h-8'>
|
||||
+ <a
|
||||
+ href="https://github.com/wasp-lang/open-saas"
|
||||
+ target="_blank"
|
||||
+ rel="noopener noreferrer"
|
||||
+ >
|
||||
+ <Button variant="ghost" className="h-8 rounded-full py-0 pl-2 pr-3">
|
||||
+ <FaGithub />
|
||||
+ <span className='text-sm leading-none'>{formatNumber(repoInfo.stargazers_count)}</span>
|
||||
+ <span className="text-sm leading-none">
|
||||
+ {formatNumber(repoInfo.stargazers_count)}
|
||||
+ </span>
|
||||
+ </Button>
|
||||
+ </a>
|
||||
+ );
|
||||
|
||||
Reference in New Issue
Block a user