From 3e895b9451f2bea318d365e3a800e16ca0c2c04f Mon Sep 17 00:00:00 2001 From: Christian Holm Christensen Date: Fri, 12 Jun 2026 22:28:44 +0200 Subject: [PATCH] * This patch adds interface the the project pages to help find forum posts (in the module-discussion and module-support forums) related to the project. * It also adds interface to post a new topic to those sub-forums. The message is auto-filled with the sub-forum, title of the project, in square brackets [], and a link to the project page. * Adds a button to send a direct message to all project owners. As with posts, the message draft has some information already filled in. To achieve this, some concrete chances that are made * Add some icons to the Header.svelte template. These are icons for direct messages, new posts, and search of forums. * The ProjectSection.svelte template is updated to show the above interfaces in the project information section of the project page (where the owners are also listed). See also screenshot below. --- game-library-frontend/app/project.html | 42 +++++ .../app/src/ProjectSection.svelte | 152 +++++++++++++++++- 2 files changed, 193 insertions(+), 1 deletion(-) diff --git a/game-library-frontend/app/project.html b/game-library-frontend/app/project.html index 5d903a7a..83b6baf1 100644 --- a/game-library-frontend/app/project.html +++ b/game-library-frontend/app/project.html @@ -171,6 +171,48 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/game-library-frontend/app/src/ProjectSection.svelte b/game-library-frontend/app/src/ProjectSection.svelte index c9f34934..3aa40c9e 100644 --- a/game-library-frontend/app/src/ProjectSection.svelte +++ b/game-library-frontend/app/src/ProjectSection.svelte @@ -77,8 +77,90 @@ editing = false; } - + // + // Feedback and forum search + // + const forumURL = "https://forum.vassalengine.org/"; + const projectsURL = "https://vassalengine.org/library/projects/" + + function gameEncoded() { + return encodeURIComponent( "[" + proj.game.title + "]" ); + } + + function projectURL() { + return projectsURL+proj.name; + } + + function projectQueryComponent(forum) { + return encodeURIComponent(proj.name+" "+proj.game.title+" #"+forum); + } + function projectQuery(forum) { + const url = forumURL + "search?q=" + projectQueryComponent(forum); + window.open(url, '_blank').focus(); + } + + function searchDiscussion(event) { + projectQuery("module-discussion"); + } + + function searchSupport(event) { + projectQuery("module-support"); + } + + function projectLink() { + return encodeURIComponent("Regarding the project [" + proj.game.title + "](" + projectURL() + ")."); + } + + function forumPost(forum) { + const url = forumURL + "new-topic?title=" + gameEncoded() + "&body=" + projectLink() + "&category=" + forum; + window.open(url, '_blank').focus(); + } + + function postDiscussion(event) { + forumPost("module-discussion"); + } + + function postSupport(event) { + forumPost("module-support"); + } + + + function messageOwners(event) { + const owners = proj.owners.join(","); + const url = forumURL+"new-message?username="+owners+"&title="+gameEncoded()+"&body="+projectLink(); + window.open(url, '_blank').focus(); + } + /* + Search: https://forum.vassalengine.org/search?q=anzio%2Bbeachhead%20anzio_beachhead_cholmcc%20%23module-discussion + Post: https://forum.vassalengine.org/new-topic?title=https://vassalengine.org/library/projects/anzio_beachhead_cholmcc&category=module-discussion + */ + + {#if error} {/if} @@ -111,6 +193,74 @@
  • {/each} + + +
    +
    + + + +
    +
    +
    + + Module Discussion: + + + Module Support: + +
    +
    + + +
    +
    + + +
    +