Skip to content

Commit cb5b34f

Browse files
authored
Merge pull request #21 from Cattn/next
Maple Web Redesign
2 parents 975a19d + 3bc710c commit cb5b34f

File tree

208 files changed

+13947
-19113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+13947
-19113
lines changed

.eslintignore

Lines changed: 0 additions & 13 deletions
This file was deleted.

.eslintrc.cjs

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
11
/** @type { import("eslint").Linter.Config } */
22
module.exports = {
33
root: true,
4-
extends: ['eslint:recommended', 'plugin:svelte/recommended', 'prettier'],
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:svelte/recommended',
8+
'prettier'
9+
],
10+
plugins: ['@typescript-eslint'],
511
parserOptions: {
612
sourceType: 'module',
7-
ecmaVersion: 2020,
13+
ecmaVersion: 'latest',
814
extraFileExtensions: ['.svelte']
915
},
16+
overrides: [
17+
{
18+
files: ['*.svelte'],
19+
parser: 'svelte-eslint-parser',
20+
parserOptions: {
21+
parser: '@typescript-eslint/parser',
22+
extraFileExtensions: ['.svelte']
23+
}
24+
},
25+
{
26+
files: ['*.ts'],
27+
parser: '@typescript-eslint/parser'
28+
}
29+
],
1030
env: {
1131
browser: true,
1232
es2017: true,

.github/workflows/lint-format.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Lint and Format
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
lint_format:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
token: ${{ secrets.GH_TOKEN }}
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 20
18+
cache: npm
19+
- run: npm ci
20+
- run: npm run format
21+
- name: Commit and push formatting changes
22+
run: |
23+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
24+
git config --local user.name "github-actions[bot]"
25+
git add -A
26+
git diff --staged --quiet || git commit -m "style: auto-format code"
27+
git push
28+
- run: npm run lint
29+
continue-on-error: true

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
pnpm-lock.yaml
33
package-lock.json
44
yarn.lock
5-
src\lib\components\BottomBar.svelte
5+
api
6+
src/sitemap.ts

README.md

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
> Need Help? Join our [Development Server](https://discord.gg/Wxrp73HVj4)
1414
15+
https://github.com/user-attachments/assets/83778c71-c67c-4830-9b1e-c57177d8fa05
16+
1517
<p align="center">
1618
Maple is a music library and organization tool. It allows you to upload your music library and watch it be organized into albums, artists, playlists, and more! You are given robust controls to play and organize your music. In the future, it will include optional social and stat-tracking features.
1719
</p>
@@ -52,19 +54,22 @@ If you have any other questions, feel free to DM `cattn.` on discord, or email m
5254

5355
> API Link: https://api.maple.music/
5456
55-
### ``GET`` - ``/public/get/user/:username``
57+
### `GET` - `/public/get/user/:username`
58+
5659
Returns a user based on the given username.
5760

5861
Request Example:
62+
5963
```js
6064
const response = await fetch(`${this.SERVER}/public/get/user/${username}`, {
61-
credentials: 'include',
62-
method: 'GET'
65+
credentials: 'include',
66+
method: 'GET'
6367
});
6468
const data = await response.json();
6569
```
6670

6771
Response:
72+
6873
```
6974
{
7075
id: id,
@@ -73,18 +78,21 @@ Response:
7378
}
7479
```
7580

76-
### ``GET`` - ``/public/get/user/id/:id``
81+
### `GET` - `/public/get/user/id/:id`
82+
7783
Returns a user based on the given id.
7884

7985
Request Example:
86+
8087
```js
8188
const response = await fetch(`${this.SERVER}/public/get/user/id/${id}`, {
82-
method: 'GET'
89+
method: 'GET'
8390
});
8491
const data = await response.json();
8592
```
8693

8794
Response:
95+
8896
```
8997
{
9098
id: id,
@@ -98,52 +106,65 @@ Response:
98106
}
99107
```
100108

101-
### ``GET`` - ``/public/get/pfp/:id``
109+
### `GET` - `/public/get/pfp/:id`
110+
102111
Returns a profile picture based on the given id.
103112

104113
Request Example:
114+
105115
```js
106116
const response = await fetch(`${this.SERVER}/public/get/pfp/${id}`, {
107-
method: 'GET'
117+
method: 'GET'
108118
});
109119
const data = await response;
110120
```
111121

112122
Response:
123+
113124
```
114125
File Object
115126
```
116127

117-
### ``POST`` - ``/user/friends/add/:id``
128+
### `POST` - `/user/friends/add/:id`
129+
118130
Add a given user to your friends list by ID.
119131

120-
REQUIRED: ``Login Token``*
132+
REQUIRED: `Login Token`\*
121133

122134
Request Example:
135+
123136
```js
124137
const response = await fetch(`${this.SERVER}/user/friends/add/${id}`, {
125-
credentials: 'include',
126-
method: 'POST'
138+
credentials: 'include',
139+
method: 'POST'
127140
});
128141
const data = await response.json();
129142
```
130143

131-
Response: ``200``
144+
Response: `200`
145+
132146
```
133147
{ message: 'Request sent successfully' }
134148
```
135149

136-
Response: ``500``
150+
Response: `500`
151+
137152
```
138153
{ error: 'Error adding friend' }
139154
```
140155

141-
### * How do I get login token?
156+
### \* How do I get login token?
157+
142158
> Typically you can only get a login token by logging in on our site, however if you extract this cookie you can use it from another site to login.
159+
143160
## What's the inspiration behind it?
144161

145162
Maple was inspired by various experiences, such as being on a plane without internet. While I had my music with me, I found local tools like Windows Media Player lacking. This project not only aims to solve that issue but also serves as a learning experience for me.
146163

164+
## Wondering how we use your data?
165+
166+
You can view our privacy policy [here](https://maple.music/privacy)!
167+
147168
## Credits
148169

149170
### Lead Developer

api/package-lock.json

Lines changed: 62 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"express": "^4.21.2",
2828
"express-rate-limit": "^7.5.0",
2929
"express-slow-down": "^3.0.1",
30-
"express-validator": "^7.3.1",
30+
"express-validator": "^7.2.1",
3131
"jsonwebtoken": "^9.0.2",
3232
"multer": "^2.0.2",
3333
"mysql": "^2.18.1",

components.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)