Skip to content

Commit 96c674d

Browse files
working publishing
1 parent 4fb7731 commit 96c674d

1 file changed

Lines changed: 32 additions & 3 deletions

File tree

src/views/Export/Nostr.vue

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,33 @@
200200
<div class="mb-3">
201201
<i class="bi bi-check-circle-fill text-success" style="font-size: 3rem"></i>
202202
</div>
203-
<h5>Successfully Published!</h5>
204-
<p>Your course has been shared to the Nostr network.</p>
205-
<button class="btn btn-primary" @click="close">Close</button>
203+
<h5>Your course is now published!</h5>
204+
205+
<div class="form-group mb-4">
206+
<label class="form-label">Access your course at:</label>
207+
<div class="input-group">
208+
<input
209+
type="text"
210+
class="form-control"
211+
readonly
212+
:value="publishedCourseUrl"
213+
/>
214+
<button
215+
class="btn btn-outline-secondary"
216+
@click="copyToClipboard(publishedCourseUrl)"
217+
title="Copy to clipboard"
218+
>
219+
<i class="bi bi-clipboard"></i>
220+
</button>
221+
</div>
222+
</div>
223+
224+
<div class="mt-3 d-flex justify-content-between">
225+
<a :href="publishedCourseUrl" target="_blank" class="btn btn-primary">
226+
<i class="bi bi-box-arrow-up-right me-1"></i> Open Course
227+
</a>
228+
<button class="btn btn-outline-secondary" @click="close">Close</button>
229+
</div>
206230
</div>
207231
</div>
208232
</div>
@@ -248,6 +272,7 @@ export default {
248272
tags: ["liascript", "education"],
249273
newTag: "",
250274
publishStatus: null,
275+
publishedCourseUrl: "",
251276
252277
// Nostr key management
253278
publicKey: "",
@@ -439,7 +464,11 @@ export default {
439464
relays: relays,
440465
});
441466
467+
// Set the published course URL
468+
this.publishedCourseUrl = `https://liascript.github.io/course/?nostr:${naddr}`;
469+
442470
console.log("Published as naddr:", "nostr:" + naddr);
471+
console.log("Published course URL:", this.publishedCourseUrl);
443472
444473
// Success!
445474
this.step = "success";

0 commit comments

Comments
 (0)