Skip to content

Commit

Permalink
tweak b947311
Browse files Browse the repository at this point in the history
  • Loading branch information
noridev committed Oct 4, 2023
1 parent 9948ea3 commit 5de3c77
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/admin/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fetch('https://api.github.com/repos/kokonect-link/cherrypick/releases', {
}).then(res => res.json())
.then(async res => {
const meta = await os.api('admin/meta');
if (meta.enableReceivePrerelease) releasesCherryPick = res.filter(x => x.prerelease === true);
if (meta.enableReceivePrerelease) releasesCherryPick = res;
else releasesCherryPick = res.filter(x => x.prerelease === false);
if ((version < releasesCherryPick[0].tag_name) && (meta.skipCherryPickVersion < releasesCherryPick[0].tag_name)) updateAvailable = true;
});
Expand Down
6 changes: 3 additions & 3 deletions packages/frontend/src/pages/admin/update.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ onMounted(() => {
method: 'GET',
}).then(res => res.json())
.then(res => {
if (meta.enableReceivePrerelease) releasesCherryPick = res.filter(x => x.prerelease === true);
if (meta.enableReceivePrerelease) releasesCherryPick = res;
else releasesCherryPick = res.filter(x => x.prerelease === false);
if (skipCherryPickVersion < releasesCherryPick[0].tag_name) {
skipVersion = false;
Expand All @@ -133,7 +133,7 @@ onMounted(() => {
method: 'GET',
}).then(res => res.json())
.then(res => {
if (meta.enableReceivePrerelease) releasesMisskey = res.filter(x => x.prerelease === true);
if (meta.enableReceivePrerelease) releasesMisskey = res;
else releasesMisskey = res.filter(x => x.prerelease === false);
});
});
Expand All @@ -151,7 +151,7 @@ const whatIsNewMisskey = () => {
};

const whatIsNewLatestMisskey = () => {
window.open(`https://misskey-hub.net/docs/releases.html#_${releasesMisskey[0].tag_name.replace(/\./g, '-')}`, '_blank');
window.open(`https://github.com/misskey-dev/misskey/blob/develop/CHANGELOG.md#${releasesMisskey[0].tag_name.replace(/\./g, '')}`, '_blank');
};

const headerActions = $computed(() => [{
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/ui/_common_/navbar-for-mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if ($i.isAdmin || $i.isModerator) {
}).then(res => res.json())
.then(async res => {
const meta = await os.api('admin/meta');
if (meta.enableReceivePrerelease) releasesCherryPick = res.filter(x => x.prerelease === true);
if (meta.enableReceivePrerelease) releasesCherryPick = res;
else releasesCherryPick = res.filter(x => x.prerelease === false);
if ((version < releasesCherryPick[0].tag_name) && (meta.skipCherryPickVersion < releasesCherryPick[0].tag_name)) controlPanelIndicated = true;
});
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/ui/_common_/navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ if ($i.isAdmin || $i.isModerator) {
}).then(res => res.json())
.then(async res => {
const meta = await os.api('admin/meta');
if (meta.enableReceivePrerelease) releasesCherryPick = res.filter(x => x.prerelease === true);
if (meta.enableReceivePrerelease) releasesCherryPick = res;
else releasesCherryPick = res.filter(x => x.prerelease === false);
if ((version < releasesCherryPick[0].tag_name) && (meta.skipCherryPickVersion < releasesCherryPick[0].tag_name)) controlPanelIndicated = true;
});
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/ui/classic.header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ if ($i.isAdmin || $i.isModerator) {
}).then(res => res.json())
.then(async res => {
const meta = await os.api('admin/meta');
if (meta.enableReceivePrerelease) releasesCherryPick = res.filter(x => x.prerelease === true);
if (meta.enableReceivePrerelease) releasesCherryPick = res;
else releasesCherryPick = res.filter(x => x.prerelease === false);
if ((version < releasesCherryPick[0].tag_name) && (meta.skipCherryPickVersion < releasesCherryPick[0].tag_name)) controlPanelIndicated = true;
});
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/ui/classic.sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ if ($i.isAdmin || $i.isModerator) {
}).then(res => res.json())
.then(async res => {
const meta = await os.api('admin/meta');
if (meta.enableReceivePrerelease) releasesCherryPick = res.filter(x => x.prerelease === true);
if (meta.enableReceivePrerelease) releasesCherryPick = res;
else releasesCherryPick = res.filter(x => x.prerelease === false);
if ((version < releasesCherryPick[0].tag_name) && (meta.skipCherryPickVersion < releasesCherryPick[0].tag_name)) controlPanelIndicated = true;
});
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/ui/friendly/navbar-for-mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ if ($i.isAdmin || $i.isModerator) {
}).then(res => res.json())
.then(async res => {
const meta = await os.api('admin/meta');
if (meta.enableReceivePrerelease) releasesCherryPick = res.filter(x => x.prerelease === true);
if (meta.enableReceivePrerelease) releasesCherryPick = res;
else releasesCherryPick = res.filter(x => x.prerelease === false);
if ((version < releasesCherryPick[0].tag_name) && (meta.skipCherryPickVersion < releasesCherryPick[0].tag_name)) controlPanelIndicated = true;
});
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/ui/friendly/navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ if ($i.isAdmin || $i.isModerator) {
}).then(res => res.json())
.then(async res => {
const meta = await os.api('admin/meta');
if (meta.enableReceivePrerelease) releasesCherryPick = res.filter(x => x.prerelease === true);
if (meta.enableReceivePrerelease) releasesCherryPick = res;
else releasesCherryPick = res.filter(x => x.prerelease === false);
if ((version < releasesCherryPick[0].tag_name) && (meta.skipCherryPickVersion < releasesCherryPick[0].tag_name)) controlPanelIndicated = true;
});
Expand Down

0 comments on commit 5de3c77

Please sign in to comment.