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: telegram mini-app #282

Merged
merged 3 commits into from
Sep 3, 2024
Merged

feat: telegram mini-app #282

merged 3 commits into from
Sep 3, 2024

Conversation

TaToTanWeb
Copy link

Adds a simple Web App for users to access different UNICT Devs projects. A working example can be found here: https://t.me/DMIBotTestBot
Steps for building:

cd webapp
npm install
npx parcel build index.html

Note: the parts of the code related to the Google Drive API in module/commands/gdrive.py have been separated from the ones related to the telegram API and moved to module/utils/drive_utils.py in order to make them accessible from the mini-app.

@Helias
Copy link
Member

Helias commented Aug 31, 2024

awesome 🚀

Showing the OPIS Manager there is not a bad idea, in this way someone will use it xD

About showing Ask DMI and Spotted DMI, thinking about it we should show them in the main buttons of the DMI Bot too

webapp/app.py Outdated Show resolved Hide resolved

setContent(content: T[]) {
// Displays the given list of objects
for (var i=0; i < content.length; i++)
Copy link
Member

Choose a reason for hiding this comment

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

never use var, use always const or let

Suggested change
for (var i=0; i < content.length; i++)
for (let i=0; i < content.length; i++)

Copy link
Author

Choose a reason for hiding this comment

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

i am quite sure i need var in this case because the variable i is also used later (outside the for loop), and using "let" would cause it to be out of scope

Copy link
Member

Choose a reason for hiding this comment

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

then, create the variable using let before the for cycle

let i;
for (i = 0; i < content.length; i++)

<b class = "mt-2">OPIS Manager</b>
</div>
</div>
<a href="drive/index.html"></a>
Copy link
Member

Choose a reason for hiding this comment

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

I would ask community members to see if we could add more things here or make changes

webapp/package.json Outdated Show resolved Hide resolved
webapp/package.json Outdated Show resolved Hide resolved
webapp/yarn.lock Outdated Show resolved Hide resolved
@TaToTanWeb
Copy link
Author

Thank you very much for the review! I applied your suggestions and tried to fix pylint errors – some of these were not related to code I have changed, I tried to fix them but I didn't know the context, I hope I didn't break anything

@Helias Helias merged commit 4105e39 into UNICT-DMI:master Sep 3, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants