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
|
@ -53,37 +53,37 @@ export const SubscriberAdministration = ({ page }) => {
|
|||
{subscribers ? (
|
||||
<>
|
||||
<h5>Search subscribers</h5>
|
||||
<div className="tw-flex tw-flex-row tw-gap-2 tw-items-center">
|
||||
<div className="tw:flex tw:flex-row tw:gap-2 tw:items-center">
|
||||
<input
|
||||
autoFocus
|
||||
value={q}
|
||||
onChange={(evt) => setQ(evt.target.value)}
|
||||
className="tw-daisy-input tw-w-full tw-daisy-input-bordered tw-flex tw-flex-row"
|
||||
className="tw:daisy-input tw:w-full tw:daisy-input-bordered tw:flex tw:flex-row"
|
||||
type="text"
|
||||
placeholder="Username, ID, or E-mail address"
|
||||
/>
|
||||
<button onClick={search} className="tw-daisy-btn tw-daisy-btn-primary">
|
||||
<button onClick={search} className="tw:daisy-btn tw:daisy-btn-primary">
|
||||
<SearchIcon />
|
||||
</button>
|
||||
</div>
|
||||
<table className="tw-table tw-my-4">
|
||||
<table className="tw:table tw:my-4">
|
||||
<thead>
|
||||
<tr>
|
||||
<th className="tw-text-right">Email</th>
|
||||
<th className="tw-w-12">Language</th>
|
||||
<th className="tw:text-right">Email</th>
|
||||
<th className="tw:w-12">Language</th>
|
||||
<th>Unsubscribe</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{hits.map((hit, i) => (
|
||||
<tr key={i}>
|
||||
<td className="tw-text-right">
|
||||
<td className="tw:text-right">
|
||||
<b>{hit.email}</b>
|
||||
</td>
|
||||
<td className="tw-w-12">{hit.lang.toUpperCase()}</td>
|
||||
<td className="tw-w-full">
|
||||
<td className="tw:w-12">{hit.lang.toUpperCase()}</td>
|
||||
<td className="tw:w-full">
|
||||
<button
|
||||
className="tw-daisy-btn tw-daisy-btn-link"
|
||||
className="tw:daisy-btn tw:daisy-btn-link"
|
||||
onClick={() => unsubscribe(hit.ehash)}
|
||||
>
|
||||
Unsubscribe
|
||||
|
@ -96,7 +96,7 @@ export const SubscriberAdministration = ({ page }) => {
|
|||
</>
|
||||
) : (
|
||||
<button
|
||||
className="tw-daisy-btn tw-daisy-btn-primary tw-daisy-btn-lg"
|
||||
className="tw:daisy-btn tw:daisy-btn-primary tw:daisy-btn-lg"
|
||||
onClick={loadSubscribers}
|
||||
>
|
||||
Load Subscribers
|
||||
|
@ -127,21 +127,21 @@ export const UserAdministration = ({ Link = false }) => {
|
|||
|
||||
return (
|
||||
<>
|
||||
<div className="tw-flex tw-flex-row tw-gap-8 tw-items-start tw-w-full">
|
||||
<div className="tw-grow">
|
||||
<div className="tw:flex tw:flex-row tw:gap-8 tw:items-start tw:w-full">
|
||||
<div className="tw:grow">
|
||||
<h5>Search users</h5>
|
||||
<div className="tw-flex tw-flex-row tw-gap-2 tw-items-center">
|
||||
<div className="tw:flex tw:flex-row tw:gap-2 tw:items-center">
|
||||
<input
|
||||
autoFocus
|
||||
value={q}
|
||||
onChange={(evt) => setQ(evt.target.value)}
|
||||
className="tw-daisy-input tw-w-full tw-daisy-input-bordered tw-flex tw-flex-row"
|
||||
className="tw:daisy-input tw:w-full tw:daisy-input-bordered tw:flex tw:flex-row"
|
||||
type="text"
|
||||
placeholder="Username, ID, or E-mail address"
|
||||
/>
|
||||
<button
|
||||
onClick={search}
|
||||
className="tw-daisy-btn tw-daisy-btn-primary"
|
||||
className="tw:daisy-btn tw:daisy-btn-primary"
|
||||
disabled={q.length < 3}
|
||||
>
|
||||
<SearchIcon />
|
||||
|
@ -183,9 +183,9 @@ export const User = ({ user, Link }) => {
|
|||
const { setModal } = useContext(ModalContext)
|
||||
|
||||
return (
|
||||
<div className="tw-flex tw-flex-row tw-w-full tw-gap-4 tw-my-2">
|
||||
<div className="tw:flex tw:flex-row tw:w-full tw:gap-4 tw:my-2">
|
||||
<button
|
||||
className="tw-w-24 tw-h-24 tw-bg-base-100 tw-rounded-lg tw-shadow tw-shrink-0"
|
||||
className="tw:w-24 tw:h-24 tw:bg-base-100 tw:rounded-lg tw:shadow tw:shrink-0"
|
||||
onClick={() =>
|
||||
setModal(
|
||||
<ModalWrapper>
|
||||
|
@ -199,18 +199,18 @@ export const User = ({ user, Link }) => {
|
|||
backgroundColor: '#ccc',
|
||||
}}
|
||||
></button>
|
||||
<div className="tw-w-full tw-flex tw-flex-col tw-gap-1">
|
||||
<div className="tw-w-full tw-flex tw-flex-row tw-flex-wrap tw-gap-1">
|
||||
<div className="tw:w-full tw:flex tw:flex-col tw:gap-1">
|
||||
<div className="tw:w-full tw:flex tw:flex-row tw:flex-wrap tw:gap-1">
|
||||
<Link href={`/users/?id=${user.id}`}>{user.username}</Link>
|
||||
<KeyVal k="id" val={user.id} />
|
||||
</div>
|
||||
<div className="tw-w-full tw-flex tw-flex-row tw-flex-wrap tw-gap-1">
|
||||
<div className="tw:w-full tw:flex tw:flex-row tw:flex-wrap tw:gap-1">
|
||||
<UserRole role={user.role} />
|
||||
<AccountStatus status={user.status} />
|
||||
</div>
|
||||
<div className="tw-w-full tw-flex tw-flex-row tw-flex-wrap tw-gap-1">
|
||||
<div className="tw:w-full tw:flex tw:flex-row tw:flex-wrap tw:gap-1">
|
||||
<button
|
||||
className="tw-daisy-btn tw-daisy-btn-primary tw-daisy-btn-sm tw-daisy-btn-outline"
|
||||
className="tw:daisy-btn tw:daisy-btn-primary tw:daisy-btn-sm tw:daisy-btn-outline"
|
||||
onClick={() =>
|
||||
setModal(
|
||||
<ModalWrapper>
|
||||
|
@ -246,7 +246,7 @@ export const ImpersonateButton = ({ userId }) => {
|
|||
|
||||
return (
|
||||
<button
|
||||
className="tw-daisy-btn tw-daisy-btn-primary tw-daisy-btn-sm tw-daisy-btn-outline"
|
||||
className="tw:daisy-btn tw:daisy-btn-primary tw:daisy-btn-sm tw:daisy-btn-outline"
|
||||
onClick={impersonateUser}
|
||||
>
|
||||
Impersonate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue