fix index.html

This commit is contained in:
Cikaros 2024-09-10 12:37:25 +08:00
parent eea7c81398
commit 4b4f81f01b
2 changed files with 5 additions and 2 deletions

View File

@ -40,12 +40,14 @@ public class IndexController {
private final JetbrainsHelpProperties jetbrainsHelpProperties; private final JetbrainsHelpProperties jetbrainsHelpProperties;
@GetMapping @GetMapping
public String index(Model model) { public String index(HttpServletRequest request,Model model) {
String basePath = (request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath());
List<ProductsContextHolder.ProductCache> productCacheList = ProductsContextHolder.productCacheList(); List<ProductsContextHolder.ProductCache> productCacheList = ProductsContextHolder.productCacheList();
List<PluginsContextHolder.PluginCache> pluginCacheList = PluginsContextHolder.pluginCacheList(); List<PluginsContextHolder.PluginCache> pluginCacheList = PluginsContextHolder.pluginCacheList();
model.addAttribute("products", productCacheList); model.addAttribute("products", productCacheList);
model.addAttribute("plugins", pluginCacheList); model.addAttribute("plugins", pluginCacheList);
model.addAttribute("defaults", jetbrainsHelpProperties); model.addAttribute("defaults", jetbrainsHelpProperties);
model.addAttribute("basePath", basePath);
return "index"; return "index";
} }

View File

@ -13,7 +13,8 @@
<p> <p>
🇨🇳 下载 <a href="ja-netfilter" title="Download jetbra first">ja-netfilter.zip</a> , 然后配置 🇨🇳 下载 <a href="ja-netfilter" title="Download jetbra first">ja-netfilter.zip</a> , 然后配置
你的JetBrains IDE(anything)'s <a onclick="showVmoptins()">IDE.vmoptions</a> 配置文件!<br> 你的JetBrains IDE(anything)'s <a onclick="showVmoptins()">IDE.vmoptions</a> 配置文件!<br>
🇨🇳 当然你也可以 <a onclick="showLicenseForm()">重新定制激活授权</a> 用以自定义你的激活信息!</br> 🇨🇳 当然你也可以 <a onclick="showLicenseForm()">重新定制激活授权</a> 用以自定义你的激活信息!<br>
🇨🇳 也可使用Scoop进行安装<code th:text="'scoop install ' + ${basePath}+'/scoop/ja-netfilter'"></code><br>
<strong>🇨🇳 请注意,此页面仅由 <span <strong>🇨🇳 请注意,此页面仅由 <span
th:text="${defaults.getDefaultLicenseName()} + '/' + ${defaults.getDefaultAssigneeName()}"></span> th:text="${defaults.getDefaultLicenseName()} + '/' + ${defaults.getDefaultAssigneeName()}"></span>
个人所有!</strong> 个人所有!</strong>