diff --git a/package-lock.json b/package-lock.json index 46ee5c5..ebc67a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4777,9 +4777,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001583", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001583.tgz", - "integrity": "sha512-acWTYaha8xfhA/Du/z4sNZjHUWjkiuoAi2LM+T/aL+kemKQgPT1xBb/YKjlQ0Qo8gvbHsGNplrEJ+9G3gL7i4Q==", + "version": "1.0.30001666", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001666.tgz", + "integrity": "sha512-gD14ICmoV5ZZM1OdzPWmpx+q4GyefaK06zi8hmfHV5xe4/2nOQX3+Dw5o+fSqOws2xVwL9j+anOPFwHzdEdV4g==", "dev": true, "funding": [ { @@ -4794,7 +4794,8 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/case-sensitive-paths-webpack-plugin": { "version": "2.4.0", diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index 1e85d55..9accf81 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -286,5 +286,11 @@ }, "alertHostPermissionsRequiredButtonAllUrls": { "message": "All URLs to ensure full support" + }, + "pluginListEnabledPlugins": { + "message": "Enabled plugins" + }, + "pluginListDisabledPlugins": { + "message": "Disabled plugins" } } diff --git a/src/popup/App.vue b/src/popup/App.vue index cf490d1..8db7f93 100644 --- a/src/popup/App.vue +++ b/src/popup/App.vue @@ -12,23 +12,14 @@
-
- - -
- - diff --git a/src/popup/components/SectionMainMenu.vue b/src/popup/components/SectionMainMenu.vue deleted file mode 100644 index 7cae6d9..0000000 --- a/src/popup/components/SectionMainMenu.vue +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - diff --git a/src/popup/components/SectionMainMenu/PluginList/NoData.vue b/src/popup/components/SectionMainMenu/PluginList/NoData.vue new file mode 100644 index 0000000..84d6550 --- /dev/null +++ b/src/popup/components/SectionMainMenu/PluginList/NoData.vue @@ -0,0 +1,33 @@ + + + + + + diff --git a/src/popup/components/ElementPlugin.vue b/src/popup/components/SectionMainMenu/PluginList/Plugin.vue similarity index 53% rename from src/popup/components/ElementPlugin.vue rename to src/popup/components/SectionMainMenu/PluginList/Plugin.vue index ba46775..82edea3 100644 --- a/src/popup/components/ElementPlugin.vue +++ b/src/popup/components/SectionMainMenu/PluginList/Plugin.vue @@ -1,58 +1,66 @@ diff --git a/src/popup/components/SectionMainMenu/PluginList/Title.vue b/src/popup/components/SectionMainMenu/PluginList/Title.vue new file mode 100644 index 0000000..2ad9e37 --- /dev/null +++ b/src/popup/components/SectionMainMenu/PluginList/Title.vue @@ -0,0 +1,47 @@ + + + + + + diff --git a/src/popup/components/ProgressBar.vue b/src/popup/components/SectionMainMenu/ProgressBar.vue similarity index 100% rename from src/popup/components/ProgressBar.vue rename to src/popup/components/SectionMainMenu/ProgressBar.vue diff --git a/src/popup/components/SearchBar.vue b/src/popup/components/SectionMainMenu/SearchBar.vue similarity index 97% rename from src/popup/components/SearchBar.vue rename to src/popup/components/SectionMainMenu/SearchBar.vue index d5a1a92..d1229c1 100644 --- a/src/popup/components/SearchBar.vue +++ b/src/popup/components/SectionMainMenu/SearchBar.vue @@ -20,7 +20,7 @@ + + diff --git a/src/popup/components/SectionMainMenu/Tags/Tag.vue b/src/popup/components/SectionMainMenu/Tags/Tag.vue new file mode 100644 index 0000000..f197d19 --- /dev/null +++ b/src/popup/components/SectionMainMenu/Tags/Tag.vue @@ -0,0 +1,65 @@ + + + + + + diff --git a/src/popup/components/SectionMainMenu/Tags/Tags.vue b/src/popup/components/SectionMainMenu/Tags/Tags.vue new file mode 100644 index 0000000..cde4d13 --- /dev/null +++ b/src/popup/components/SectionMainMenu/Tags/Tags.vue @@ -0,0 +1,73 @@ + + + + + + diff --git a/src/popup/components/Title.vue b/src/popup/components/SectionMainMenu/Title.vue similarity index 92% rename from src/popup/components/Title.vue rename to src/popup/components/SectionMainMenu/Title.vue index 583767b..7c3f291 100644 --- a/src/popup/components/Title.vue +++ b/src/popup/components/SectionMainMenu/Title.vue @@ -27,9 +27,9 @@ - - diff --git a/src/popup/components/mixins.js b/src/popup/components/mixins.js index 49a86cd..b1d16d3 100644 --- a/src/popup/components/mixins.js +++ b/src/popup/components/mixins.js @@ -30,7 +30,7 @@ export const mixin = { __: function (key, item) { if (item === undefined || !(key in item)) return ""; const lang = browser.i18n.getUILanguage(); - return key + ":" + lang in item ? item[key + ":" + lang] : item[key]; + return `${key}:${lang}` in item ? item[`${key}:${lang}`] : item[key]; }, objIsEmpty: function (obj) { return typeof obj !== "object" || Object.keys(obj).length === 0; @@ -47,22 +47,14 @@ export const mixin = { return {}; } - const arr = Object.keys(obj).map((key) => obj[key]); + const arr = Object.entries(obj); + arr.sort((a, b) => { + const nameA = this.__("name", a[1]).toLowerCase(); + const nameB = this.__("name", b[1]).toLowerCase(); + return nameA > nameB ? 1 : -1; + }); - for (let i = 0; i < arr.length; i++) { - for (let j = i + 1; j < arr.length; j++) { - if ( - this.__("name", arr[i]).toLowerCase() > - this.__("name", arr[j]).toLowerCase() - ) { - let swap = arr[i]; - arr[i] = arr[j]; - arr[j] = swap; - } - } - } - - return arr; + return Object.fromEntries(arr); }, showMessage: function (msg) { this.$root.$emit("message", msg);