Skip to content

Commit 4819eee

Browse files
committed
fix: Updates for emberfest
1 parent 8d79ad3 commit 4819eee

10 files changed

+81
-71
lines changed

app/components/microphone.gjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ She's pretty practical and mostly focused on the financial here-and-now, but is
197197

198198
{{#if this.randomPullQuote}}
199199
<div>
200-
<blockquote class="text-center text-xl font-semibold leading-8 text-gray-900 sm:text-2xl sm:leading-9 max-w-prose mx-auto my-8">
200+
<blockquote class="text-center text-xl font-semibold leading-8 sm:text-2xl sm:leading-9 max-w-prose mx-auto my-8">
201201
{{this.randomPullQuote.quote}}
202202
</blockquote>
203203
</div>
@@ -209,7 +209,7 @@ She's pretty practical and mostly focused on the financial here-and-now, but is
209209
{{#if this.recording.lastSummary}}
210210
<Markdown @markdown={{this.recording.lastSummary.summary}} />
211211
{{else}}
212-
<div class="text-lg text-gray-500">
212+
<div class="text-lg">
213213
Waiting to write summary.
214214
</div>
215215
{{/if}}

app/components/session.gjs

+64-55
Large diffs are not rendered by default.

app/models/illustrator-illustration.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function b64toBlob(b64Data, contentType = '', sliceSize = 512) {
2525
return blob;
2626
}
2727

28-
function getLightestRow(imageData, padding) {
28+
function getDarkestRow(imageData, padding) {
2929
return new Promise((resolve, reject) => {
3030
let img = new Image();
3131
img.onload = function () {
@@ -37,8 +37,8 @@ function getLightestRow(imageData, padding) {
3737

3838
ctx.drawImage(this, 0, 0, this.width, this.height);
3939

40-
let maxBrightness = 0;
41-
let maxBrightnessRowIndex = padding;
40+
let minBrightness = 0;
41+
let minBrightnessRowIndex = padding;
4242

4343
for (let y = padding; y < this.height - padding; y += 5) {
4444
let rowBrightness = 0;
@@ -57,14 +57,14 @@ function getLightestRow(imageData, padding) {
5757

5858
let averageRowBrightness = rowBrightness / count; // divide by the number of pixels checked
5959

60-
if (averageRowBrightness > maxBrightness) {
61-
maxBrightness = averageRowBrightness;
62-
maxBrightnessRowIndex = y;
60+
if (averageRowBrightness < minBrightness) {
61+
minBrightness = averageRowBrightness;
62+
minBrightnessRowIndex = y;
6363
}
6464
}
6565

6666
// Convert row index to percentage
67-
let percentage = (maxBrightnessRowIndex / this.height) * 100;
67+
let percentage = (minBrightnessRowIndex / this.height) * 100;
6868

6969
resolve(percentage);
7070
};
@@ -97,16 +97,16 @@ export default class IllustratorIllustrationModel extends Model {
9797
base64;
9898

9999
@attr('number')
100-
lightestRowPct;
100+
darkestRowPct;
101101

102102
@task
103-
*setLightestRowPctTask() {
103+
*setDarkestRowPctTask() {
104104
const { url } = this;
105105
if (!url) return;
106106

107-
const lightestRowPct = yield getLightestRow(url, 50);
107+
const darkestRowPct = yield getDarkestRow(url, 50);
108108

109-
this.lightestRowPct = lightestRowPct;
109+
this.darkestRowPct = darkestRowPct;
110110
}
111111

112112
get base64Data() {
@@ -159,7 +159,7 @@ export default class IllustratorIllustrationModel extends Model {
159159
const json = yield response.json();
160160
this.cost += COST_PER_IMAGE;
161161
this.base64 = json['data'][0]['b64_json'];
162-
this.setLightestRowPctTask.perform();
162+
this.setDarkestRowPctTask.perform();
163163
}
164164
}
165165
}

app/models/recording-summary.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default class RecordingSummaryModel extends Model {
4747
${this.audience}
4848
"""
4949
50-
The summary should include a title formatted as an h3 and formatting and should be written in Markdown.
50+
The summary should be written in Markdown.
5151
`,
5252
};
5353
messages.push(systemMessage);

app/models/recording.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ export default class RecordingModel extends Model {
323323

324324
const illustrator = this.store.createRecord('illustrator', {
325325
recording: this,
326-
style: 'Black and white polaroid picture',
326+
style:
327+
'Abstract oil painting inspired by the visual style of Hieronymus Bosch.',
327328
transcript,
328329
});
329330

1.42 MB
Loading

public/images/daft-tomster.png

217 KB
Loading
Loading

public/images/hieronymus-tomster.png

1.14 MB
Loading

public/images/leonardo-da-vinci.png

1.52 MB
Loading

0 commit comments

Comments
 (0)