1
0
Fork 0

chore: Various small tweaks

This commit is contained in:
joostdecock 2023-11-03 19:41:21 +01:00
parent 4473efe604
commit f6a1063e59
20 changed files with 119 additions and 57 deletions

View file

@ -6,4 +6,5 @@ export const social = {
GitHub: 'https://github.com/freesewing',
Reddit: 'https://www.reddit.com/r/freesewing/',
Mastodon: 'https://freesewing.social/@freesewing',
Bluesky: 'https://bsky.app/profile/freesewing.org',
}

View file

@ -59,7 +59,7 @@ show you how to create your first parametric design.
FreeSewing is an open source project maintained by Joost De Cock and financially supported by the FreeSewing patrons.
If you feel FreeSewing is worthwhile, and you can spend a few coind without
If you feel FreeSewing is worthwhile, and you can spend a few coins without
hardship, then you should [join us and become a patron](https://freesewing.org/community/join).
## Links 👩‍💻

View file

@ -92,7 +92,7 @@ show you how to create your first parametric design.
FreeSewing is an open source project maintained by Joost De Cock and financially supported by the FreeSewing patrons.
If you feel FreeSewing is worthwhile, and you can spend a few coind without
If you feel FreeSewing is worthwhile, and you can spend a few coins without
hardship, then you should [join us and become a patron](https://freesewing.org/community/join).
## Links 👩‍💻

View file

@ -8,5 +8,27 @@ author: joost
There's a flurry of news and announcements about FreeSewing v3, so this _umbrella post_ gathers all of them into one place.
If you're looking for the best link to share regarding the v3 release and migration, this is probably the one.
If you're looking for the best link to share regarding the v3 release and migration, this post is your best bet.
##### FreeSewing is now pay-what-you-want
[This post outlines the reasoning behind FreeSewing's new pricing](/blog/freesewing-is-now-pay-what-you-want)
##### Welcome to the new FreeSewing.org site, powered by v3
[This is the _official_ announcement post for the new website](/blog/welcome-to-freesewining-3)
##### Announcing FreeSewing.social
[Announcement of FreeSewing's own Mastodon instance, and our departure from Twitter](/blog/announcing-freesewing-social)
##### Opening up the FreeSewing backend API
[Announcement of the new API keys feature that lets anyone connect to our backend to retrieve data](/blog/open-backend-api)
##### Announcing FreeSewing v3.0
[Announcement of the release of v3.0.0 of FreeSewing's core library](/blog/announcing-freesewing-v30)

View file

@ -56,3 +56,4 @@ This allows you to quickly verify the specific role of a setting or option witho
## Editor modes
<Fixme>Complete these docs</Fixme>

View file

@ -15,7 +15,11 @@ const namespaces = nsMerge('designs', 'sections', pageNs)
// Helper object to order posts
const order = {}
for (const [slug, props] of Object.entries(meta)) order[props.d] = slug
let i = 0 // Avoid posts with same date not showing up
for (const [slug, props] of Object.entries(meta)) {
i++
order[props.d + i] = slug
}
export const recentBlogPosts = Object.keys(order)
.sort()

View file

@ -16,7 +16,7 @@ import {
GitHubIcon,
InstagramIcon,
RedditIcon,
TwitterIcon,
MastodonIcon,
YouTubeIcon,
CommunityIcon,
ChatIcon,
@ -47,12 +47,12 @@ const SupportCard = ({ bg, textColor, title, icon, nr }) => (
)
const socialIcon = {
mastodon: <MastodonIcon />,
github: <GitHubIcon />,
discord: <DiscordIcon />,
facebook: <FacebookIcon />,
github: <GitHubIcon />,
instagram: <InstagramIcon />,
reddit: <RedditIcon />,
twitter: <TwitterIcon />,
youtube: <YouTubeIcon fill stroke={0} />,
}
@ -85,7 +85,7 @@ const SupportPage = ({ page }) => {
<div className="max-w-7xl mx-auto mb-24 px-4 mt-16">
<Breadcrumbs />
<h1>{pageTitle}</h1>
<h2>{t('howCanWeSupportYou')}</h2>
<h2>{t('support:howCanWeSupportYou')}</h2>
<div className="flex flex-row flex-wrap gap-4 lg:grid lg:grid-cols-3 lg:gap-8 justify-around -mt-4">
{/* Community */}
<div className="w-full md:max-w-md my-8">
@ -96,7 +96,10 @@ const SupportPage = ({ page }) => {
title={t('support:communitySupport')}
icon={<CommunityIcon className="w-10 h-10 lg:w-14 lg:h-14 shrink-0" />}
/>
<p className="font-normal text-inherit">{t('support:communitySupport1')}</p>
<p
className="font-normal text-inherit"
dangerouslySetInnerHTML={{ __html: t('support:communitySupport1') }}
/>
<p className="font-normal text-inherit">{t('support:communitySupport2')}</p>
<div className="grid grid-cols-2 gap-2">
{Object.keys(config.social)

View file

@ -4,6 +4,7 @@ import { useContext } from 'react'
import Link from 'next/link'
import orderBy from 'lodash.orderby'
import {
CsetIcon,
DesignIcon,
DocsIcon,
RssIcon,
@ -39,6 +40,7 @@ export const icons = {
showcase: (className = '') => <ShowcaseIcon className={className} />,
new: (className = '') => <PlusIcon className={className} />,
support: (className = '') => <HeartIcon className={className} />,
csets: (className = '') => <CsetIcon className={className} />,
// Lab
code: (className = '') => <GitHubIcon className={className} />,

View file

@ -47,7 +47,7 @@ export const socialList = (spectrum) => ({
},
Bluesky: {
icon: <CloudIcon {...iconClasses(spectrum[4])} stroke={2} />,
href: social.YouTube,
href: social.Bluesky,
community: true,
},
Discord: {

View file

@ -108,11 +108,11 @@ const SupportType = ({ type, active, t, update }) => (
<ButtonFrame key={type} active={active} onClick={() => update(type)}>
<div className="w-full flex flex-col gap-2">
<div className="w-full text-lg leading-5 flex flex-row items-center justify-between grow-0">
<span>{t(type)}</span>
<span>{t(`support:${type}`)}</span>
{icons[type]}
</div>
<div className="w-full text-normal font-normal normal-case pt-1 leading-5 grow">
{t(`${type}Desc`)}
{t(`support:${type}Desc`)}
</div>
</div>
</ButtonFrame>
@ -179,7 +179,7 @@ export const SupportForm = () => {
if (issue || discussion)
return (
<div className="w-full max-w-xl">
<h5>{t('requestCreated')}</h5>
<h5>{t('support:requestCreated')}</h5>
<p>
We have created your request, you can find it here:
<br />
@ -190,7 +190,7 @@ export const SupportForm = () => {
</p>
<button className="btn btn-secondary" onClick={clear}>
<LeftIcon />
{t('back')}
{t('support:back')}
</button>
</div>
)
@ -205,7 +205,7 @@ export const SupportForm = () => {
</div>
<p className="text-right">
<WebLink
txt={t('useGitHubInstead')}
txt={t('support:useGitHubInstead')}
href="https://github.com/freesewing/freesewing/issues/new/choose"
/>
</p>
@ -217,15 +217,15 @@ export const SupportForm = () => {
<SupportType type={type} active={true} update={() => setType(false)} t={t} />
<StringInput
id="support-title"
label={t('title')}
label={t('support:title')}
update={setTitle}
current={title}
valid={(val) => val.length > 10}
docs={
<div className="max-w-prose">
<h2>{t('title')}</h2>
<p>{t('titleDocs1')}</p>
<p>{t('titleDocs2')}</p>
<h2>{t('support:title')}</h2>
<p>{t('support:titleDocs1')}</p>
<p>{t('support:titleDocs2')}</p>
</div>
}
/>
@ -239,21 +239,21 @@ export const SupportForm = () => {
docs={
<div className="max-w-prose">
<h2>{t('design')}</h2>
<p>{t('designDocs1')}</p>
<p>{t('support:designDocs1')}</p>
</div>
}
/>
)}
<MarkdownInput
id="support-body"
label={t('description')}
label={t('support:description')}
update={setBody}
current={body}
valid={(val) => val.length > 10}
docs={
<div className="max-w-prose">
<h2>{t('description')}</h2>
<p>{t('descriptionDocs1')}</p>
<h2>{t('support:description')}</h2>
<p>{t('support:descriptionDocs1')}</p>
</div>
}
/>
@ -265,14 +265,14 @@ export const SupportForm = () => {
<Fragment key={key}>
<ActiveImageInput
id={`support-img-${key}`}
label={`${t('image')} ${key}`}
label={`${t('support:image')} ${key}`}
update={(val) => setSingleImage(key, val)}
current={images[key]}
valid={(val) => val.length > 1}
docs={
<div className="max-w-prose">
<h2>{t('image')}</h2>
<p>{t('imageDocs1')}</p>
<h2>{t('support:image')}</h2>
<p>{t('support:imageDocs1')}</p>
</div>
}
imgType="support"
@ -281,14 +281,14 @@ export const SupportForm = () => {
/>
{images[key] && (
<Popout tip>
<span>{t('addImageToMd')}:</span>
<span>{t('support:addImageToMd')}:</span>
<CodeBox code={markup} title="MarkDown" />
<p className="text-right -mt-5">
<button
className="btn btn-sm btn-accent"
onClick={() => setBody(body + '\n\n' + markup)}
>
{t('addToDescription')}
{t('support:addToDescription')}
</button>
</p>
</Popout>
@ -298,7 +298,7 @@ export const SupportForm = () => {
})}
{Object.keys(images).length < 9 && (
<button className="btn btn-secondary mt-2" onClick={addImage}>
{t('addImage')}
{t('support:addImage')}
</button>
)}
<button
@ -306,7 +306,7 @@ export const SupportForm = () => {
disabled={title.length < 10}
onClick={submit}
>
{t('submitSupportRequest')}
{t('support:submitSupportRequest')}
</button>
</div>
)

View file

@ -40,9 +40,11 @@ editCurrentMeasiesDesc: Changes you make here will not be saved to your measurem
editCurrentMeasiesHeader: Edit Pattern Measurements
editMeasiesByHand: Edit measurements by hand
editMeasiesByHandDesc: Manually set or override any measurements. These changes will only apply to the current pattern.
editSettings: Edit configuration
editSettings: Edit settings
editSettingsByHand: Edit settings by hand
elastic: Elastic
export: Export
exporting: Exporting
exportAsData: Export as data
exportForEditing: Export for editing
exportForPrinting: Export for printing
@ -80,6 +82,7 @@ partTransfoYes: Show buttons
partTransfoYesDesc: Include these buttons on the pattern output (they will not be printed)
pathInfo: Path info
patternBookmarkCreated: Pattern bookmark created
patternEditor: Pattern Editor
patternInspector: Pattern Inspector
patternLogs: Pattern logs
patternSaved: Pattern saved
@ -106,6 +109,7 @@ showOnlyThisPart: Show only this pattern part
sleevecap: Sleevecap
style: Style
test: Test
testDesign: Test Design
testDesignMeasurement: "Test {design} measurements: {measurement}"
testDesignOption: "Test {design} design options: {option}"
testDesignSets: "Test {design} across measurements sets"

View file

@ -18,7 +18,7 @@ export const ns = ['cut', 'plugin', 'common']
export const exportTypes = {
exportForPrinting: ['a4', 'a3', 'a2', 'a1', 'a0', 'letter', 'legal', 'tabloid'],
exportForEditing: ['svg', 'pdf'],
exportAsData: ['json', 'yaml', 'github gist'],
exportAsData: ['json', 'yaml'],
}
/**
@ -171,7 +171,7 @@ export const handleExport = async ({
// add the strings that are used on the cover page
workerArgs.strings = {
design: capitalize(design),
tagline: t('common:sloganCome') + '. ' + t('common:sloganStay'),
tagline: t('common:slogan1') + '. ' + t('common:slogan2'),
url: window.location.href,
cuttingLayout: t('cut:cuttingLayout'),
}
@ -186,8 +186,8 @@ export const handleExport = async ({
// add the svg and pages data to the worker args
workerArgs.pages = pattern.setStores[pattern.activeSet].get('pages')
// add cutting layouts if requested
if (!exportTypes.exportForEditing.includes(format) && pageSettings.cutlist) {
// add cutting layouts if requested (commented out for now)
if (false && !exportTypes.exportForEditing.includes(format) && pageSettings.cutlist) {
workerArgs.cutLayouts = generateCutLayouts(pattern, Design, settings, format, t, ui)
}
} catch (err) {

View file

@ -108,7 +108,7 @@ const NavIcons = ({ setView, setDense, dense, view, saveAs = false, control }) =
{control >= controlLevels.views.test && (
<NavButton
onClick={() => setView('test')}
label={t('workbench:patternTests')}
label={t('workbench:testDesign')}
active={view === 'test'}
>
<BeakerIcon className={iconSize} />
@ -153,7 +153,7 @@ const NavIcons = ({ setView, setDense, dense, view, saveAs = false, control }) =
{control >= controlLevels.views.edit && (
<NavButton
onClick={() => setView('edit')}
label={t('workbench:editByHand')}
label={t('workbench:editSettingsByHand')}
active={view === 'edit'}
>
<EditIcon className={iconSize} />

View file

@ -10,7 +10,6 @@ import { useEffect, useState, useRef, useMemo, useContext } from 'react'
import { useTranslation } from 'next-i18next'
// Components
import { CloseIcon } from 'shared/components/icons.mjs'
import { V3Wip } from 'shared/components/v3-wip.mjs'
export const ns = []
@ -58,8 +57,7 @@ export const EditView = ({ settings, setSettings, design, Design }) => {
return (
<div className="max-w-screen-xl m-auto h-screen form-control mt-4 flex flex-col">
<h2>{t('yamlEditViewTitleThing', { thing: capitalize(design) })}</h2>
<V3Wip />
<h2>{t('workbench:editSettingsByHand')}</h2>
<div id="editor" className="h-2/3 my-2 overflow-auto flex flex-col">
{error && (
<div className={`w-full shadow bg-base-100 p-0 my-4`}>
@ -86,8 +84,8 @@ export const EditView = ({ settings, setSettings, design, Design }) => {
ref={inputRef}
/>
</div>
<button className="btn btn-primary" onClick={onSave}>
{t('save')}
<button className="btn btn-primary w-64 mx-auto mt-4" onClick={onSave}>
{t('workbench:save')}
</button>
</div>
)

View file

@ -13,9 +13,8 @@ import { useTranslation } from 'next-i18next'
// Components
import { Popout } from 'shared/components/popout/index.mjs'
import { WebLink } from 'shared/components/link.mjs'
import { V3Wip } from 'shared/components/v3-wip.mjs'
export const ns = ['exporting', exportNs]
export const ns = ['exporting', exportNs, 'workbench']
export const ExportView = ({ settings, ui, design, Design }) => {
const [link, setLink] = useState(false)
@ -51,8 +50,7 @@ export const ExportView = ({ settings, ui, design, Design }) => {
return (
<div className="max-w-screen-xl m-auto py-8">
<h2>{t('export')}</h2>
<V3Wip />
<h2>{t('workbench:export')}</h2>
<p className="text-lg sm:text-xl">{t('exportPattern-txt')}</p>
{link && (
<Popout link compact>
@ -65,7 +63,11 @@ export const ExportView = ({ settings, ui, design, Design }) => {
<div key={type} className="flex flex-col gap-2 w-full sm:w-auto">
<h4>{t(type)}</h4>
{exportTypes[type].map((format) => (
<button key={format} className="btn btn-primary" onClick={() => doExport(format)}>
<button
key={format}
className="btn btn-primary uppercase"
onClick={() => doExport(format)}
>
{type === 'exportForPrinting' ? `${format} pdf` : format}
</button>
))}

View file

@ -4,7 +4,6 @@ import { InspectorPattern } from './inspector/pattern.mjs'
import { DraftMenu, ns as menuNs } from './menu.mjs'
import { objUpdate, nsMerge } from 'shared/utils.mjs'
import { PatternWithMenu, ns as wrapperNs } from '../pattern-with-menu.mjs'
import { V3Wip } from 'shared/components/v3-wip.mjs'
import { DraftHeader, ns as headerNs } from '../draft/header.mjs'
export const ns = nsMerge(menuNs, wrapperNs, headerNs)
@ -82,7 +81,6 @@ export const InspectView = ({
Header: DraftHeader,
menu: (
<>
<V3Wip />
<DraftMenu
{...{
design,

View file

@ -2,11 +2,7 @@
import { useTranslation } from 'next-i18next'
import { analyzeDraftLogLine } from './errors.mjs'
import { Mdx } from 'shared/components/mdx/dynamic.mjs'
import {
ClearAllButton,
ns as coreMenuNs,
} from 'shared/components/workbench/menus/core-settings/index.mjs'
import { V3Wip } from 'shared/components/v3-wip.mjs'
import { ns as coreMenuNs } from 'shared/components/workbench/menus/core-settings/index.mjs'
export const ns = ['logs', ...coreMenuNs]
@ -88,9 +84,7 @@ export const LogView = ({ pattern, settings, setSettings }) => {
<div className="max-w-4xl mx-auto px-4 pb-8">
<div className="flex">
<h2 className="grow">{t('logs')}</h2>
<ClearAllButton setSettings={setSettings} />
</div>
<V3Wip />
{Object.entries(logs).map(([type, lines], key) => (
<DraftLogs key={key} {...{ type, lines, t }} />
))}

View file

@ -7,4 +7,5 @@ export const social = {
GitHub: 'https://github.com/freesewing',
Reddit: 'https://www.reddit.com/r/freesewing/',
Mastodon: 'https://freesewing.social/@freesewing',
Bluesky: 'https://bsky.app/profile/freesewing.org',
}

View file

@ -1,13 +1,44 @@
support: Support
accountIssue: Account problem
accountIssueDesc: Do you have trouble with your FreeSewing account?
addImage: Add an image
bugReport: Report a bug
bugReportDesc: Is something broken, or not working as expected?
createSupportRequest: Create a support request
communitySupport: Community Support
communitySupport1: For the fastest response, head over to <b>discord.freesewing.org</b> and post your question in the <b>Support</b> channel.
communitySupport2: The FreeSewing community is a helpful bunch, so there is a good chance they are able to help you.
contributorSupport: Contributor Support
contributorSupport1: If something is broken or you have found a bug, you can <b>create an issue on GitHub</b>.
contributorSupport2: Issues are more likely to attract the attention of core contributors, but tend to take longer to get a response.
description: Description
descriptionDocs1: This is where you can describe the issue
design: Design
designDocs1: Pick the FreeSewing design this issue applies to
designIssue: Report an issue with a FreeSewing Design
designIssueDesc: Are you having trouble with a FreeSewing design or the pattern you are generating from it?
docsUpdate: Documentation update
docsUpdateDesc: Is there something to be improved about our documentation?
featureRequest: Feature request
featureRequestDesc: Is there something you would like to see happen or implemented?
howCanWeSupportYou: How can we support you?
howCanYouSupportFreeSewing: How can you support FreeSewing?
maintainerSupport: Maintainer Support
maintainerSupport1: If you are <b>a FreeSewing patron</b>, you can go straight to the top and contact Joost directly.
maintainerSupport2: While Joost will treat requests from patrons with priority, he does also needs sleep. So keep that in mind, especially when you are in a different time zone.
other: Something else
otherDesc: Do you have something else you required assistance with?
patronSponsor: Patrons / Sponsorship
patronSponsorDesc: Do you have questions about FreeSewing patronship or (corporate) sponsorship?
question: Question
questionDesc: Do you have a general question to ask?
security: Security
securityDesc: Do you want to report a security issue or incident?
submitSupportRequest: Submit support request
support: Support
title: Title
titleDocs1: This is the title of the issue
titleDocs2: Best to keep it short and to the point
useGitHubInstead: Use GitHub instead
whatIsDiscord: What is Discord?
whatIsDiscord1: Discord is a free chat platform where communities can come together to chat discuss their interests. It also supports (group) voice and video calls.
whatIsDiscord2: FreeSewing has its own Discord community (a <em>server</em> in Discord terminology) at

View file

@ -116,6 +116,7 @@ export const extendSiteNav = async (siteNav, lang) => {
t: 'Curated Measurement Sets',
s: 'admin/cset',
_: 1,
h: 1,
},
}