|
1 | 1 | {{#if this.isEnabled}} |
2 | | - {{! Watch for post.updatedAt changes to trigger recalculation after saves }} |
3 | | - <span {{did-update this.checkEmailSize @post.updatedAtUTC}} class="gh-editor-email-size-warning-container"> |
4 | | - <span class="gh-editor-email-size-warning gh-editor-email-size-warning--{{this.warningLevel}}" data-warning-active={{if this.warningLevel "true" "false"}}> |
| 2 | + {{#if (has-block)}} |
| 3 | + <div {{did-update this.checkEmailSize @post.updatedAtUTC}}> |
| 4 | + {{yield this.warningLevel this.emailSizeKb}} |
| 5 | + </div> |
| 6 | + {{else}} |
| 7 | + <span {{did-update this.checkEmailSize @post.updatedAtUTC}} class="gh-editor-email-size-warning-container"> |
| 8 | + <span class="gh-editor-email-size-warning gh-editor-email-size-warning--{{this.warningLevel}}" data-warning-active={{if this.warningLevel "true" "false"}}> |
| 9 | + {{#if this.warningLevel}} |
| 10 | + <span class="{{concat "gh-editor-email-warning-icon-" this.warningLevel}}"> |
| 11 | + {{svg-jar "email-warning"}} |
| 12 | + </span> |
| 13 | + {{/if}} |
| 14 | + </span> |
5 | 15 | {{#if this.warningLevel}} |
6 | | - <span class="{{concat "gh-editor-email-warning-icon-" this.warningLevel}}"> |
7 | | - {{svg-jar "email-warning"}} |
8 | | - </span> |
| 16 | + <div class="gh-editor-email-size-popup"> |
| 17 | + <div class="gh-editor-email-size-popup-title">Looks like this is a long post</div> |
| 18 | + <div class="gh-editor-email-size-popup-text">Email newsletters may get cut off in the inbox behind a "View entire message" link when they're over 100kB.</div> |
| 19 | + <div class="gh-editor-email-size-popup-used">You've used: <span class={{this.warningLevel}}>{{this.emailSizeKb}}kB</span></div> |
| 20 | + </div> |
9 | 21 | {{/if}} |
10 | 22 | </span> |
11 | | - {{#if this.warningLevel}} |
12 | | - <div class="gh-editor-email-size-popup"> |
13 | | - <div class="gh-editor-email-size-popup-title">Looks like this is a long post</div> |
14 | | - <div class="gh-editor-email-size-popup-text">Email newsletters may get cut off in the inbox behind a "View entire message" link when they're over 100kB.</div> |
15 | | - <div class="gh-editor-email-size-popup-used">You've used: <span class={{this.warningLevel}}>{{this.emailSizeKb}}kB</span></div> |
16 | | - </div> |
17 | | - {{/if}} |
18 | | - </span> |
| 23 | + {{/if}} |
19 | 24 | {{/if}} |
0 commit comments