mirror of
https://github.com/Pandipipas/scoreko-dev.git
synced 2026-06-06 03:32:06 +00:00
Merge pull request #88 from Pandipipas/fix-aboutview-repository-to-be-non-editable
Codex-generated pull request
This commit is contained in:
@@ -15,8 +15,8 @@ type ReleaseResponse = {
|
|||||||
|
|
||||||
const appName = 'Scoreko-dev';
|
const appName = 'Scoreko-dev';
|
||||||
const currentVersion = import.meta.env.PACKAGE_VERSION;
|
const currentVersion = import.meta.env.PACKAGE_VERSION;
|
||||||
const repoOwner = ref(localStorage.getItem('scoreko:repoOwner') ?? 'Pandipipas');
|
const updateRepoOwner = 'Pandipipas';
|
||||||
const repoName = ref(localStorage.getItem('scoreko:repoName') ?? 'scoreko-dev');
|
const updateRepoName = 'scoreko';
|
||||||
|
|
||||||
const checkingUpdates = ref(false);
|
const checkingUpdates = ref(false);
|
||||||
const updateError = ref('');
|
const updateError = ref('');
|
||||||
@@ -58,7 +58,7 @@ const hasUpdate = computed(() => {
|
|||||||
return compareVersions(normalizeVersion(latestRelease.value.tag_name), normalizeVersion(currentVersion)) > 0;
|
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`);
|
const releaseUrl = computed(() => latestRelease.value?.html_url ?? `${repoUrl.value}/releases`);
|
||||||
|
|
||||||
function normalizeVersion(version: string) {
|
function normalizeVersion(version: string) {
|
||||||
@@ -91,11 +91,8 @@ async function checkForUpdates() {
|
|||||||
updateError.value = '';
|
updateError.value = '';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
localStorage.setItem('scoreko:repoOwner', repoOwner.value.trim());
|
|
||||||
localStorage.setItem('scoreko:repoName', repoName.value.trim());
|
|
||||||
|
|
||||||
const response = await fetch(
|
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: {
|
headers: {
|
||||||
Accept: 'application/vnd.github+json'
|
Accept: 'application/vnd.github+json'
|
||||||
@@ -160,17 +157,6 @@ onMounted(() => {
|
|||||||
Dashboard para producción de overlays de fighting games usando NodeCG, Vue y Quasar.
|
Dashboard para producción de overlays de fighting games usando NodeCG, Vue y Quasar.
|
||||||
</p>
|
</p>
|
||||||
<div class="column q-gutter-sm">
|
<div class="column q-gutter-sm">
|
||||||
<QBtn
|
|
||||||
:href="repoUrl"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
icon="open_in_new"
|
|
||||||
label="Repositorio en GitHub"
|
|
||||||
color="primary"
|
|
||||||
flat
|
|
||||||
no-caps
|
|
||||||
align="left"
|
|
||||||
/>
|
|
||||||
<QBtn
|
<QBtn
|
||||||
href="https://github.com/nodecg/nodecg"
|
href="https://github.com/nodecg/nodecg"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
@@ -229,19 +215,6 @@ onMounted(() => {
|
|||||||
<QSeparator />
|
<QSeparator />
|
||||||
|
|
||||||
<QCardSection class="q-gutter-md">
|
<QCardSection class="q-gutter-md">
|
||||||
<QInput
|
|
||||||
v-model="repoOwner"
|
|
||||||
label="GitHub owner"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
/>
|
|
||||||
<QInput
|
|
||||||
v-model="repoName"
|
|
||||||
label="GitHub repo"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
/>
|
|
||||||
|
|
||||||
<QBtn
|
<QBtn
|
||||||
label="Buscar updates"
|
label="Buscar updates"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|||||||
Reference in New Issue
Block a user