CherryPick🍒

This commit is contained in:
NoriDev 2023-05-28 20:37:55 +09:00
parent e90b9537ea
commit 32312f267a
8 changed files with 15 additions and 13 deletions

View file

@ -45,7 +45,7 @@ fs.readFile(
micromatch(Array.from(modules), [
'../../assets/**',
'../../fluent-emojis/**',
'../../locales/ja-JP.yml',
'../../locales/ko-KR.yml',
'../../misskey-assets/**',
'assets/**',
'public/**',

View file

@ -60,7 +60,7 @@ export function file(isSensitive = false) {
};
}
export function userDetailed(id = 'someuserid', username = 'miskist', host = 'misskey-hub.net', name = 'Misskey User'): entities.UserDetailed {
export function userDetailed(id = 'someuserid', username = 'miskist', host = 'misskey-hub.net', name = 'CherryPick User'): entities.UserDetailed {
return {
id,
username,

File diff suppressed because one or more lines are too long

View file

@ -4,6 +4,6 @@ import * as locales from '../../../locales';
writeFile(
resolve(__dirname, 'locale.ts'),
`export default ${JSON.stringify(locales['ja-JP'], undefined, 2)} as const;`,
`export default ${JSON.stringify(locales['ko-KR'], undefined, 2)} as const;`,
'utf8',
)

View file

@ -5,6 +5,7 @@ import * as JSON5 from 'json5';
const keys = [
'_dark',
'_light',
'l-cherrypick',
'l-light',
'l-coffee',
'l-apricot',
@ -14,6 +15,7 @@ const keys = [
'l-cherry',
'l-sushi',
'l-u0',
'd-cherrypick',
'd-dark',
'd-persimmon',
'd-astro',

View file

@ -14,7 +14,7 @@ const appInitialized = Symbol();
let lastStory = null;
let moduleInitialized = false;
let unobserve = () => {};
let misskeyOS = null;
let cherrypickOS = null;
function loadTheme(applyTheme: typeof import('../src/scripts/theme')['applyTheme']) {
unobserve();
@ -26,7 +26,7 @@ function loadTheme(applyTheme: typeof import('../src/scripts/theme')['applyTheme
}
const observer = new MutationObserver((entries) => {
for (const entry of entries) {
if (entry.attributeName === 'data-misskey-theme') {
if (entry.attributeName === 'data-cherrypick-theme') {
const target = entry.target as HTMLElement;
const theme = themes[target.dataset.misskeyTheme];
if (theme) {
@ -39,7 +39,7 @@ function loadTheme(applyTheme: typeof import('../src/scripts/theme')['applyTheme
});
observer.observe(document.documentElement, {
attributes: true,
attributeFilter: ['data-misskey-theme'],
attributeFilter: ['data-cherrypick-theme'],
});
unobserve = () => observer.disconnect();
}
@ -76,7 +76,7 @@ queueMicrotask(() => {
components(app);
directives(app);
widgets(app);
misskeyOS = os;
cherrypickOS = os;
if (isChromatic()) {
defaultStore.set('animation', false);
}
@ -123,7 +123,7 @@ const preview = {
setup() {
return {
context,
popups: misskeyOS.popups,
popups: cherrypickOS.popups,
};
},
template:

View file

@ -2,11 +2,11 @@ import { Meta } from '@storybook/blocks'
<Meta title="index" />
# Welcome to Misskey Storybook
# Welcome to <span style={{ color: '#ffbcdc', fontSize: 'inherit' }}>Cherry</span><span style={{ color: '#b1d3ff', fontSize: 'inherit' }}>Pick</span> Storybook
This project uses [Storybook](https://storybook.js.org/) to develop and document components.
You can find more information about the usage of Storybook in this project in the CONTRIBUTING.md file placed in the root of this repository.
The Misskey Storybook is under development and not all components are documented yet.
The CherryPick Storybook is under development and not all components are documented yet.
Contributions are welcome! Please refer to [#10336](https://github.com/misskey-dev/misskey/issues/10336) for more information.
Thank you for your support!

View file

@ -100,7 +100,7 @@ export function getConfig(): UserConfig {
_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',
_PERF_PREFIX_: JSON.stringify('Misskey:'),
_PERF_PREFIX_: JSON.stringify('CherryPick:'),
_DATA_TRANSFER_DRIVE_FILE_: JSON.stringify('mk_drive_file'),
_DATA_TRANSFER_DRIVE_FOLDER_: JSON.stringify('mk_drive_folder'),
_DATA_TRANSFER_DECK_COLUMN_: JSON.stringify('mk_deck_column'),