From 0db6550efc0fbdd85d4ab331f111bb806bfe3257 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 3 Jan 2023 17:38:07 -0800 Subject: [PATCH] release version system --- README.md | 1 + package.json | 2 +- packages/backend/src/server/api/endpoints.ts | 2 ++ .../src/server/api/endpoints/release.ts | 24 +++++++++++++++++ packages/client/src/components/MkUpdated.vue | 26 ++++++++++++------- packages/client/src/pages/about-calckey.vue | 2 +- .../client/src/pages/admin/instance-block.vue | 2 +- packages/client/src/store.ts | 2 +- release.json | 5 ++++ 9 files changed, 53 insertions(+), 13 deletions(-) create mode 100644 packages/backend/src/server/api/endpoints/release.ts create mode 100644 release.json diff --git a/README.md b/README.md index 66de3abf5..f68038947 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ [![liberapay-badge](https://img.shields.io/liberapay/receives/ThatOneCalculator?logo=liberapay)](https://liberapay.com/ThatOneCalculator) [![translate-badge](https://hosted.weblate.org/widgets/calckey/-/svg-badge.svg)](https://hosted.weblate.org/engage/calckey/) [![docker-badge](https://img.shields.io/docker/pulls/thatonecalculator/calckey?logo=docker)](https://hub.docker.com/r/thatonecalculator/calckey) +[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](./CODE_OF_CONDUCT.md) [![codeberg-badge](https://custom-icon-badges.demolab.com/badge/hosted%20on-codeberg-blue.svg?logo=codeberg&logoColor=white)](https://codeberg.org/calckey/calckey/) diff --git a/package.json b/package.json index 650b7331c..50e19f346 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "13.0.6", + "version": "13.0.8", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/backend/src/server/api/endpoints.ts b/packages/backend/src/server/api/endpoints.ts index c09101099..cb2564037 100644 --- a/packages/backend/src/server/api/endpoints.ts +++ b/packages/backend/src/server/api/endpoints.ts @@ -277,6 +277,7 @@ import * as ep___customMOTD from './endpoints/custom-motd.js'; import * as ep___customSplashIcons from './endpoints/custom-splash-icons.js'; import * as ep___latestVersion from './endpoints/latest-version.js'; import * as ep___patrons from './endpoints/patrons.js'; +import * as ep___release from './endpoints/release.js'; import * as ep___promo_read from './endpoints/promo/read.js'; import * as ep___requestResetPassword from './endpoints/request-reset-password.js'; import * as ep___resetDb from './endpoints/reset-db.js'; @@ -610,6 +611,7 @@ const eps = [ ['custom-splash-icons', ep___customSplashIcons], ['latest-version', ep___latestVersion], ['patrons', ep___patrons], + ['release', ep___release], ['promo/read', ep___promo_read], ['request-reset-password', ep___requestResetPassword], ['reset-db', ep___resetDb], diff --git a/packages/backend/src/server/api/endpoints/release.ts b/packages/backend/src/server/api/endpoints/release.ts new file mode 100644 index 000000000..9ea916075 --- /dev/null +++ b/packages/backend/src/server/api/endpoints/release.ts @@ -0,0 +1,24 @@ +import define from '../define.js'; + +export const meta = { + tags: ['meta'], + description: 'Get release notes from Codeberg', + + requireCredential: false, + requireCredentialPrivateMode: false, +} as const; + +export const paramDef = { + type: 'object', + properties: {}, + required: [], +} as const; + +// eslint-disable-next-line import/no-default-export +export default define(meta, paramDef, async () => { + await fetch('https://codeberg.org/calckey/calckey/raw/branch/develop/release.json') + .then((response) => response.json()) + .then((data) => { + return data; + }); +}); diff --git a/packages/client/src/components/MkUpdated.vue b/packages/client/src/components/MkUpdated.vue index 2cc294f4d..c5b5f1001 100644 --- a/packages/client/src/components/MkUpdated.vue +++ b/packages/client/src/components/MkUpdated.vue @@ -3,26 +3,27 @@
{{ i18n.ts.misskeyUpdated }}
✨ {{ version }} 🚀
- {{ i18n.ts.whatIsNew }} +
+ +
+ +
+
{{ i18n.ts.gotIt }}
diff --git a/packages/client/src/pages/about-calckey.vue b/packages/client/src/pages/about-calckey.vue index 89975ce0b..880af1f96 100644 --- a/packages/client/src/pages/about-calckey.vue +++ b/packages/client/src/pages/about-calckey.vue @@ -84,7 +84,7 @@ const containerEl = $ref(); function iconLoaded() { const emojis = defaultStore.state.reactions; - const containerWidth = containerEl.offsetWidth; + const containerWidth = containerEl?.offsetWidth; for (let i = 0; i < 32; i++) { easterEggEmojis.push({ id: i.toString(), diff --git a/packages/client/src/pages/admin/instance-block.vue b/packages/client/src/pages/admin/instance-block.vue index c8ac8a597..b3209ec61 100644 --- a/packages/client/src/pages/admin/instance-block.vue +++ b/packages/client/src/pages/admin/instance-block.vue @@ -33,7 +33,7 @@ async function init() { function save() { os.apiWithDialog('admin/update-meta', { - blockedHosts: blockedHosts.split('\n') || [], + blockedHosts: blockedHosts.split('\n').map(h => h.trim()) || [], }).then(() => { fetchInstance(); }); diff --git a/packages/client/src/store.ts b/packages/client/src/store.ts index 8b8a60587..632f6df5c 100644 --- a/packages/client/src/store.ts +++ b/packages/client/src/store.ts @@ -257,7 +257,7 @@ export const defaultStore = markRaw(new Storage('base', { }, showUpdates: { where: 'device', - default: false, + default: true, }, swipeOnDesktop: { where: 'device', diff --git a/release.json b/release.json new file mode 100644 index 000000000..129cff22a --- /dev/null +++ b/release.json @@ -0,0 +1,5 @@ +{ + "version": "13.0.8", + "notes": "$[jelly Happy new year!] This release includes many changes, including:\n- New post layout\n- Automatic subdomain blocks\n- Notes are now called posts\n- Many bug fixes and performance improvements", + "screenshots": [] +}