Skip to content

Commit

Permalink
feat: ビルドベースのMisskeyバージョンを確認できる
Browse files Browse the repository at this point in the history
  • Loading branch information
noridev committed Sep 27, 2023
1 parent 7749bbc commit f13b479
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG_CHERRYPICK.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
- Feat: 노트 작성 폼에 MFM 도움말을 볼 수 있는 버튼 추가
- Feat: 새 MFM 구문 추가 (페이드)
- Feat: 햅틱 피드백 지원
- Feat: 빌드 기반 Misskey 버전을 확인할 수 있음
- Enhance: 노트의 리액션을 삭제하지 않고도 리액션 버튼을 눌러 리액션을 변경할 수 있도록 (misskey-dev/misskey#11157)
- Enhance: 이용 약관을 서버 메뉴에서 볼 수 있도록
- Enhance: 설정에서 변경 가능한 옵션은 다이얼로그에서 안내하도록 설명 추가
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "cherrypick",
"version": "2023.9.1-cp-4.3.0-rc.1",
"basedMisskeyVersion": "2023.9.1",
"codename": "nasubi",
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ module.exports = {
'_DEV_': false,
'_LANGS_': false,
'_VERSION_': false,
'_BASEDMISSKEYVERSION_': false,
'_ENV_': false,
'_PERF_PREFIX_': false,
'_DATA_TRANSFER_DRIVE_FILE_': false,
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/@types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ type FIXME = any;

declare const _LANGS_: string[][];
declare const _VERSION_: string;
declare const _BASEDMISSKEYVERSION_: string;
declare const _ENV_: string;
declare const _DEV_: boolean;
declare const _PERF_PREFIX_: string;
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const langs = _LANGS_;
const preParseLocale = miLocalStorage.getItem('locale');
export let locale = preParseLocale ? JSON.parse(preParseLocale) : null;
export const version = _VERSION_;
export const basedMisskeyVersion = _BASEDMISSKEYVERSION_;
export const instanceName = siteName === 'CherryPick' ? host : siteName;
export const ui = miLocalStorage.getItem('ui');
export const debug = miLocalStorage.getItem('debug') === 'true';
Expand Down
7 changes: 6 additions & 1 deletion packages/frontend/src/pages/about-misskey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<img src="/client-assets/about-icon.png" alt="" class="icon" draggable="false" @load="iconLoaded" @click="gravity"/>
<div class="cherrypick">CherryPick</div>
<div class="version" @click="whatIsNewCherryPick">v{{ version }}</div>
<div class="version" style="font-size: 11px;" @click="whatIsNewMisskey">v{{ basedMisskeyVersion }} (Based on Misskey)</div>
<span v-for="emoji in easterEggEmojis" :key="emoji.id" class="emoji" :data-physics-x="emoji.left" :data-physics-y="emoji.top" :class="{ _physics_circle_: !emoji.emoji.startsWith(':') }">
<MkCustomEmoji v-if="emoji.emoji[0] === ':'" class="emoji" :name="emoji.emoji" :normal="true" :noStyle="true"/>
<MkEmoji v-else class="emoji" :emoji="emoji.emoji" :normal="true" :noStyle="true"/>
Expand Down Expand Up @@ -202,7 +203,7 @@ SPDX-License-Identifier: AGPL-3.0-only

<script lang="ts" setup>
import { nextTick, onBeforeUnmount, onMounted } from 'vue';
import { version } from '@/config.js';
import { version, basedMisskeyVersion } from '@/config.js';
import FormLink from '@/components/form/link.vue';
import FormSection from '@/components/form/section.vue';
import MkButton from '@/components/MkButton.vue';
Expand Down Expand Up @@ -400,6 +401,10 @@ const whatIsNewCherryPick = () => {
window.open(`https://github.com/kokonect-link/cherrypick/blob/develop/CHANGELOG_CHERRYPICK.md#${version.replace(/\./g, '')}`, '_blank');
};

const whatIsNewMisskey = () => {
window.open(`https://github.com/kokonect-link/cherrypick/blob/develop/CHANGELOG.md#${basedMisskeyVersion.replace(/\./g, '')}`, '_blank');
};

function iconLoaded() {
const emojis = defaultStore.state.reactions;
const containerWidth = containerEl.offsetWidth;
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export function getConfig(): UserConfig {

define: {
_VERSION_: JSON.stringify(meta.version),
_BASEDMISSKEYVERSION_: JSON.stringify(meta.basedMisskeyVersion),
_LANGS_: JSON.stringify(Object.entries(locales).map(([k, v]) => [k, v._lang_])),
_ENV_: JSON.stringify(process.env.NODE_ENV),
_DEV_: process.env.NODE_ENV !== 'production',
Expand Down
1 change: 1 addition & 0 deletions packages/sw/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = {
_DEV_: false,
_LANGS_: false,
_VERSION_: false,
_BASEDMISSKEYVERSION_: false,
_ENV_: false,
_PERF_PREFIX_: false,
},
Expand Down
1 change: 1 addition & 0 deletions packages/sw/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const buildOptions = {
_LANGS_: JSON.stringify(Object.entries(locales).map(([k, v]) => [k, v._lang_])),
_PERF_PREFIX_: JSON.stringify('CherryPick:'),
_VERSION_: JSON.stringify(meta.version),
_BASEDMISSKEYVERSION_: JSON.stringify(meta.basedMisskeyVersion),
},
entryPoints: [`${__dirname}/src/sw.ts`],
format: 'esm',
Expand Down
1 change: 1 addition & 0 deletions packages/sw/src/@types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type FIXME = any;

declare const _LANGS_: string[][];
declare const _VERSION_: string;
declare const _BASEDMISSKEYVERSION_: string;
declare const _ENV_: string;
declare const _DEV_: boolean;
declare const _PERF_PREFIX_: string;

0 comments on commit f13b479

Please sign in to comment.