mirror of
https://github.com/codex-storage/codex-marketplace-ui.git
synced 2025-02-24 13:48:14 +00:00
Merge pull request #26 from codex-storage/releases/0.0.2
Releases/0.0.2
This commit is contained in:
commit
8b1700b8e9
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@codex-storage/marketplace-ui",
|
"name": "@codex-storage/marketplace-ui",
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@codex-storage/marketplace-ui",
|
"name": "@codex-storage/marketplace-ui",
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codex-storage/marketplace-ui-components": "0.0.9",
|
"@codex-storage/marketplace-ui-components": "0.0.9",
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/codex-storage/codex-marketplace-ui"
|
"url": "https://github.com/codex-storage/codex-marketplace-ui"
|
||||||
},
|
},
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Grid2x2Check } from "lucide-react";
|
import { StretchHorizontal } from "lucide-react";
|
||||||
import "./AvailabilityActionsCell.css";
|
import "./AvailabilityActionsCell.css";
|
||||||
import { CodexAvailability } from "@codex-storage/sdk-js/async";
|
import { CodexAvailability } from "@codex-storage/sdk-js/async";
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ export function AvailabilityActionsCell({
|
|||||||
className="cell--action availability-action"
|
className="cell--action availability-action"
|
||||||
title="Reservations"
|
title="Reservations"
|
||||||
onClick={onReservationsClick}>
|
onClick={onReservationsClick}>
|
||||||
<Grid2x2Check width={"1.25rem"} />
|
<StretchHorizontal width={"1.25rem"} />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -28,13 +28,11 @@ export function AvailabilityConfirm({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<b className="availabilitConfirm-subtitle">
|
<b className="availabilitConfirm-subtitle">Confirm your new sale</b>
|
||||||
Confirm your new availability
|
|
||||||
</b>
|
|
||||||
|
|
||||||
<p className="availabilitConfirm-message">
|
<p className="availabilitConfirm-message">
|
||||||
By clicking 'Next', you will establish a new availability based on
|
By clicking 'Next', you will establish a new sale based on the space
|
||||||
the space allocation specified above. Do you want to confirm ?
|
allocation specified above. Do you want to confirm ?
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,7 +33,7 @@ const defaultAvailabilityData: AvailabilityState = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export function AvailabilityCreate({ space }: Props) {
|
export function AvailabilityCreate({ space }: Props) {
|
||||||
const steps = useRef(["Availability", "Confirmation", "Success"]);
|
const steps = useRef(["Sale", "Confirmation", "Success"]);
|
||||||
const [availability, setAvailability] = useState<AvailabilityState>(
|
const [availability, setAvailability] = useState<AvailabilityState>(
|
||||||
defaultAvailabilityData
|
defaultAvailabilityData
|
||||||
);
|
);
|
||||||
@ -126,12 +126,7 @@ export function AvailabilityCreate({ space }: Props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Button
|
<Button label="Sale" Icon={Plus} onClick={onOpen} variant="primary" />
|
||||||
label="Availability"
|
|
||||||
Icon={Plus}
|
|
||||||
onClick={onOpen}
|
|
||||||
variant="primary"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Modal open={state.open} onClose={onClose} displayCloseButton={false}>
|
<Modal open={state.open} onClose={onClose} displayCloseButton={false}>
|
||||||
<Stepper
|
<Stepper
|
||||||
|
@ -62,7 +62,7 @@ export function AvailabilityForm({
|
|||||||
const isValid = isAvailabilityValid(availability, max);
|
const isValid = isAvailabilityValid(availability, max);
|
||||||
|
|
||||||
const helper = isValid
|
const helper = isValid
|
||||||
? "Total size of availability's storage in bytes"
|
? "Total size of sale's storage in bytes"
|
||||||
: "The total size cannot exceed the space available.";
|
: "The total size cannot exceed the space available.";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -16,6 +16,6 @@ export function AvailabilitySuccess({ dispatch }: AvailabilityComponentProps) {
|
|||||||
<Placeholder
|
<Placeholder
|
||||||
Icon={<SuccessIcon />}
|
Icon={<SuccessIcon />}
|
||||||
title="Success"
|
title="Success"
|
||||||
message="The new availability will appear in your availability list. You can safely close this dialog."></Placeholder>
|
message="The new sale will appear in your sale list. You can safely close this dialog."></Placeholder>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ export function useStorageRequestMutation(
|
|||||||
.createStorageRequest(input)
|
.createStorageRequest(input)
|
||||||
.then((s) => Promises.rejectOnError(s)),
|
.then((s) => Promises.rejectOnError(s)),
|
||||||
onSuccess: async () => {
|
onSuccess: async () => {
|
||||||
queryClient.invalidateQueries({ queryKey: ["mutationKey"] });
|
queryClient.invalidateQueries({ queryKey: ["purchases"] });
|
||||||
|
|
||||||
// if (!requestId.startsWith("0x")) {
|
// if (!requestId.startsWith("0x")) {
|
||||||
// requestId = "0x" + requestId;
|
// requestId = "0x" + requestId;
|
||||||
|
@ -63,7 +63,7 @@ const Layout = () => {
|
|||||||
Component: (p: MenuItemComponentProps) => (
|
Component: (p: MenuItemComponentProps) => (
|
||||||
<Link to="/dashboard/availabilities" {...p}>
|
<Link to="/dashboard/availabilities" {...p}>
|
||||||
<Server size={ICON_SIZE} />
|
<Server size={ICON_SIZE} />
|
||||||
Availabilities
|
Sales
|
||||||
</Link>
|
</Link>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user