This commit is contained in:
Mirco Wittrien 2019-04-16 10:03:38 +02:00
parent 71d20c2bef
commit af73809097
2 changed files with 6 additions and 8 deletions

View File

@ -473,7 +473,6 @@ class PluginRepo {
let instPlugin = window.bdplugins[plugin.getName] ? window.bdplugins[plugin.getName].plugin : null;
if (instPlugin && this.getString(instPlugin.getAuthor()).toUpperCase() == plugin.getAuthor.toUpperCase()) plugin.getState = this.getString(instPlugin.getVersion()) != plugin.getVersion ? 1 : 0;
else plugin.getState = 2;
plugin.getFav = favorites[url] ? 0 : 1;
let data = {
url: plugin.url,
search: (plugin.getName + " " + plugin.getVersion + " " + plugin.getAuthor + " " + plugin.getDescription).toUpperCase(),
@ -481,8 +480,8 @@ class PluginRepo {
version: plugin.getVersion,
author: plugin.getAuthor,
description: plugin.getDescription ? plugin.getDescription : "No Description found.",
fav: plugin.getFav,
new: !this.cachedPlugins.includes(url),
fav: favorites[url] ? 0 : 1,
new: !this.cachedPlugins.includes(url) ? 0 : 1,
state: plugin.getState
};
pluginRepoModal.entries[url] = data;
@ -666,7 +665,7 @@ class PluginRepo {
if (oldbarbutton) oldbarbutton.click();
var bar = BDFDB.createNotificationsBar(`There are ${newentries} new Plugin${newentries == 1 ? "" : "s"} in the Repo. Check:`,{type:"success",btn:"PluginRepo",selector:"pluginrepo-notice pluginrepo-newentries-notice"});
bar.querySelector(BDFDB.dotCN.noticebutton).addEventListener("click", e => {
this.openPluginRepoModal({forcedSort:"new",forcedOrder:"desc"});
this.openPluginRepoModal({forcedSort:"new",forcedOrder:"asc"});
bar.querySelector(BDFDB.dotCN.noticedismiss).click();
});
}

View File

@ -585,7 +585,6 @@ class ThemeRepo {
let instTheme = window.bdthemes[this.loadedThemes[url].name];
if (instTheme && instTheme.author.toUpperCase() == theme.author.toUpperCase()) theme.state = instTheme.version != theme.version ? 1 : 0;
else theme.state = 2;
theme.fav = favorites[url] ? 0 : 1;
let data = {
url: theme.url,
search: (theme.name + " " + theme.version + " " + theme.author + " " + theme.description).toUpperCase(),
@ -593,8 +592,8 @@ class ThemeRepo {
version: theme.version,
author: theme.author,
description: theme.description,
fav: theme.fav,
new: !this.cachedThemes.includes(url),
fav: favorites[url] ? 0 : 1,
new: !this.cachedThemes.includes(url) ? 0 : 1,
state: theme.state,
css: theme.css
};
@ -783,7 +782,7 @@ class ThemeRepo {
if (oldbarbutton) oldbarbutton.click();
var bar = BDFDB.createNotificationsBar(`There are ${newentries} new Theme${newentries == 1 ? "" : "s"} in the Repo. Check:`,{type:"success",btn:"ThemeRepo",selector:"themerepo-notice themerepo-newentries-notice"});
bar.querySelector(BDFDB.dotCN.noticebutton).addEventListener("click", e => {
this.openThemeRepoModal({forcedSort:"new",forcedOrder:"desc"});
this.openThemeRepoModal({forcedSort:"new",forcedOrder:"asc"});
bar.querySelector(BDFDB.dotCN.noticedismiss).click();
});
}