Skip to content

Commit

Permalink
Merge pull request #15 from NEARBuilders/chore/upgrade
Browse files Browse the repository at this point in the history
Upgrades near-bos-webcomponent
  • Loading branch information
bb-face authored May 15, 2024
2 parents 6c4bde8 + 3a0454b commit 94e8114
Show file tree
Hide file tree
Showing 38 changed files with 3,053 additions and 1,566 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/npm-publish-gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,24 @@ jobs:
node-version: "21"
registry-url: "https://registry.npmjs.org/"

- name: Check for changes in gateway
id: has_changes
run: |
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q 'gateway/'; then
echo 'changed=true' >> $GITHUB_ENV
else
echo 'changed=false' >> $GITHUB_ENV
- name: Install dependencies
if: env.changed == 'true'
run: yarn

- name: Build your project
if: env.changed == 'true'
run: yarn build

- name: Publish to npm
if: env.changed == 'true'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.PUBLISH_NPM_TOKEN }}
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- @bb-face @itexpert120 @elliotBraem
4 changes: 1 addition & 3 deletions apps/video.every.near/widget/Broadcast/GenerateStream.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
return (
<Broadcast.GenerateStream />
);
return <Broadcast.GenerateStream />;
1 change: 1 addition & 0 deletions apps/video.every.near/widget/Broadcast/WatchStream.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
return <Broadcast.WatchStream />;
130 changes: 130 additions & 0 deletions apps/video.every.near/widget/Library/FileUploader.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
const Container = styled.div`
display: flex;
flex-direction: column;
gap: 32px;
h1 {
color: #292c2a;
font-family: Poppins;
font-size: 24px;
font-weight: 500;
line-height: 130%; /* 31.2px */
letter-spacing: -0.48px;
margin: 0;
}
`;

const Heading = styled.h3`
color: #292c2a;
font-family: Poppins;
font-size: 18px;
font-weight: 500;
line-height: 150%; /* 27px */
letter-spacing: -0.18px;
margin-bottom: 8px;
`;

const PreviewContent = styled.div`
grid-column: span 9 / span 9;
border-radius: 24px;
border: 1px solid #c7c7c7;
padding: 4rem;
word-break: normal;
`;

const WidgetCode = `
\`\`\`js
<Widget src={"efiz.near/widget/Player.FileUploader"} />
\`\`\`
`;

const UsageContent = styled.div`
pre {
div {
padding: 1.5rem !important;
border-radius: 1.5rem;
}
}
`;

const PoweredBy = styled.h3`
display: flex;
align-items: center;
gap: 4px;
color: #a5a5a5 !important;
font-family: Poppins;
font-size: 12px !important;
line-height: 140% !important; /* 16.8px */
font-weight: 400 !important;
letter-spacing: -0.12px !important;
margin-bottom: 8px !important;
img {
height: 12px;
width: auto;
object-fit: cover;
}
`;

const PropertiesContent = styled.div`
grid-column: span 9 / span 9;
border-radius: 24px;
border: 1px solid #c7c7c7;
padding: 1rem;
word-break: normal;
overflow-x: scroll;
table {
border-radius: 24px;
overflow: hidden;
}
`;

const MonospaceText = styled.span`
font-family: monospace;
`;

return (
<Container>
<div>
<PoweredBy>
Powered by
<img src="https://ipfs.near.social/ipfs/bafkreia4rl6nknogzwwcj5qjladmgytyufxyl56fgr6nfjbwc6l5f6in4y" />
</PoweredBy>
<h1
style={{
fontSize: "28px",
fontWeight: "",
}}
>
File Uploader
</h1>
</div>
<div>
<Heading> Preview </Heading>
<PreviewContent>
<Widget src="video.every.near/widget/Player.FileUploader" />
<Widget src="video.every.near/widget/Player.Player" />
</PreviewContent>
</div>
<div>
<Heading>Description</Heading>
<p>
This component is responsible for uploading and displaying an asset
using the
<a
href="https://github.com/bb-face/livepeer-web-server"
target="_blank"
>
Livepeer web-server
</a>
.
</p>
</div>
<UsageContent>
<Heading>Usage</Heading>
<Markdown text={WidgetCode} />
</UsageContent>
</Container>
);
129 changes: 129 additions & 0 deletions apps/video.every.near/widget/Library/GetAssets.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
const Container = styled.div`
display: flex;
flex-direction: column;
gap: 32px;
h1 {
color: #292c2a;
font-family: Poppins;
font-size: 24px;
font-weight: 500;
line-height: 130%; /* 31.2px */
letter-spacing: -0.48px;
margin: 0;
}
`;

const Heading = styled.h3`
color: #292c2a;
font-family: Poppins;
font-size: 18px;
font-weight: 500;
line-height: 150%; /* 27px */
letter-spacing: -0.18px;
margin-bottom: 8px;
`;

const PreviewContent = styled.div`
grid-column: span 9 / span 9;
border-radius: 24px;
border: 1px solid #c7c7c7;
padding: 4rem;
word-break: normal;
`;

const WidgetCode = `
\`\`\`js
<Widget src={"efiz.near/widget/Player.GetAssets"} />
\`\`\`
`;

const UsageContent = styled.div`
pre {
div {
padding: 1.5rem !important;
border-radius: 1.5rem;
}
}
`;

const PoweredBy = styled.h3`
display: flex;
align-items: center;
gap: 4px;
color: #a5a5a5 !important;
font-family: Poppins;
font-size: 12px !important;
line-height: 140% !important; /* 16.8px */
font-weight: 400 !important;
letter-spacing: -0.12px !important;
margin-bottom: 8px !important;
img {
height: 12px;
width: auto;
object-fit: cover;
}
`;

const PropertiesContent = styled.div`
grid-column: span 9 / span 9;
border-radius: 24px;
border: 1px solid #c7c7c7;
padding: 1rem;
word-break: normal;
overflow-x: scroll;
table {
border-radius: 24px;
overflow: hidden;
}
`;

const MonospaceText = styled.span`
font-family: monospace;
`;

return (
<Container>
<div>
<PoweredBy>
Powered by
<img src="https://ipfs.near.social/ipfs/bafkreia4rl6nknogzwwcj5qjladmgytyufxyl56fgr6nfjbwc6l5f6in4y" />
</PoweredBy>
<h1
style={{
fontSize: "28px",
fontWeight: "",
}}
>
Get Assets
</h1>
</div>
<div>
<Heading> Preview </Heading>
<PreviewContent>
<Widget src="video.every.near/widget/Player.GetAssets" />
</PreviewContent>
</div>
<div>
<Heading>Description</Heading>
<p>
This component will fetch the list of assets in your Livepeer account.
It requires a the{" "}
<a
href="https://github.com/bb-face/livepeer-web-server"
target="_blank"
>
Livepeer web-server
</a>
up and running.
</p>
</div>
<UsageContent>
<Heading>Usage</Heading>
<Markdown text={WidgetCode} />
</UsageContent>
</Container>
);
Loading

0 comments on commit 94e8114

Please sign in to comment.