Skip to content

Commit

Permalink
feat(Teckie): add activity (#9280)
Browse files Browse the repository at this point in the history
Signed-off-by: bakzkndd <[email protected]>
Co-authored-by: Florian Metz <[email protected]>
Co-authored-by: Bas van Zanten <[email protected]>
Co-authored-by: github plz bring back DarkVIllager <[email protected]>
Co-authored-by: Bas van Zanten <[email protected]>
Co-authored-by: Daniel Lau <[email protected]>
  • Loading branch information
6 people authored Mar 3, 2025
1 parent 8d12d97 commit 665c08b
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
24 changes: 24 additions & 0 deletions websites/T/Teckie/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$schema": "https://schemas.premid.app/metadata/1.13",
"apiVersion": 1,
"author": {
"id": "343103632453009408",
"name": "bakzkndd"
},
"service": "Teckie",
"description": {
"en": "Discover the ultimate partner for all your technology needs at Teckie. We offer a wide range of solutions including refurbished gaming computers, prebuilt systems and custom computers, all created locally in the heart of the Netherlands.",
"nl": "Ontdek de ultieme partner voor al je technologiebehoeften bij Teckie. Wij bieden een breed scala aan oplossingen, waaronder refurbished game computers, prebuilt-systemen en op maat gemaakte computers, allemaal lokaal gecreëerd in het hart van Nederland."
},
"url": "teckie.nl",
"version": "1.0.0",
"logo": "https://i.imgur.com/DGq6NNv.png",
"thumbnail": "https://i.imgur.com/6jejHTw.png",
"color": "#a859f8",
"category": "other",
"tags": [
"pc",
"store",
"shopping"
]
}
46 changes: 46 additions & 0 deletions websites/T/Teckie/presence.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
const presence = new Presence({
clientId: '576477712470769675',
})

enum ActivityAssets {
Logo = 'https://i.imgur.com/DGq6NNv.png',
}

presence.on('UpdateData', async () => {
const presenceData: PresenceData = {
largeImageKey: ActivityAssets.Logo,
details: 'Bezoekt Teckie',
}
const { pathname } = document.location

let path = 0

switch (pathname.split('/')[1]) {
case 'pages': {
presenceData.details = 'Bekijkt een pagina'
path = 1
break
}
case 'products': {
presenceData.details = 'Bekijkt een product'
path = 2
break
}
case 'policies': {
presenceData.details = 'Bekijkt een policy'
path = 2
break
}
case 'blogs': {
presenceData.details = `Bekijkt een ${pathname.split('/')[2]} blog`
path = 2
break
}
}

if (path !== 0) {
presenceData.state = `${path === 1 ? 'Pagina: ' : ''}${document.title.split('– Teckie')?.[0]}`
}

presence.setActivity(presenceData)
})

0 comments on commit 665c08b

Please sign in to comment.