Skip to content

Commit 0d1e597

Browse files
authored
Merge pull request #212 from csfloat/feature/auto-fill-notice
Adds Notice that you need to use auto-fill for csfloat market
2 parents 35dbf37 + 7c3acad commit 0d1e597

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

src/lib/components/trade_offer/auto_fill.ts

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,27 @@ export class AutoFill extends FloatElement {
3939
background-color: rgb(179, 0, 0);
4040
}
4141
42+
.notice {
43+
background-color: #6775e1;
44+
padding: 6px;
45+
border-radius: 6px;
46+
display: flex;
47+
gap: 10px;
48+
align-items: center;
49+
margin-top: 10px;
50+
margin-bottom: 10px;
51+
font-size: 15px;
52+
color: white;
53+
}
54+
4255
.float-icon {
4356
float: left;
4457
}
4558
59+
.float-icon > img {
60+
border-radius: 5px;
61+
}
62+
4663
.item-name {
4764
font-size: 18px;
4865
margin-left: 15px;
@@ -228,6 +245,22 @@ export class AutoFill extends FloatElement {
228245
`;
229246
}
230247

248+
showAutoFillInfoDialog(tradesToBuyer: Trade[]): HTMLTemplateResult {
249+
if (tradesToBuyer.length === 0) {
250+
return html``;
251+
}
252+
253+
return html`
254+
<div class="notice">
255+
<img
256+
src="https://avatars.cloudflare.steamstatic.com/6ab5219d0bbcce1300a2c6d7cbc638da52edda48_full.jpg"
257+
style="height: 32px; border-radius: 5px;"
258+
/>
259+
<div>You must use auto-fill in order to send trades on CSFloat Market.</div>
260+
</div>
261+
`;
262+
}
263+
231264
protected render(): HTMLTemplateResult {
232265
if (!this.pendingTradesResponse) return html``;
233266

@@ -240,8 +273,9 @@ export class AutoFill extends FloatElement {
240273
}
241274

242275
return html`
243-
${this.showPermissionWarningDialog(tradesToBuyer)} ${this.renderBulkAutoFillDialog(tradesToBuyer)}
244-
${tradesToBuyer.map((e) => this.renderAutoFillDialog(e))} ${this.showWarningDialog()}
276+
${this.showAutoFillInfoDialog(tradesToBuyer)} ${this.showPermissionWarningDialog(tradesToBuyer)}
277+
${this.renderBulkAutoFillDialog(tradesToBuyer)} ${tradesToBuyer.map((e) => this.renderAutoFillDialog(e))}
278+
${this.showWarningDialog()}
245279
`;
246280
}
247281

0 commit comments

Comments
 (0)