Merge pull request #559 from liyasthomas/tweaks
chore: use typeof as an operator and make use of localizable strings
This commit is contained in:
@@ -58,7 +58,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
addNewCollection() {
|
addNewCollection() {
|
||||||
if (!this.$data.name) {
|
if (!this.$data.name) {
|
||||||
this.$toast.info("Please provide a valid name for the collection");
|
this.$toast.info($t("invalid_collection_name"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$store.commit("postwoman/addNewCollection", {
|
this.$store.commit("postwoman/addNewCollection", {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
saveCollection() {
|
saveCollection() {
|
||||||
if (!this.$data.name) {
|
if (!this.$data.name) {
|
||||||
this.$toast.info("Please provide a valid name for the collection");
|
this.$toast.info($t("invalid_collection_name"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const collectionUpdated = {
|
const collectionUpdated = {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import FirefoxStrategy from "./strategies/FirefoxStrategy";
|
|||||||
import ChromeStrategy, { hasChromeExtensionInstalled } from "./strategies/ChromeStrategy";
|
import ChromeStrategy, { hasChromeExtensionInstalled } from "./strategies/ChromeStrategy";
|
||||||
|
|
||||||
const isExtensionsAllowed = ({ state }) => {
|
const isExtensionsAllowed = ({ state }) => {
|
||||||
return typeof(state.postwoman.settings.EXTENSIONS_ENABLED) === 'undefined'
|
return typeof state.postwoman.settings.EXTENSIONS_ENABLED === 'undefined'
|
||||||
|| state.postwoman.settings.EXTENSIONS_ENABLED;
|
|| state.postwoman.settings.EXTENSIONS_ENABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ export default {
|
|||||||
deleted: "Deleted",
|
deleted: "Deleted",
|
||||||
undo: "Undo",
|
undo: "Undo",
|
||||||
collection_empty: "Collection is empty",
|
collection_empty: "Collection is empty",
|
||||||
|
invalid_collection_name: "Please provide a valid name for the collection",
|
||||||
new_collection: "New Collection",
|
new_collection: "New Collection",
|
||||||
my_new_collection: "My New Collection",
|
my_new_collection: "My New Collection",
|
||||||
edit_collection: "Edit Collection",
|
edit_collection: "Edit Collection",
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ export default {
|
|||||||
"https://postwoman.apollotv.xyz/",
|
"https://postwoman.apollotv.xyz/",
|
||||||
PROXY_KEY: this.$store.state.postwoman.settings.PROXY_KEY || "",
|
PROXY_KEY: this.$store.state.postwoman.settings.PROXY_KEY || "",
|
||||||
EXTENSIONS_ENABLED:
|
EXTENSIONS_ENABLED:
|
||||||
(typeof(this.$store.state.postwoman.settings.EXTENSIONS_ENABLED) !== 'undefined') ?
|
(typeof this.$store.state.postwoman.settings.EXTENSIONS_ENABLED !== 'undefined') ?
|
||||||
this.$store.state.postwoman.settings.EXTENSIONS_ENABLED
|
this.$store.state.postwoman.settings.EXTENSIONS_ENABLED
|
||||||
: true
|
: true
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user