Skip to content

Import a 3D Model and automatically assign and export animations

TypeScript

More cleanup and improvements for post-download popup

Scott Petrovic4ca16a8ded3f
diff --git a/src/dialog.css b/src/dialog.css
index fa9d3b7..1a21c0f 100644
--- a/src/dialog.css
+++ b/src/dialog.css
@@ -208,7 +208,7 @@
.survey-thank-you {
font-style: italic;
- text-align: center;
+ margin-top: 0 !important;
}
.download-success-dialog-overlay {
@@ -274,6 +274,7 @@
margin: 0;
font-size: 1.5rem;
color: var(--text-primary);
+ white-space: pre; /* no word-wrap */
}
.download-success-section p {
@@ -284,10 +285,10 @@
}
.download-success-dialog-close {
- display: flex;
+ display: flex !important;
padding: 1rem;
- font-size: 1.1rem;
justify-content: center;
+ margin: 1rem auto;
}
/* ── Star Rating Component ── */
@@ -311,9 +312,7 @@
}
.star-icon {
-font-size: 2rem;
- color: #fff566;
- -webkit-text-stroke: 1px #978530;
+ font-size: 1.9rem;
}
.star-button:hover {
@@ -321,12 +320,15 @@ font-size: 2rem;
transform: scale(1.2);
}
-.star-button.active,
-.star-button:active {
+.star-button.active {
color: var(--button-primary-bg);
opacity: 1;
}
+.star-button:active {
+ transform: scale(0.92);
+}
+
/* ── Download Success Feedback Textarea ── */
.download-success-feedback-textarea {
@@ -345,7 +347,7 @@ font-size: 2rem;
.download-success-feedback-textarea::placeholder {
color: var(--text-primary);
- opacity: 1;
+ opacity: 0.6;
font-style: italic;
}
diff --git a/src/lib/components/download-success/DownloadSuccessDialog.ts b/src/lib/components/download-success/DownloadSuccessDialog.ts
index efed60e..4e03b7e 100644
--- a/src/lib/components/download-success/DownloadSuccessDialog.ts
+++ b/src/lib/components/download-success/DownloadSuccessDialog.ts
@@ -7,17 +7,17 @@ export class DownloadSuccessDialog {
<div class="download-success-dialog-content">
- <h2>Export Successful</h2>
+ <h2>Enjoy the free animations</h2>
<div class="download-success-dialog-body">
<div class="download-success-section">
<h3>Support the Project</h3>
- <p>If you find Mesh2Motion helpful, consider donating to help us keep improving the tool
+ <p>If you find this application helpful, consider contributing to keep improving the tool
and adding new features.</p>
<a href="https://support.mesh2motion.org/" class="button">Learn More</a>
</div>
<div class="download-success-section">
- <h3>Share Your Feedback</h3>
+ <h3>How was your experience?</h3>
<div class="survey-content">
<div class="star-rating-container"></div>
<textarea id="download-success-feedback" name="download-success-feedback" class="download-success-feedback-textarea" placeholder="Add optionalal feedback. (500 character max)" rows="4" maxlength="500"></textarea>
@@ -27,7 +27,7 @@ export class DownloadSuccessDialog {
<div class="download-success-section">
<h3>Join Our Community</h3>
- <p>Have questions or want to share your creations? Join us on Discord to connect with
+ <p>Have questions or want to see what is going on? Join us on Discord to connect with
other animators and get support.</p>
<a href="https://discord.gg/UChE936q7y" target="_blank" class="button">
Join Discord Server
@@ -35,7 +35,7 @@ export class DownloadSuccessDialog {
</div>
</div>
- <a href="#" class="download-success-dialog-close">Not today, maybe tomorrow</a>
+ <button class="download-success-dialog-close secondary-button">Close</button>
</div>
`
diff --git a/src/lib/components/download-success/StarRating.ts b/src/lib/components/download-success/StarRating.ts
index 243515d..e3ac51e 100644
--- a/src/lib/components/download-success/StarRating.ts
+++ b/src/lib/components/download-success/StarRating.ts
@@ -1,6 +1,7 @@
export class StarRating {
private rating: number = 3
private onRatingChange?: (rating: number) => void
+ private readonly rating_emojis: string[] = ['🤮', '🙁', '😐', '🙂', '😍']
constructor (onRatingChange?: (rating: number) => void) {
this.onRatingChange = onRatingChange
@@ -10,8 +11,8 @@ export class StarRating {
return `
<div class="star-rating">
${[1, 2, 3, 4, 5].map(star => `
- <button class="star-button" data-star="${star}" aria-label="Rate ${star} stars">
- <span class="star-icon">★</span>
+ <button class="star-button" data-star="${star}" aria-label="Rate ${star}: ${this.rating_emojis[star - 1]}">
+ <span class="star-icon" aria-hidden="true">${this.rating_emojis[star - 1]}</span>
</button>
`).join('')}
</div>