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: {
|
||||
addNewCollection() {
|
||||
if (!this.$data.name) {
|
||||
this.$toast.info("Please provide a valid name for the collection");
|
||||
this.$toast.info($t("invalid_collection_name"));
|
||||
return;
|
||||
}
|
||||
this.$store.commit("postwoman/addNewCollection", {
|
||||
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
methods: {
|
||||
saveCollection() {
|
||||
if (!this.$data.name) {
|
||||
this.$toast.info("Please provide a valid name for the collection");
|
||||
this.$toast.info($t("invalid_collection_name"));
|
||||
return;
|
||||
}
|
||||
const collectionUpdated = {
|
||||
|
||||
@@ -3,7 +3,7 @@ import FirefoxStrategy from "./strategies/FirefoxStrategy";
|
||||
import ChromeStrategy, { hasChromeExtensionInstalled } from "./strategies/ChromeStrategy";
|
||||
|
||||
const isExtensionsAllowed = ({ state }) => {
|
||||
return typeof(state.postwoman.settings.EXTENSIONS_ENABLED) === 'undefined'
|
||||
return typeof state.postwoman.settings.EXTENSIONS_ENABLED === 'undefined'
|
||||
|| state.postwoman.settings.EXTENSIONS_ENABLED;
|
||||
}
|
||||
|
||||
|
||||
@@ -140,6 +140,7 @@ export default {
|
||||
deleted: "Deleted",
|
||||
undo: "Undo",
|
||||
collection_empty: "Collection is empty",
|
||||
invalid_collection_name: "Please provide a valid name for the collection",
|
||||
new_collection: "New Collection",
|
||||
my_new_collection: "My New Collection",
|
||||
edit_collection: "Edit Collection",
|
||||
|
||||
@@ -339,7 +339,7 @@ export default {
|
||||
"https://postwoman.apollotv.xyz/",
|
||||
PROXY_KEY: this.$store.state.postwoman.settings.PROXY_KEY || "",
|
||||
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
|
||||
: true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user