[org] fix: Missing new measurements set link
This commit is contained in:
parent
880f738973
commit
7f39f319c6
6 changed files with 70 additions and 49 deletions
|
@ -86,59 +86,45 @@ export const Sets = ({ Link = false }) => {
|
|||
|
||||
return (
|
||||
<div className="tw-max-w-7xl xl:tw-pl-4">
|
||||
{sets.length > 0 ? (
|
||||
<>
|
||||
<p className="tw-text-center md:tw-text-right">
|
||||
<Link
|
||||
className="tw-daisy-btn tw-daisy-btn-primary tw-daisy-btn-outline tw-capitalize tw-w-full md:tw-w-auto tw-mr-2 tw-mb-2 hover:tw-no-underline hover:tw-text-primary-content"
|
||||
bottom
|
||||
primary
|
||||
href="/account/import"
|
||||
>
|
||||
<UploadIcon />
|
||||
Import Measurements Sets
|
||||
</Link>
|
||||
<button
|
||||
className="tw-daisy-btn tw-daisy-btn-primary tw-capitalize tw-w-full md:tw-w-auto hover:tw-no-underline hover:tw-text-primary-content"
|
||||
onClick={() =>
|
||||
setModal(
|
||||
<ModalWrapper keepOpenOnClick>
|
||||
<NewSet />
|
||||
</ModalWrapper>
|
||||
)
|
||||
}
|
||||
>
|
||||
<PlusIcon />
|
||||
Create a new Measurements Set
|
||||
</button>
|
||||
</p>
|
||||
<div className="tw-flex tw-flex-row tw-gap-2 tw-border-b-2 tw-mb-4 tw-pb-4 tw-mt-8 tw-h-14 tw-items-center">
|
||||
<input
|
||||
type="checkbox"
|
||||
className="tw-daisy-checkbox tw-daisy-checkbox-secondary"
|
||||
onClick={toggleSelectAll}
|
||||
checked={sets.length === selCount}
|
||||
/>
|
||||
<button
|
||||
className="tw-daisy-btn tw-daisy-btn-error"
|
||||
onClick={removeSelectedSets}
|
||||
disabled={selCount < 1}
|
||||
>
|
||||
<TrashIcon /> {selCount} Measurements Sets
|
||||
</button>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<p className="tw-text-center md:tw-text-right">
|
||||
<Link
|
||||
className="tw-daisy-btn tw-daisy-btn-primary tw-capitalize tw-w-full md:tw-w-auto tw-btn-lg hover:tw-no-underline hover:tw-text-primary-content"
|
||||
className="tw-daisy-btn tw-daisy-btn-primary tw-daisy-btn-outline tw-capitalize tw-w-full md:tw-w-auto tw-mr-2 tw-mb-2 hover:tw-no-underline hover:tw-text-primary-content"
|
||||
bottom
|
||||
primary
|
||||
href="/new/set"
|
||||
href="/account/import"
|
||||
>
|
||||
<UploadIcon />
|
||||
Import Measurements Sets
|
||||
</Link>
|
||||
<button
|
||||
className="tw-daisy-btn tw-daisy-btn-primary tw-capitalize tw-w-full md:tw-w-auto hover:tw-no-underline hover:tw-text-primary-content"
|
||||
onClick={() =>
|
||||
setModal(
|
||||
<ModalWrapper keepOpenOnClick>
|
||||
<NewSet />
|
||||
</ModalWrapper>
|
||||
)
|
||||
}
|
||||
>
|
||||
<PlusIcon />
|
||||
Create a new Measurements Set
|
||||
</Link>
|
||||
)}
|
||||
</button>
|
||||
</p>
|
||||
<div className="tw-flex tw-flex-row tw-gap-2 tw-border-b-2 tw-mb-4 tw-pb-4 tw-mt-8 tw-h-14 tw-items-center">
|
||||
<input
|
||||
type="checkbox"
|
||||
className="tw-daisy-checkbox tw-daisy-checkbox-secondary"
|
||||
onClick={toggleSelectAll}
|
||||
checked={sets.length === selCount}
|
||||
/>
|
||||
<button
|
||||
className="tw-daisy-btn tw-daisy-btn-error"
|
||||
onClick={removeSelectedSets}
|
||||
disabled={selCount < 1}
|
||||
>
|
||||
<TrashIcon /> {selCount} Measurements Sets
|
||||
</button>
|
||||
</div>
|
||||
<div className="tw-grid tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-2">
|
||||
{sets.map((set, i) => (
|
||||
<div
|
||||
|
|
15
sites/org/docs/account/import.mdx
Normal file
15
sites/org/docs/account/import.mdx
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: Import Data
|
||||
sidebar_class_name: tw-hidden
|
||||
---
|
||||
|
||||
import { RoleBlock } from '@freesewing/react/components/Role'
|
||||
import { Popout } from '@freesewing/react/components/Popout'
|
||||
import Link from '@docusaurus/Link'
|
||||
|
||||
<RoleBlock user>
|
||||
<Popout fixme title="Under construction">
|
||||
<h4>This page is not ready yet</h4>
|
||||
<p>Sorry, it's on our TODO list.</p>
|
||||
</Popout>
|
||||
</RoleBlock>
|
|
@ -258,7 +258,7 @@ const config = {
|
|||
colorMode: {
|
||||
defaultMode: 'light',
|
||||
disableSwitch: false,
|
||||
respectPrefersColorScheme: true,
|
||||
respectPrefersColorScheme: false,
|
||||
},
|
||||
image: 'img/freesewing-social-card.png',
|
||||
navbar: {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This file is auto-generated.
|
||||
* Any changes you make will be overwritten by the prebuild step.
|
||||
*/
|
||||
export const measurements = {"ankle":"Ankle circumference","biceps":"Biceps circumference","bustFront":"Bust front","bustPointToUnderbust":"Bust point to underbust","bustSpan":"Bust span","chest":"Chest circumference","crossSeam":"Cross seam","crossSeamFront":"Cross seam front","head":"Head circumference","heel":"Heel circumference","highBustFront":"High bust front","highBust":"High bust","hips":"Hips circumference","hpsToBust":"HPS to bust","hpsToWaistBack":"HPS to waist back","hpsToWaistFront":"HPS to waist front","inseam":"Inseam","knee":"Knee circumference","neck":"Neck circumference","seat":"Seat circumference","seatBack":"Seat back","crotchDepth":"Crotch depth","shoulderSlope":"Shoulder slope","shoulderToElbow":"Shoulder to elbow","shoulderToShoulder":"Shoulder to shoulder","shoulderToWrist":"Shoulder to wrist","underbust":"Underbust","upperLeg":"Upper leg circumference","waist":"Waist circumference","waistBack":"Waist back","waistToArmpit":"Waist to armpit","waistToFloor":"Waist to floor","waistToHips":"Waist to hips","waistToKnee":"Waist to knee","waistToSeat":"Waist to seat","waistToUnderbust":"Waist to underbust","waistToUpperLeg":"Waist to upper leg","wrist":"Wrist circumference"}
|
||||
export const measurements = {"ankle":"Ankle circumference","biceps":"Biceps circumference","bustFront":"Bust front","bustPointToUnderbust":"Bust point to underbust","bustSpan":"Bust span","chest":"Chest circumference","crossSeam":"Cross seam","crossSeamFront":"Cross seam front","head":"Head circumference","heel":"Heel circumference","height":"Height","highBustFront":"High bust front","highBust":"High bust","hips":"Hips circumference","hpsToBust":"HPS to bust","hpsToWaistBack":"HPS to waist back","hpsToWaistFront":"HPS to waist front","inseam":"Inseam","knee":"Knee circumference","neck":"Neck circumference","seat":"Seat circumference","seatBack":"Seat back","crotchDepth":"Crotch depth","shoulderSlope":"Shoulder slope","shoulderToElbow":"Shoulder to elbow","shoulderToShoulder":"Shoulder to shoulder","shoulderToWrist":"Shoulder to wrist","underbust":"Underbust","upperLeg":"Upper leg circumference","waist":"Waist circumference","waistBack":"Waist back","waistToArmpit":"Waist to armpit","waistToFloor":"Waist to floor","waistToHips":"Waist to hips","waistToKnee":"Waist to knee","waistToSeat":"Waist to seat","waistToUnderbust":"Waist to underbust","waistToUpperLeg":"Waist to upper leg","wrist":"Wrist circumference"}
|
||||
|
||||
export const optiongroups = {"advanced":"Advanced","armhole":"Armhole","backPockets":"Back pockets","closure":"Closure","collar":"Collar","conditional":"Conditional Options","construction":"Construction","cuffs":"Cuffs","darts":"Darts","elastic":"Elastic","fit":"Fit","frontPockets":"Front pockets","length":"Length","pockets":"Pockets","style":"Style","sleevecap":"Sleevecap","test":"Test"}
|
||||
|
||||
|
|
|
@ -53,6 +53,25 @@ const meta = {
|
|||
}
|
||||
|
||||
export default function Home() {
|
||||
useEffect(() => {
|
||||
// Check initial state
|
||||
console.log('Initial data-theme:', document.documentElement.getAttribute('data-theme'))
|
||||
console.log('OS prefers dark:', window.matchMedia('(prefers-color-scheme: dark)').matches)
|
||||
|
||||
// Monitor for changes
|
||||
const observer = new MutationObserver((mutations) => {
|
||||
mutations.forEach((mutation) => {
|
||||
if (mutation.attributeName === 'data-theme') {
|
||||
console.log('data-theme changed to:', document.documentElement.getAttribute('data-theme'))
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
observer.observe(document.documentElement, { attributes: true })
|
||||
|
||||
return () => observer.disconnect()
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<DocusaurusPage DocusaurusLayout={Layout} {...meta} Layout={false}>
|
||||
<div className="tw-max-w-7xl tw-mx-auto tw-my-12 tw-px-4">
|
||||
|
|
|
@ -5,6 +5,7 @@ import daisyui from 'daisyui'
|
|||
export default {
|
||||
content: [
|
||||
'./src/**/*.{js,mjs,mdx}',
|
||||
'./docs/**/*.mdx',
|
||||
'../../node_modules/daisyui/**/*.{js,mjs,ts,tsx}',
|
||||
'../../packages/react/components/**/*.mjs',
|
||||
'../../packages/react/context/**/*.mjs',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue