From 68df7d178e1bbb9c3e8eefbdd8763be6ee053d96 Mon Sep 17 00:00:00 2001 From: hzz780 Date: Fri, 21 Jun 2024 11:48:50 +0800 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20=F0=9F=A4=96=20github=20ISSUE=5FTE?= =?UTF-8?q?MPLATE=20&=20LICENSE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/bug_report.md | 55 +++++++++++------------ .github/ISSUE_TEMPLATE/config.yml | 10 +++++ .github/ISSUE_TEMPLATE/feature_request.md | 29 +++++++----- LICENSE | 2 +- 4 files changed, 54 insertions(+), 42 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dd84ea78..ca17d143 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,38 +1,33 @@ --- -name: Bug report -about: Create a report to help us improve +name: 👾 Bug Report +about: Report a bug or issue with the project. title: '' -labels: '' +labels: 'bug' assignees: '' --- -**Describe the bug** +### Description A clear and concise description of what the bug is. -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. +### Steps To Reproduce +1. Log in... +2. Ensure that... +3. Allow a long period of inactivity to pass... +4. Observe that... +5. Attempt to log in... + +### Current Behavior +- After the period of inactivity... +- When the user tries to log in using another method... +- This causes a bug due to... + +### Expected Behavior +- After a long period of inactivity... +- When a user logs in successfully... +- This ensures that only... + +### Environment +- Platform: PC +- Node: v18.18.0 +- Browser: Chrome 126.0.6478.56 diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..6d8a9140 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,10 @@ +blank_issues_enabled: false +issue_template: + - name: 👾 Bug Report + description: Report a bug or issue with the project. + labels: ["bug"] + template: bug_report.md + - name: 💡 Feature Request + description: Create a new ticket for a new feature request. + labels: ["enhancement"] + template: feature_request.md diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7d..fb53c7f4 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,20 +1,27 @@ --- -name: Feature request -about: Suggest an idea for this project +name: 💡 Feature Request +about: Create a new ticket for a new feature request title: '' -labels: '' +labels: 'enhancement' assignees: '' --- -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] +### Expected Behavior +Describe the expected behavior here. -**Describe the solution you'd like** -A clear and concise description of what you want to happen. +### Specifications +As a `user`, I would like to `action` so that `reason`. -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. +**Features:** +- describe feature details here. -**Additional context** -Add any other context or screenshots about the feature request here. +**Development Tasks:** +- [ ] Task 1 +- [ ] Task 2 + +### Dependencies +List any dependencies that are required for this feature by providing links to the issues or repositories. + +### References +List any references that are related to this feature request. diff --git a/LICENSE b/LICENSE index 19fb5ca9..ddffa213 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 AElfProject +Copyright (c) 2024 AElfProject Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 1838db377dfe4f6539765448bb3e5a7ea91da9ad Mon Sep 17 00:00:00 2001 From: hzz780 Date: Fri, 21 Jun 2024 11:50:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=F0=9F=90=9B=20xml,=20sync=20way?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/util/httpProvider.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/httpProvider.js b/src/util/httpProvider.js index e4d58133..fbb5f496 100644 --- a/src/util/httpProvider.js +++ b/src/util/httpProvider.js @@ -27,7 +27,7 @@ if (process.env.RUNTIME_ENV === 'browser') { } else { // For node use xmlhttprequest // eslint-disable-next-line global-require - RequestLibrary = require('xmlhttprequest').XMLHttpRequest; + RequestLibraryXMLOnly = require('xmlhttprequest').XMLHttpRequest; // eslint-disable-next-line global-require RequestLibrary = require('node-fetch'); isFetch = true; @@ -210,7 +210,7 @@ export default class HttpProvider { } sendAsyncByXMLHttp(requestConfig) { - const request = new RequestLibrary(); + const request = RequestLibraryXMLOnly ? new RequestLibraryXMLOnly() : new RequestLibrary(); request.withCredentials = false; request.timeout = this.timeout; this.requestSend(requestConfig, request, true);