-
Notifications
You must be signed in to change notification settings - Fork 287
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
base: main
Are you sure you want to change the base?
Conversation
1015ee4
to
52d9c61
Compare
const next = list[newIdx] | ||
|
||
return { | ||
src: `data:image/png;base64,${await getScreenshotData(props.instance.path, next)}`, |
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.
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', |
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.
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.
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.
This needs to be removed, I temp disabled during development
Closes: #460