Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://schemas.elgato.com/streamdeck/plugins/manifest.json",
"UUID": "io.github.darrellvs.goodbit",
"Name": "GoodBit",
"Version": "0.4.0.0",
"Version": "0.4.1.0",
"Author": "GoodBit",
"Description": "Save the replay, then tag, publish or discard the clip you just saved, and see today's count, without leaving the game. Needs GoodBit running with the Stream Deck connection switched on in Settings, Connections.",
"URL": "https://darrellvs.github.io/goodbit/",
Expand Down
14 changes: 9 additions & 5 deletions streamdeck-plugin/src/actions/discard-latest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,12 @@ export class DiscardLatest extends SingletonAction {
/**
* The key's face as an SVG data URL, or '' for the plain icon from the manifest.
*
* 144 square. The thumbnail fills it, darkened so the mark reads over any
* frame, and the mark sits in the middle: trash in the danger colour, or a
* lock in the light one for a clip that would be kept.
* 144 square. The thumbnail fills it at nearly full brightness, because the
* picture is the point of the key: darkening the whole frame so the mark read
* made the clip itself unreadable on the LCD. The mark sits on a small dark
* disc of its own instead, trash in the danger colour, or a lock in the light
* one for a clip that would be kept, which is dimmed a little more so it reads
* as not on offer.
*/
function face(preview: Preview): string {
if (!preview.thumbnail) return '';
Expand All @@ -129,8 +132,9 @@ function face(preview: Preview): string {
const svg = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="144" height="144" viewBox="0 0 144 144">
<rect width="144" height="144" fill="#121110"/>
<image x="0" y="0" width="144" height="144" preserveAspectRatio="xMidYMid slice" xlink:href="${preview.thumbnail}"/>
<rect width="144" height="144" fill="#121110" opacity="${kept ? 0.62 : 0.45}"/>
<g transform="translate(44 36) scale(0.21875)" fill="${colour}">${glyph}</g>
<rect width="144" height="144" fill="#121110" opacity="${kept ? 0.3 : 0.08}"/>
<circle cx="72" cy="72" r="30" fill="#121110" opacity="0.72"/>
<g transform="translate(50 50) scale(0.171875)" fill="${colour}">${glyph}</g>
</svg>`;
return `data:image/svg+xml;base64,${Buffer.from(svg).toString('base64')}`;
}
Loading