Skip to content

Commit 14bb737

Browse files
Add files via upload
1 parent d51a04f commit 14bb737

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

addon/admin/add_new_tools.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ async function submitExp(event) {
2222
const name = document.getElementById("name").value;
2323
const des = document.getElementById("des").value;
2424
const plat = document.getElementById("plat").value;
25-
const link = document.getElementById("link").value;
25+
const linkd = document.getElementById("linkd").value;
26+
const links = document.getElementById("links").value;
2627
const file = document.getElementById("img").files[0];
2728

2829
if (!file) {
@@ -36,7 +37,8 @@ async function submitExp(event) {
3637
name: name,
3738
description: des,
3839
platform: plat,
39-
link: link,
40+
link_download: linkd,
41+
link_source: links,
4042
image: imageBase64,
4143
date: new Date()
4244
}).then(() => {

addon/admin/admin_add_new_tool.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
<input type="text" id="name" placeholder="name"/>
99
<input type="text" id="des" placeholder="description"/>
1010
<input type="text" id="plat" placeholder="plat"/>
11-
<input type="text" id="link" placeholder="link"/>
11+
<input type="text" id="linkd" placeholder="link_download"/>
12+
<input type="text" id="links" placeholder="link_source"/>
1213

1314
<input type="file" id="img" accept="image/*" />
1415

scripts/tools.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ async function fetchTools() {
7272
<p class="project-desc">${tool.description}</p>
7373
<p class="project-desc"><strong>Platform:</strong> ${tool.platform}</p>
7474
<div class="btn-group">
75-
<button class="download-btn" onclick="window.open('${tool.link_download}', '_blank')">Free Download</button>
75+
<button class="download-btn" onclick="window.open('${tool.link_download}', '_blank')">Download</button>
7676
<button class="code-btn" onclick="window.open('${tool.link_source}', '_blank')">Source Code</button>
7777
</div>
7878
`;

0 commit comments

Comments
 (0)