Add outdated warning

This commit is contained in:
toasted-nutbread 2019-11-03 12:54:18 -05:00
parent cad0648cbe
commit b059609670
2 changed files with 5 additions and 1 deletions

View File

@ -171,6 +171,10 @@ class SettingsDictionaryEntryUI {
this.priorityInput = this.content.querySelector('.dict-priority'); this.priorityInput = this.content.querySelector('.dict-priority');
this.deleteButton = this.content.querySelector('.dict-delete-button'); this.deleteButton = this.content.querySelector('.dict-delete-button');
if (this.dictionaryInfo.version < 3) {
this.content.querySelector('.dict-outdated').hidden = false;
}
this.content.querySelector('.dict-title').textContent = this.dictionaryInfo.title; this.content.querySelector('.dict-title').textContent = this.dictionaryInfo.title;
this.content.querySelector('.dict-revision').textContent = `rev.${this.dictionaryInfo.revision}`; this.content.querySelector('.dict-revision').textContent = `rev.${this.dictionaryInfo.revision}`;

View File

@ -492,7 +492,7 @@
<template id="dict-template"><div class="dict-group well well-sm"> <template id="dict-template"><div class="dict-group well well-sm">
<h4><span class="text-muted glyphicon glyphicon-book"></span> <span class="dict-title"></span> <small class="dict-revision"></small></h4> <h4><span class="text-muted glyphicon glyphicon-book"></span> <span class="dict-title"></span> <small class="dict-revision"></small></h4>
<p class="text-warning" hidden>This dictionary is outdated and may not support new extension features; please import the latest version.</p> <p class="text-warning dict-outdated" hidden>This dictionary is outdated and may not support new extension features; please import the latest version.</p>
<div class="checkbox"> <div class="checkbox">
<label><input type="checkbox" class="dict-enabled"> Enable search</label> <label><input type="checkbox" class="dict-enabled"> Enable search</label>