Skip to content

feat(app): instance screenshot management #3637

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

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

Conversation

IMB11
Copy link
Member

@IMB11 IMB11 commented May 10, 2025

Closes: #460

  • Copy to clipboard
  • Delete
  • View in Folder
  • Watch for new screenshots & refresh accordingly.
  • Large viewer when clicking screenshot - like gallery

image

@IMB11 IMB11 changed the title feat: instance screenshot management feat(app): instance screenshot management May 11, 2025
@IMB11 IMB11 force-pushed the instance-screenshots branch from 1015ee4 to 52d9c61 Compare May 11, 2025 13:19
@IMB11 IMB11 marked this pull request as ready for review May 11, 2025 13:23
const next = list[newIdx]

return {
src: `data:image/png;base64,${await getScreenshotData(props.instance.path, next)}`,
Copy link
Member

Choose a reason for hiding this comment

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

Have you considered using FileReader#readAsDataURL to convert PNG blobs to data URIs on the frontend? This approach could simplify both the backend, by allowing it to return the raw PNG data instead of a Base64-encoded version, and the frontend, since it also uses the raw PNG data elsewhere and currently it needs to decode it with atob. It could also be faster, which may matter a little bit when PNGs are several MiB big due to capturing a game window at e.g. 4K resolution.

@@ -17,6 +17,7 @@ export default createConfigForNuxt().append([
rules: {
'vue/html-self-closing': 'off',
'vue/multi-word-component-names': 'off',
'@typescript-eslint/no-explicit-any': 'off',
Copy link
Member

Choose a reason for hiding this comment

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

Disabling this lint rule entirely feels wrong to me, as it undermines the point of using TypeScript in the first place: encouraging developers to engage with its type system and the richer model it provides about data. As a likely consequence, the overall quality of type information may degrade over time.

Are we sure we want to do this? I understand that ESLint and TypeScript can get frustrating with types at times, but silencing the rule everywhere, as opposed to on a case-by-case basis, is rarely the right solution to the underlying issue(s). Usually, other type keywords such as never or unknown better represent the underlying reality, too.

Copy link
Member Author

@IMB11 IMB11 Jun 10, 2025

Choose a reason for hiding this comment

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

This needs to be removed, I temp disabled during development

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to view screenshots in instance menu
2 participants