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

feat(81Dojo): add activity #9277

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

feat(81Dojo): add activity #9277

wants to merge 22 commits into from

Conversation

IcefoxKishi
Copy link

Description

Acknowledgements

Screenshots

Proof showing the creation/modification is working as expected ![image](https://github.com/user-attachments/assets/3ad37d38-1a58-4cdb-a8f8-5fbab2ae98e8) ![image](https://github.com/user-attachments/assets/22ba9ce0-0439-4f4e-9971-0089a9f9592e) ![image](https://github.com/user-attachments/assets/afec00b5-baf3-41e1-badc-a20ec9970fa8)

Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

ESLint found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@Kuriel23
Copy link
Contributor

Use npm run lint:fix and fix the issues on VS Code.

const presence = new Presence({
clientId: "1338891034310213683"
})
const enum Assets { // Other default assets can be found at index.d.ts
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const enum Assets { // Other default assets can be found at index.d.ts
enum Assets {

websites/0-9/81Dojo/presence.ts Outdated Show resolved Hide resolved
websites/0-9/81Dojo/presence.ts Outdated Show resolved Hide resolved
websites/0-9/81Dojo/metadata.json Outdated Show resolved Hide resolved
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
@IcefoxKishi
Copy link
Author

Anyone mind telling me what Anthony's curly bracket conventions are (and what's up with the trailing comma requirements)? I've fixed up what I can understand.

Signed-off-by: Higitsune Fujiharu <[email protected]>
Comment on lines +4 to +6
const enum Assets {
Logo = 'https://81dojo.com/images/81DojoLogo_Big.png',
}

Check failure

Code scanning / ESLint

Disallow specified syntax Error

Using 'TSEnumDeclaration[const=true]' is not allowed.
switch (document.location.hostname) {
case '81dojo.com':
if (document.location.pathname === '/')
presenceData.details = 'Viewing home page'

Check failure

Code scanning / ESLint

Enforce Anthony's style of curly bracket Error

Expect curly brackets
// todo: statuses for more pages
else if (document.location.pathname.includes('/client/')) {
if (Number.parseFloat(document.getElementById('layerLogin').style.zIndex) === 2)
presenceData.details = 'Logging in to client'

Check failure

Code scanning / ESLint

Enforce Anthony's style of curly bracket Error

Expect curly brackets
presenceData.details = `In ${server} lobby`
}
else {
const playerElements = document.querySelectorAll(

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
Comment on lines +27 to +28
const playerElements = document.querySelectorAll(
"[id='player-info-name']"

Check failure

Code scanning / ESLint

Require or disallow trailing commas Error

Missing trailing comma.
}
}
else if (document.location.pathname.includes('/documents'))
presenceData.details = `Reading the docs: ${document.getElementById('firstHeading').textContent}`

Check failure

Code scanning / ESLint

Enforce Anthony's style of curly bracket Error

Expect curly brackets
Comment on lines +80 to +82
if (document.location.pathname === '/'){
presenceData.details = 'Viewing WebSystem'
}

Check failure

Code scanning / ESLint

Enforce consistent spacing before blocks Error

Missing space before opening brace.
}
else {
presenceData.details = 'WebSystem: Browsing clubs'
}

Check failure

Code scanning / ESLint

Enforce Anthony's style of curly bracket Error

Expect curly brackets
Comment on lines +121 to +123
else if (document.location.pathname.includes('/players/upload_avatar')){
presenceData.details = 'WebSystem: Choosing avatar'
}

Check failure

Code scanning / ESLint

Enforce consistent spacing before blocks Error

Missing space before opening brace.
Comment on lines +124 to +126
else if (document.location.pathname.includes('/players/favorites')){
presenceData.details = 'WebSystem: Viewing favorited players'
}

Check failure

Code scanning / ESLint

Enforce consistent spacing before blocks Error

Missing space before opening brace.
Signed-off-by: Higitsune Fujiharu <[email protected]>
IcefoxKishi and others added 2 commits February 15, 2025 12:26
presenceData.details = 'WebSystem: Viewing rankings'
}
else if (document.location.pathname.includes('/tournaments')) {
if (Number.isInteger(Number.parseInt(document.location.pathname.substr(-1)))) {

Check failure

Code scanning / ESLint

Disallow using code marked as `@deprecated` Error

substr is deprecated. A legacy feature for browser compatibility
}
}
else if (document.location.pathname.includes('/titles')) {
if (Number.isInteger(Number.parseInt(document.location.pathname.substr(-1)))) {

Check failure

Code scanning / ESLint

Disallow using code marked as `@deprecated` Error

substr is deprecated. A legacy feature for browser compatibility
}
}
else if (document.location.pathname.includes('/circles')) {
if (Number.isInteger(Number.parseInt(document.location.pathname.substr(-1)))) {

Check failure

Code scanning / ESLint

Disallow using code marked as `@deprecated` Error

substr is deprecated. A legacy feature for browser compatibility
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

pmd found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Comment on lines +38 to +39
.textContent.slice(3, 7)
)

Check failure

Code scanning / ESLint

Require or disallow trailing commas Error

Missing trailing comma.
presenceData.details = 'WebSystem: Applying for certificate'
}
else if (document.location.pathname.includes('/kifu')) {
presenceData.details = `WebSystem: Viewing kifu: ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[0]} vs. ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[1]}`

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
presenceData.details = 'WebSystem: Applying for certificate'
}
else if (document.location.pathname.includes('/kifu')) {
presenceData.details = `WebSystem: Viewing kifu: ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[0]} vs. ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[1]}`

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
presenceData.details = 'WebSystem: Applying for certificate'
}
else if (document.location.pathname.includes('/kifu')) {
presenceData.details = `WebSystem: Viewing kifu: ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[0]} vs. ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[1]}`

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
presenceData.details = 'WebSystem: Applying for certificate'
}
else if (document.location.pathname.includes('/kifu')) {
presenceData.details = `WebSystem: Viewing kifu: ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[0]} vs. ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[1]}`

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
presenceData.details = `WebSystem: Viewing kifu: ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[0]} vs. ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[1]}`
}
else if (document.location.pathname.includes('/forums')) {
if (document.getElementsByClassName("title") == null) {

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
presenceData.details = 'WebSystem: Viewing World Shogi Forum'
}
else {
presenceData.details = `WebSystem: Viewing forum topic: ${document.getElementsByClassName("title")[0].textContent}`

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
Signed-off-by: Higitsune Fujiharu <[email protected]>
}
}
else if (document.location.pathname.includes('/topics')) {
presenceData.details = `WebSystem: Viewing forum topic: ${document.getElementsByClassName("title")[0].textContent}`

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 8 spaces but found 10.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants