-
{{ toggleIcon() }}
-
-
-
{{
- __("name", plugin)
- }}
-
{{
- _("badgeOverride")
- }}
-
+
+
+ class="plugin__action material-icons"
+ @click="managePlugin"
+ v-if="plugin.status"
+ >{{ toggleIcon() }}
+
-
-
+ class="plugin__action disabled material-icons"
+ @click="managePlugin"
+ v-if="!plugin.status"
+ >toggle_on
+
+
+
{{
+ __("name", plugin)
+ }}
+
{{
+ _("badgeOverride")
+ }}
+
+
+
+
+
+
+
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 @@
+
+
+
+ {{ tag.name }}
+
+
+
+
+
+
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);
diff --git a/vue.config.js b/vue.config.js
index 9064e9b..d045874 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -56,7 +56,7 @@ const manifest_v3_transformer = (manifest, browser) => {
];
manifest.content_security_policy = {
extension_pages:
- "default-src 'self'; connect-src 'self' http://localhost:8000 https://*; img-src 'self' https://iitc.app",
+ "default-src 'self'; connect-src 'self' http://localhost:8000 https://*; img-src 'self' https://* data:",
};
manifest.content_scripts = [
{