mirror of
https://github.com/Pandipipas/scoreko-dev.git
synced 2026-06-06 03:32:06 +00:00
Merge branch 'master' into translate-all-spanish-to-english
This commit is contained in:
@@ -15,8 +15,8 @@ type ReleaseResponse = {
|
||||
|
||||
const appName = 'Scoreko-dev';
|
||||
const currentVersion = import.meta.env.PACKAGE_VERSION;
|
||||
const repoOwner = ref(localStorage.getItem('scoreko:repoOwner') ?? 'Pandipipas');
|
||||
const repoName = ref(localStorage.getItem('scoreko:repoName') ?? 'scoreko-dev');
|
||||
const updateRepoOwner = 'Pandipipas';
|
||||
const updateRepoName = 'scoreko';
|
||||
|
||||
const checkingUpdates = ref(false);
|
||||
const updateError = ref('');
|
||||
@@ -58,7 +58,7 @@ const hasUpdate = computed(() => {
|
||||
return compareVersions(normalizeVersion(latestRelease.value.tag_name), normalizeVersion(currentVersion)) > 0;
|
||||
});
|
||||
|
||||
const repoUrl = computed(() => `https://github.com/${repoOwner.value}/${repoName.value}`);
|
||||
const repoUrl = computed(() => `https://github.com/${updateRepoOwner}/${updateRepoName}`);
|
||||
const releaseUrl = computed(() => latestRelease.value?.html_url ?? `${repoUrl.value}/releases`);
|
||||
|
||||
function normalizeVersion(version: string) {
|
||||
@@ -91,11 +91,8 @@ async function checkForUpdates() {
|
||||
updateError.value = '';
|
||||
|
||||
try {
|
||||
localStorage.setItem('scoreko:repoOwner', repoOwner.value.trim());
|
||||
localStorage.setItem('scoreko:repoName', repoName.value.trim());
|
||||
|
||||
const response = await fetch(
|
||||
`https://api.github.com/repos/${encodeURIComponent(repoOwner.value.trim())}/${encodeURIComponent(repoName.value.trim())}/releases/latest`,
|
||||
`https://api.github.com/repos/${encodeURIComponent(updateRepoOwner)}/${encodeURIComponent(updateRepoName)}/releases/latest`,
|
||||
{
|
||||
headers: {
|
||||
Accept: 'application/vnd.github+json'
|
||||
@@ -160,17 +157,6 @@ onMounted(() => {
|
||||
Dashboard for producing fighting game overlays using NodeCG, Vue, and Quasar.
|
||||
</p>
|
||||
<div class="column q-gutter-sm">
|
||||
<QBtn
|
||||
:href="repoUrl"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
icon="open_in_new"
|
||||
label="GitHub Repository"
|
||||
color="primary"
|
||||
flat
|
||||
no-caps
|
||||
align="left"
|
||||
/>
|
||||
<QBtn
|
||||
href="https://github.com/nodecg/nodecg"
|
||||
target="_blank"
|
||||
@@ -229,19 +215,6 @@ onMounted(() => {
|
||||
<QSeparator />
|
||||
|
||||
<QCardSection class="q-gutter-md">
|
||||
<QInput
|
||||
v-model="repoOwner"
|
||||
label="GitHub owner"
|
||||
outlined
|
||||
dense
|
||||
/>
|
||||
<QInput
|
||||
v-model="repoName"
|
||||
label="GitHub repo"
|
||||
outlined
|
||||
dense
|
||||
/>
|
||||
|
||||
<QBtn
|
||||
label="Check for updates"
|
||||
color="primary"
|
||||
|
||||
Reference in New Issue
Block a user