Skip to content

Commit 0746ec0

Browse files
committed
Version 2.1.0. Adding new products, minor refactoring.
1 parent 23ff498 commit 0746ec0

14 files changed

Lines changed: 358 additions & 17 deletions

dev/serve-collab-chat.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import Vue, { VNode } from 'vue';
2+
import Dev from './serve-collab-chat.vue';
3+
import Router from 'vue-router';
4+
5+
Vue.config.productionTip = false;
6+
7+
const routes = [
8+
{
9+
path: '/demo',
10+
component: Dev
11+
}
12+
];
13+
14+
const router = new Router({
15+
routes
16+
});
17+
18+
Vue.use(Router);
19+
20+
new Vue({
21+
router,
22+
render: (h): VNode => h(Dev),
23+
}).$mount('#app');

dev/serve-collab-chat.vue

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<script lang="ts">
2+
import Vue from 'vue';
3+
import {FastCommentsCollabChat} from '@/entry';
4+
5+
export default Vue.extend({
6+
name: 'ServeDev',
7+
components: {
8+
FastCommentsCollabChat
9+
},
10+
data() {
11+
return {
12+
fastCommentsCollabChatTarget: {}
13+
}
14+
},
15+
mounted() {
16+
this.fastCommentsCollabChatTarget = this.$refs.fastCommentsCollabChatTarget;
17+
}
18+
});
19+
</script>
20+
21+
<template>
22+
<div id="app">
23+
<div ref="fastCommentsCollabChatTarget">This is some text that will have collab chat enabled.</div>
24+
<fast-comments-collab-chat v-bind:config="{tenantId: 'demo'}" :target-ref="fastCommentsCollabChatTarget"/>
25+
</div>
26+
</template>

dev/serve-dark-mode-toggle.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script lang="ts">
22
import Vue from 'vue';
3-
import FastCommentsVue from '@/fastcomments-vue.vue';
3+
import FastComments from '@/fastcomments-vue.vue';
44
55
export default Vue.extend({
66
name: 'ServeDarkModeToggle',
77
components: {
8-
FastCommentsVue
8+
FastComments
99
},
1010
data() {
1111
return {
@@ -18,7 +18,7 @@
1818
<template>
1919
<div id="app" :class="isDarkMode ? 'dark' : 'light'">
2020
<button @click="isDarkMode = !isDarkMode">Toggle Dark Mode</button>
21-
<fast-comments-vue v-bind:config="{tenantId: 'demo', hasDarkBackground: isDarkMode}"/>
21+
<fast-comments v-bind:config="{tenantId: 'demo', hasDarkBackground: isDarkMode}"/>
2222
</div>
2323
</template>
2424
<style>
@@ -39,4 +39,4 @@
3939
background: #000;
4040
color: #fff;
4141
}
42-
</style>
42+
</style>

dev/serve-image-chat.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import Vue, { VNode } from 'vue';
2+
import Dev from './serve-image-chat.vue';
3+
import Router from 'vue-router';
4+
5+
Vue.config.productionTip = false;
6+
7+
const routes = [
8+
{
9+
path: '/demo',
10+
component: Dev
11+
}
12+
];
13+
14+
const router = new Router({
15+
routes
16+
});
17+
18+
Vue.use(Router);
19+
20+
new Vue({
21+
router,
22+
render: (h): VNode => h(Dev),
23+
}).$mount('#app');

dev/serve-image-chat.vue

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<script lang="ts">
2+
import Vue from 'vue';
3+
import {FastCommentsImageChat} from '@/entry';
4+
5+
export default Vue.extend({
6+
name: 'ServeDev',
7+
components: {
8+
FastCommentsImageChat
9+
},
10+
data() {
11+
return {
12+
fastCommentsImageChatTarget: {}
13+
}
14+
},
15+
mounted() {
16+
this.fastCommentsImageChatTarget = this.$refs.fastCommentsImageChatTarget;
17+
}
18+
});
19+
</script>
20+
21+
<template>
22+
<div id="app">
23+
<img ref="fastCommentsImageChatTarget" src="https://fastcomments.com/images/image-chat-demo-1.jpg" alt="Demo Image"/>
24+
<fast-comments-image-chat v-bind:config="{tenantId: 'demo'}" :target-ref="fastCommentsImageChatTarget" />
25+
</div>
26+
</template>

dev/serve-live-chat.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import Vue, { VNode } from 'vue';
2+
import Dev from './serve-live-chat.vue';
3+
import Router from 'vue-router';
4+
5+
Vue.config.productionTip = false;
6+
7+
const routes = [
8+
{
9+
path: '/demo',
10+
component: Dev
11+
}
12+
];
13+
14+
const router = new Router({
15+
routes
16+
});
17+
18+
Vue.use(Router);
19+
20+
new Vue({
21+
router,
22+
render: (h): VNode => h(Dev),
23+
}).$mount('#app');

dev/serve-live-chat.vue

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<script lang="ts">
2+
import Vue from 'vue';
3+
import {FastCommentsLiveChat} from '@/entry';
4+
5+
export default Vue.extend({
6+
name: 'ServeDev',
7+
components: {
8+
FastCommentsLiveChat
9+
}
10+
});
11+
</script>
12+
13+
<template>
14+
<div id="app">
15+
<fast-comments-live-chat v-bind:config="{tenantId: 'demo'}" />
16+
</div>
17+
</template>

dev/serve-pagination.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script lang="ts">
22
import Vue from 'vue';
3-
import FastCommentsVue from '@/fastcomments-vue.vue';
3+
import FastComments from '@/fastcomments-vue.vue';
44
55
export default Vue.extend({
66
name: 'ServePagination',
77
components: {
8-
FastCommentsVue
8+
FastComments
99
},
1010
methods: {
1111
updatePage: function(pageNumber: number) {
@@ -32,6 +32,6 @@
3232
<div>Page: <span v-html="page"></span></div>
3333
<button @click="updatePage(page - 1)" style="margin-right: 5px">Prev</button>
3434
<button @click="updatePage(page + 1)">Next</button>
35-
<fast-comments-vue v-bind:config="{tenantId: 'nYrnfYEv', urlId: url, url: url}"/>
35+
<fast-comments v-bind:config="{tenantId: 'nYrnfYEv', urlId: url, url: url}"/>
3636
</div>
3737
</template>

dev/serve.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<script lang="ts">
22
import Vue from 'vue';
3-
import FastCommentsVue from '@/fastcomments-vue.vue';
3+
import FastComments from '@/entry';
44
55
export default Vue.extend({
66
name: 'ServeDev',
77
components: {
8-
FastCommentsVue
8+
FastComments
99
}
1010
});
1111
</script>
1212

1313
<template>
1414
<div id="app">
15-
<fast-comments-vue v-bind:config="{tenantId: 'demo'}" />
15+
<fast-comments v-bind:config="{tenantId: 'demo'}" />
1616
</div>
1717
</template>

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fastcomments-vue",
3-
"version": "2.0.1",
3+
"version": "2.1.0",
44
"author": "winrid",
55
"license": "MIT",
66
"repository": "fastcomments/fastcomments-vue",
@@ -19,6 +19,9 @@
1919
"serve": "vue-cli-service serve dev/serve.ts",
2020
"serve-toggle-dark-mode": "vue-cli-service serve dev/serve-dark-mode-toggle.ts",
2121
"serve-pagination": "vue-cli-service serve dev/serve-pagination.ts",
22+
"serve-collab-chat": "vue-cli-service serve dev/serve-collab-chat.ts",
23+
"serve-image-chat": "vue-cli-service serve dev/serve-image-chat.ts",
24+
"serve-live-chat": "vue-cli-service serve dev/serve-live-chat.ts",
2225
"build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js",
2326
"build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es",
2427
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife"

0 commit comments

Comments
 (0)