fix: Update after breaking changes to Popout component
This commit is contained in:
parent
b8740c2223
commit
320bcf8534
22 changed files with 26 additions and 199 deletions
|
@ -313,7 +313,7 @@ const ShowNewApikey = ({ apikey }) => (
|
|||
<CopyToClipboardButton sup content={apikey.secret} label="API key secret" />
|
||||
</h6>
|
||||
<pre>{apikey.secret}</pre>
|
||||
<Popout warning compact>
|
||||
<Popout type="warning" compact>
|
||||
This is the only time you can see the key secret, make sure to copy it.
|
||||
</Popout>
|
||||
</div>
|
||||
|
|
|
@ -55,7 +55,7 @@ export const Email = ({ welcome = false, Link = false }) => {
|
|||
return (
|
||||
<div className="tw:w-full">
|
||||
{changed ? (
|
||||
<Popout note>
|
||||
<Popout type="note">
|
||||
<h3>Please confirm this change</h3>
|
||||
<p>
|
||||
We have sent an E-mail to your new address to confirm this change. Please click the link
|
||||
|
|
|
@ -39,7 +39,7 @@ export const Export = () => {
|
|||
return (
|
||||
<div className="tw:max-w-xl">
|
||||
{link ? (
|
||||
<Popout link>
|
||||
<Popout type="link">
|
||||
<h5>Your data was exported and is available for download at the following location:</h5>
|
||||
<p className="tw:text-lg">
|
||||
<WebLink href={link}>{link}</WebLink>
|
||||
|
|
|
@ -76,7 +76,7 @@ export const ImportSet = () => {
|
|||
multiple: false,
|
||||
}}
|
||||
/>
|
||||
<Popout tip>
|
||||
<Popout type="tip">
|
||||
<p>
|
||||
To import a measurement set, you should have a JSON or YAML file that has the following
|
||||
structure:
|
||||
|
|
|
@ -200,7 +200,7 @@ export const Mfa = ({ title = true }) => {
|
|||
<LockIcon />
|
||||
Set up Mult-Factor Authentication
|
||||
</button>
|
||||
<Popout tip>
|
||||
<Popout type="tip">
|
||||
<h5>Please consider enabling Two-Factor Authentication</h5>
|
||||
<p>
|
||||
We do not enforce a password policy, but we do recommend you enable Multi-Factor
|
||||
|
|
|
@ -111,7 +111,7 @@ export const Newsletter = ({ welcome = false, Link = false }) => {
|
|||
</>
|
||||
) : null}
|
||||
{welcome ? null : (
|
||||
<Popout tip>
|
||||
<Popout type="tip">
|
||||
<h5>You can unsubscribe at any time with the link below</h5>
|
||||
<p>
|
||||
This unsubscribe link will also be included at the bottom of every newsletter we send
|
||||
|
|
|
@ -63,7 +63,7 @@ export const Password = ({ welcome = false, Link = false }) => {
|
|||
<SaveIcon /> Save
|
||||
</button>
|
||||
{!account.mfaEnabled && (
|
||||
<Popout tip>
|
||||
<Popout type="tip">
|
||||
<h5>Please consider enabling Two-Factor Authentication</h5>
|
||||
<p>
|
||||
We do not enforce a password policy, but we do recommend you enable Two-Factor
|
||||
|
|
|
@ -146,7 +146,7 @@ export const Pattern = ({ id, Link }) => {
|
|||
return (
|
||||
<div className="tw:w-full">
|
||||
{pattern.public ? (
|
||||
<Popout note>
|
||||
<Popout type="note">
|
||||
<h5>This is the private view of your pattern</h5>
|
||||
<p>
|
||||
Everyone can access the public view since this is a public pattern.
|
||||
|
|
|
@ -748,7 +748,7 @@ const SuggestCset = ({ mset, Link }) => {
|
|||
Notes
|
||||
</h4>
|
||||
<p>If you would like to add any notes, you can do so here.</p>
|
||||
<Popout tip compact>
|
||||
<Popout type="tip" compact>
|
||||
This field supports markdown
|
||||
</Popout>
|
||||
<MarkdownInput label="Notes" current={notes} update={setNotes} valid={() => true} />
|
||||
|
|
|
@ -47,7 +47,7 @@ export const UserSetPicker = ({
|
|||
if (!hasSets)
|
||||
return (
|
||||
<div className="tw:w-full tw:max-w-3xl tw:mx-auto">
|
||||
<Popout tip>
|
||||
<Popout type="tip">
|
||||
<h5> You do not (yet) have any of your own measurements sets</h5>
|
||||
<p>
|
||||
You can store your measurements as a measurements set, after which you can generate as
|
||||
|
@ -88,7 +88,7 @@ export const UserSetPicker = ({
|
|||
)}
|
||||
{lackingSets.length > 0 ? (
|
||||
<div className="tw:my-4">
|
||||
<Popout note>
|
||||
<Popout type="note">
|
||||
<h5>
|
||||
Some of your measurements sets lack the measurements required to generate this pattern
|
||||
</h5>
|
||||
|
@ -174,7 +174,7 @@ export const BookmarkedSetPicker = ({
|
|||
)}
|
||||
{lackingSets.length > 0 && (
|
||||
<div className="tw:my-4">
|
||||
<Popout note>
|
||||
<Popout type="note">
|
||||
<h5>
|
||||
Some of these measurements sets lack the measurements required to generate this
|
||||
pattern
|
||||
|
|
|
@ -22,7 +22,7 @@ export const DocsView = ({ state, config, update }) => {
|
|||
<div className="tw:m-auto tw:mt-8 tw:max-w-2xl tw:px-4 tw:mb-8">
|
||||
<H1>Documentation</H1>
|
||||
{state?.design ? (
|
||||
<Popout link>
|
||||
<Popout type="link">
|
||||
<H5>Design Documentation</H5>
|
||||
<p className="tw:text-lg">
|
||||
You can find documentation for the {capitalize(state.design)} design at:
|
||||
|
@ -36,7 +36,7 @@ export const DocsView = ({ state, config, update }) => {
|
|||
</p>
|
||||
</Popout>
|
||||
) : null}
|
||||
<Popout link>
|
||||
<Popout type="link">
|
||||
<H5>Understanding the FreeSewing Pattern Editor</H5>
|
||||
<p className="tw:text-lg">
|
||||
Please refer to the pattern editor documentation at:
|
||||
|
@ -49,7 +49,7 @@ export const DocsView = ({ state, config, update }) => {
|
|||
</b>
|
||||
</p>
|
||||
</Popout>
|
||||
<Popout tip>
|
||||
<Popout type="tip">
|
||||
<H5>
|
||||
Looking for info on how it <em>really</em> works?
|
||||
</H5>
|
||||
|
|
|
@ -14,7 +14,7 @@ export const DraftErrorHandler = ({ failure, errors }) => {
|
|||
}
|
||||
|
||||
return (
|
||||
<Popout error>
|
||||
<Popout type="error">
|
||||
<p>
|
||||
Sorry, there were problems drafting your pattern with the given measurements and options.
|
||||
</p>
|
||||
|
|
|
@ -183,7 +183,7 @@ export const MeasurementsView = ({
|
|||
<div className="tw:max-w-7xl tw:mt-8 tw:mx-auto tw:px-4 tw:mb-4">
|
||||
<H1>Measurements</H1>
|
||||
{missingMeasurements && missingMeasurements.length > 0 ? (
|
||||
<Popout note dense noP>
|
||||
<Popout type="note" dense>
|
||||
<h3>
|
||||
To generate this pattern, we need {missingMeasurements.length} additional measurement
|
||||
{missingMeasurements.length === 1 ? '' : 's'}:
|
||||
|
@ -198,7 +198,7 @@ export const MeasurementsView = ({
|
|||
</ol>
|
||||
</Popout>
|
||||
) : (
|
||||
<Popout tip dense noP>
|
||||
<Popout type="tip" dense>
|
||||
<H5>We have all required measurements to draft this pattern</H5>
|
||||
<div className="tw:flex tw:flex-row tw:flex-wrap tw:gap-2 tw:mt-2">
|
||||
<button
|
||||
|
|
|
@ -77,17 +77,9 @@ export const SaveView = ({ config, state, update }) => {
|
|||
}
|
||||
const result = await backend.updatePattern(saveAs.pattern, patternData)
|
||||
if (result.success) {
|
||||
//setLoadingStatus([
|
||||
// true,
|
||||
// <>
|
||||
// {t('status:patternSaved')} <small>[#{saveAs.pattern}]</small>
|
||||
// </>,
|
||||
// true,
|
||||
// true,
|
||||
//])
|
||||
setSavedId(saveAs.pattern)
|
||||
update.notify({ color: 'success', msg: 'boom' }, saveAs.pattern)
|
||||
} //else setLoadingStatus([true, 'backendError', true, false])
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -98,7 +90,7 @@ export const SaveView = ({ config, state, update }) => {
|
|||
<>
|
||||
<h2>Save Pattern</h2>
|
||||
{savedId && (
|
||||
<Popout link>
|
||||
<Popout type="link">
|
||||
<h5>Pattern Saved</h5>
|
||||
See: <Link href={`/account/patterns/${savedId}`}>/account/patterns/{savedId}</Link>
|
||||
</Popout>
|
||||
|
|
|
@ -27,7 +27,7 @@ export const UndosView = ({ Design, update, state, config }) => {
|
|||
<H1>Undo History</H1>
|
||||
<p className="tw:mb-4">Time-travel through your recent pattern changes.</p>
|
||||
{steps.length < 1 ? (
|
||||
<Popout note>
|
||||
<Popout type="note">
|
||||
<h4>Your undo history is currently empty</h4>
|
||||
<p>When you make changes to your pattern, they will show up here.</p>
|
||||
<p>For example, you can click the button below to change the pattern rotation:</p>
|
||||
|
|
|
@ -28,7 +28,7 @@ export const ViewPicker = ({ Design, update, state }) => {
|
|||
.map((view) => (
|
||||
<MainCard key={view} {...{ view, update, Design }} />
|
||||
))}
|
||||
<Popout note>
|
||||
<Popout type="note">
|
||||
<div className="tw:text-left">
|
||||
<H5>pe:measurementsFreeViewsOnly.t:</H5>
|
||||
<p>pe:measurementsFreeViewsOnly.d</p>
|
||||
|
|
|
@ -142,7 +142,7 @@ const ConsentLacking = ({ banner, refresh }) => {
|
|||
<Wrap>
|
||||
<div className="tw:text-left">
|
||||
{banner}
|
||||
<Popout warning>
|
||||
<Popout type="warning">
|
||||
<h2>Your account lacks consent</h2>
|
||||
<p>
|
||||
This should have been taken care of when onboarding your account, but due to a earlier
|
||||
|
|
|
@ -400,7 +400,7 @@ export const SignInConfirmation = ({ onSuccess = false }) => {
|
|||
return error === 'signInFailed' ? (
|
||||
<>
|
||||
<MfaForm {...{ mfaCode, setMfaCode }} onSubmit={getConfirmation} />
|
||||
<Popout warning title="Sign In Failed">
|
||||
<Popout type="warning" title="Sign In Failed">
|
||||
<p>Your one-time token is either invalid of expired.</p>
|
||||
</Popout>
|
||||
</>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue