跳到主要内容

@openclothes/config

open clothes's config package bundles configuration data for open clothes's websites and infrastructure.

It is published on NPM as @openclothes/config .
The source code for this package is available in our monorepo on Codeberg under packages/config .

注意

This package does not provide a default export.

Installation

npm install --save @openclothes/config

Named Exports

apikeyLevels

Holds an object where the key is the permission level for an API key (a number from 0 t0 8), and the value is a textual description of that access level.

import { apikeyLevels } from '@openclothes/config'

cloudflare

Holds an object with information about Cloudflare's image service which open clothes 使用 for hosting images.

import { cloudflare } from '@openclothes/config'

control

Holds an object with the configuration of open clothes's control setting. This setting determines which level of UX complexity hides/reveals what features on the website.

import { control } from '@openclothes/config'

controlDesc

Holds an object with the textual description of the various control levels used by open clothes.

import { controlDesc } from '@openclothes/config'

degree量体参数

Holds an array of measurements that measure an angle, rather than a distance.

import { degree量体参数 } from '@openclothes/config'

isDegreeMeasurement

A helper method to determine whether a measurement is a degree measurement. In other words, a measurement that captures an angle, rather than a distance.

ParameterTypeDefaultDescription
measurementstringundefinedThe ID of a open clothes measurement
Return TypeDescription
booleantrue of it is a degree measurement, false if not
import {isDegreeMeasurement} from '@openclothes/config'

const result = isDegreeMeasurement('shoulderSlope')
// result now holds: true

logoPath

Holds a string that is the SVG pathstring for the open clothes logo, Skully.

import { logoPath } from '@openclothes/config'

measurements

Holds an array of (the IDs of) all measurements used by open clothes designs.

import { measurements } from '@openclothes/config'

roles

Holds an object detailing the roles for role-based access control (RBAC) on the open clothes backend.

import { roles } from '@openclothes/config'

sewingTechniques

Holds an array of (the IDs of) all the sewing techniques used by open clothes designs.

import { sewingTechniques } from '@openclothes/config'

uiRoles

Holds an array of all the roles used on the open clothes website.

import { uiRoles } from '@openclothes/config'

urls

Holds an array of all the roles used on the open clothes website.

import { urls } from '@openclothes/config'