Compare commits
No commits in common. "develop" and "v0.1.0-develop.41" have entirely different histories.
develop
...
v0.1.0-dev
|
@ -1,13 +1,13 @@
|
||||||
name: Build/Publish
|
name: Build/Publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- develop
|
- develop
|
||||||
- develop-*
|
- develop-*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
main:
|
||||||
uses: lumeweb/github-node-deploy-workflow/.github/workflows/main.yml@master
|
uses: lumeweb/github-node-deploy-workflow/.github/workflows/main.yml@master
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
21
CHANGELOG.md
21
CHANGELOG.md
|
@ -1,24 +1,3 @@
|
||||||
# [0.1.0-develop.44](https://git.lumeweb.com/LumeWeb/sdk/compare/v0.1.0-develop.43...v0.1.0-develop.44) (2023-10-20)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* add postinstall for patch-package ([a1968f4](https://git.lumeweb.com/LumeWeb/sdk/commit/a1968f43d02193b2c4fe1b40db56afb60e64a7df))
|
|
||||||
|
|
||||||
# [0.1.0-develop.43](https://git.lumeweb.com/LumeWeb/sdk/compare/v0.1.0-develop.42...v0.1.0-develop.43) (2023-10-20)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* positioning error ([88e08d1](https://git.lumeweb.com/LumeWeb/sdk/commit/88e08d13e27093768e3dfed3c015fefe7bb1bb8b))
|
|
||||||
|
|
||||||
# [0.1.0-develop.42](https://git.lumeweb.com/LumeWeb/sdk/compare/v0.1.0-develop.41...v0.1.0-develop.42) (2023-10-20)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* small ui problems ([2aa2a5f](https://git.lumeweb.com/LumeWeb/sdk/commit/2aa2a5ff30b43574e96b4057938a247ea72d446b))
|
|
||||||
|
|
||||||
# [0.1.0-develop.41](https://git.lumeweb.com/LumeWeb/sdk/compare/v0.1.0-develop.40...v0.1.0-develop.41) (2023-10-20)
|
# [0.1.0-develop.41](https://git.lumeweb.com/LumeWeb/sdk/compare/v0.1.0-develop.40...v0.1.0-develop.41) (2023-10-20)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/sdk",
|
"name": "@lumeweb/sdk",
|
||||||
"version": "0.1.0-develop.44",
|
"version": "0.1.0-develop.41",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lumeweb/sdk",
|
"name": "@lumeweb/sdk",
|
||||||
"version": "0.1.0-develop.44",
|
"version": "0.1.0-develop.41",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lumeweb/kernel-network-registry-client": "0.1.0-develop.10",
|
"@lumeweb/kernel-network-registry-client": "0.1.0-develop.10",
|
||||||
"@lumeweb/libkernel": "0.1.0-develop.65",
|
"@lumeweb/libkernel": "0.1.0-develop.65",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/sdk",
|
"name": "@lumeweb/sdk",
|
||||||
"version": "0.1.0-develop.44",
|
"version": "0.1.0-develop.41",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "lib/src/index.d.ts",
|
"types": "lib/src/index.d.ts",
|
||||||
|
@ -13,8 +13,7 @@
|
||||||
"build": "run build",
|
"build": "run build",
|
||||||
"storybook": "storybook dev -p 6006",
|
"storybook": "storybook dev -p 6006",
|
||||||
"build-storybook": "storybook build",
|
"build-storybook": "storybook build",
|
||||||
"semantic-release": "semantic-release",
|
"semantic-release": "semantic-release"
|
||||||
"postinstall": "patch-package"
|
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
|
|
|
@ -2,10 +2,10 @@ import * as Dialog from "@radix-ui/react-dialog";
|
||||||
import Logo from "../../../assets/lume-logo.png";
|
import Logo from "../../../assets/lume-logo.png";
|
||||||
import { cva } from "class-variance-authority";
|
import { cva } from "class-variance-authority";
|
||||||
import { cn } from "../../utils";
|
import { cn } from "../../utils";
|
||||||
|
import { useState, useEffect } from "react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import camelCase from "camelcase";
|
import camelCase from "camelcase";
|
||||||
import { useNetworks, type Network } from "../../NetworksProvider";
|
import { useNetworks, type Network } from "../../NetworksProvider";
|
||||||
import { TW_PREFIX } from "../../../../scoped-tailwind-prefix";
|
|
||||||
|
|
||||||
const SYNCSTATE_TO_TEXT: Record<Network["syncState"], string> = {
|
const SYNCSTATE_TO_TEXT: Record<Network["syncState"], string> = {
|
||||||
done: "Synced",
|
done: "Synced",
|
||||||
|
@ -20,8 +20,13 @@ const LumeDashboard = (props: any) => {
|
||||||
const { children }: { children: React.PropsWithChildren } = props;
|
const { children }: { children: React.PropsWithChildren } = props;
|
||||||
const { networks } = useNetworks();
|
const { networks } = useNetworks();
|
||||||
|
|
||||||
const networkTypes = networks.map((network) => network.type);
|
const [uniqueNetworkTypes, setUniqueNetworkTypes] = useState<string[]>([]);
|
||||||
const uniqueNetworkTypes = Array.from(new Set(networkTypes));
|
|
||||||
|
useEffect(() => {
|
||||||
|
const networkTypes = networks.map((network) => network.type);
|
||||||
|
const uniqueTypes = Array.from(new Set(networkTypes));
|
||||||
|
setUniqueNetworkTypes(uniqueTypes);
|
||||||
|
}, [networks]);
|
||||||
|
|
||||||
const DefaultTrigger = (props: any) => (
|
const DefaultTrigger = (props: any) => (
|
||||||
<LumeDashboardTrigger asChild {...props}>
|
<LumeDashboardTrigger asChild {...props}>
|
||||||
|
@ -119,12 +124,12 @@ const CircularProgress = ({
|
||||||
className?: string;
|
className?: string;
|
||||||
}) => {
|
}) => {
|
||||||
const size = 70;
|
const size = 70;
|
||||||
const progressWidth = size * 0.03; // based on size
|
const progressWidth = 2;
|
||||||
const circleWidth = size * 0.03; // based on size
|
const circleWidth = 2;
|
||||||
const radius = size / 2 - 10;
|
const radius = size / 2 - 10;
|
||||||
const circumference = 2 * radius * Math.PI;
|
const circumference = 2 * radius * Math.PI;
|
||||||
const offset = circumference * ((100 - chain.sync) / 100);
|
const offset = circumference * ((100 - chain.sync) / 100);
|
||||||
const fontSize = size * 0.2; // based on size
|
const fontSize = 15;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
|
@ -134,7 +139,9 @@ const CircularProgress = ({
|
||||||
])}
|
])}
|
||||||
width={size}
|
width={size}
|
||||||
height={size}
|
height={size}
|
||||||
viewBox={`0 0 ${size} ${size}`}
|
viewBox={`-${size * 0.125} -${size * 0.125} ${size * 1.25} ${
|
||||||
|
size * 1.25
|
||||||
|
}`}
|
||||||
version="1.1"
|
version="1.1"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
style={{ transform: "rotate(-90deg)" }}>
|
style={{ transform: "rotate(-90deg)" }}>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useState, type FC, useRef, useEffect } from "react";
|
import React, { useState, type FC } from "react";
|
||||||
import { Button } from "../../ui/button";
|
import { Button } from "../../ui/button";
|
||||||
import {
|
import {
|
||||||
SwitchableComponent,
|
SwitchableComponent,
|
||||||
|
@ -111,7 +111,6 @@ export const LumeIdentityTrigger = Dialog.Trigger;
|
||||||
LumeIdentityTrigger.displayName = "LumeIdentityTrigger";
|
LumeIdentityTrigger.displayName = "LumeIdentityTrigger";
|
||||||
export default function Wrapped({ children }: React.PropsWithChildren) {
|
export default function Wrapped({ children }: React.PropsWithChildren) {
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const dialogContentEl = useRef<HTMLElement>();
|
|
||||||
const DefaultTrigger = () => (
|
const DefaultTrigger = () => (
|
||||||
<LumeIdentityTrigger asChild>
|
<LumeIdentityTrigger asChild>
|
||||||
<button className="bg-primary text-primary-foreground p-2 px-4 text-sm font-semibold font-mono rounded-md">
|
<button className="bg-primary text-primary-foreground p-2 px-4 text-sm font-semibold font-mono rounded-md">
|
||||||
|
@ -136,8 +135,8 @@ export default function Wrapped({ children }: React.PropsWithChildren) {
|
||||||
<Trigger />
|
<Trigger />
|
||||||
<Dialog.Portal>
|
<Dialog.Portal>
|
||||||
<Dialog.Overlay className="fixed z-40 inset-0 bg-black bg-opacity-50 backdrop-blur-sm" />
|
<Dialog.Overlay className="fixed z-40 inset-0 bg-black bg-opacity-50 backdrop-blur-sm" />
|
||||||
{/* @ditorodev: `left-[calc(50%-192px)]` these two are me being dumb and lazy, would be cool to fix with proper centering */}
|
{/* @ditorodev: `left-[calc(50%-192px)] top-[calc(50vh-174px)]` these two are me being dumb and lazy, would be cool to fix with proper centering */}
|
||||||
<Dialog.Content className="absolute left-[calc(50%-192px)] top-12 mx-auto my-auto w-96 max-w-full h-auto z-40 flex items-center justify-center" >
|
<Dialog.Content className="absolute left-[calc(50%-192px)] top-[calc(50vh-174px)] mx-auto my-auto w-96 max-w-full h-auto z-40 flex items-center justify-center">
|
||||||
<SwitchableComponentProvider>
|
<SwitchableComponentProvider>
|
||||||
<LumeIdentityContext.Provider value={{open, setOpen}}>
|
<LumeIdentityContext.Provider value={{open, setOpen}}>
|
||||||
<LumeIdentity />
|
<LumeIdentity />
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { StoryFn, Meta } from "@storybook/react";
|
import { StoryFn, Meta } from "@storybook/react";
|
||||||
import LumeDashboard from "../src/components/lume/LumeDashboard/LumeDashboard.js";
|
import LumeDashboard from "../src/components/lume/LumeDashboard/LumeDashboard.js";
|
||||||
import NetworksProvider from "../src/components/NetworksProvider.js";
|
import NetworksProvider from "src/components/NetworksProvider.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "LumeDashboard",
|
title: "LumeDashboard",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { StoryFn, Meta } from "@storybook/react";
|
import { StoryFn, Meta } from "@storybook/react";
|
||||||
import LumeIdentity from "../src/components/lume/LumeIdentity/LumeIdentity.js";
|
import LumeIdentity from "../src/components/lume/LumeIdentity/LumeIdentity.js";
|
||||||
import AuthProvider from "../src/components/AuthProvider.js";
|
import AuthProvider from "src/components/AuthProvider.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "LumeIdentity",
|
title: "LumeIdentity",
|
||||||
|
|
Loading…
Reference in New Issue