mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
Merge pull request #1099 from TriliumNext/refactor_simplify-electron-desktop-ejs
refactor(bin/electron-forge): make desktop.ejs easier to read
This commit is contained in:
@@ -1,12 +1,17 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
<% if (productName) { %>Name=<%= productName %>
|
<%=
|
||||||
<% } %><% if (description) { %>Comment=<%= description %>
|
Object.entries({
|
||||||
<% } %><% if (genericName) { %>GenericName=<%= genericName %>
|
"Name": productName,
|
||||||
<% } %><% if (name) { %>Exec=<%= name %> %U
|
"Comment": description,
|
||||||
Icon=<%= name %>
|
"GenericName": genericName,
|
||||||
<% } %>Type=Application
|
"Exec": name ? `${name} %U` : undefined,
|
||||||
StartupNotify=true
|
"Icon": name,
|
||||||
<% if (productName) { %>StartupWMClass=<%= productName %>
|
"Type": "Application",
|
||||||
<% } if (categories && categories.length) { %>Categories=<%= categories.join(';') %>;
|
"StartupNotify": "true",
|
||||||
<% } %><% if (mimeType && mimeType.length) { %>MimeType=<%= mimeType.join(';') %>;
|
"StartupWMClass": productName,
|
||||||
<% } %>
|
"Categories": categories?.length ? `${categories.join(";")};` : undefined,
|
||||||
|
"MimeType": mimeType?.length ? `${mimeType.join(";")};` : undefined
|
||||||
|
})
|
||||||
|
.map(line => line[1] ? line.join("=") : undefined)
|
||||||
|
.filter(line => !!line)
|
||||||
|
.join("\n")%>
|
||||||
Reference in New Issue
Block a user