git: restructered by removing old files and making the vue (front) folder the root
This commit is contained in:
parent
41d559e039
commit
6b25628e7a
48 changed files with 28218 additions and 29188 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
|
@ -1,11 +1,12 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
./front/dist
|
#/dist
|
||||||
|
|
||||||
|
|
||||||
# local env files
|
# local env files
|
||||||
.env.local
|
.env.local
|
||||||
.env.*.local
|
.env.*.local
|
||||||
|
.env
|
||||||
|
|
||||||
# Log files
|
# Log files
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
|
|
@ -23,4 +24,6 @@ pnpm-debug.log*
|
||||||
*.sw?
|
*.sw?
|
||||||
zuliprc
|
zuliprc
|
||||||
|
|
||||||
Icon[\
]
|
upload.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
0
front/dist/index.html → dist/index.html
vendored
0
front/dist/index.html → dist/index.html
vendored
29
front/.gitignore
vendored
29
front/.gitignore
vendored
|
|
@ -1,29 +0,0 @@
|
||||||
.DS_Store
|
|
||||||
node_modules
|
|
||||||
#/dist
|
|
||||||
|
|
||||||
|
|
||||||
# local env files
|
|
||||||
.env.local
|
|
||||||
.env.*.local
|
|
||||||
.env
|
|
||||||
|
|
||||||
# Log files
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
pnpm-debug.log*
|
|
||||||
|
|
||||||
# Editor directories and files
|
|
||||||
.idea
|
|
||||||
.vscode
|
|
||||||
*.suo
|
|
||||||
*.ntvs*
|
|
||||||
*.njsproj
|
|
||||||
*.sln
|
|
||||||
*.sw?
|
|
||||||
zuliprc
|
|
||||||
|
|
||||||
upload.sh
|
|
||||||
|
|
||||||
|
|
||||||
28787
front/package-lock.json
generated
28787
front/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,56 +0,0 @@
|
||||||
{
|
|
||||||
"name": "Chattypub",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"private": true,
|
|
||||||
"scripts": {
|
|
||||||
"serve": "vue-cli-service serve",
|
|
||||||
"build": "vue-cli-service build",
|
|
||||||
"lint": "vue-cli-service lint"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"axios": "^0.21.1",
|
|
||||||
"core-js": "^3.6.5",
|
|
||||||
"css-polyfills": "0.0.16",
|
|
||||||
"emoji-js": "^3.5.0",
|
|
||||||
"markdown-it": "^12.0.6",
|
|
||||||
"moment": "^2.29.1",
|
|
||||||
"pagedjs": "^0.2.0",
|
|
||||||
"splitpanes": "^3.0.4",
|
|
||||||
"string-strip-html": "^8.3.0",
|
|
||||||
"vue": "^3.1.1",
|
|
||||||
"vue-router": "^4.0.8",
|
|
||||||
"vue3-markdown-it": "^1.0.9",
|
|
||||||
"vuex": "^4.0.1"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@vue/cli-plugin-babel": "~4.5.0",
|
|
||||||
"@vue/cli-plugin-eslint": "^3.1.1",
|
|
||||||
"@vue/cli-service": "^4.5.13",
|
|
||||||
"@vue/compiler-sfc": "^3.0.0",
|
|
||||||
"babel-eslint": "^10.1.0",
|
|
||||||
"eslint": "^6.7.2",
|
|
||||||
"eslint-plugin-vue": "^7.0.0",
|
|
||||||
"github-markdown-css": "^4.0.0",
|
|
||||||
"raw-loader": "^4.0.2",
|
|
||||||
"zulip-js": "^2.0.9"
|
|
||||||
},
|
|
||||||
"eslintConfig": {
|
|
||||||
"root": true,
|
|
||||||
"env": {
|
|
||||||
"node": true
|
|
||||||
},
|
|
||||||
"extends": [
|
|
||||||
"plugin:vue/vue3-essential",
|
|
||||||
"eslint:recommended"
|
|
||||||
],
|
|
||||||
"parserOptions": {
|
|
||||||
"parser": "babel-eslint"
|
|
||||||
},
|
|
||||||
"rules": {}
|
|
||||||
},
|
|
||||||
"browserslist": [
|
|
||||||
"> 1%",
|
|
||||||
"last 2 versions",
|
|
||||||
"not dead"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
101
index.js
101
index.js
|
|
@ -1,101 +0,0 @@
|
||||||
const
|
|
||||||
zulip = require("zulip-js"),
|
|
||||||
config = { zuliprc: "zuliprc" },
|
|
||||||
|
|
||||||
init = () => ( new
|
|
||||||
Promise((resolve, reject) => {
|
|
||||||
zulip(config)
|
|
||||||
.then(client => resolve(client))
|
|
||||||
.catch(error => reject(error))
|
|
||||||
})
|
|
||||||
),
|
|
||||||
|
|
||||||
sendMsg = (client, params) => ( new
|
|
||||||
Promise((resolve, reject) => {
|
|
||||||
client.messages.send(params || {
|
|
||||||
to: "chatty",
|
|
||||||
type: "stream",
|
|
||||||
topic: "content",
|
|
||||||
content: "I come not, friends, to steal away your hearts.",
|
|
||||||
})
|
|
||||||
.then(result => resolve(result))
|
|
||||||
.catch(error => reject(error))
|
|
||||||
})
|
|
||||||
),
|
|
||||||
|
|
||||||
getMsgs = (client, params) => ( new
|
|
||||||
Promise((resolve, reject) => {
|
|
||||||
client.messages.retrieve(params || {
|
|
||||||
anchor: "newest",
|
|
||||||
num_before: 100,
|
|
||||||
num_after: 0,
|
|
||||||
narrow: [
|
|
||||||
// { operator: "sender", operand: "karl@hackersanddesigners.nl" },
|
|
||||||
{ operator: "stream", operand: "chatty" },
|
|
||||||
// { operator: "topic", operand: "rules" },
|
|
||||||
],
|
|
||||||
})
|
|
||||||
.then(result => resolve(result))
|
|
||||||
.catch(error => reject(error))
|
|
||||||
})
|
|
||||||
),
|
|
||||||
|
|
||||||
regNotif = (client, params) => ( new
|
|
||||||
Promise((resolve, reject) => {
|
|
||||||
client.queues.register(params || {
|
|
||||||
event_types: ["message"],
|
|
||||||
})
|
|
||||||
.then(result => resolve(result))
|
|
||||||
.catch(error => reject(error))
|
|
||||||
})
|
|
||||||
),
|
|
||||||
|
|
||||||
getNotif = (client, params) => ( new
|
|
||||||
Promise((resolve, reject) => {
|
|
||||||
client.events.retrieve(params || {
|
|
||||||
queue_id: '1624161658:64',
|
|
||||||
last_event_id: -1,
|
|
||||||
dont_block: true,
|
|
||||||
})
|
|
||||||
.then(result => resolve(result))
|
|
||||||
.catch(error => reject(error))
|
|
||||||
})
|
|
||||||
)
|
|
||||||
|
|
||||||
init().then(client => {
|
|
||||||
// sendMsg(client).then(result => console.log(result))
|
|
||||||
// getMsgs(client).then(result => {
|
|
||||||
// console.log(result)
|
|
||||||
// const messagesWithReactions = result
|
|
||||||
// .messages
|
|
||||||
// .filter(m => (
|
|
||||||
// m.reactions.length > 0
|
|
||||||
// ))
|
|
||||||
// console.log(messagesWithReactions[0].reactions)
|
|
||||||
// const messagesWithSubs = result
|
|
||||||
// .messages
|
|
||||||
// .filter(m => (
|
|
||||||
// m.submessages.length > 0
|
|
||||||
// ))
|
|
||||||
// console.log(messagesWithSubs)
|
|
||||||
// result.messages.forEach(m =>
|
|
||||||
// console.log(m.submessages)
|
|
||||||
// )
|
|
||||||
// })
|
|
||||||
// regNotif(client).then(result => {
|
|
||||||
// console.log(result)
|
|
||||||
// })
|
|
||||||
getNotif(client).then(result => {
|
|
||||||
console.log(result)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
// (async () => {
|
|
||||||
// const user_id = 9;
|
|
||||||
// params = {
|
|
||||||
// to: [user_id],
|
|
||||||
// type: "private",
|
|
||||||
// content: "With mirth and laughter let old wrinkles come.",
|
|
||||||
// };
|
|
||||||
// console.log(await client.messages.send(params));
|
|
||||||
// })();
|
|
||||||
28369
package-lock.json
generated
28369
package-lock.json
generated
File diff suppressed because it is too large
Load diff
57
package.json
57
package.json
|
|
@ -1,18 +1,57 @@
|
||||||
{
|
{
|
||||||
"name": "chattypub",
|
"name": "Chattypub",
|
||||||
"version": "1.0.0",
|
"version": "0.1.0",
|
||||||
"description": "",
|
"private": true,
|
||||||
"main": "index.js",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"serve": "vue-cli-service serve",
|
||||||
|
"build": "vue-cli-service build",
|
||||||
|
"lint": "vue-cli-service lint"
|
||||||
},
|
},
|
||||||
"author": "Karl Moubarak",
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"axios": "^0.21.1",
|
||||||
|
"core-js": "^3.6.5",
|
||||||
|
"css-polyfills": "0.0.16",
|
||||||
"emoji-js": "^3.5.0",
|
"emoji-js": "^3.5.0",
|
||||||
"splitpanes": "^2.3.6",
|
"markdown-it": "^12.0.6",
|
||||||
|
"moment": "^2.29.1",
|
||||||
|
"pagedjs": "^0.2.0",
|
||||||
|
"splitpanes": "^3.0.4",
|
||||||
"string-strip-html": "^8.3.0",
|
"string-strip-html": "^8.3.0",
|
||||||
|
"vue": "^3.1.1",
|
||||||
|
"vue-router": "^4.0.8",
|
||||||
|
"vue3-markdown-it": "^1.0.9",
|
||||||
|
"vuex": "^4.0.1",
|
||||||
"vue-html2pdf": "^1.8.0",
|
"vue-html2pdf": "^1.8.0",
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@vue/cli-plugin-babel": "~4.5.0",
|
||||||
|
"@vue/cli-plugin-eslint": "^3.1.1",
|
||||||
|
"@vue/cli-service": "^4.5.13",
|
||||||
|
"@vue/compiler-sfc": "^3.0.0",
|
||||||
|
"babel-eslint": "^10.1.0",
|
||||||
|
"eslint": "^6.7.2",
|
||||||
|
"eslint-plugin-vue": "^7.0.0",
|
||||||
|
"github-markdown-css": "^4.0.0",
|
||||||
|
"raw-loader": "^4.0.2",
|
||||||
"zulip-js": "^2.0.9"
|
"zulip-js": "^2.0.9"
|
||||||
}
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"root": true,
|
||||||
|
"env": {
|
||||||
|
"node": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"plugin:vue/vue3-essential",
|
||||||
|
"eslint:recommended"
|
||||||
|
],
|
||||||
|
"parserOptions": {
|
||||||
|
"parser": "babel-eslint"
|
||||||
|
},
|
||||||
|
"rules": {}
|
||||||
|
},
|
||||||
|
"browserslist": [
|
||||||
|
"> 1%",
|
||||||
|
"last 2 versions",
|
||||||
|
"not dead"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue