Skip to content

Commit

Permalink
Update: isOpen prop
Browse files Browse the repository at this point in the history
  • Loading branch information
juzser committed Mar 25, 2020
1 parent 670905c commit d3cf8f4
Show file tree
Hide file tree
Showing 9 changed files with 2,119 additions and 1,375 deletions.
5 changes: 0 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,3 @@ module.exports = {
}
]
}

// "plugin:vue/recommended",
// "eslint:recommended",
// "prettier/vue",
// "plugin:prettier/recommended"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ List of available props to use in the component:
| `options` | Object | see below | Some options to customize UI |
| `bot-typing` | Boolean | false | If `true`, the bot typing indicator will show |
| `input-disable` | Boolean | false | If `true`, message input will be disabled |
| `is-open` | Boolean | false | If `true`, the board will open from init |



Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"@vue/cli-service": "^4.0.0",
"@vue/eslint-config-standard": "^4.0.0",
"@vue/test-utils": "1.0.0-beta.29",
"axios": "^0.19.0",
"babel-eslint": "^10.0.3",
"bootstrap": "^4.3.1",
"core-js": "^3.3.2",
Expand All @@ -44,9 +43,10 @@
"pug": "^2.0.4",
"pug-plain-loader": "^1.0.0",
"sass": "^1.19.0",
"sass-loader": "^8.0.0",
"sass-loader": "^8.0.2",
"standard-version": "^7.0.1",
"vue": "^2.6.10",
"vue-loader": "^15.8.3",
"vue-svg-loader": "^0.15.0",
"vue-template-compiler": "^2.6.10"
},
Expand Down
5 changes: 3 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
:messages="messageData",
:bot-typing="botTyping",
:input-disable="inputDisable",
:is-open="false",
@init="botStart",
@msg-send="msgSend",
)
</template>
<script>
import BotIcon from '@/assets/icons/bot.png'
import BotIcon from './assets/icons/bot.png'
import { VueBotUI } from './vue-bot-ui'
import { messageService } from '@/helpers/message'
import { messageService } from './helpers/message'
export default {
components: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Board/Action.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
IconSend.qkb-action-icon.qkb-action-icon--send
</template>
<script>
import IconSend from '@/assets/icons/send.svg'
import IconSend from '../../assets/icons/send.svg'
export default {
components: {
Expand Down
15 changes: 12 additions & 3 deletions src/components/BotUI.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
.qkb-msg-avatar__img(v-if="optionsMain.botAvatarImg")
</template>
<script>
import EventBus from '@/helpers/event-bus'
import EventBus from '../helpers/event-bus'
import BoardHeader from './Board/Header'
import BoardContent from './Board/Content'
import BoardAction from './Board/Action'
import AppStyle from './AppStyle'
import BubbleIcon from '@/assets/icons/bubble.svg'
import CloseIcon from '@/assets/icons/close.svg'
import BubbleIcon from '../assets/icons/bubble.svg'
import CloseIcon from '../assets/icons/close.svg'
export default {
name: 'VueBotUI',
Expand Down Expand Up @@ -75,6 +75,11 @@ export default {
inputDisable: {
type: Boolean,
default: false
},
isOpen: {
type: Boolean,
default: false
}
},
Expand Down Expand Up @@ -119,6 +124,10 @@ export default {
},
created () {
if (this.isOpen) {
this.botToggle()
}
EventBus.$on('select-button-option', this.selectOption)
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/MessageBubble/ButtonOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
span {{ item.text }}
</template>
<script>
import EventBus from '@/helpers/event-bus'
import EventBus from '../../helpers/event-bus'
export default {
props: {
Expand Down
2 changes: 1 addition & 1 deletion src/vue-bot-ui.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import VueBotUI from '@/components/BotUI.vue'
import VueBotUI from './components/BotUI.vue'

const Plugin = {
install (Vue, options) {
Expand Down
Loading

0 comments on commit d3cf8f4

Please sign in to comment.