-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add settings button, link socials and get the changelog from github
- Loading branch information
1 parent
fdd0a8b
commit 8665506
Showing
8 changed files
with
208 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<template> | ||
<div class="changelog"> | ||
<h1>Changelog</h1> | ||
<div class="changelog-entry" v-for="release in releases"> | ||
<h2>Version {{ release.name }}</h2> | ||
<pre>{{ release.body }}</pre> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import {defineComponent} from "vue"; | ||
export default defineComponent({ | ||
name: "ChangelogComponent", | ||
data: () => ({ | ||
releases: [] as Array<any>, | ||
lastPage: 1, | ||
}), | ||
methods: { | ||
async getReleases(page: number): Promise<void> { | ||
const result = await fetch("https://api.github.com/repos/YouHaveTrouble/GuildMaster/releases?per_page=10") | ||
.catch((e) => { | ||
return null; | ||
}); | ||
if (result === null) return; | ||
const json = await result.json(); | ||
for (const release of json) { | ||
const version = {} as any; | ||
version.body = release.body.trim(); | ||
version.name = release.name; | ||
if (release.body.length === 0) continue; | ||
this.releases.push(version); | ||
} | ||
} | ||
}, | ||
async mounted() { | ||
this.getReleases(1); | ||
} | ||
}); | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.changelog { | ||
padding: 3rem; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
gap: 1rem; | ||
max-width: 45rem; | ||
h1 { | ||
font-size: 3rem; | ||
line-height: 1; | ||
margin: 0; | ||
text-align: center; | ||
} | ||
.changelog-entry { | ||
width: 100%; | ||
h2 { | ||
margin: 0; | ||
} | ||
pre { | ||
line-height: 1.2; | ||
margin: 0; | ||
white-space: pre-wrap; | ||
font-family: 'EB Garamond', serif; | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<template> | ||
<section class="technical-view"> | ||
<h1>Socials</h1> | ||
<div class="socials"> | ||
<a class="link" href="https://discord.gg/j8KK5dGBps"><img class="icon" src="/img/icons/discord.svg" alt="Discord" />Discord</a> | ||
<a class="link" href="https://github.com/YouHaveTrouble/GuildMaster"><img class="icon" src="/img/icons/github.svg" alt="GitHub" />GitHub</a> | ||
|
||
</div> | ||
|
||
<ChangelogComponent/> | ||
|
||
</section> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import {defineComponent} from "vue"; | ||
import ChangelogComponent from "@/components/ChangelogComponent.vue"; | ||
export default defineComponent({ | ||
name: "TechnicalView", | ||
components: {ChangelogComponent}, | ||
}) | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.technical-view { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
gap: 1rem; | ||
padding-block: 1rem; | ||
h1 { | ||
font-size: 3rem; | ||
line-height: 1; | ||
margin: 0; | ||
} | ||
.socials { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
gap: 1rem; | ||
} | ||
.link { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
flex-wrap: wrap; | ||
gap: 0.05rem; | ||
text-decoration: underline; | ||
font-size: 1.5rem; | ||
color: #000; | ||
font-weight: bold; | ||
} | ||
.icon { | ||
width: 2rem; | ||
height: 2rem; | ||
} | ||
} | ||
</style> |