Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
0ccb76345e | |||
33c11dd391 | |||
420f4b141e | |||
9c7834f443 | |||
800e45fe96 | |||
3963f6decf |
13
README.md
@@ -1,7 +1,16 @@
|
||||
# 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
|
||||
This is the frontend to the [csgowtfd](https://git.harting.dev/CSGOWTF/csgowtfd) backend.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "csgowtf",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"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 = () => {
|
||||
window._paq.push(['rememberCookieConsentGiven'])
|
||||
cookies.set('consent', 'given')
|
||||
cookies.set('consent', 'given', Infinity)
|
||||
|
||||
if (tracking.value){
|
||||
window._paq.push(['rememberConsentGiven'])
|
||||
|
@@ -7,7 +7,7 @@
|
||||
@translated="handleTranslatedText"
|
||||
/>
|
||||
<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>
|
||||
<tr v-for="(m, id) in data.chat" :key="id">
|
||||
<td class="td-time">
|
||||
@@ -79,23 +79,20 @@ export default {
|
||||
const data = reactive({
|
||||
chat: [],
|
||||
translatedText: [],
|
||||
originalChat: []
|
||||
originalChat: [],
|
||||
clientWidth: 0
|
||||
})
|
||||
|
||||
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) {
|
||||
data.translatedText = await setPlayer(sortChatHistory(res, true))
|
||||
data.chat = data.translatedText
|
||||
if (toggle === 'translated') {
|
||||
data.translatedText = await setPlayer(sortChatHistory(res, true))
|
||||
data.chat = data.translatedText
|
||||
} else if (toggle === 'original') {
|
||||
data.chat = data.originalChat
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,8 +155,21 @@ export default {
|
||||
return arr
|
||||
}
|
||||
|
||||
const sizeTable = () => {
|
||||
if (document.documentElement.clientWidth <= 768) {
|
||||
data.clientWidth = document.documentElement.clientWidth - 32
|
||||
} else {
|
||||
data.clientWidth = 700
|
||||
}
|
||||
}
|
||||
|
||||
window.onresize = () => {
|
||||
sizeTable()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getChatHistory()
|
||||
sizeTable()
|
||||
})
|
||||
|
||||
return {
|
||||
@@ -188,69 +198,77 @@ export default {
|
||||
margin-top: .5rem;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 700px;
|
||||
max-width: 700px;
|
||||
td {
|
||||
padding: .5rem;
|
||||
}
|
||||
td {
|
||||
padding: .5rem;
|
||||
}
|
||||
|
||||
.td-time {
|
||||
width: 80px;
|
||||
}
|
||||
.td-time {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.td-avatar {
|
||||
width: 30px;
|
||||
.avatar {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.td-avatar {
|
||||
width: 30px;
|
||||
|
||||
.td-name {
|
||||
width: 250px;
|
||||
max-width: 250px;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
.tracked {
|
||||
font-size: .8rem;
|
||||
margin-right: .2rem;
|
||||
}
|
||||
|
||||
.ban-shadow {
|
||||
color: red;
|
||||
text-shadow: 0 0 1rem orangered;
|
||||
}
|
||||
}
|
||||
|
||||
.td-icon {
|
||||
.avatar {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.fa-caret-right {
|
||||
font-size: 1rem;
|
||||
}
|
||||
.td-name {
|
||||
width: 200px;
|
||||
max-width: 200px;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
.tracked {
|
||||
font-size: .8rem;
|
||||
margin-right: .2rem;
|
||||
}
|
||||
|
||||
.ban-shadow {
|
||||
color: red;
|
||||
text-shadow: 0 0 1rem orangered;
|
||||
}
|
||||
}
|
||||
|
||||
.td-icon {
|
||||
width: 20px;
|
||||
|
||||
.fa-caret-right {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.td-message {
|
||||
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: 320px;
|
||||
width: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 576px) {
|
||||
.container {
|
||||
margin-left: 0;
|
||||
}
|
||||
.td-avatar {
|
||||
display: none;
|
||||
}
|
||||
.td-name {
|
||||
width: 120px;
|
||||
max-width: 120px;
|
||||
}
|
||||
.td-message {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@@ -33,7 +33,7 @@ export default {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
setup(props) {
|
||||
setup() {
|
||||
const store = useStore()
|
||||
|
||||
const data = reactive({
|
||||
@@ -67,18 +67,12 @@ export default {
|
||||
|
||||
toggleShow()
|
||||
|
||||
if (!props.translated && toggle.value === 'translated') {
|
||||
response = await GetChatHistoryTranslated(store, store.state.matchDetails.match_id)
|
||||
}
|
||||
if (props.translated && toggle.value === 'translated')
|
||||
response = 'already translated'
|
||||
if (toggle.value === 'original')
|
||||
response = 'original'
|
||||
response = await GetChatHistoryTranslated(store, store.state.matchDetails.match_id)
|
||||
|
||||
if (refreshButton.classList.contains('show'))
|
||||
refreshButton.classList.remove('show')
|
||||
|
||||
return response
|
||||
return [response, toggle.value]
|
||||
}
|
||||
|
||||
const toggleShow = () => {
|
||||
@@ -108,6 +102,7 @@ export default {
|
||||
.toggle-btn {
|
||||
margin: 0 auto;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
|
||||
.fa {
|
||||
display: none;
|
||||
|