-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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(nadeshiko): add activity #9206
base: main
Are you sure you want to change the base?
Conversation
I don't know why it changed all the other Activities metadata files, is it normal? |
websites/N/nadeshiko/metadata.json
Outdated
}, | ||
"url": "nadeshiko.io", | ||
"version": "1.0.0", | ||
"logo": "https://i.imgur.com/3QzrCo4.png", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logo must be 512x512
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logo must be 512x512
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be a square as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be a square as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That one should be good. Please apply the URL to the code and commit it.
websites/N/nadeshiko/presence.ts
Outdated
browsingTimestamp = Math.floor(Date.now() / 1000); | ||
|
||
const enum Assets { | ||
Logo = "https://i.imgur.com/3QzrCo4.png", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logo = "https://i.imgur.com/3QzrCo4.png", | |
Logo = "https://i.imgur.com/tDAXNRP.png", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't there a way to get the Logo URL from the metadata logo field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose you could import the metadata json, but it's probably fine/better to update the url in the code instead
websites/N/nadeshiko/presence.ts
Outdated
if (oldLang !== languageSetting) { | ||
oldLang = languageSetting; | ||
|
||
strings = await getStrings(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current implementation of getStrings
no longer needs the oldLang
hack to work efficiently. Instead, just embed the presence.getStrings
directly here
const strings = await presence.getStrings(...)
websites/K/kisskh/metadata.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this change. (You might need to update your branch)
There was a problem hiding this 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.
I have to update something for the /leaderboards page btw, I'll try to update it ASAP. |
function homePage() { | ||
presenceData.details = strings.viewHome; | ||
presenceData.state = `${strings.search} for a player or guild...`; | ||
presenceData.smallImageKey = Assets.Search; |
Check failure
Code scanning / PMD
Makes sure the TypeScript files are correct Error
gameSelected && leaderboardSelected | ||
? `${ | ||
strings.viewing | ||
} ${gameSelected?.textContent.trim()} - ${leaderboardSelected?.textContent.trim()} leaderboard` |
Check failure
Code scanning / PMD
Makes sure the TypeScript files are correct Error
gameSelected && leaderboardSelected | ||
? `${ | ||
strings.viewing | ||
} ${gameSelected?.textContent.trim()} - ${leaderboardSelected?.textContent.trim()} leaderboard` |
Check failure
Code scanning / PMD
Makes sure the TypeScript files are correct Error
} ${gameSelected?.textContent.trim()} - ${leaderboardSelected?.textContent.trim()} leaderboard` | ||
: `${strings.search} for a leaderboard...`; | ||
presenceData.smallImageKey = | ||
gameSelected && leaderboardSelected ? Assets.Viewing : Assets.Search; |
Check failure
Code scanning / PMD
Makes sure the TypeScript files are correct Error
} ${gameSelected?.textContent.trim()} - ${leaderboardSelected?.textContent.trim()} leaderboard` | ||
: `${strings.search} for a leaderboard...`; | ||
presenceData.smallImageKey = | ||
gameSelected && leaderboardSelected ? Assets.Viewing : Assets.Search; |
Check failure
Code scanning / PMD
Makes sure the TypeScript files are correct Error
else { | ||
presenceData.details = `${strings.viewProfile} ${playerOrGuild}`; | ||
presenceData.state = `${strings.viewing} guild stats`; | ||
presenceData.smallImageKey = Assets.Viewing; |
Check failure
Code scanning / PMD
Makes sure the TypeScript files are correct Error
return homePage(); | ||
else { | ||
presenceData.details = `${strings.viewProfile} ${playerOrGuild}`; | ||
presenceData.state = `${strings.viewing} ${achievementsGameNames[game]} achievements`; |
Check failure
Code scanning / PMD
Makes sure the TypeScript files are correct Error
else { | ||
presenceData.details = `${strings.viewProfile} ${playerOrGuild}`; | ||
presenceData.state = `${strings.viewing} ${achievementsGameNames[game]} achievements`; | ||
presenceData.smallImageKey = Assets.Viewing; |
Check failure
Code scanning / PMD
Makes sure the TypeScript files are correct Error
else { | ||
presenceData.details = `${strings.viewProfile} ${playerOrGuild}`; | ||
presenceData.state = `${strings.viewing} quests`; | ||
presenceData.smallImageKey = Assets.Viewing; |
Check failure
Code scanning / PMD
Makes sure the TypeScript files are correct Error
return presence.setActivity({ | ||
details: strings.browsing, | ||
startTimestamp: browsingTimestamp, | ||
smallImageKey: Assets.Viewing, |
Check failure
Code scanning / PMD
Makes sure the TypeScript files are correct Error
838facc
to
ee88c98
Compare
Acknowledgements
yarn format
Screenshots
Proof showing the creation/modification is working as expected