diff --git a/layouts/default.vue b/layouts/default.vue index 0e44bca59..ba1973406 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -566,19 +566,19 @@
- ⌘ G + {{ getSpecialKey() }} G
- ⌘ S + {{ getSpecialKey() }} S
- ⌘ K + {{ getSpecialKey() }} K
- ⌘ L + {{ getSpecialKey() }} L
@@ -677,6 +677,9 @@ export default { }, methods: { + getSpecialKey() { + return (/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)) ? "⌘" : "Ctrl"; + }, linkActive(path) { return { "nuxt-link-exact-active": this.$route.path === path, diff --git a/store/postwoman.js b/store/postwoman.js index 09f13178f..870958d96 100644 --- a/store/postwoman.js +++ b/store/postwoman.js @@ -112,7 +112,7 @@ export const mutations = { addNewCollection({ collections }, collection) { const { name } = collection; - const duplicateCollection = collections.some(item => item.name === name); + const duplicateCollection = collections.some(item => item.name.toLowerCase() === name.toLowerCase()); if (duplicateCollection) { this.$toast.info("Duplicate collection"); return; @@ -133,7 +133,7 @@ export const mutations = { editCollection({ collections }, payload) { const { collection, collectionIndex } = payload; const { name } = collection; - const duplicateCollection = collections.some(item => item.name === name); + const duplicateCollection = collections.some(item => item.name.toLowerCase() === name.toLowerCase()); if (duplicateCollection) { this.$toast.info("Duplicate collection"); return;