Skip to content

Commit fb14b83

Browse files
author
Ajit Kumar
committed
feat(support app login)
1 parent 13c96dd commit fb14b83

File tree

6 files changed

+179
-94
lines changed

6 files changed

+179
-94
lines changed

CODE_OF_CONDUCT.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at Acode.CODE_OF_CONDUCT.md
63+
All complaints will be reviewed and investigated promptly and fairly.
64+
65+
All community leaders are obligated to respect the privacy and security of the
66+
reporter of any incident.
67+
68+
## Enforcement Guidelines
69+
70+
Community leaders will follow these Community Impact Guidelines in determining
71+
the consequences for any action they deem in violation of this Code of Conduct:
72+
73+
### 1. Corrections Issues
74+
75+
**Community Impact**: Must Not Use of inappropriate coding language or other hacker behavior deemed
76+
Any professional or manipulative findings like ease dropping hackers, malware bots, or faulty A.I. that breaks code for attacks against citizens cut-off for those programs and users are rendered fictitious businesses spammers using meta-trans-users causing confusion and corruption problems recirculating systems. Without help fixing these misconducts are responsible with talk back in any encryptions Acode intelligence blocking them from entry to another account. Issues and comments are welcome in the community.
77+
78+
**Consequence**: A private, written warning from community leaders, providing
79+
clarity around the nature of the violation and an explanation of why the
80+
behavior was inappropriate. A public apology may be requested.
81+
82+
### 2. Warning
83+
84+
**Community Impact**: A violation through a single incident or series
85+
of actions.
86+
87+
**Consequence**: A warning with consequences for continued behavior. No
88+
interaction with the people involved, including unsolicited interaction with
89+
those enforcing the Code of Conduct, for a specified period of time. This
90+
includes avoiding interactions in community spaces as well as external channels
91+
like social media. Violating these terms may lead to a temporary or
92+
permanent ban.
93+
94+
### 3. Temporary Guidance
95+
96+
**Community Impact**: A serious violation of community standards, including
97+
sustained inappropriate behavior.
98+
99+
**Consequence**: A temporary ban from any sort of interaction or public
100+
communication with the community for a specified period of time. No public or
101+
private interaction with the people involved, including unsolicited interaction
102+
with those enforcing the Code of Conduct, is allowed during this period.
103+
Violating these terms may lead to a permanent ban.
104+
105+
### 4. Permanent view
106+
107+
**Community Impact**: Demonstrating a pattern of violation of community
108+
standards, including sustained inappropriate behavior, harassment of an
109+
individual, or aggression toward or disparagement of classes of individuals.
110+
111+
**Consequence**: A permanent free service for bandwidth/LTE technology, for opening arguments within discussions hearing any testing that class forms, and any sort of arbitration claims processed are settled. Giving back to private sectors,to public interaction within
112+
the community, state, country, and never excludes global conglomerates due to consumer reports, feedbacks, sharing viable information that interests any disadvantages against
113+
114+
## Attribution
115+
116+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117+
version 2.0, available at
118+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
119+
120+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
121+
enforcement reversal legislation relativity](https://github.com/mozilla/diversity).
122+
123+
[homepage]: https://www.contributor-covenant.org
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
https://www.contributor-covenant.org/faq. Translations are available at
127+
https://www.contributor-covenant.org/translations.

client/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ window.onload = async () => {
5353
Router.add('/login', (_params, query) => loadModule('loginUser', query));
5454
Router.add('/plugins', (_params, query) => loadModule('plugins', query));
5555
Router.add('/logout', logout);
56-
Router.add('/register', () => loadModule('registerUser'));
56+
Router.add('/register', (_params, query) => loadModule('registerUser', query));
5757
Router.add('/change-password', (_params, query) => loadModule('changePassword', query));
5858
Router.add('/edit-user', () => loadModule('registerUser', { mode: 'edit' }));
5959
Router.add('/publish', (_params, query) => loadModule('publishPlugin', query));

client/pages/changePassword/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default async function changePassword({ mode, redirect }) {
6868
errorText.value = '';
6969
successText.value = 'Password changed successfully.';
7070
setTimeout(() => {
71-
Router.loadUrl(`/login${redirect ? `?redirect=${redirect}` : ''}`);
71+
Router.loadUrl(`/login?redirect=${redirect}`);
7272
}, 3000);
7373
}
7474

client/pages/loginUser/index.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ export default function LoginUser({ redirect }) {
3030
Login
3131
</button>
3232
<div style={{ margin: 'auto' }}>
33-
<a className='link' href='/register'>
33+
<a className='link' href={`/register?redirect=${redirect}`}>
3434
New account.
3535
</a>{' '}
3636
|{' '}
37-
<a className='link' href='/change-password?mode=reset'>
37+
<a className='link' href={`/change-password?redirect=${redirect}&mode=reset`}>
3838
Forgot password?
3939
</a>
4040
</div>
@@ -52,15 +52,18 @@ export default function LoginUser({ redirect }) {
5252
return;
5353
}
5454

55-
successText.textContent = 'Login successful. Redirecting...';
55+
successText.value = 'Login successful. Redirecting...';
5656
button.el.disabled = true;
5757
setTimeout(() => {
58+
if (redirect === 'app') {
59+
redirect = `acode://user/login/${data.token}`;
60+
}
5861
window.location.replace(redirect || '/');
5962
}, 1000);
6063
}
6164

6265
function onerror(error) {
6366
button.el.disabled = false;
64-
errorText.textContent = error;
67+
errorText.value = error;
6568
}
6669
}

client/pages/registerUser/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import SendOtp from 'components/sendOtp';
44
import Reactive from 'html-tag-js/reactive';
55
import { getLoggedInUser, loadingEnd, loadingStart } from 'lib/helpers';
66

7-
export default async function registerUser({ mode }) {
7+
export default async function registerUser({ mode, redirect }) {
88
const title = mode === 'edit' ? 'Edit user' : 'Register new user';
99
const buttonText = mode === 'edit' ? 'Update' : 'Register';
1010
const method = mode === 'edit' ? 'put' : 'post';
@@ -83,7 +83,7 @@ export default async function registerUser({ mode }) {
8383
if (mode !== 'edit') {
8484
successText.value = 'User registered successfully. Redirecting...';
8585
setTimeout(() => {
86-
window.location.href = '/login';
86+
window.location.href = `/login?redirect=${redirect}`;
8787
}, 2000);
8888
return;
8989
}

readme.md

Lines changed: 41 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,61 @@
1-
# Quickpage
1+
# Acode - Official Website Repository
22

3-
Quickpage is a GitHub template for creating single-page-application with front-end routing. See demo at official page <https://quickpage.foxdebug.com>.
3+
Welcome to the repository for Acode's official website. This project contains the source code and content for [acode.app](https://acode.app), the home of Acode—a powerful and versatile code editor for Android devices.
44

5-
## Usage
5+
## About Acode
66

7-
Create github repository using this template.
7+
Acode is a lightweight yet robust code editor and web IDE designed specifically for Android. It supports a wide range of programming languages, including but not limited to:
88

9-
## Documentation
9+
- HTML
10+
- JavaScript
11+
- Python
12+
- Java
13+
- CSS
14+
- Dart
1015

11-
### Start server
16+
With Acode, you can:
1217

13-
To start the server run the following bash command
18+
- Edit and create websites, and instantly preview them in a browser.
19+
- Seamlessly modify source files for various languages.
20+
- Utilize GitHub integration for efficient version control.
21+
- Manage files via FTP/SFTP support.
22+
- Enjoy syntax highlighting for over 100 programming languages.
23+
- Customize the interface with multiple themes.
24+
- Use the in-app preview for HTML and Markdown files.
25+
- Debug using the integrated JavaScript console.
26+
- Enhance functionality with a collection of over 195 plugins.
1427

15-
```bash
16-
: yarn start
17-
```
28+
For more details, visit the [Acode website](https://acode.app).
1829

19-
To start the dev-server run the following bash command
30+
## Repository Structure
2031

21-
```bash
22-
: yarn start-dev
23-
```
32+
This repository is organized as follows:
2433

25-
### Build the application
34+
- `/client`: Contains the React components and logic for the website.
35+
- `/server`: Includes the backend code for handling API requests and server-side logic.
36+
- `/public`: Houses static assets, built files and the main HTML files.
37+
- `/dev`: Contains development scripts and tools.
38+
- `/cron-jobs/`: Includes scripts for scheduled tasks and maintenance.
2639

27-
```bash
28-
: yarn build-release
29-
```
40+
## Contributing
3041

31-
The server uses 'NodeJs' and 'ExpressJs' for serving files. You can edit the server src code in `server` directory.
42+
We welcome contributions to improve the Acode website. To contribute:
3243

33-
### Routing
44+
1. Fork this repository.
45+
2. Create a new branch for your feature or bug fix.
46+
3. Make your changes and ensure they are well-tested.
47+
4. Submit a pull request with a clear description of your changes.
3448

35-
Create a router.
49+
Please adhere to our [Code of Conduct](CODE_OF_CONDUCT.md) in all interactions.
3650

37-
```javascript
38-
import Router from 'lib/Router';
51+
## License
3952

40-
const router = new Router();
41-
```
53+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
4254

43-
Add routes.
55+
## Contact
4456

45-
```javascript
46-
router.add('/home', (params, queries) => {
47-
// render home
48-
});
49-
```
57+
For any inquiries or support, please visit our [contact page](https://acode.app/contact) or reach out via [email](mailto:support@acode.app).
5058

51-
Start route.
59+
---
5260

53-
```javascript
54-
router.listen();
55-
```
56-
57-
#### Create saperate routing page
58-
59-
Create a router page
60-
61-
```bash
62-
touch adminRouter.js
63-
```
64-
65-
Initialize router page.
66-
67-
```javascript
68-
// adminRouter.js
69-
import Router from 'lib/RouterExtension';
70-
71-
const router = new Router('/admin');
72-
73-
// routes
74-
75-
export default router;
76-
```
77-
78-
Add middle function to filter routes.
79-
80-
```javascript
81-
router.beforeNavigate((url, next) => {
82-
// url -> current url
83-
// next -> callback function
84-
// call next function to proceed
85-
});
86-
```
87-
88-
Add a route.
89-
90-
```javascript
91-
router.add('home', (params, queries) => {
92-
// render '/base-route/home'
93-
});
94-
```
95-
96-
Add router to main router.
97-
98-
```javascript
99-
import adminRouter from './adminRouter';
100-
import Router from 'lib/Router';
101-
102-
const router = new Router();
103-
104-
router.use(adminRouter);
105-
router.listen();
106-
```
61+
*Empower your coding journey with Acode—code anytime, anywhere.*

0 commit comments

Comments
 (0)