mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-07-07 12:00:53 +00:00
created utils folder
This commit is contained in:
parent
65cba9d7d9
commit
baf998a415
20 changed files with 37 additions and 14 deletions
10
jsconfig.json
Normal file
10
jsconfig.json
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"@/*": [
|
||||||
|
"src/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {bus} from './../main.js'
|
import {bus} from './../main.js'
|
||||||
import changelog from '@/changelog.js'
|
import changelog from '@/utils/changelog.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,9 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ProfilePicture from "@/components/ProfilePictureTemplate.vue";
|
import ProfilePicture from "@/components/ProfilePictureTemplate.vue";
|
||||||
import messageFormatter from "@/messageFormatter.js";
|
import messageFormatter from "@/utils/messageFormatter.js";
|
||||||
import config from "@/config.js";
|
import config from "@/config.js";
|
||||||
import friendlyDate from "@/date";
|
import friendlyDate from "@/utils/date";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
<script>
|
<script>
|
||||||
import Spinner from '@/components/Spinner.vue'
|
import Spinner from '@/components/Spinner.vue'
|
||||||
import ChangeLog from '@/components/ChangeLog.vue'
|
import ChangeLog from '@/components/ChangeLog.vue'
|
||||||
import changelog from '@/changelog.js'
|
import changelog from '@/utils/changelog.js'
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ import Message from "../../components/app/MessageTemplate.vue";
|
||||||
import Spinner from "@/components/Spinner.vue";
|
import Spinner from "@/components/Spinner.vue";
|
||||||
import TypingStatus from "@/components/app/TypingStatus.vue";
|
import TypingStatus from "@/components/app/TypingStatus.vue";
|
||||||
import uploadsQueue from "@/components/app/uploadsQueue.vue";
|
import uploadsQueue from "@/components/app/uploadsQueue.vue";
|
||||||
import emojiParser from "@/emojiParser.js";
|
import emojiParser from "@/utils/emojiParser.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -97,7 +97,8 @@ export default {
|
||||||
postTimerID: null,
|
postTimerID: null,
|
||||||
getTimerID: null,
|
getTimerID: null,
|
||||||
typing: false,
|
typing: false,
|
||||||
whosTyping: ""
|
whosTyping: "",
|
||||||
|
showEmojiSuggestions: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -188,6 +189,14 @@ export default {
|
||||||
delayedResize(event) {
|
delayedResize(event) {
|
||||||
this.resize(event);
|
this.resize(event);
|
||||||
},
|
},
|
||||||
|
showEmojiPopout(shortcode) {
|
||||||
|
if (shortcode.length < 3) return this.showEmojiSuggestions = false;
|
||||||
|
const searchArr = emojiParser.searchEmoji(shortcode.slice(1, -1))
|
||||||
|
if (searchArr.length <=0) return this.showEmojiSuggestions = false;
|
||||||
|
return this.showEmojiSuggestions = true;
|
||||||
|
console.log(searchArr)
|
||||||
|
|
||||||
|
},
|
||||||
async onInput(event) {
|
async onInput(event) {
|
||||||
this.delayedResize(event);
|
this.delayedResize(event);
|
||||||
this.messageLength = this.message.length;
|
this.messageLength = this.message.length;
|
||||||
|
|
@ -196,6 +205,9 @@ export default {
|
||||||
this.postTimer();
|
this.postTimer();
|
||||||
await typingService.post(this.selectedChannelID);
|
await typingService.post(this.selectedChannelID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const shortCode = this.message.split(" ").pop()
|
||||||
|
if (shortCode && shortCode.startsWith(":")) this.showEmojiPopout(shortCode);
|
||||||
},
|
},
|
||||||
chatInput(event) {
|
chatInput(event) {
|
||||||
this.delayedResize(event);
|
this.delayedResize(event);
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
import channelService from '@/services/channelService';
|
import channelService from '@/services/channelService';
|
||||||
import messagesService from '@/services/messagesService';
|
import messagesService from '@/services/messagesService';
|
||||||
import config from '@/config.js'
|
import config from '@/config.js'
|
||||||
import statuses from '@/statuses';
|
import statuses from '@/utils/statuses';
|
||||||
import {bus} from '@/main'
|
import {bus} from '@/main'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import filesize from "filesize";
|
import filesize from "filesize";
|
||||||
import emojiParser from "@/emojiParser.js";
|
import emojiParser from "@/utils/emojiParser.js";
|
||||||
import messagesService from "@/services/messagesService";
|
import messagesService from "@/services/messagesService";
|
||||||
import { bus } from "../../main";
|
import { bus } from "../../main";
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import {router} from './router'
|
||||||
import Main from '../src/Main.vue'
|
import Main from '../src/Main.vue'
|
||||||
import {store} from './store/index';
|
import {store} from './store/index';
|
||||||
import Axios from 'axios';
|
import Axios from 'axios';
|
||||||
import './clickOutside';
|
import './utils/clickOutside';
|
||||||
import vueHeadful from 'vue-headful';
|
import vueHeadful from 'vue-headful';
|
||||||
Vue.component('vue-headful', vueHeadful);
|
Vue.component('vue-headful', vueHeadful);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import config from '@/config';
|
import config from '../config';
|
||||||
|
|
||||||
export const instance = () => {
|
export const instance = () => {
|
||||||
return axios.create({
|
return axios.create({
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import {bus} from '../../main'
|
import {bus} from '../../main'
|
||||||
import {router} from './../../router'
|
import {router} from './../../router'
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import NotificationSounds from '@/notificationSound';
|
import NotificationSounds from '@/utils/notificationSound';
|
||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
notifications: []
|
notifications: []
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import {
|
||||||
bus
|
bus
|
||||||
} from '../../main'
|
} from '../../main'
|
||||||
import VueRouter from 'vue-router';
|
import VueRouter from 'vue-router';
|
||||||
import NotificationSounds from '@/notificationSound';
|
import NotificationSounds from '@/utils/notificationSound';
|
||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
fileToUpload: null,
|
fileToUpload: null,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import axios from 'axios'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import {bus} from '../../main'
|
import {bus} from '../../main'
|
||||||
import VueRouter from 'vue-router';
|
import VueRouter from 'vue-router';
|
||||||
import NotificationSounds from '@/notificationSound';
|
import NotificationSounds from '@/utils/notificationSound';
|
||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
token: localStorage.getItem('hauthid') || null,
|
token: localStorage.getItem('hauthid') || null,
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ export default {
|
||||||
for (let i = 0; i < element.shortcodes.length; i++) {
|
for (let i = 0; i < element.shortcodes.length; i++) {
|
||||||
const el2 = element.shortcodes[i];
|
const el2 = element.shortcodes[i];
|
||||||
if (el2.includes(shortCode)) array.push(element);
|
if (el2.includes(shortCode)) array.push(element);
|
||||||
|
if (array.length >= 10) return array;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return array;
|
return array;
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
import {bus} from '../main';
|
import {bus} from '../main';
|
||||||
import RightPanel from "./../components/homePage/RightPanel.vue"
|
import RightPanel from "./../components/homePage/RightPanel.vue"
|
||||||
import ChangeLog from "./../components/ChangeLog.vue"
|
import ChangeLog from "./../components/ChangeLog.vue"
|
||||||
import changelog from '@/changelog.js'
|
import changelog from '@/utils/changelog.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
RightPanel,
|
RightPanel,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue