diff --git a/package-lock.json b/package-lock.json index 602f3d0..4bed7d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "mercury", "version": "0.0.0", "dependencies": { + "@vueuse/core": "^8.1.2", "animate.css": "^4.1.1", "bennc-js": "git+https://git.jacknet.io/TerribleCodeClub/bennc-js.git", "bootstrap": "^5.1.3", @@ -22,6 +23,7 @@ "vue-router": "^4.0.14" }, "devDependencies": { + "@types/bootstrap": "^5.1.9", "@vitejs/plugin-vue": "^2.2.0", "vite": "^2.8.0" } @@ -41,7 +43,6 @@ "version": "2.11.4", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.4.tgz", "integrity": "sha512-q/ytXxO5NKvyT37pmisQAItCFqA7FD/vNb8dgaJy3/630Fsc+Mz9/9f2SziBoIZ30TJooXyTwZmhi1zjXmObYg==", - "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/popperjs" @@ -52,6 +53,16 @@ "resolved": "https://registry.npmjs.org/@sphinxxxx/color-conversion/-/color-conversion-2.2.2.tgz", "integrity": "sha512-XExJS3cLqgrmNBIP3bBw6+1oQ1ksGjFh0+oClDKFYpCCqx/hlqwWO5KO/S63fzUo67SxI9dMrF0y5T/Ey7h8Zw==" }, + "node_modules/@types/bootstrap": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/@types/bootstrap/-/bootstrap-5.1.9.tgz", + "integrity": "sha512-Tembe6lt7819EUzV5LSG9uuwULm4hdEGV9LZ8QBYpWc0J+a+9DdmJEwZ4FMaXGVJWwumTPSkJ8JQF0/KDAmXYg==", + "dev": true, + "dependencies": { + "@popperjs/core": "^2.9.2", + "@types/jquery": "*" + } + }, "node_modules/@types/color": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/color/-/color-3.0.3.tgz", @@ -73,6 +84,21 @@ "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" }, + "node_modules/@types/jquery": { + "version": "3.5.14", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.14.tgz", + "integrity": "sha512-X1gtMRMbziVQkErhTQmSe2jFwwENA/Zr+PprCkF63vFq+Yt5PZ4AlKqgmeNlwgn7dhsXEK888eIW2520EpC+xg==", + "dev": true, + "dependencies": { + "@types/sizzle": "*" + } + }, + "node_modules/@types/sizzle": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", + "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", + "dev": true + }, "node_modules/@types/uuid": { "version": "8.3.4", "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", @@ -198,6 +224,87 @@ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.31.tgz", "integrity": "sha512-ymN2pj6zEjiKJZbrf98UM2pfDd6F2H7ksKw7NDt/ZZ1fh5Ei39X5tABugtT03ZRlWd9imccoK0hE8hpjpU7irQ==" }, + "node_modules/@vueuse/core": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.1.2.tgz", + "integrity": "sha512-prI2GzigBUtJNTcwRjJPzUPLFoRZM1RZFR464DFdwgU8TxRFf7dRvuvWFDNbCATzLExHFnGI3zTp9GkXTTZxgQ==", + "dependencies": { + "@vueuse/metadata": "8.1.2", + "@vueuse/shared": "8.1.2", + "vue-demi": "*" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.1.0", + "vue": "^2.6.0 || ^3.2.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + }, + "vue": { + "optional": true + } + } + }, + "node_modules/@vueuse/core/node_modules/@vueuse/shared": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.1.2.tgz", + "integrity": "sha512-4Hb9iPUhAz7ghO4hgvB2GV2FOy12qQGdhmQ+9HC6QN/J66DELhmxAvkZAtK5FBqZOSwzKszPqNqoyhRKQrrWGQ==", + "dependencies": { + "vue-demi": "*" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.1.0", + "vue": "^2.6.0 || ^3.2.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + }, + "vue": { + "optional": true + } + } + }, + "node_modules/@vueuse/core/node_modules/vue-demi": { + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.12.4.tgz", + "integrity": "sha512-ztPDkFt0TSUdoq1ZI6oD730vgztBkiByhUW7L1cOTebiSBqSYfSQgnhYakYigBkyAybqCTH7h44yZuDJf2xILQ==", + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/@vueuse/metadata": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.1.2.tgz", + "integrity": "sha512-LrPtdiYMleygnGmz8mEmYI9h4Eyo+/igxZWNrwuPnqvL9pIO+8eUpBgPLH5GowKv3Nu0LPZSXSIuaWVJBSU1Cg==", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/animate.css": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz", @@ -965,14 +1072,23 @@ "@popperjs/core": { "version": "2.11.4", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.4.tgz", - "integrity": "sha512-q/ytXxO5NKvyT37pmisQAItCFqA7FD/vNb8dgaJy3/630Fsc+Mz9/9f2SziBoIZ30TJooXyTwZmhi1zjXmObYg==", - "peer": true + "integrity": "sha512-q/ytXxO5NKvyT37pmisQAItCFqA7FD/vNb8dgaJy3/630Fsc+Mz9/9f2SziBoIZ30TJooXyTwZmhi1zjXmObYg==" }, "@sphinxxxx/color-conversion": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/@sphinxxxx/color-conversion/-/color-conversion-2.2.2.tgz", "integrity": "sha512-XExJS3cLqgrmNBIP3bBw6+1oQ1ksGjFh0+oClDKFYpCCqx/hlqwWO5KO/S63fzUo67SxI9dMrF0y5T/Ey7h8Zw==" }, + "@types/bootstrap": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/@types/bootstrap/-/bootstrap-5.1.9.tgz", + "integrity": "sha512-Tembe6lt7819EUzV5LSG9uuwULm4hdEGV9LZ8QBYpWc0J+a+9DdmJEwZ4FMaXGVJWwumTPSkJ8JQF0/KDAmXYg==", + "dev": true, + "requires": { + "@popperjs/core": "^2.9.2", + "@types/jquery": "*" + } + }, "@types/color": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/color/-/color-3.0.3.tgz", @@ -994,6 +1110,21 @@ "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" }, + "@types/jquery": { + "version": "3.5.14", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.14.tgz", + "integrity": "sha512-X1gtMRMbziVQkErhTQmSe2jFwwENA/Zr+PprCkF63vFq+Yt5PZ4AlKqgmeNlwgn7dhsXEK888eIW2520EpC+xg==", + "dev": true, + "requires": { + "@types/sizzle": "*" + } + }, + "@types/sizzle": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", + "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", + "dev": true + }, "@types/uuid": { "version": "8.3.4", "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", @@ -1110,6 +1241,37 @@ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.31.tgz", "integrity": "sha512-ymN2pj6zEjiKJZbrf98UM2pfDd6F2H7ksKw7NDt/ZZ1fh5Ei39X5tABugtT03ZRlWd9imccoK0hE8hpjpU7irQ==" }, + "@vueuse/core": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.1.2.tgz", + "integrity": "sha512-prI2GzigBUtJNTcwRjJPzUPLFoRZM1RZFR464DFdwgU8TxRFf7dRvuvWFDNbCATzLExHFnGI3zTp9GkXTTZxgQ==", + "requires": { + "@vueuse/metadata": "8.1.2", + "@vueuse/shared": "8.1.2", + "vue-demi": "*" + }, + "dependencies": { + "@vueuse/shared": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.1.2.tgz", + "integrity": "sha512-4Hb9iPUhAz7ghO4hgvB2GV2FOy12qQGdhmQ+9HC6QN/J66DELhmxAvkZAtK5FBqZOSwzKszPqNqoyhRKQrrWGQ==", + "requires": { + "vue-demi": "*" + } + }, + "vue-demi": { + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.12.4.tgz", + "integrity": "sha512-ztPDkFt0TSUdoq1ZI6oD730vgztBkiByhUW7L1cOTebiSBqSYfSQgnhYakYigBkyAybqCTH7h44yZuDJf2xILQ==", + "requires": {} + } + } + }, + "@vueuse/metadata": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.1.2.tgz", + "integrity": "sha512-LrPtdiYMleygnGmz8mEmYI9h4Eyo+/igxZWNrwuPnqvL9pIO+8eUpBgPLH5GowKv3Nu0LPZSXSIuaWVJBSU1Cg==" + }, "animate.css": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz", diff --git a/package.json b/package.json index 7b101c4..f287256 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "preview": "vite preview" }, "dependencies": { + "@vueuse/core": "^8.1.2", "animate.css": "^4.1.1", "bennc-js": "git+https://git.jacknet.io/TerribleCodeClub/bennc-js.git", "bootstrap": "^5.1.3", @@ -22,6 +23,7 @@ "vue-router": "^4.0.14" }, "devDependencies": { + "@types/bootstrap": "^5.1.9", "@vitejs/plugin-vue": "^2.2.0", "vite": "^2.8.0" } diff --git a/src/App.vue b/src/App.vue index 7fbbef6..9afc2ae 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,4 +1,16 @@ \ No newline at end of file diff --git a/src/components/common/Key.vue b/src/components/common/Key.vue index 09e17a0..540aa17 100644 --- a/src/components/common/Key.vue +++ b/src/components/common/Key.vue @@ -8,7 +8,7 @@ import { computed, ref } from 'vue' import { onBeforeRouteUpdate } from 'vue-router' const props = defineProps(['channel']) -const key = computed(() => { return props.channel.key.base64 }) +const key = computed(() => { return props.channel.key }) const locked = ref(true) diff --git a/src/components/conversation/Message.vue b/src/components/conversation/Message.vue index a3a8d8a..acb516c 100644 --- a/src/components/conversation/Message.vue +++ b/src/components/conversation/Message.vue @@ -1,7 +1,7 @@ @@ -9,10 +9,14 @@ diff --git a/src/components/conversation/MessageInput.vue b/src/components/conversation/MessageInput.vue index aa6a0d4..312e146 100644 --- a/src/components/conversation/MessageInput.vue +++ b/src/components/conversation/MessageInput.vue @@ -27,7 +27,7 @@ const sendMessage = () => { if (message.value.trim() === '') { animateCSS(input.value, 'headShake') } else { - ws.send(packers[MessageTypes.Basic](encoder.encode(message.value), channel.value.key.raw)) + ws.send(packers[MessageTypes.Basic](encoder.encode(message.value), channel.value.rawKey)) messageStore.addMessage(channel.value.id, -1, message.value) message.value = '' } diff --git a/src/components/settings/ColorPicker.vue b/src/components/settings/ColorPicker.vue deleted file mode 100644 index c66fe31..0000000 --- a/src/components/settings/ColorPicker.vue +++ /dev/null @@ -1,62 +0,0 @@ - - - - - diff --git a/src/components/Sidebar.vue b/src/components/sidebar/Sidebar.vue similarity index 69% rename from src/components/Sidebar.vue rename to src/components/sidebar/Sidebar.vue index c7b863b..2c62d5b 100644 --- a/src/components/Sidebar.vue +++ b/src/components/sidebar/Sidebar.vue @@ -2,10 +2,10 @@
-
+
Channels
@@ -21,10 +21,13 @@ \ No newline at end of file diff --git a/src/components/userSettings/ColorPicker.vue b/src/components/userSettings/ColorPicker.vue new file mode 100644 index 0000000..59f90be --- /dev/null +++ b/src/components/userSettings/ColorPicker.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/src/components/userSettings/UserSettings.vue b/src/components/userSettings/UserSettings.vue new file mode 100644 index 0000000..8b05af7 --- /dev/null +++ b/src/components/userSettings/UserSettings.vue @@ -0,0 +1,40 @@ + + + \ No newline at end of file diff --git a/src/components/userlist/User.vue b/src/components/userlist/User.vue index 2031233..b2510f0 100644 --- a/src/components/userlist/User.vue +++ b/src/components/userlist/User.vue @@ -4,13 +4,12 @@ \ No newline at end of file diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 2b16900..485f5a2 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -1,6 +1,5 @@ @@ -26,10 +25,4 @@ import Content from '../components/Content.vue' #logo { filter: invert(80%); } -/* h1 { - --animate-delay: 0.5s; -} -h2 { - --animate-delay: 0.5s; -} */ \ No newline at end of file diff --git a/src/views/SettingsView.vue b/src/views/SettingsView.vue index d13475f..13cf15d 100644 --- a/src/views/SettingsView.vue +++ b/src/views/SettingsView.vue @@ -5,68 +5,20 @@ - - \ No newline at end of file + \ No newline at end of file