diff --git a/src/component/greeting/index.js b/src/component/greeting/index.js index 1907643d..d79c3f7a 100644 --- a/src/component/greeting/index.js +++ b/src/component/greeting/index.js @@ -36,6 +36,12 @@ export const Greeting = function({} = {}) { switch (state.get.current().header.greeting.type) { + case 'none': + + value = ''; + + break; + case 'good': value = this.message[Math.floor(this.now.hours() / 6)]; @@ -57,9 +63,13 @@ export const Greeting = function({} = {}) { case 'custom': if (isValidString(state.get.current().header.greeting.custom)) { + value = trimString(state.get.current().header.greeting.custom); + } else { + value = this.message[Math.floor(this.now.hours() / 6)]; + }; break; @@ -68,14 +78,14 @@ export const Greeting = function({} = {}) { if (isValidString(state.get.current().header.greeting.name)) { - if (state.get.current().header.greeting.type === 'custom') { - if (isValidString(state.get.current().header.greeting.custom)) { - value = value + ', ' + trimString(state.get.current().header.greeting.name) - } else { - value = value + ', ' + trimString(state.get.current().header.greeting.name) - }; + if (state.get.current().header.greeting.type === 'none') { + + value = value + trimString(state.get.current().header.greeting.name); + } else { - value = value + ', ' + trimString(state.get.current().header.greeting.name) + + value = value + ', ' + trimString(state.get.current().header.greeting.name); + }; }; diff --git a/src/component/header/index.js b/src/component/header/index.js index 6d5ead8d..acf4c948 100644 --- a/src/component/header/index.js +++ b/src/component/header/index.js @@ -129,7 +129,7 @@ header.item.mod = { } else { if (state.get.current().header.order.includes(item)) { - state.get.current().header.order.splice(state.get.current().header.order.indexOf(item), 1) + state.get.current().header.order.splice(state.get.current().header.order.indexOf(item), 1); }; }; @@ -166,7 +166,7 @@ header.item.mod = { } else { if (state.get.current().header.order.includes(item)) { - state.get.current().header.order.splice(state.get.current().header.order.indexOf(item), 1) + state.get.current().header.order.splice(state.get.current().header.order.indexOf(item), 1); }; }; @@ -186,7 +186,7 @@ header.item.mod = { } else { if (state.get.current().header.order.includes(item)) { - state.get.current().header.order.splice(state.get.current().header.order.indexOf(item), 1) + state.get.current().header.order.splice(state.get.current().header.order.indexOf(item), 1); }; }; @@ -222,7 +222,7 @@ header.item.mod = { } else { if (state.get.current().header.order.includes(item)) { - state.get.current().header.order.splice(state.get.current().header.order.indexOf(item), 1) + state.get.current().header.order.splice(state.get.current().header.order.indexOf(item), 1); }; }; diff --git a/src/component/menuContent/headerSetting/index.js b/src/component/menuContent/headerSetting/index.js index 65218965..d945a423 100644 --- a/src/component/menuContent/headerSetting/index.js +++ b/src/component/menuContent/headerSetting/index.js @@ -514,7 +514,8 @@ headerSetting.greeting = (parent) => { { id: 'header-greeting-type-good', labelText: '"Good morning..."', value: 'good' }, { id: 'header-greeting-type-hello', labelText: '"Hello..."', value: 'hello' }, { id: 'header-greeting-type-hi', labelText: '"Hi..."', value: 'hi' }, - { id: 'header-greeting-type-custom', labelText: 'Custom', value: 'custom' } + { id: 'header-greeting-type-none', labelText: 'None', description: 'Useful for just displaying your name.', value: 'none' }, + { id: 'header-greeting-type-custom', labelText: 'Custom', description: ['Use your own greeting.', 'Defaults to "Good morning..." if left blank.'], value: 'custom' } ], groupName: 'header-greeting-type', path: 'header.greeting.type',