├── static
└── .gitkeep
├── src
├── assets
│ └── logo.png
├── AvInit.js
├── main.js
├── vuex
│ └── admin
│ │ ├── action.js
│ │ └── store.js
├── admin.js
├── router
│ └── admin.js
├── components
│ ├── index.js
│ ├── alert.vue
│ ├── mobileInput.vue
│ ├── input.vue
│ ├── modal.vue
│ ├── bullet.vue
│ ├── upload.vue
│ ├── textfield.vue
│ ├── fabButton.vue
│ ├── navTab.vue
│ ├── button.vue
│ └── list.vue
├── views
│ ├── admin
│ │ ├── setting.vue
│ │ ├── login.vue
│ │ ├── dashboard.vue
│ │ ├── faq.vue
│ │ └── list.vue
│ ├── admin.vue
│ └── app.vue
└── helper.js
├── .babelrc
├── .gitignore
├── test
├── unit
│ ├── .eslintrc
│ ├── specs
│ │ └── Hello.spec.js
│ ├── index.js
│ └── karma.conf.js
└── e2e
│ ├── specs
│ └── test.js
│ ├── custom-assertions
│ └── elementCount.js
│ ├── runner.js
│ └── nightwatch.conf.js
├── .editorconfig
├── index.html
├── admin.html
├── .eslintrc.js
├── config.js
├── README.md
└── package.json
/static/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hilongjw/AweSiteChat/HEAD/src/assets/logo.png
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["es2015", "stage-2"],
3 | "plugins": ["transform-runtime"],
4 | "comments": false
5 | }
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log
5 | selenium-debug.log
6 | test/unit/coverage
7 | test/e2e/reports
8 |
--------------------------------------------------------------------------------
/test/unit/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "mocha": true
4 | },
5 | "globals": {
6 | "expect": true,
7 | "sinon": true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/src/AvInit.js:
--------------------------------------------------------------------------------
1 | import AV from 'leancloud-storage'
2 | const appId = 'JFqRXySTOsn6qWGARSpX1tpw-gzGzoHsz'
3 | const appKey = 'ftH48M9Atkm0vt61FE49l1Ot'
4 |
5 | AV.init({ appId, appKey })
6 |
7 | module.exports = AV
8 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | urlchat
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/admin.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | urlchat
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import covApp from './views/app'
3 | import AV from './AvInit'
4 |
5 | window.AV = AV
6 | let app = document.createElement('cov-app')
7 | document.body.appendChild(app)
8 |
9 | /* eslint-disable no-new */
10 | new Vue({
11 | el: 'body',
12 | components: { 'cov-app': covApp }
13 | })
14 |
15 |
--------------------------------------------------------------------------------
/src/vuex/admin/action.js:
--------------------------------------------------------------------------------
1 | export const showAlert = ({ dispatch }, msg) => {
2 | dispatch('SHOW_ALERT', msg)
3 | setTimeout(() => {
4 | dispatch('HIDE_ALERT')
5 | }, 3000)
6 | }
7 |
8 | export const addCheckList = ({ dispatch }, item) => {
9 | dispatch('ADD_CHECKLIST', item)
10 | }
11 |
12 | export const removeCheckList = ({ dispatch }, item) => {
13 | dispatch('REMOVE_CHECKLIST', item)
14 | }
15 |
--------------------------------------------------------------------------------
/src/admin.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 | import VueRouter from 'vue-router'
4 | import { sync } from 'vuex-router-sync'
5 |
6 | import App from './views/admin'
7 | import store from './vuex/admin/store'
8 | import router from './router/admin'
9 |
10 | Vue.use(VueRouter)
11 | Vue.use(Vuex)
12 |
13 | Vue.config.debug = true
14 |
15 | sync(store, router)
16 |
17 | router.start(App, 'app')
18 |
--------------------------------------------------------------------------------
/test/unit/specs/Hello.spec.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Hello from 'src/components/Hello'
3 |
4 | describe('Hello.vue', () => {
5 | it('should render correct contents', () => {
6 | const vm = new Vue({
7 | template: '
',
8 | components: { Hello }
9 | }).$mount()
10 | expect(vm.$el.querySelector('.hello h1').textContent).to.contain('Hello World!')
11 | })
12 | })
13 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
4 | extends: 'standard',
5 | // required to lint *.vue files
6 | plugins: [
7 | 'html'
8 | ],
9 | // add your custom rules here
10 | 'rules': {
11 | // allow paren-less arrow functions
12 | 'arrow-parens': 0,
13 | // allow debugger during development
14 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/config.js:
--------------------------------------------------------------------------------
1 | // see http://vuejs-templates.github.io/webpack for documentation.
2 | var path = require('path')
3 |
4 | module.exports = {
5 | build: {
6 | index: path.resolve(__dirname, 'dist/index.html'),
7 | admin: path.resolve(__dirname, 'dist/admin.html'),
8 | assetsRoot: path.resolve(__dirname, 'dist'),
9 | assetsSubDirectory: 'static',
10 | assetsPublicPath: '/',
11 | productionSourceMap: false
12 | },
13 | dev: {
14 | port: 8080,
15 | proxyTable: {}
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/router/admin.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import VueRouter from 'vue-router'
3 |
4 | Vue.use(VueRouter)
5 |
6 | const router = new VueRouter()
7 |
8 | router.map({
9 | '/faq': {
10 | component: (resolve) => {
11 | require(['../views/admin/faq.vue'], resolve)
12 | }
13 | },
14 | '/list': {
15 | component: (resolve) => {
16 | require(['../views/admin/list.vue'], resolve)
17 | }
18 | },
19 | '/setting': {
20 | component: (resolve) => {
21 | require(['../views/admin/setting.vue'], resolve)
22 | }
23 | }
24 | })
25 |
26 | export default router
27 |
--------------------------------------------------------------------------------
/test/unit/index.js:
--------------------------------------------------------------------------------
1 | // Polyfill fn.bind() for PhantomJS
2 | /* eslint-disable no-extend-native */
3 | Function.prototype.bind = require('function-bind')
4 |
5 | // require all test files (files that ends with .spec.js)
6 | var testsContext = require.context('./specs', true, /\.spec$/)
7 | testsContext.keys().forEach(testsContext)
8 |
9 | // require all src files except main.js for coverage.
10 | // you can also change this to match only the subset of files that
11 | // you want coverage for.
12 | var srcContext = require.context('../../src', true, /^\.\/(?!main(\.js)?$)/)
13 | srcContext.keys().forEach(srcContext)
14 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AweSiteChat
2 |
3 | > A Vue.js & Wilddog project
4 |
5 | ## Usage
6 |
7 | set your site user's nickname and avatar
8 |
9 | ```javascript
10 | window.$__covInit = {
11 | nickname: 'Awe',
12 | avatar: 'http://tp1.sinaimg.cn/1765813240/180/40054316852/1'
13 | }
14 | ```
15 |
16 | ## Build Setup
17 |
18 | ``` bash
19 | # install dependencies
20 | npm install
21 |
22 | # serve with hot reload at localhost:8080
23 | npm run dev
24 |
25 | # build for production with minification
26 | npm run build
27 |
28 | # run unit tests
29 | npm run unit
30 |
31 | # run e2e tests
32 | npm run e2e
33 |
34 | # run all tests
35 | npm test
36 | ```
37 |
38 |
--------------------------------------------------------------------------------
/src/components/index.js:
--------------------------------------------------------------------------------
1 | import covFabButton from './fabButton.vue'
2 | import covButton from './button.vue'
3 | import covInput from './input.vue'
4 | import covBullet from './bullet.vue'
5 | import covAlert from './alert.vue'
6 | import textfield from './textfield.vue'
7 | import modal from './modal.vue'
8 | import covList from './list.vue'
9 | import navTab from './navTab.vue'
10 | import mobileInput from './mobileInput.vue'
11 | import Upload from './upload.vue'
12 |
13 | export {
14 | covFabButton,
15 | covButton,
16 | covInput,
17 | covBullet,
18 | covAlert,
19 | textfield,
20 | modal,
21 | covList,
22 | navTab,
23 | mobileInput,
24 | Upload
25 | }
26 |
--------------------------------------------------------------------------------
/src/vuex/admin/store.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 |
4 | Vue.use(Vuex)
5 |
6 | const state = {
7 | Alert: {
8 | message: '',
9 | show: false
10 | },
11 | checkList: []
12 | }
13 |
14 | const mutations = {
15 | 'SHOW_ALERT' (state, msg) {
16 | state.Alert.message = msg
17 | state.Alert.show = true
18 | },
19 | 'HIDE_ALERT' (state, msg) {
20 | state.Alert.message = ''
21 | state.Alert.show = false
22 | },
23 | 'ADD_CHECKLIST' (state, item) {
24 | state.checkList.push(item)
25 | },
26 | 'REMOVE_CHECKLIST' (state, item) {
27 | state.checkList.$remove(item)
28 | }
29 | }
30 |
31 | export default new Vuex.Store({
32 | state,
33 | mutations,
34 | strict: true
35 | })
36 |
--------------------------------------------------------------------------------
/test/e2e/specs/test.js:
--------------------------------------------------------------------------------
1 | // For authoring Nightwatch tests, see
2 | // http://nightwatchjs.org/guide#usage
3 |
4 | module.exports = {
5 | 'awe-site-chat-test': function (browser) {
6 | browser
7 | .url('http://localhost:8080')
8 | .waitForElementPresent('#__covAlert', 10000)
9 | .click('#__covAdd')
10 | .assert.cssClassPresent(".ink", "animate")
11 | .waitForElementNotVisible('#__covInput', 100)
12 | .click('#__covAdd')
13 | .waitForElementVisible('#__covInput', 100)
14 | .click('#__covInputText')
15 | .assert.cssClassPresent("#__covInput", "active")
16 | .setValue('#__covInputText', 'nightwatch')
17 | .sendKeys('#__covInputText', browser.Keys.ENTER)
18 | .waitForElementPresent('.__cov-item', 5000)
19 | .end()
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/test/e2e/custom-assertions/elementCount.js:
--------------------------------------------------------------------------------
1 | // A custom Nightwatch assertion.
2 | // the name of the method is the filename.
3 | // can be used in tests like this:
4 | //
5 | // browser.assert.elementCount(selector, count)
6 | //
7 | // for how to write custom assertions see
8 | // http://nightwatchjs.org/guide#writing-custom-assertions
9 | exports.assertion = function (selector, count) {
10 | this.message = 'Testing if element <' + selector + '> has count: ' + count
11 | this.expected = count
12 | this.pass = function (val) {
13 | return val === this.expected
14 | }
15 | this.value = function (res) {
16 | return res.value
17 | }
18 | this.command = function (cb) {
19 | var self = this
20 | return this.api.execute(function (selector) {
21 | return document.querySelectorAll(selector).length
22 | }, [selector], function (res) {
23 | cb.call(self, res)
24 | })
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/components/alert.vue:
--------------------------------------------------------------------------------
1 |
2 | {{Alert.message}}
3 |
4 |
5 |
10 |
11 |
53 |
--------------------------------------------------------------------------------
/test/e2e/runner.js:
--------------------------------------------------------------------------------
1 | // 1. start the dev server using production config
2 | process.env.NODE_ENV = 'testing'
3 | var server = require('../../build/dev-server.js')
4 | var os = require('os')
5 | var isWin = os.platform() == 'win32'
6 |
7 | // 2. run the nightwatch test suite against it
8 | // to run in additional browsers:
9 | // 1. add an entry in test/e2e/nightwatch.conf.json under "test_settings"
10 | // 2. add it to the --env flag below
11 | // For more information on Nightwatch's config file, see
12 | // http://nightwatchjs.org/guide#settings-file
13 | var spawn = require('cross-spawn')
14 | var runner = spawn(
15 | isWin ? '.\\node_modules\\.bin\\nightwatch' : './node_modules/.bin/nightwatch',
16 | [
17 | '--config', 'test/e2e/nightwatch.conf.js',
18 | '--env', 'chrome'
19 | ],
20 | {
21 | stdio: 'inherit'
22 | }
23 | )
24 |
25 | runner.on('exit', function (code) {
26 | server.close()
27 | process.exit(code)
28 | })
29 |
30 | runner.on('error', function (err) {
31 | server.close()
32 | throw err
33 | })
34 |
--------------------------------------------------------------------------------
/test/e2e/nightwatch.conf.js:
--------------------------------------------------------------------------------
1 | // http://nightwatchjs.org/guide#settings-file
2 | module.exports = {
3 | "src_folders": ["test/e2e/specs"],
4 | "output_folder": "test/e2e/reports",
5 | "custom_assertions_path": ["test/e2e/custom-assertions"],
6 |
7 | "selenium": {
8 | "start_process": true,
9 | "server_path": "node_modules/selenium-server/lib/runner/selenium-server-standalone-2.53.0.jar",
10 | "host": "127.0.0.1",
11 | "port": 4444,
12 | "cli_args": {
13 | "webdriver.chrome.driver": require('chromedriver').path
14 | }
15 | },
16 |
17 | "test_settings": {
18 | "default": {
19 | "selenium_port": 4444,
20 | "selenium_host": "localhost",
21 | "silent": true
22 | },
23 |
24 | "chrome": {
25 | "desiredCapabilities": {
26 | "browserName": "chrome",
27 | "javascriptEnabled": true,
28 | "acceptSslCerts": true
29 | }
30 | },
31 |
32 | "firefox": {
33 | "desiredCapabilities": {
34 | "browserName": "firefox",
35 | "javascriptEnabled": true,
36 | "acceptSslCerts": true
37 | }
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/views/admin/setting.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
安全设置
4 |
5 |
6 |
7 |
8 |
9 | SAVE
10 |
11 |
12 |
13 |
14 |
36 |
37 |
68 |
--------------------------------------------------------------------------------
/src/components/mobileInput.vue:
--------------------------------------------------------------------------------
1 |
48 |
49 |
50 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/src/components/input.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{state.disable ? 'CANCEL':'SEND'}}
5 |
6 |
7 |
8 |
43 |
44 |
80 |
--------------------------------------------------------------------------------
/test/unit/karma.conf.js:
--------------------------------------------------------------------------------
1 | // This is a karma config file. For more details see
2 | // http://karma-runner.github.io/0.13/config/configuration-file.html
3 | // we are also using it with karma-webpack
4 | // https://github.com/webpack/karma-webpack
5 |
6 | var path = require('path')
7 | var merge = require('webpack-merge')
8 | var baseConfig = require('../../build/webpack.base.conf')
9 | var projectRoot = path.resolve(__dirname, '../../')
10 |
11 | var webpackConfig = merge(baseConfig, {
12 | // use inline sourcemap for karma-sourcemap-loader
13 | devtool: '#inline-source-map',
14 | vue: {
15 | loaders: {
16 | js: 'isparta'
17 | }
18 | }
19 | })
20 |
21 | // no need for app entry during tests
22 | delete webpackConfig.entry
23 |
24 | // make sure isparta loader is applied before eslint
25 | webpackConfig.module.preLoaders = webpackConfig.module.preLoaders || []
26 | webpackConfig.module.preLoaders.unshift({
27 | test: /\.js$/,
28 | loader: 'isparta',
29 | include: projectRoot,
30 | exclude: /test\/unit|node_modules/
31 | })
32 |
33 | // only apply babel for test files when using isparta
34 | webpackConfig.module.loaders.some(function (loader, i) {
35 | if (loader.loader === 'babel') {
36 | loader.include = /test\/unit/
37 | return true
38 | }
39 | })
40 |
41 | module.exports = function (config) {
42 | config.set({
43 | // to run in additional browsers:
44 | // 1. install corresponding karma launcher
45 | // http://karma-runner.github.io/0.13/config/browsers.html
46 | // 2. add it to the `browsers` array below.
47 | browsers: ['PhantomJS'],
48 | frameworks: ['mocha', 'sinon-chai'],
49 | reporters: ['spec', 'coverage'],
50 | files: ['./index.js'],
51 | preprocessors: {
52 | './index.js': ['webpack', 'sourcemap']
53 | },
54 | webpack: webpackConfig,
55 | webpackMiddleware: {
56 | noInfo: true
57 | },
58 | coverageReporter: {
59 | dir: './coverage',
60 | reporters: [
61 | { type: 'lcov', subdir: '.' },
62 | { type: 'text-summary' }
63 | ]
64 | }
65 | })
66 | }
67 |
--------------------------------------------------------------------------------
/src/components/modal.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
资料设定
4 |
5 |
6 |
7 |
8 | OK
9 |
10 |
11 |
12 |
13 |
22 |
23 |
84 |
--------------------------------------------------------------------------------
/src/views/admin.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
71 |
72 |
90 |
--------------------------------------------------------------------------------
/src/views/admin/login.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
登录
4 |
5 |
6 |
7 |
8 |
9 | LOGIN
10 |
11 |
12 |
13 |
14 |
25 |
26 |
87 |
--------------------------------------------------------------------------------
/src/views/admin/dashboard.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
26 |
27 |
28 |
29 |
30 |
71 |
72 |
100 |
--------------------------------------------------------------------------------
/src/components/bullet.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 | {{item.nickname}}
10 |
11 | {{item.word}}
12 |
13 |
14 |
15 |
20 |
21 |
88 |
--------------------------------------------------------------------------------
/src/components/upload.vue:
--------------------------------------------------------------------------------
1 |
14 |
15 |
16 |
17 |
20 |
21 |
22 | 选择图片
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/components/textfield.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
14 |
35 |
36 |
101 |
--------------------------------------------------------------------------------
/src/helper.js:
--------------------------------------------------------------------------------
1 | import Wilddog from 'wilddog'
2 | const DB = Wilddog // Firebase
3 | const AppId = 'livechat' // 'glodchat-48777'
4 |
5 | const currentSite = window.$__covInit && window.$__covInit.currentSite || document.domain.replace(/(\.|#)/g, '-')
6 |
7 | // currentSite = '127.0.0.1'
8 | const Site = new DB('https://' + AppId + '.wilddogio.com/' + currentSite)
9 | // let Site = new DB('https://' + AppId + '.firebaseio.com/' + currentSite)
10 | const List = Site.child('list')
11 | const MaxCount = 20
12 |
13 | const AVATAR = [
14 | 'http://tp1.sinaimg.cn/1765813240/180/40054316852/1',
15 | 'http://tp2.sinaimg.cn/1968077401/180/5722082245/1',
16 | 'http://tp2.sinaimg.cn/2507347737/180/5716093192/1',
17 | 'http://ac-mhke0kuv.clouddn.com/918f366b6698038fff2c.jpg?imageView/1/w/100/h/100/q/80/format/png'
18 | ]
19 |
20 | let roadIndex = 0
21 | const roadWidth = 30
22 |
23 | const getRoadway = function (scrollHeight) {
24 | roadIndex === 10 ? roadIndex = 0 : roadIndex++
25 | return roadWidth * roadIndex * Math.random()
26 | }
27 |
28 | const generateBullet = function (obj) {
29 | let item = obj.val()
30 | let y = getRoadway()
31 | return {
32 | _key: obj.key() + Math.random(),
33 | key: obj.key(),
34 | avatar: item.avatar ? item.avatar : AVATAR[Math.floor(Math.random() * 4)],
35 | show: false,
36 | flying: false,
37 | roadway: y,
38 | tick: item.tick,
39 | position: {'top': y + 'px', 'color': item.color},
40 | nickname: item.nickname,
41 | word: item.word,
42 | color: item.color
43 | }
44 | }
45 |
46 | const localStorage = window.localStorage
47 |
48 | const getLocalStorage = function (key) {
49 | if (localStorage && localStorage.covChat) {
50 | let tmp = JSON.parse(localStorage.covChat)
51 | return tmp[key]
52 | }
53 | return ''
54 | }
55 |
56 | const setLocalStorage = function (key, value) {
57 | if (localStorage) {
58 | let tmp = {}
59 | if (localStorage.covChat) {
60 | tmp = JSON.parse(localStorage.covChat)
61 | }
62 | tmp[key] = value
63 | localStorage.covChat = JSON.stringify(tmp)
64 | return true
65 | }
66 | return false
67 | }
68 |
69 | const checkGlobalInit = function () {
70 | let globalInit = window.$__covInit
71 | if (globalInit) {
72 | if (globalInit.nickname) {
73 | setLocalStorage('nickname', globalInit.nickname)
74 | }
75 | if (globalInit.avatar) {
76 | setLocalStorage('avatar', globalInit.avatar)
77 | }
78 | }
79 | }
80 |
81 | export {
82 | AVATAR,
83 | generateBullet,
84 | setLocalStorage,
85 | getLocalStorage,
86 | checkGlobalInit,
87 | DB,
88 | Site,
89 | List,
90 | MaxCount
91 | }
92 |
--------------------------------------------------------------------------------
/src/views/admin/faq.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
FAQ
4 |
7 |
8 | LOGIN
9 |
10 |
11 |
12 |
13 |
45 |
46 |
107 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "urlchat",
3 | "version": "1.0.0",
4 | "description": "A Vue.js project",
5 | "author": "hilongjw ",
6 | "private": true,
7 | "scripts": {
8 | "dev": "node build/dev-server.js",
9 | "build": "node build/build.js",
10 | "unit": "karma start test/unit/karma.conf.js --single-run",
11 | "e2e": "node test/e2e/runner.js",
12 | "test": "npm run e2e",
13 | "lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs"
14 | },
15 | "dependencies": {
16 | "babel-runtime": "^5.8.0",
17 | "firebase": "^2.4.2",
18 | "leancloud-storage": "^1.3.2",
19 | "vue": "^1.0.18",
20 | "wilddog": "^0.6.2"
21 | },
22 | "devDependencies": {
23 | "babel-core": "^6.0.0",
24 | "babel-loader": "^6.0.0",
25 | "babel-plugin-transform-runtime": "^6.0.0",
26 | "babel-preset-es2015": "^6.0.0",
27 | "babel-preset-stage-2": "^6.0.0",
28 | "chai": "^3.5.0",
29 | "chromedriver": "^2.21.2",
30 | "connect-history-api-fallback": "^1.1.0",
31 | "cross-spawn": "^2.1.5",
32 | "css-loader": "^0.23.0",
33 | "eslint": "^2.0.0",
34 | "eslint-config-standard": "^5.1.0",
35 | "eslint-friendly-formatter": "^1.2.2",
36 | "eslint-loader": "^1.3.0",
37 | "eslint-plugin-html": "^1.3.0",
38 | "eslint-plugin-promise": "^1.0.8",
39 | "eslint-plugin-standard": "^1.3.2",
40 | "eventsource-polyfill": "^0.9.6",
41 | "express": "^4.13.3",
42 | "extract-text-webpack-plugin": "^1.0.1",
43 | "file-loader": "^0.8.4",
44 | "function-bind": "^1.0.2",
45 | "html-webpack-plugin": "^2.8.1",
46 | "http-proxy-middleware": "^0.12.0",
47 | "inject-loader": "^2.0.1",
48 | "isparta-loader": "^2.0.0",
49 | "json-loader": "^0.5.4",
50 | "karma": "^0.13.15",
51 | "karma-coverage": "^0.5.5",
52 | "karma-mocha": "^0.2.2",
53 | "karma-phantomjs-launcher": "^1.0.0",
54 | "karma-sinon-chai": "^1.2.0",
55 | "karma-sourcemap-loader": "^0.3.7",
56 | "karma-spec-reporter": "0.0.24",
57 | "karma-webpack": "^1.7.0",
58 | "lolex": "^1.4.0",
59 | "mocha": "^2.4.5",
60 | "nightwatch": "^0.8.18",
61 | "ora": "^0.2.0",
62 | "phantomjs-prebuilt": "^2.1.3",
63 | "selenium-server": "2.53.0",
64 | "shelljs": "^0.6.0",
65 | "sinon": "^1.17.3",
66 | "sinon-chai": "^2.8.0",
67 | "url-loader": "^0.5.7",
68 | "vue-hot-reload-api": "^1.2.0",
69 | "vue-html-loader": "^1.0.0",
70 | "vue-loader": "^8.2.1",
71 | "vue-router": "^0.7.13",
72 | "vue-style-loader": "^1.0.0",
73 | "vuex": "^0.6.2",
74 | "webpack": "^1.12.2",
75 | "webpack-dev-middleware": "^1.4.0",
76 | "webpack-hot-middleware": "^2.6.0",
77 | "webpack-merge": "^0.8.3"
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/src/views/admin/list.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 弹幕管理
5 |
6 |
7 |
8 |
13 |
![]()
14 |
15 | {{item.nickname}}
16 |
17 | {{item.word}}
18 |
Delete
19 |
20 |
21 |
22 |
23 |
24 |
81 |
82 |
111 |
--------------------------------------------------------------------------------
/src/components/fabButton.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
44 |
45 |
113 |
--------------------------------------------------------------------------------
/src/components/navTab.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
52 |
53 |
107 |
--------------------------------------------------------------------------------
/src/components/button.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
49 |
50 |
110 |
--------------------------------------------------------------------------------
/src/components/list.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 弹幕管理
5 |
6 |
7 |
8 |
13 |
![]()
14 |
15 | {{item.nickname}}
16 |
17 | {{item.word}}
18 |
Delete
19 |
20 |
21 |
22 | OK
23 |
24 |
25 |
26 |
27 |
67 |
68 |
147 |
--------------------------------------------------------------------------------
/src/views/app.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
233 |
234 |
253 |
--------------------------------------------------------------------------------