From 0142cb3316bb1e52e4e68f08269247f9fba24859 Mon Sep 17 00:00:00 2001 From: stoically Date: Sat, 2 Nov 2019 11:43:02 +0100 Subject: [PATCH] feat: hide container number (#281) --- src/_locales/en/messages.json | 3 +++ src/background/container.js | 5 ++++- src/ui/components/general.vue | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index d9a3b7ee..7e99ddc6 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -116,6 +116,9 @@ "optionsGeneralContainerNumberReuseNumbers": { "message": "Reuse available numbers" }, + "optionsGeneralContainerNumberHide": { + "message": "Hide number" + }, "optionsGeneralContainerRemoval": { "message": "Delete no longer needed Temporary Containers" }, diff --git a/src/background/container.js b/src/background/container.js index 23c8db47..8840f669 100644 --- a/src/background/container.js +++ b/src/background/container.js @@ -204,7 +204,7 @@ class Container { getContainerNameIconColor(url) { - let tempContainerNumber; + let tempContainerNumber = ''; if (this.pref.container.numberMode.startsWith('keep')) { this.storage.local.tempContainerCounter++; tempContainerNumber = this.storage.local.tempContainerCounter; @@ -229,6 +229,9 @@ class Container { .replace('%domain%', ''); } containerName = `${containerName}${tempContainerNumber}`; + if (!containerName) { + containerName = ' '; + } let containerColor = this.pref.container.color; if (this.pref.container.colorRandom) { diff --git a/src/ui/components/general.vue b/src/ui/components/general.vue index 06512e23..843c25f0 100644 --- a/src/ui/components/general.vue +++ b/src/ui/components/general.vue @@ -312,6 +312,9 @@ export default { +