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

change url for terms and conditions from threefold library to manual #3687

Draft
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

mik-tf
Copy link
Contributor

@mik-tf mik-tf commented Nov 28, 2024

Description

  • Changed the URL for the Terms and Conditions from Library to Manual

Related Issues

Preliminary Checks:

  • Does it completely address the issue linked?
    • IMO, it should work but please test.

Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstrings
  • Screenshots/Video attached (needed for UI changes)

Copy link
Contributor

@0oM4R 0oM4R left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should have this update in dashboard as well,

function parseAcceptTermsLink(tempDiv: HTMLDivElement) {
const url = "https://library.threefold.me/info/legal#";
const linkElements = tempDiv.querySelectorAll("a");
linkElements.forEach(linkElement => {
const currentDomainMatch = linkElement.href.match(/^(https?:\/\/[^\\/]+)/);
if (
(currentDomainMatch && linkElement.href.includes("localhost")) ||
(currentDomainMatch && linkElement.href.includes("dashboard")) // To update only internal links
) {
const currentDomain = currentDomainMatch[1];
linkElement.href = linkElement.href.replace(currentDomain, url);
}
});
}
watch(openAcceptTerms, async () => {
if (openAcceptTerms.value) {
try {
const url = "https://library.threefold.me/info/legal/";

@mik-tf
Copy link
Contributor Author

mik-tf commented Dec 2, 2024

@0oM4R I updated the two URLs from library to manual.

LMK if it's OK. And feel free to test it on your end. Thanks.

Copy link
Contributor

@maayarosama maayarosama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The terms and condition page can't be retrieved and when I press accept terms and conditions it fails
dashboard (2).log
Screenshot from 2024-12-04 13-34-10

@@ -873,7 +873,7 @@ function parseAcceptTermsLink(tempDiv: HTMLDivElement) {
watch(openAcceptTerms, async () => {
if (openAcceptTerms.value) {
try {
const url = "https://library.threefold.me/info/legal/";
const url = "https://manual.grid.tf/knowledge_base/legal/terms_conditions_all3.html";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it wont work; i think we should have markdown file to be able to parse it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also looks like the host have cors error
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CORS error resolved, we may see the error as the current appends readme.md to the link, if you commented this part you will not face the cors error again, but the content will be shown as html file
image

@0oM4R
Copy link
Contributor

0oM4R commented Dec 10, 2024

@mik-tf Can we mark this PR as a draft until the comments get resolved?

@mik-tf mik-tf marked this pull request as draft December 10, 2024 13:21
@mik-tf
Copy link
Contributor Author

mik-tf commented Dec 10, 2024

@0oM4R Of course. Done.

@mik-tf
Copy link
Contributor Author

mik-tf commented Dec 10, 2024

@0oM4R as I understand, the issue on cors has been resolved. I'll wait for your input before setting it to Ready to review, to be sure. Thanks.

@0oM4R
Copy link
Contributor

0oM4R commented Dec 15, 2024

@0oM4R as I understand, the issue on cors has been resolved. I'll wait for your input before setting it to Ready to review, to be sure. Thanks.
@mik-tf
already reviewed the pr and mentioned the current issue on #3687 (comment)

@mik-tf mik-tf marked this pull request as ready for review December 15, 2024 13:21
@maayarosama
Copy link
Contributor

The related issue's state is accepted, shouldn't this pr be drafted?

@mik-tf mik-tf marked this pull request as draft December 18, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants