chore: discontinue latest-version api
This commit is contained in:
parent
4bf63a73e0
commit
cd18bf0c48
2 changed files with 1 additions and 29 deletions
|
@ -14,18 +14,7 @@ export const paramDef = {
|
|||
} as const;
|
||||
|
||||
export default define(meta, paramDef, async () => {
|
||||
let tag_name: string;
|
||||
const pattern = /"version": "(.*)",$/m;
|
||||
|
||||
await fetch(
|
||||
"https://code.naskya.net/naskya/firefish/source-by/main/package.json",
|
||||
)
|
||||
.then((response) => response.text())
|
||||
.then((text) => {
|
||||
tag_name = pattern.exec(text)[1];
|
||||
});
|
||||
|
||||
return {
|
||||
tag_name,
|
||||
tag_name: "neko",
|
||||
};
|
||||
});
|
||||
|
|
|
@ -42,15 +42,6 @@
|
|||
i18n.ts.configure
|
||||
}}</MkA></MkInfo
|
||||
>
|
||||
<MkInfo v-if="updateAvailable" warn class="info"
|
||||
>{{ i18n.ts.updateAvailable }}
|
||||
<a
|
||||
href="https://code.naskya.net/naskya/firefish"
|
||||
target="_bank"
|
||||
class="_link"
|
||||
>{{ i18n.ts.check }}</a
|
||||
></MkInfo
|
||||
>
|
||||
|
||||
<MkSuperMenu :def="menuDef" :grid="narrow"></MkSuperMenu>
|
||||
</div>
|
||||
|
@ -113,7 +104,6 @@ const noBotProtection =
|
|||
!instance.enableRecaptcha;
|
||||
const noEmailServer = !instance.enableEmail;
|
||||
const thereIsUnresolvedAbuseReport = ref(false);
|
||||
const updateAvailable = ref(false);
|
||||
const currentPage = computed(() => router.currentRef.value.child);
|
||||
|
||||
os.api("admin/abuse-user-reports", {
|
||||
|
@ -123,13 +113,6 @@ os.api("admin/abuse-user-reports", {
|
|||
if (reports?.length > 0) thereIsUnresolvedAbuseReport.value = true;
|
||||
});
|
||||
|
||||
if (defaultStore.state.showAdminUpdates) {
|
||||
os.api("latest-version").then((res) => {
|
||||
if (res == null || res.tag_name == null) return;
|
||||
updateAvailable.value = !version.startsWith(res.tag_name);
|
||||
});
|
||||
}
|
||||
|
||||
const NARROW_THRESHOLD = 600;
|
||||
const ro = new ResizeObserver((entries, observer) => {
|
||||
if (entries.length === 0) return;
|
||||
|
|
Loading…
Reference in a new issue