mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-06-20 14:51:33 +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>
|
||||
import {bus} from './../main.js'
|
||||
import changelog from '@/changelog.js'
|
||||
import changelog from '@/utils/changelog.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@
|
|||
|
||||
<script>
|
||||
import ProfilePicture from "@/components/ProfilePictureTemplate.vue";
|
||||
import messageFormatter from "@/messageFormatter.js";
|
||||
import messageFormatter from "@/utils/messageFormatter.js";
|
||||
import config from "@/config.js";
|
||||
import friendlyDate from "@/date";
|
||||
import friendlyDate from "@/utils/date";
|
||||
import path from "path";
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
<script>
|
||||
import Spinner from '@/components/Spinner.vue'
|
||||
import ChangeLog from '@/components/ChangeLog.vue'
|
||||
import changelog from '@/changelog.js'
|
||||
import changelog from '@/utils/changelog.js'
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ import Message from "../../components/app/MessageTemplate.vue";
|
|||
import Spinner from "@/components/Spinner.vue";
|
||||
import TypingStatus from "@/components/app/TypingStatus.vue";
|
||||
import uploadsQueue from "@/components/app/uploadsQueue.vue";
|
||||
import emojiParser from "@/emojiParser.js";
|
||||
import emojiParser from "@/utils/emojiParser.js";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -97,7 +97,8 @@ export default {
|
|||
postTimerID: null,
|
||||
getTimerID: null,
|
||||
typing: false,
|
||||
whosTyping: ""
|
||||
whosTyping: "",
|
||||
showEmojiSuggestions: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -188,6 +189,14 @@ export default {
|
|||
delayedResize(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) {
|
||||
this.delayedResize(event);
|
||||
this.messageLength = this.message.length;
|
||||
|
|
@ -196,6 +205,9 @@ export default {
|
|||
this.postTimer();
|
||||
await typingService.post(this.selectedChannelID);
|
||||
}
|
||||
|
||||
const shortCode = this.message.split(" ").pop()
|
||||
if (shortCode && shortCode.startsWith(":")) this.showEmojiPopout(shortCode);
|
||||
},
|
||||
chatInput(event) {
|
||||
this.delayedResize(event);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
import channelService from '@/services/channelService';
|
||||
import messagesService from '@/services/messagesService';
|
||||
import config from '@/config.js'
|
||||
import statuses from '@/statuses';
|
||||
import statuses from '@/utils/statuses';
|
||||
import {bus} from '@/main'
|
||||
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
<script>
|
||||
import filesize from "filesize";
|
||||
import emojiParser from "@/emojiParser.js";
|
||||
import emojiParser from "@/utils/emojiParser.js";
|
||||
import messagesService from "@/services/messagesService";
|
||||
import { bus } from "../../main";
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {router} from './router'
|
|||
import Main from '../src/Main.vue'
|
||||
import {store} from './store/index';
|
||||
import Axios from 'axios';
|
||||
import './clickOutside';
|
||||
import './utils/clickOutside';
|
||||
import vueHeadful from 'vue-headful';
|
||||
Vue.component('vue-headful', vueHeadful);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import axios from 'axios';
|
||||
import config from '@/config';
|
||||
import config from '../config';
|
||||
|
||||
export const instance = () => {
|
||||
return axios.create({
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import {bus} from '../../main'
|
||||
import {router} from './../../router'
|
||||
import Vue from 'vue';
|
||||
import NotificationSounds from '@/notificationSound';
|
||||
import NotificationSounds from '@/utils/notificationSound';
|
||||
|
||||
const state = {
|
||||
notifications: []
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import {
|
|||
bus
|
||||
} from '../../main'
|
||||
import VueRouter from 'vue-router';
|
||||
import NotificationSounds from '@/notificationSound';
|
||||
import NotificationSounds from '@/utils/notificationSound';
|
||||
|
||||
const state = {
|
||||
fileToUpload: null,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import axios from 'axios'
|
|||
import Vue from 'vue'
|
||||
import {bus} from '../../main'
|
||||
import VueRouter from 'vue-router';
|
||||
import NotificationSounds from '@/notificationSound';
|
||||
import NotificationSounds from '@/utils/notificationSound';
|
||||
|
||||
const state = {
|
||||
token: localStorage.getItem('hauthid') || null,
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export default {
|
|||
for (let i = 0; i < element.shortcodes.length; i++) {
|
||||
const el2 = element.shortcodes[i];
|
||||
if (el2.includes(shortCode)) array.push(element);
|
||||
if (array.length >= 10) return array;
|
||||
}
|
||||
}
|
||||
return array;
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
import {bus} from '../main';
|
||||
import RightPanel from "./../components/homePage/RightPanel.vue"
|
||||
import ChangeLog from "./../components/ChangeLog.vue"
|
||||
import changelog from '@/changelog.js'
|
||||
import changelog from '@/utils/changelog.js'
|
||||
export default {
|
||||
components: {
|
||||
RightPanel,
|
||||
|
|
|
|||
Loading…
Reference in a new issue