Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Package | improve steps in docs #1189

Merged
merged 5 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This repo contains the typescript clients and projects for Threefold grid.
- [rmb peer client](./packages/rmb_peer_client/README.md)
- [rmb peer server](./packages/rmb_peer_server/README.md)
- [Playground](./packages/playground/README.md)
- [UI](./packages/UI/README.md)

## Requirements

Expand Down
10 changes: 7 additions & 3 deletions packages/UI/docs/pdf_viewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ To use the PDF Signer Web Component, follow these steps:

2. Navigate to the `repository/packages/UI` directory.

3. Run `yarn build` to generate the required distribution files.
3. Choose which provider you are going to use [see providers section](#using-providers-and-extensions)

4. Locate the `dist` folder created in the previous step.
4. Run `yarn build` to generate the required distribution files.

5. Copy the `dist/threefold-ui.umd.js` file and include it in your project's HTML files.
5. Locate the `dist` folder created in the previous step.

6. Copy the `dist/threefold-ui.umd.js` file and include it in your project's HTML files.

```html
<body>
Expand Down Expand Up @@ -101,6 +103,8 @@ Here's an example of how to use the PDF Signer Web Component in your HTML file:

In the example above, replace `<pdf-url>` and `<endpoint-url>` with the actual URLs for your PDF document and the destination where signed documents should be sent. Also, for the `<network>`, use one of the following network options: `[main, test, qa, dev]`.

PS: Please make sure that you have a `PDF URL` with `CORS-ORIGIN` enabled.

Feel free to customize the HTML structure and styles to match your application's design and requirements.

**Now you can serve your HTML file on any live-server plugin.**
Expand Down
8 changes: 5 additions & 3 deletions packages/UI/docs/script_editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ To create an instance of the Script Editor, follow these steps:

2. Navigate to the `repository/packages/UI` directory.

3. Run `yarn build` to generate the required distribution files.
3. Choose which provider you are going to use [see providers section](#using-providers-and-extensions)

4. Locate the `dist` folder created in the previous step.
4. Run `yarn build` to generate the required distribution files.

5. Copy the `dist/threefold-ui.umd.js` file and include it in your project's HTML files.
5. Locate the `dist` folder created in the previous step.

6. Copy the `dist/threefold-ui.umd.js` file and include it in your project's HTML files.

```html
<body>
Expand Down
5 changes: 4 additions & 1 deletion packages/UI/src/components/PDFSignerViewComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ export default {
pdfData.value = data.toString();
numOfPages.value = pdf.numPages;
} catch (error: any) {
showError({ isError: true, errorMessage: error.message });
showError({
isError: true,
errorMessage: "Please make sure that you have provided a PDF URL with CORS enabled.",
});
} finally {
loadingPdf.value = false;
}
Expand Down
Loading