feat: Upgrade to TailwindCSS 4 & DaisyUI 5 (#263)
Also fixes #251 Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/263 Co-authored-by: joostdecock <joost@joost.at> Co-committed-by: joostdecock <joost@joost.at>
This commit is contained in:
parent
a2863e5158
commit
44e04a4cef
164 changed files with 2361 additions and 2658 deletions
|
@ -15,15 +15,15 @@ import { H1, H2, H3 } from '@freesewing/react/components/Heading'
|
|||
const ConsentForm = () => null
|
||||
|
||||
const Wrap = ({ children }) => (
|
||||
<div className="tw-m-auto tw-max-w-xl tw-text-center tw-mt-8 tw-p-8">{children}</div>
|
||||
<div className="tw:m-auto tw:max-w-xl tw:text-center tw:mt-8 tw:p-8">{children}</div>
|
||||
)
|
||||
|
||||
const ContactSupport = ({ Link = false }) => {
|
||||
if (!Link) Link = DefaultLink
|
||||
|
||||
return (
|
||||
<div className="tw-flex tw-flex-row tw-items-center tw-justify-center tw-gap-4 tw-mt-8">
|
||||
<Link href="/support" className="tw-daisy-btn tw-daisy-btn-success tw-w-full">
|
||||
<div className="tw:flex tw:flex-row tw:items-center tw:justify-center tw:gap-4 tw:mt-8">
|
||||
<Link href="/support" className="tw:daisy-btn tw:daisy-btn-success tw:w-full">
|
||||
Contact Support
|
||||
</Link>
|
||||
</div>
|
||||
|
@ -38,17 +38,17 @@ const AuthRequired = ({ Link, banner }) => {
|
|||
{banner}
|
||||
<H3>Authentication Required</H3>
|
||||
<p>This functionality requires a FreeSewing account</p>
|
||||
<div className="tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-2 tw-mt-8">
|
||||
<div className="tw:grid tw:grid-cols-1 tw:md:grid-cols-2 tw:gap-2 tw:mt-8">
|
||||
<Link
|
||||
href="/signup"
|
||||
className={`${horFlexClasses} tw-daisy-btn tw-daisy-btn-secondary tw-w-full`}
|
||||
className={`${horFlexClasses} tw:daisy-btn tw:daisy-btn-secondary tw:w-full`}
|
||||
>
|
||||
<PlusIcon />
|
||||
Sign Up
|
||||
</Link>
|
||||
<Link
|
||||
href="/signin"
|
||||
className={`${horFlexClasses} tw-daisy-btn tw-daisy-btn-secondary tw-daisy-btn-outline tw-w-full`}
|
||||
className={`${horFlexClasses} tw:daisy-btn tw:daisy-btn-secondary tw:daisy-btn-outline tw:w-full`}
|
||||
>
|
||||
<LockIcon />
|
||||
Sign In
|
||||
|
@ -67,8 +67,8 @@ const AccountInactive = ({ Link, banner }) => {
|
|||
<H3>Account Inactive</H3>
|
||||
<p>You must activate your account via the signup link we sent you.</p>
|
||||
<p>If you cannot find the link, you can receive a new one by signing up again.</p>
|
||||
<div className="tw-flex tw-flex-row tw-items-center tw-justify-center tw-gap-4 tw-mt-8">
|
||||
<Link href="/signup" className="tw-daisy-btn tw-daisy-btn-primary tw-w-full">
|
||||
<div className="tw:flex tw:flex-row tw:items-center tw:justify-center tw:gap-4 tw:mt-8">
|
||||
<Link href="/signup" className="tw:daisy-btn tw:daisy-btn-primary tw:w-full">
|
||||
Sign Up
|
||||
</Link>
|
||||
</div>
|
||||
|
@ -142,7 +142,7 @@ const ConsentLacking = ({ banner, refresh }) => {
|
|||
|
||||
return (
|
||||
<Wrap>
|
||||
<div className="tw-text-left">
|
||||
<div className="tw:text-left">
|
||||
{banner}
|
||||
<ConsentForm submit={updateConsent} />
|
||||
</div>
|
||||
|
@ -204,11 +204,11 @@ export const RoleBlock = ({ children, user = false, Link = false }) => {
|
|||
if (!ready) return <Spinner />
|
||||
|
||||
const banner = impersonating ? (
|
||||
<div className="tw-bg-warning tw-rounded-lg tw-shadow tw-py-4 tw-px-6 tw-flex tw-flex-row tw-items-center tw-gap-4 tw-justify-between">
|
||||
<span className="tw-text-base-100 tw-text-left">
|
||||
<div className="tw:bg-warning tw:rounded-lg tw:shadow tw:py-4 tw:px-6 tw:flex tw:flex-row tw:items-center tw:gap-4 tw:justify-between">
|
||||
<span className="tw:text-base-100 tw:text-left">
|
||||
Hi <b>{impersonating.admin}</b>, you are currently impersonating <b>{impersonating.user}</b>
|
||||
</span>
|
||||
<button className="tw-daisy-btn tw-daisy-btn-neutral" onClick={stopImpersonating}>
|
||||
<button className="tw:daisy-btn tw:daisy-btn-neutral" onClick={stopImpersonating}>
|
||||
Stop Impersonating
|
||||
</button>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue