Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
0ccb76345e | |||
33c11dd391 | |||
420f4b141e | |||
9c7834f443 | |||
800e45fe96 | |||
3963f6decf |
13
README.md
@@ -1,7 +1,16 @@
|
|||||||
# CSGOW.TF
|
# CSGOW.TF
|
||||||
[](https://git.harting.dev/CSGOWTF/csgowtf/src/branch/master/LICENSE) [](https://liberapay.com/CSGOWTF/)
|
|
||||||
|
|
||||||
Statistics for CS:GO matchmaking matches.
|
[](https://vuejs.org/)
|
||||||
|
[](https://go.dev/)
|
||||||
|
[](https://git.harting.dev/CSGOWTF/csgowtf/src/branch/master/LICENSE)
|
||||||
|
[](https://liberapay.com/CSGOWTF/)
|
||||||
|
[](https://liberapay.com/CSGOWTF/)
|
||||||
|
[](https://csgow.tf/)
|
||||||
|
<!--[](https://www.typescriptlang.org/)-->
|
||||||
|
|
||||||
|
### Statistics for CS:GO matchmaking matches.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Backend
|
## Backend
|
||||||
This is the frontend to the [csgowtfd](https://git.harting.dev/CSGOWTF/csgowtfd) backend.
|
This is the frontend to the [csgowtfd](https://git.harting.dev/CSGOWTF/csgowtfd) backend.
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "csgowtf",
|
"name": "csgowtf",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
|
2054
public/images/map_icons/map_icon_cs_climb.svg
Normal file
After Width: | Height: | Size: 212 KiB |
2061
public/images/map_icons/map_icon_de_crete.svg
Normal file
After Width: | Height: | Size: 212 KiB |
2053
public/images/map_icons/map_icon_de_hive.svg
Normal file
After Width: | Height: | Size: 212 KiB |
2051
public/images/map_icons/map_icon_de_iris.svg
Normal file
After Width: | Height: | Size: 212 KiB |
2064
public/images/map_icons/map_icon_dz_ember.svg
Normal file
After Width: | Height: | Size: 213 KiB |
2077
public/images/map_icons/map_icon_dz_vineyard.svg
Normal file
After Width: | Height: | Size: 214 KiB |
BIN
public/images/map_screenshots/cs_climb.jpg
Normal file
After Width: | Height: | Size: 503 KiB |
BIN
public/images/map_screenshots/cs_climb.webp
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
public/images/map_screenshots/de_crete.jpg
Normal file
After Width: | Height: | Size: 458 KiB |
BIN
public/images/map_screenshots/de_crete.webp
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
public/images/map_screenshots/de_hive.jpg
Normal file
After Width: | Height: | Size: 259 KiB |
BIN
public/images/map_screenshots/de_hive.webp
Normal file
After Width: | Height: | Size: 904 KiB |
BIN
public/images/map_screenshots/de_iris.jpg
Normal file
After Width: | Height: | Size: 753 KiB |
BIN
public/images/map_screenshots/de_iris.webp
Normal file
After Width: | Height: | Size: 1.8 MiB |
@@ -39,7 +39,7 @@ export default {
|
|||||||
|
|
||||||
const handleConsent = () => {
|
const handleConsent = () => {
|
||||||
window._paq.push(['rememberCookieConsentGiven'])
|
window._paq.push(['rememberCookieConsentGiven'])
|
||||||
cookies.set('consent', 'given')
|
cookies.set('consent', 'given', Infinity)
|
||||||
|
|
||||||
if (tracking.value){
|
if (tracking.value){
|
||||||
window._paq.push(['rememberConsentGiven'])
|
window._paq.push(['rememberConsentGiven'])
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
@translated="handleTranslatedText"
|
@translated="handleTranslatedText"
|
||||||
/>
|
/>
|
||||||
<div v-if="data.chat.length > 0" class="chat-history mt-2">
|
<div v-if="data.chat.length > 0" class="chat-history mt-2">
|
||||||
<table class="table table-borderless">
|
<table id="chat" :style="`max-width: ${data.clientWidth}px; width: ${data.clientWidth}px`" class="table table-borderless">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(m, id) in data.chat" :key="id">
|
<tr v-for="(m, id) in data.chat" :key="id">
|
||||||
<td class="td-time">
|
<td class="td-time">
|
||||||
@@ -79,23 +79,20 @@ export default {
|
|||||||
const data = reactive({
|
const data = reactive({
|
||||||
chat: [],
|
chat: [],
|
||||||
translatedText: [],
|
translatedText: [],
|
||||||
originalChat: []
|
originalChat: [],
|
||||||
|
clientWidth: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
const handleTranslatedText = async (e) => {
|
const handleTranslatedText = async (e) => {
|
||||||
const res = await e
|
const [res, toggle] = await e
|
||||||
|
|
||||||
if (res === 'original' && data.originalChat.length > 0) {
|
|
||||||
data.chat = data.originalChat
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (res === 'already translated' && data.translatedText.length > 0) {
|
|
||||||
data.chat = data.translatedText
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (res !== null) {
|
if (res !== null) {
|
||||||
|
if (toggle === 'translated') {
|
||||||
data.translatedText = await setPlayer(sortChatHistory(res, true))
|
data.translatedText = await setPlayer(sortChatHistory(res, true))
|
||||||
data.chat = data.translatedText
|
data.chat = data.translatedText
|
||||||
|
} else if (toggle === 'original') {
|
||||||
|
data.chat = data.originalChat
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,8 +155,21 @@ export default {
|
|||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const sizeTable = () => {
|
||||||
|
if (document.documentElement.clientWidth <= 768) {
|
||||||
|
data.clientWidth = document.documentElement.clientWidth - 32
|
||||||
|
} else {
|
||||||
|
data.clientWidth = 700
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onresize = () => {
|
||||||
|
sizeTable()
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getChatHistory()
|
getChatHistory()
|
||||||
|
sizeTable()
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -188,9 +198,6 @@ export default {
|
|||||||
margin-top: .5rem;
|
margin-top: .5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
|
||||||
width: 700px;
|
|
||||||
max-width: 700px;
|
|
||||||
td {
|
td {
|
||||||
padding: .5rem;
|
padding: .5rem;
|
||||||
}
|
}
|
||||||
@@ -201,6 +208,7 @@ table {
|
|||||||
|
|
||||||
.td-avatar {
|
.td-avatar {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
@@ -209,8 +217,8 @@ table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.td-name {
|
.td-name {
|
||||||
width: 250px;
|
width: 200px;
|
||||||
max-width: 250px;
|
max-width: 200px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -237,20 +245,30 @@ table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.td-message {
|
.td-message {
|
||||||
width: 320px;
|
width: 400px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
.container {
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: flex-start;
|
||||||
|
margin-left: 1rem;
|
||||||
|
}
|
||||||
|
.td-name {
|
||||||
|
width: 120px !important;
|
||||||
|
max-width: 120px !important;
|
||||||
|
}
|
||||||
|
.td-message {
|
||||||
|
width: auto !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 576px) {
|
@media screen and (max-width: 576px) {
|
||||||
|
.container {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
.td-avatar {
|
.td-avatar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.td-name {
|
|
||||||
width: 120px;
|
|
||||||
max-width: 120px;
|
|
||||||
}
|
|
||||||
.td-message {
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -33,7 +33,7 @@ export default {
|
|||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup() {
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
@@ -67,18 +67,12 @@ export default {
|
|||||||
|
|
||||||
toggleShow()
|
toggleShow()
|
||||||
|
|
||||||
if (!props.translated && toggle.value === 'translated') {
|
|
||||||
response = await GetChatHistoryTranslated(store, store.state.matchDetails.match_id)
|
response = await GetChatHistoryTranslated(store, store.state.matchDetails.match_id)
|
||||||
}
|
|
||||||
if (props.translated && toggle.value === 'translated')
|
|
||||||
response = 'already translated'
|
|
||||||
if (toggle.value === 'original')
|
|
||||||
response = 'original'
|
|
||||||
|
|
||||||
if (refreshButton.classList.contains('show'))
|
if (refreshButton.classList.contains('show'))
|
||||||
refreshButton.classList.remove('show')
|
refreshButton.classList.remove('show')
|
||||||
|
|
||||||
return response
|
return [response, toggle.value]
|
||||||
}
|
}
|
||||||
|
|
||||||
const toggleShow = () => {
|
const toggleShow = () => {
|
||||||
@@ -108,6 +102,7 @@ export default {
|
|||||||
.toggle-btn {
|
.toggle-btn {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
.fa {
|
.fa {
|
||||||
display: none;
|
display: none;
|
||||||
|