mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-06-12 11:10:10 +00:00
fixed more problems
This commit is contained in:
parent
d1fcba0fea
commit
cda2dc953e
32 changed files with 47 additions and 98 deletions
|
|
@ -103,7 +103,7 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
async onEnd(event) {
|
||||
async onEnd() {
|
||||
this.drag = false;
|
||||
const serverIDArr = this.serversArr.map(s => s.server_id);
|
||||
await settingsService.setServerPositions(serverIDArr);
|
||||
|
|
@ -152,7 +152,6 @@ export default {
|
|||
this.toolTipShown = true;
|
||||
|
||||
this.$nextTick(() => {
|
||||
const width = window.innerWidth;
|
||||
const tooltipWidth = this.$refs.toolTip.clientWidth;
|
||||
const rect = event.target.getBoundingClientRect();
|
||||
this.toolTipLeftPosition = rect.left - tooltipWidth / 2 + 25;
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ export default {
|
|||
this.$store.dispatch("setEditMessage", null);
|
||||
this.message = "";
|
||||
|
||||
const { ok, error, result } = await messagesService.update(
|
||||
const { ok } = await messagesService.update(
|
||||
editMessage.messageID,
|
||||
editMessage.channelID,
|
||||
{
|
||||
|
|
@ -419,7 +419,6 @@ export default {
|
|||
}
|
||||
},
|
||||
ReturnWord(text, caretPos) {
|
||||
var index = text.indexOf(caretPos);
|
||||
var preText = text.substring(0, caretPos);
|
||||
if (preText.indexOf(" ") > 0) {
|
||||
var words = preText.split(" ");
|
||||
|
|
@ -590,7 +589,7 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
async onFocus(event) {
|
||||
async onFocus() {
|
||||
if (this.message.trim() !== "") {
|
||||
await typingService.post(this.selectedChannelID);
|
||||
this.postTimer();
|
||||
|
|
|
|||
|
|
@ -136,7 +136,6 @@ import path from "path";
|
|||
import windowProperties from "@/utils/windowProperties";
|
||||
|
||||
import { mapState } from "vuex";
|
||||
import messagesService from "../../services/messagesService";
|
||||
|
||||
export default {
|
||||
props: [
|
||||
|
|
@ -247,7 +246,7 @@ export default {
|
|||
imageTag.style.height =
|
||||
this.clamp(newDimentions.height, 0, srcHeight) + "px";
|
||||
},
|
||||
onResize(dimentions) {
|
||||
onResize() {
|
||||
this.imageSize();
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
async onEnd(event) {
|
||||
async onEnd() {
|
||||
this.drag = false;
|
||||
const serverIDArr = this.serversArr.map(s => s.server_id);
|
||||
await settingsService.setServerPositions(serverIDArr);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ export default {
|
|||
this.closeMenu();
|
||||
}
|
||||
},
|
||||
async addButton(e) {
|
||||
async addButton() {
|
||||
if (this.requestSent) return;
|
||||
this.error = null;
|
||||
this.success = null;
|
||||
|
|
|
|||
|
|
@ -104,10 +104,9 @@
|
|||
|
||||
<script>
|
||||
import config from "@/config.js";
|
||||
import { bus } from "@/main";
|
||||
|
||||
import ServerService from "@/services/ServerService";
|
||||
import ProfilePicture from "@/components/ProfilePictureTemplate.vue";
|
||||
import serversModule from "../../../../store/modules/serversModule";
|
||||
import ErrorsListTemplate from "@/components/app/errorsListTemplate";
|
||||
|
||||
export default {
|
||||
|
|
@ -157,7 +156,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
event.target.classList.add("button-clicked");
|
||||
const { ok, error, result } = await ServerService.post({ name });
|
||||
const { ok, error } = await ServerService.post({ name });
|
||||
if (ok) {
|
||||
this.closeMenu();
|
||||
} else {
|
||||
|
|
@ -197,12 +196,9 @@ export default {
|
|||
async joinButton(event) {
|
||||
if (event.target.classList.contains("button-clicked")) return;
|
||||
event.target.classList.add("button-clicked");
|
||||
const { ok, error, result } = await ServerService.joinServer(
|
||||
this.inviteCode,
|
||||
{
|
||||
socketID: this.$socket.client.id
|
||||
}
|
||||
);
|
||||
const { ok } = await ServerService.joinServer(this.inviteCode, {
|
||||
socketID: this.$socket.client.id
|
||||
});
|
||||
if (ok) {
|
||||
this.closeMenu();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,9 +36,6 @@ import "codemirror/theme/base16-dark.css";
|
|||
import "codemirror/lib/codemirror.css";
|
||||
import { codemirror } from "vue-codemirror";
|
||||
|
||||
import config from "@/config.js";
|
||||
import { bus } from "@/main";
|
||||
import Spinner from "@/components/Spinner.vue";
|
||||
import AdminService from "@/services/adminService";
|
||||
|
||||
export default {
|
||||
|
|
@ -91,9 +88,7 @@ export default {
|
|||
}
|
||||
},
|
||||
async mounted() {
|
||||
const { ok, result, error } = await AdminService.fetchTheme(
|
||||
this.popoutDetails.id
|
||||
);
|
||||
const { ok, result } = await AdminService.fetchTheme(this.popoutDetails.id);
|
||||
if (ok) {
|
||||
this.cmOptions.orig = result.data.css;
|
||||
this.cmOptions.value = result.data.updatedCss;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import messagesService from "@/services/messagesService";
|
||||
import ServerService from "../../../../services/ServerService";
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -41,7 +40,7 @@ export default {
|
|||
serverID: this.contextDetails.serverID
|
||||
});
|
||||
},
|
||||
createInvite(serverID) {
|
||||
createInvite() {
|
||||
this.closeMenu();
|
||||
this.$store.dispatch("setPopoutVisibility", {
|
||||
name: "showServerInviteMenu",
|
||||
|
|
@ -50,9 +49,7 @@ export default {
|
|||
},
|
||||
async leaveServer() {
|
||||
this.closeMenu();
|
||||
const { ok, error, result } = await ServerService.leaveServer(
|
||||
this.contextDetails.serverID
|
||||
);
|
||||
await ServerService.leaveServer(this.contextDetails.serverID);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import config from "@/config.js";
|
||||
import { bus } from "@/main";
|
||||
import Spinner from "@/components/Spinner.vue";
|
||||
import ServerService from "@/services/ServerService";
|
||||
|
||||
|
|
@ -40,7 +38,7 @@ export default {
|
|||
},
|
||||
async mounted() {
|
||||
// get invites created by you
|
||||
const { ok, error, result } = await ServerService.getInvites(this.serverID);
|
||||
const { ok, result } = await ServerService.getInvites(this.serverID);
|
||||
if (ok) {
|
||||
let invites = [];
|
||||
for (let invite of result.data) {
|
||||
|
|
@ -66,9 +64,7 @@ export default {
|
|||
console.log("Server ID is not defined");
|
||||
return;
|
||||
}
|
||||
const { ok, error, result } = await ServerService.postInvite(
|
||||
this.serverID
|
||||
);
|
||||
const { ok, result } = await ServerService.postInvite(this.serverID);
|
||||
if (ok) {
|
||||
this.invites.push(result.data.invite_code);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import messagesService from "@/services/messagesService";
|
||||
import ServerService from "../../../../services/ServerService";
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -26,7 +25,7 @@ export default {
|
|||
y: null
|
||||
});
|
||||
},
|
||||
outsideClick(event) {
|
||||
outsideClick() {
|
||||
this.closeMenu();
|
||||
},
|
||||
viewProfile() {
|
||||
|
|
@ -51,19 +50,13 @@ export default {
|
|||
const serverID = this.contextDetails.serverID;
|
||||
const uniqueID = this.contextDetails.uniqueID;
|
||||
this.closeMenu();
|
||||
const { ok, error, result } = await ServerService.kickMember(
|
||||
serverID,
|
||||
uniqueID
|
||||
);
|
||||
await ServerService.kickMember(serverID, uniqueID);
|
||||
},
|
||||
async banMember() {
|
||||
const serverID = this.contextDetails.serverID;
|
||||
const uniqueID = this.contextDetails.uniqueID;
|
||||
this.closeMenu();
|
||||
const { ok, error, result } = await ServerService.banMember(
|
||||
serverID,
|
||||
uniqueID
|
||||
);
|
||||
await ServerService.banMember(serverID, uniqueID);
|
||||
},
|
||||
setPosition() {
|
||||
const y = this.contextDetails.y;
|
||||
|
|
|
|||
|
|
@ -11,11 +11,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import config from "@/config.js";
|
||||
import { bus } from "@/main";
|
||||
import ServerService from "@/services/ServerService";
|
||||
import { mapState } from "vuex";
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
|
|
@ -28,9 +24,7 @@ export default {
|
|||
if (!this.confirmed) {
|
||||
return (this.confirmed = true);
|
||||
}
|
||||
const { ok, error, result } = await ServerService.leaveServer(
|
||||
this.server.server_id
|
||||
);
|
||||
const { ok } = await ServerService.leaveServer(this.server.server_id);
|
||||
if (ok) {
|
||||
this.$store.dispatch("setServerSettings", { serverID: null });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,12 +76,10 @@
|
|||
|
||||
<script>
|
||||
import config from "@/config.js";
|
||||
import { bus } from "@/main";
|
||||
import ProfilePicture from "@/components/ProfilePictureTemplate.vue";
|
||||
import ErrorsListTemplate from "@/components/app/errorsListTemplate";
|
||||
import ServerService from "@/services/ServerService";
|
||||
import DropDown from "./DropDownMenu";
|
||||
import { mapState } from "vuex";
|
||||
import path from "path";
|
||||
|
||||
export default {
|
||||
|
|
@ -107,7 +105,7 @@ export default {
|
|||
async updateServer() {
|
||||
if (this.requestSent) return;
|
||||
this.requestSent = true;
|
||||
const { ok, error, result } = await ServerService.updateServer(
|
||||
const { ok, error } = await ServerService.updateServer(
|
||||
this.server.server_id,
|
||||
this.update
|
||||
);
|
||||
|
|
@ -127,7 +125,7 @@ export default {
|
|||
this.requestSent = false;
|
||||
},
|
||||
//type: avatar || banner
|
||||
imageChangeEvent(type, e) {
|
||||
imageChangeEvent(type) {
|
||||
if (!this.googleDriveLinked) {
|
||||
event.target.value = "";
|
||||
return this.$store.dispatch("setPopoutVisibility", {
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { bus } from "@/main";
|
||||
|
||||
import { isMobile } from "@/utils/Mobile";
|
||||
import isElectron from "@/utils/ElectronJS/isElectron";
|
||||
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ export default {
|
|||
if (this.requestSent) return;
|
||||
this.errors = null;
|
||||
this.requestSent = true;
|
||||
const { ok, result, error } = await userService.update(this.update);
|
||||
const { ok, error } = await userService.update(this.update);
|
||||
if (!ok) {
|
||||
if (error.response === undefined) {
|
||||
this.errors = { message: "Cant connect to server" };
|
||||
|
|
|
|||
|
|
@ -22,10 +22,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import config from "@/config.js";
|
||||
|
||||
import SettingsService from "@/services/settingsService.js";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import isElectron from "@/utils/ElectronJS/isElectron";
|
||||
import config from "@/config.js";
|
||||
const { ipcRenderer, remote } = window.require("electron");
|
||||
const Store = remote.require("electron-store");
|
||||
const store = new Store();
|
||||
|
|
@ -87,8 +85,6 @@ export default {
|
|||
.checkbox-box:hover {
|
||||
background: rgba(88, 88, 88, 0.94);
|
||||
}
|
||||
.checkbox-name {
|
||||
}
|
||||
|
||||
.message-example {
|
||||
padding: 10px;
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
|
||||
const { ok, error, result } = await userService.setSurvey(this.items);
|
||||
const { ok, error } = await userService.setSurvey(this.items);
|
||||
if (ok) {
|
||||
this.surveyValidMessage = "Saved!";
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ import MyMiniInformation from "@/components/app/MyMiniInformation.vue";
|
|||
import ChannelsList from "@/components/app/ServerTemplate/ChannelsList.vue";
|
||||
import Navigation from "@/components/app/Navigation.vue";
|
||||
import config from "@/config";
|
||||
import { bus } from "@/main";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -63,7 +62,7 @@ export default {
|
|||
visibility: true
|
||||
});
|
||||
},
|
||||
clickServer(serverID, event) {
|
||||
clickServer(serverID) {
|
||||
this.openedServer = serverID;
|
||||
this.$store.dispatch("servers/setSelectedServerID", serverID);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -46,10 +46,7 @@ export default {
|
|||
async onEnd() {
|
||||
this.drag = false;
|
||||
const channelIDs = this.serverChannels.map(s => s.channelID);
|
||||
const update = await ServerService.channelPosition(
|
||||
this.serverID,
|
||||
channelIDs
|
||||
);
|
||||
await ServerService.channelPosition(this.serverID, channelIDs);
|
||||
},
|
||||
openChannel(channel) {
|
||||
// add to local storage
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
import { bus } from "../../../main.js";
|
||||
import config from "@/config.js";
|
||||
import ProfilePicture from "@/components/ProfilePictureTemplate.vue";
|
||||
import ServerService from "@/services/ServerService";
|
||||
|
||||
export default {
|
||||
components: { ProfilePicture },
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from "vue";
|
||||
import messageFormatter from "@/utils/messageFormatter";
|
||||
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export default {
|
|||
};
|
||||
},
|
||||
async mounted() {
|
||||
const { ok, error, result } = await adminService.fetchOnlineUsers();
|
||||
const { ok, result } = await adminService.fetchOnlineUsers();
|
||||
if (ok) {
|
||||
this.users = result.data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export default {
|
|||
};
|
||||
},
|
||||
async mounted() {
|
||||
const { ok, error, result } = await adminService.fetchWaitingThemes();
|
||||
const { ok, result } = await adminService.fetchWaitingThemes();
|
||||
if (ok) {
|
||||
this.themes = result.data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export default {
|
|||
};
|
||||
},
|
||||
async mounted() {
|
||||
const { ok, error, result } = await adminService.fetchRecentCreatedUsers();
|
||||
const { ok, result } = await adminService.fetchRecentCreatedUsers();
|
||||
if (ok) {
|
||||
this.users = result.data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { bus } from "@/main";
|
||||
import Servers from "./Explore/servers";
|
||||
import Themes from "./Explore/themes";
|
||||
import ServerService from "@/services/ServerService";
|
||||
|
|
@ -126,12 +125,9 @@ export default {
|
|||
this.donateHide = true;
|
||||
},
|
||||
async joinNertiviaServer() {
|
||||
const { ok, error, result } = await ServerService.joinServerById(
|
||||
this.nertiviaServerID,
|
||||
{
|
||||
socketID: this.$socket.client.id
|
||||
}
|
||||
);
|
||||
await ServerService.joinServerById(this.nertiviaServerID, {
|
||||
socketID: this.$socket.client.id
|
||||
});
|
||||
},
|
||||
donateButton() {
|
||||
window.open("https://www.paypal.me/DiscordDevHelp", "_blank");
|
||||
|
|
|
|||
|
|
@ -33,9 +33,7 @@ export default {
|
|||
methods: {
|
||||
async getServersList() {
|
||||
this.publicServers = null;
|
||||
const { ok, result, error } = await exploreService.getServersList(
|
||||
this.params
|
||||
);
|
||||
const { ok, result } = await exploreService.getServersList(this.params);
|
||||
if (ok) {
|
||||
this.publicServers = result.data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Spinner from "@/components/Spinner.vue";
|
||||
import Navigation from "@/components/app/Navigation";
|
||||
import changelog from "@/utils/changelog.js";
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ export default {
|
|||
if (this.embed.type !== "article" && this.embed.type !== "video.other")
|
||||
return undefined;
|
||||
|
||||
const embed = this.$refs["embed"];
|
||||
const messageLog = document.querySelector(".message-logs");
|
||||
const w = messageLog.offsetWidth;
|
||||
const h = messageLog.offsetHeight;
|
||||
|
|
@ -76,7 +75,7 @@ export default {
|
|||
imageTag.style.height =
|
||||
this.clamp(newDimentions.height, 0, srcHeight) + "px";
|
||||
},
|
||||
onResize(dimensions) {
|
||||
onResize() {
|
||||
this.articleSize();
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Tab from "./Tab.vue";
|
||||
import FriendsTemplate from "./FriendsTemplate.vue";
|
||||
export default {
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div id="app">
|
||||
<vue-headful title="Nertivia" description="Nertivia Chat Client" />
|
||||
<div ref="backgroundImage" class="background-image" />
|
||||
<div ref="backgroundImage" class="background" />
|
||||
<div class="content">
|
||||
<transition name="fall-down" appear>
|
||||
<div class="header">
|
||||
|
|
@ -239,13 +239,13 @@ body {
|
|||
background: #072834;
|
||||
}
|
||||
.logo {
|
||||
background-image: url("../assets/logo.png");
|
||||
background: url("../assets/logo.png");
|
||||
background-size: 100%;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
margin-left: 10px;
|
||||
margin-left: 20px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.name {
|
||||
|
|
@ -256,7 +256,7 @@ body {
|
|||
color: white;
|
||||
}
|
||||
|
||||
.background-image {
|
||||
.background {
|
||||
z-index: -1;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
|
|
@ -291,7 +291,8 @@ body {
|
|||
margin-bottom: 0;
|
||||
user-select: none;
|
||||
flex-shrink: 0;
|
||||
border: solid 5px #0f272a;
|
||||
border: solid 2px #0f272a;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.title {
|
||||
font-size: 25px;
|
||||
|
|
@ -314,6 +315,7 @@ body {
|
|||
transition: 0.3s;
|
||||
margin: 10px;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
|
|
@ -348,6 +350,7 @@ body {
|
|||
height: 200px;
|
||||
width: 200px;
|
||||
flex-shrink: 0;
|
||||
border-radius: 4px;
|
||||
transition: 0.3s;
|
||||
}
|
||||
.feature .description {
|
||||
|
|
@ -370,6 +373,7 @@ body {
|
|||
margin-left: 5px;
|
||||
transition: 0.3s;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.link:hover {
|
||||
background: rgba(255, 255, 255, 0.26);
|
||||
|
|
|
|||
|
|
@ -246,6 +246,7 @@ body {
|
|||
z-index: 9999;
|
||||
padding-bottom: 20px;
|
||||
background: #043b4a;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.box .title {
|
||||
text-align: center;
|
||||
|
|
@ -310,6 +311,7 @@ input {
|
|||
outline: none;
|
||||
transition: 0.2s;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.button:hover {
|
||||
background: rgb(25, 151, 255);
|
||||
|
|
|
|||
|
|
@ -254,6 +254,7 @@ body {
|
|||
z-index: 9999;
|
||||
padding-bottom: 20px;
|
||||
background: #043b4a;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.box .title {
|
||||
text-align: center;
|
||||
|
|
@ -318,6 +319,7 @@ input {
|
|||
font-size: 17px;
|
||||
outline: none;
|
||||
transition: 0.2s;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.button:hover {
|
||||
|
|
|
|||
Loading…
Reference in a new issue