diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..4c8c281 --- /dev/null +++ b/.babelrc @@ -0,0 +1,3 @@ +{ + "plugins": ["@babel/plugin-syntax-dynamic-import"] +} \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 122372d..5fac39c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,7 +7,7 @@ module.exports = { }, "extends": [ "eslint:recommended", - "plugin:vue/essential" + "plugin:vue/essential", ], "globals": { "Atomics": "readonly", diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json deleted file mode 100644 index 2964a7a..0000000 --- a/.vs/VSWorkspaceState.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "ExpandedNodes": [ - "", - "\\src" - ], - "SelectedNode": "\\src\\main.js", - "PreviewInSolutionExplorer": false -} \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite deleted file mode 100644 index 8941b1d..0000000 Binary files a/.vs/slnx.sqlite and /dev/null differ diff --git a/package-lock.json b/package-lock.json index f082588..c4955bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4959,7 +4959,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -4980,12 +4981,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5000,17 +5003,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -5127,7 +5133,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -5139,6 +5146,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5153,6 +5161,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -5160,12 +5169,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -5184,6 +5195,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -5264,7 +5276,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -5276,6 +5289,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -5361,7 +5375,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -5397,6 +5412,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -5416,6 +5432,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -5459,12 +5476,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -6570,9 +6589,9 @@ } }, "jquery": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", - "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==" + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.0.tgz", + "integrity": "sha512-ggRCXln9zEqv6OqAGXFEcshF5dSBvCkzj6Gm2gzuR5fWawaX8t7cxKVkkygKODrDAzKdoYw3l/e3pm3vlT4IbQ==" }, "js-levenshtein": { "version": "1.1.4", diff --git a/package.json b/package.json index cf431c8..38f794e 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "axios": "^0.18.0", "filesize": "^4.1.2", "futoji": "^0.5.0", - "jquery": "^3.3.1", + "jquery": "^3.4.0", "match-sorter": "^2.3.0", "socket.io": "^2.2.0", "socket.io-client": "^2.2.0", diff --git a/src/components/ElectronJS/FrameButtons.vue b/src/components/ElectronJS/FrameButtons.vue new file mode 100644 index 0000000..ca9572b --- /dev/null +++ b/src/components/ElectronJS/FrameButtons.vue @@ -0,0 +1,74 @@ + + + + + + diff --git a/src/components/Spinner.vue b/src/components/Spinner.vue index f04d1df..bb6c9ad 100644 --- a/src/components/Spinner.vue +++ b/src/components/Spinner.vue @@ -16,7 +16,7 @@ export default { diff --git a/src/components/app/Tabs/News.vue b/src/components/app/Tabs/News.vue index 7a8d1c9..a778257 100644 --- a/src/components/app/Tabs/News.vue +++ b/src/components/app/Tabs/News.vue @@ -84,7 +84,7 @@ export default { padding: 10px; background: rgba(0, 0, 0, 0.555); margin-bottom: 10px; - border-radius: 5px; + border-radius: 10px; } .heading.latest { background: rgba(38, 139, 255, 0.87); @@ -121,8 +121,5 @@ export default { .todo-list { margin-left: 0; } - .change-log { - margin-bottom: 20px; - } } diff --git a/src/components/app/Tabs/Servers.vue b/src/components/app/Tabs/Servers.vue new file mode 100644 index 0000000..b06f89e --- /dev/null +++ b/src/components/app/Tabs/Servers.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/src/components/homePage/LoggedIn.vue b/src/components/homePage/LoggedIn.vue index 1287e2c..66c15b5 100644 --- a/src/components/homePage/LoggedIn.vue +++ b/src/components/homePage/LoggedIn.vue @@ -86,7 +86,13 @@ export default { .username { font-size: 20px; + word-wrap: break-word; + word-break: break-word; + white-space: pre-wrap; + overflow: hidden; user-select: all; + max-width: 200px; + margin: auto; } .tag{ @@ -96,6 +102,7 @@ export default { .buttons{ display: flex; + margin: auto; } .button { diff --git a/src/utils/changelog.js b/src/utils/changelog.js index 61395b5..9fb6de8 100644 --- a/src/utils/changelog.js +++ b/src/utils/changelog.js @@ -1,9 +1,20 @@ const config = [ + { + version: 2, + title: "Make your own servers!", + shortTitle: "Servers", + date: "24/04/2019", + headColor: "rgba(155, 244, 66, 0.77)", + new: [ + "", + ], + next: [""] + }, { version: 1.5, - title: 'New Notification Sound', - shortTitle: 'Notification Sound', - date: '22/04/2019', + title: "New Notification Sound", + shortTitle: "Notification Sound", + date: "22/04/2019", headColor: "rgba(16, 0, 154, 0.77)", new: [ "Do not disturb should now mute notification sounds.", @@ -16,9 +27,9 @@ const config = [ }, { version: 1, - title: 'Profile Panel', - shortTitle: 'Profile Panel', - date: '21/04/2019', + title: "Profile Panel", + shortTitle: "Profile Panel", + date: "21/04/2019", headColor: "rgba(39, 14, 204, 0.77)", new: [ "Tabs have been added at the top of the screen.", @@ -28,197 +39,170 @@ const config = [ "Added a survey option to display your hobbies and age in your profile page." ], fix: ["Some formatting issues with custom emojis have been fixed."], - next: ['Make your own servers'] + next: ["Make your own servers"] }, { - title: 'Custom emojis!', - shortTitle: 'Custom emojis!', - date: '29/03/2019', + title: "Custom emojis!", + shortTitle: "Custom emojis!", + date: "29/03/2019", headColor: "rgba(255, 48, 48, 0.77)", new: [ - 'You can now add your own emojis for free.', + "You can now add your own emojis for free.", "User status in the top bar to easily view if someone is still online or, if you're talking to a wall on the phone.", - 'Switching dms should be faster now.' + "Switching dms should be faster now." ], - next: ['Servers', 'View an users information page'] + next: ["Servers", "View an users information page"] }, { - title: 'Emoji tabs and recent emojis', - shortTitle: 'Emoji tabs and recent emojis', - date: '22/03/2019', + title: "Emoji tabs and recent emojis", + shortTitle: "Emoji tabs and recent emojis", + date: "22/03/2019", headColor: "rgba(244, 169, 65, 0.77)", - new: [ - 'Tabs in emoji panel', - 'Recent Emojis now show in the emoji panel' - ], - fix: [ - 'Emoji panel closes when clicking outside the panel.', - ], - next: ['Custom emojis'] + new: ["Tabs in emoji panel", "Recent Emojis now show in the emoji panel"], + fix: ["Emoji panel closes when clicking outside the panel."], + next: ["Custom emojis"] }, { - title: 'Emojis :D', - shortTitle: 'Emojis', - date: '20/03/2019', + title: "Emojis :D", + shortTitle: "Emojis", + date: "20/03/2019", headColor: "rgba(17, 153, 69, 0.77)", new: [ - 'Emoji suggestions in chat when typing in any emoji :ok_hand:', - 'Emoji picker', - 'Removed planned features from changelog' + "Emoji suggestions in chat when typing in any emoji :ok_hand:", + "Emoji picker", + "Removed planned features from changelog" ], next: [ - 'make tabs in emoji panel', - 'Make it so that emoji panel closes when clicking outside the panel.', - 'Custom emojis for freeeee!', + "make tabs in emoji panel", + "Make it so that emoji panel closes when clicking outside the panel.", + "Custom emojis for freeeee!" ] }, { - title: 'Upload anything!', - shortTitle: 'Upload anything!', - date: '08/03/2019', + title: "Upload anything!", + shortTitle: "Upload anything!", + date: "08/03/2019", headColor: "rgba(38, 139, 255, 0.77)", new: [ - 'You can now upload any kind of files to friends. (Google drive required)', - 'Shift + enter should expand the text area.', - 'Made some design changes to the home page panel.' + "You can now upload any kind of files to friends. (Google drive required)", + "Shift + enter should expand the text area.", + "Made some design changes to the home page panel." ], fix: [ - 'Improved performance by using Redis in more places.', - 'Small bugs fixed around some places.' + "Improved performance by using Redis in more places.", + "Small bugs fixed around some places." ], - next: [ - 'Servers or emojis.', - ] + next: ["Servers or emojis."] }, { - title: 'Notifications are finally here!', - shortTitle: 'Notifications', - date: '18/02/2019', + title: "Notifications are finally here!", + shortTitle: "Notifications", + date: "18/02/2019", new: [ - 'When you get a notification, you will now be notified by the red flashing Indicator.', - 'When you get a new friend request, you will notified by a sound.', - 'Added a new Recents tab to easily see who messaged you last.', - 'Adjusted the padding and size in some places such as the friends list.', - 'Messages can now be formated (e.g. **Hello**)' + "When you get a notification, you will now be notified by the red flashing Indicator.", + "When you get a new friend request, you will notified by a sound.", + "Added a new Recents tab to easily see who messaged you last.", + "Adjusted the padding and size in some places such as the friends list.", + "Messages can now be formated (e.g. **Hello**)" ], fix: [ - 'Performance improvements were made in some places.', + "Performance improvements were made in some places.", 'Yesterday is now spelt with a capital "Y" in the timestamp.' ], - next: [ - 'Uploading images or any files.', - ] + next: ["Uploading images or any files."] }, { - title: 'Typing Indicator', - shortTitle: 'Typing Indicator', - date: '08/02/2019', + title: "Typing Indicator", + shortTitle: "Typing Indicator", + date: "08/02/2019", new: [ - 'See who\'s typing with the new typing indicator!', - 'Online and offline friends now have their own category.', - 'Timestamps for each message.' + "See who's typing with the new typing indicator!", + "Online and offline friends now have their own category.", + "Timestamps for each message." ], fix: [ - 'Some bugs with the message list scrolling.', - 'Added some margin and padding to some places.' + "Some bugs with the message list scrolling.", + "Added some margin and padding to some places." ], - next: [ - 'Message notifications.', - ] + next: ["Message notifications."] }, { - title: 'Avatar', - shortTitle: 'Avatar', - date: '29/01/2019', + title: "Avatar", + shortTitle: "Avatar", + date: "29/01/2019", new: [ - 'Settings page has been added.', - 'You can now set your own profile picture from the settings page.', - 'You can now logout within the app.' + "Settings page has been added.", + "You can now set your own profile picture from the settings page.", + "You can now logout within the app." ], - next: [ - 'Typing status.', - ] + next: ["Typing status."] }, { - title: 'Message limit, Chat message changes', - shortTitle: 'Message limit', - date: '25/01/2019', + title: "Message limit, Chat message changes", + shortTitle: "Message limit", + date: "25/01/2019", + new: ["Changed the design of messages slightly and changed the font size."], + fix: ["Messages now have a limit of 5000 characters."], + next: ["I have decided to add profile pictures in the next update."] + }, + + { + title: "ReeeeCaptcha :D", + shortTitle: "ReCaptcha", + date: "23/01/2019", new: [ - 'Changed the design of messages slightly and changed the font size.' + "Added reCaptcha to our login and register so our website is safe from any spam accounts that could be created by bots." + ], + next: ["Typing status or maybe profile pictures (haven't decided yet)"] + }, + { + title: "Online status and fixes", + shortTitle: "Online status and fixes", + date: "22/01/2019", + new: [ + "See if your friends are online, away, busy, looking to play or offline.", + "Planned features and the latest change now shows in app." ], fix: [ - 'Messages now have a limit of 5000 characters.', - ], + "Messages will no longer show twice when sending.", + "Adjusted padding on some places.", + "Message font is now much smaller." + ] + }, + { + title: "Send and receive messages (experimental)", + shortTitle: "Send and receive messages", + date: "14/01/2019", + new: ["You can now send messages to your friends!"], next: [ - 'I have decided to add profile pictures in the next update.', + "improving the new messaging functionality and adding typing indicators, online statuses." ] }, { - title: 'ReeeeCaptcha :D', - shortTitle: 'ReCaptcha', - date: '23/01/2019', + title: "Public change log, Accept friends", + shortTitle: "Public change log, Accept friends", + date: "09/01/2019", new: [ - 'Added reCaptcha to our login and register so our website is safe from any spam accounts that could be created by bots.', + "Added a change log so you can see how much progress is being made to Nertivia.", + "Adding friends, denying requests, accepting requests is now possible." ], - next: [ - 'Typing status or maybe profile pictures (haven\'t decided yet)', - ] - }, - { - - title: 'Online status and fixes', - shortTitle: 'Online status and fixes', - date: '22/01/2019', - new: [ - 'See if your friends are online, away, busy, looking to play or offline.', - 'Planned features and the latest change now shows in app.' - ], - fix: [ - 'Messages will no longer show twice when sending.', - 'Adjusted padding on some places.', - 'Message font is now much smaller.' - ] - }, - { - - title: 'Send and receive messages (experimental)', - shortTitle: 'Send and receive messages', - date: '14/01/2019', - new: [ - 'You can now send messages to your friends!', - ], - next: [ - 'improving the new messaging functionality and adding typing indicators, online statuses.', - ] + next: ["Ability to send messages."] }, { - title: 'Public change log, Accept friends', - shortTitle: 'Public change log, Accept friends', - date: '09/01/2019', - new: [ - 'Added a change log so you can see how much progress is being made to Nertivia.', - 'Adding friends, denying requests, accepting requests is now possible.' - ], - next: [ - 'Ability to send messages.', - ] + title: "Issues fixed", + shortTitle: "Issues fixed", + date: "04/01/2019", + msg: "Tweaks have been made to the website here and there." }, { - title: 'Issues fixed', - shortTitle: 'Issues fixed', - date: '04/01/2019', - msg: 'Tweaks have been made to the website here and there.' - }, - - { - title: 'Compatibility', - date: '31/12/2018', - msg: 'Website is now compatible for viewing on mobile, tablet and desktop devices.' + title: "Compatibility", + date: "31/12/2018", + msg: + "Website is now compatible for viewing on mobile, tablet and desktop devices." } -] +]; - -export default config; \ No newline at end of file +export default config; diff --git a/src/views/App.vue b/src/views/App.vue index 9414761..627b2a4 100644 --- a/src/views/App.vue +++ b/src/views/App.vue @@ -5,32 +5,38 @@
-
+
+
+
+ list_alt + Changelog +
-
- list_alt - Changelog -
+
+ chat + Direct Message +
-
- chat - Direct Message -
- -
- forum - Servers -
-
- rss_feed - Server Browser +
+ forum + Servers +
+
+ rss_feed + Server Browser +
+
+
- - -
-
cached
+ + + +
+
+ cached +
Coming soon!
@@ -44,26 +50,41 @@ import { bus } from "../main"; import Popouts from "@/components/app/Popouts/Popouts.vue"; -import changelog from '@/utils/changelog.js'; +import changelog from "@/utils/changelog.js"; import ConnectingScreen from "./../components/app/ConnectingScreen.vue"; +import Spinner from "./../components/Spinner.vue"; -const News = () => import('./../components/app/Tabs/News.vue'); -const DirectMessage = () => import('./../components/app/Tabs/DirectMessage.vue'); - - +const ElectronFrameButtons = () => + import("./../components/ElectronJS/FrameButtons.vue"); + +const News = () => import("./../components/app/Tabs/News.vue"); +//const DirectMessage = () => import('./../components/app/Tabs/DirectMessage.vue'); +const DirectMessage = () => ({ + component: import("./../components/app/Tabs/DirectMessage.vue"), + loading: Spinner, + delay: 0 +}); +const Servers = () => ({ + component: import("./../components/app/Tabs/Servers.vue"), + loading: Spinner, + delay: 0 +}); export default { name: "app", components: { + ElectronFrameButtons, DirectMessage, + Servers, ConnectingScreen, Popouts, News }, data() { return { - currentTab: localStorage.getItem('currentTab') || 0, - title: "Nertivia" + currentTab: localStorage.getItem("currentTab") || 0, + title: "Nertivia", + isElectron: window && window.process && window.process.type }; }, methods: { @@ -73,14 +94,13 @@ export default { } }, mounted() { - // check if changelog is updated - const seenVersion = localStorage.getItem('changelog-version-seen'); + const seenVersion = localStorage.getItem("changelog-version-seen"); if (!seenVersion || seenVersion < changelog[0].version) { this.currentTab = 0; - localStorage.setItem('currentTab', 0) + localStorage.setItem("currentTab", 0); } - localStorage.setItem('changelog-version-seen', changelog[0].version) + localStorage.setItem("changelog-version-seen", changelog[0].version); bus.$on("title:change", title => { this.title = title; }); @@ -95,8 +115,7 @@ export default {