44 lines
1.7 KiB
Plaintext
44 lines
1.7 KiB
Plaintext
<div class="modal fade show d-block" tabindex="-1" style="background: rgba(0,0,0,0.5);">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content border-0 shadow-lg">
|
|
<div class="modal-header bg-gradient text-white">
|
|
<h5 class="modal-title">📄 PDF Preview</h5>
|
|
<button type="button" class="btn-close btn-close-white" @onclick="OnCancel"></button>
|
|
</div>
|
|
<div class="modal-body bg-light p-4 text-center">
|
|
<div class="pdf-icon mb-3">
|
|
<span style="font-size: 4rem;">📄</span>
|
|
</div>
|
|
<h5>Your Study Notes are ready!</h5>
|
|
<p class="text-muted">@System.IO.Path.GetFileName(PdfPath)</p>
|
|
|
|
<div class="alert alert-info text-start mt-3">
|
|
<strong>Saved to:</strong> <br/>
|
|
<small>@PdfPath</small>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" @onclick="OnCancel">Close</button>
|
|
<button type="button" class="btn btn-primary" @onclick="OpenPdf">📂 Open PDF</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@code {
|
|
[Parameter] public string PdfPath { get; set; } = string.Empty;
|
|
[Parameter] public EventCallback OnCancel { get; set; }
|
|
|
|
private void OpenPdf()
|
|
{
|
|
// Platform specific open
|
|
try
|
|
{
|
|
var p = new System.Diagnostics.Process();
|
|
p.StartInfo = new System.Diagnostics.ProcessStartInfo(PdfPath) { UseShellExecute = true };
|
|
p.Start();
|
|
}
|
|
catch {}
|
|
}
|
|
}
|