Merge branch 'develop' into mkjs-n

This commit is contained in:
tamaina
2023-06-30 07:16:14 +00:00
72 changed files with 4617 additions and 4865 deletions

View File

@@ -20,29 +20,29 @@
"@rollup/plugin-replace": "5.0.2",
"@rollup/pluginutils": "5.0.2",
"@syuilo/aiscript": "0.13.3",
"@tabler/icons-webfont": "2.21.0",
"@tabler/icons-webfont": "2.22.0",
"@vitejs/plugin-vue": "4.2.3",
"@vue-macros/reactivity-transform": "0.3.9",
"@vue-macros/reactivity-transform": "0.3.10",
"@vue/compiler-sfc": "3.3.4",
"astring": "1.8.6",
"autosize": "6.0.1",
"broadcast-channel": "5.1.0",
"browser-image-resizer": "github:misskey-dev/browser-image-resizer#v2.2.1-misskey.3",
"buraha": "github:misskey-dev/buraha",
"buraha": "0.0.1",
"canvas-confetti": "1.6.0",
"chart.js": "4.3.0",
"chartjs-adapter-date-fns": "3.0.0",
"chartjs-chart-matrix": "2.0.1",
"chartjs-plugin-gradient": "0.6.1",
"chartjs-plugin-zoom": "2.0.1",
"chromatic": "6.18.0",
"chromatic": "6.19.9",
"compare-versions": "5.0.3",
"cropperjs": "2.0.0-beta.2",
"cropperjs": "2.0.0-beta.3",
"date-fns": "2.30.0",
"escape-regexp": "0.0.1",
"estree-walker": "^3.0.3",
"eventemitter3": "5.0.1",
"gsap": "3.11.5",
"gsap": "3.12.1",
"idb-keyval": "6.2.1",
"insert-text-at-cursor": "0.3.0",
"is-file-animated": "1.0.2",
@@ -54,12 +54,10 @@
"prismjs": "1.29.0",
"punycode": "2.3.0",
"querystring": "0.2.1",
"rndstr": "1.0.0",
"rollup": "3.23.0",
"rollup": "3.25.1",
"s-age": "1.1.2",
"sanitize-html": "2.10.0",
"sass": "1.62.1",
"seedrandom": "3.0.5",
"sanitize-html": "2.11.0",
"sass": "1.63.6",
"strict-event-emitter-types": "2.0.0",
"syuilo-password-strength": "0.0.1",
"textarea-caret": "3.1.0",
@@ -104,31 +102,30 @@
"@types/gulp-rename": "2.0.2",
"@types/matter-js": "0.18.5",
"@types/micromatch": "4.0.2",
"@types/node": "20.2.5",
"@types/node": "20.3.1",
"@types/punycode": "2.1.0",
"@types/sanitize-html": "2.9.0",
"@types/seedrandom": "3.0.5",
"@types/testing-library__jest-dom": "^5.14.6",
"@types/throttle-debounce": "5.0.0",
"@types/tinycolor2": "1.4.3",
"@types/uuid": "9.0.1",
"@types/uuid": "9.0.2",
"@types/websocket": "1.0.5",
"@types/ws": "8.5.4",
"@typescript-eslint/eslint-plugin": "5.59.8",
"@typescript-eslint/parser": "5.59.8",
"@vitest/coverage-c8": "0.31.4",
"@types/ws": "8.5.5",
"@typescript-eslint/eslint-plugin": "5.60.0",
"@typescript-eslint/parser": "5.60.0",
"@vitest/coverage-v8": "0.32.2",
"@vue/runtime-core": "3.3.4",
"acorn": "^8.8.2",
"acorn": "8.9.0",
"chokidar-cli": "3.0.0",
"cross-env": "7.0.3",
"cypress": "12.13.0",
"eslint": "8.41.0",
"cypress": "12.15.0",
"eslint": "8.43.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-vue": "9.14.1",
"eslint-plugin-vue": "9.15.0",
"fast-glob": "3.2.12",
"happy-dom": "9.20.3",
"micromatch": "3.1.10",
"msw": "1.2.1",
"msw": "1.2.2",
"msw-storybook-addon": "1.8.0",
"prettier": "2.8.8",
"react": "18.2.0",
@@ -138,9 +135,9 @@
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
"summaly": "github:misskey-dev/summaly",
"vite-plugin-turbosnap": "1.0.2",
"vitest": "0.31.4",
"vitest": "0.32.2",
"vitest-fetch-mock": "0.2.2",
"vue-eslint-parser": "9.3.0",
"vue-tsc": "1.6.5"
"vue-eslint-parser": "9.3.1",
"vue-tsc": "1.8.1"
}
}

View File

@@ -44,8 +44,10 @@
</div>
<div v-if="user.roles.length > 0" class="roles">
<span v-for="role in user.roles" :key="role.id" v-tooltip="role.description" class="role" :style="{ '--color': role.color }">
<img v-if="role.iconUrl" style="height: 1.3em; vertical-align: -22%;" :src="role.iconUrl"/>
{{ role.name }}
<MkA v-adaptive-bg :to="`/roles/${role.id}`">
<img v-if="role.iconUrl" style="height: 1.3em; vertical-align: -22%;" :src="role.iconUrl"/>
{{ role.name }}
</MkA>
</span>
</div>
<div v-if="iAmModerator" class="moderationNote">

View File

@@ -4,12 +4,13 @@
<div :class="$style.main">
<XStatusBars/>
<div ref="columnsEl" :class="[$style.sections, { [$style.center]: deckStore.reactiveState.columnAlign.value === 'center', [$style.snapScroll]: snapScroll }]" @contextmenu.self.prevent="onContextmenu">
<div ref="columnsEl" :class="[$style.sections, { [$style.center]: deckStore.reactiveState.columnAlign.value === 'center', [$style.snapScroll]: snapScroll }]" @contextmenu.self.prevent="onContextmenu" @wheel.self="onWheel">
<!-- sectionを利用しているのはdeck.vue側でcolumnに対してfirst-of-typeを効かせるため -->
<section
v-for="ids in layout"
:class="$style.section"
:style="columns.filter(c => ids.includes(c.id)).some(c => c.flexible) ? { flex: 1, minWidth: '350px' } : { width: Math.max(...columns.filter(c => ids.includes(c.id)).map(c => c.width)) + 'px' }"
@wheel.self="onWheel"
>
<component
:is="columnComponents[columns.find(c => c.id === id)!.type] ?? XTlColumn"
@@ -19,6 +20,7 @@
:class="$style.column"
:column="columns.find(c => c.id === id)"
:isStacked="ids.length > 1"
@headerWheel="onWheel"
/>
</section>
<div v-if="layout.length === 0" class="_panel" :class="$style.onboarding">
@@ -196,15 +198,14 @@ const onContextmenu = (ev) => {
}], ev);
};
document.documentElement.style.overflowY = 'hidden';
document.documentElement.style.scrollBehavior = 'auto';
window.addEventListener('wheel', (ev) => {
if (ev.target === columnsEl && ev.deltaX === 0) {
columnsEl.scrollLeft += ev.deltaY;
} else if (getScrollContainer(ev.target as HTMLElement) == null && ev.deltaX === 0) {
function onWheel(ev: WheelEvent) {
if (ev.deltaX === 0) {
columnsEl.scrollLeft += ev.deltaY;
}
});
}
document.documentElement.style.overflowY = 'hidden';
document.documentElement.style.scrollBehavior = 'auto';
loadDeck();

View File

@@ -12,6 +12,7 @@
@dragstart="onDragstart"
@dragend="onDragend"
@contextmenu.prevent.stop="onContextmenu"
@wheel="emit('headerWheel', $event)"
>
<svg viewBox="0 0 256 128" :class="$style.tabShape">
<g transform="matrix(6.2431,0,0,6.2431,-677.417,-29.3839)">
@@ -56,6 +57,10 @@ const props = withDefaults(defineProps<{
naked: false,
});
const emit = defineEmits<{
(ev: 'headerWheel', ctx: WheelEvent): void;
}>();
let body = $shallowRef<HTMLDivElement | null>();
let dragging = $ref(false);

View File

@@ -1,5 +1,5 @@
const canvas = new OffscreenCanvas(1, 1);
const gl = canvas.getContext('webgl2');
const canvas = globalThis.OffscreenCanvas && new OffscreenCanvas(1, 1);
const gl = canvas?.getContext('webgl2');
if (gl) {
postMessage({ result: true });
} else {

View File

@@ -9,9 +9,9 @@
"noFallthroughCasesInSwitch": true,
"declaration": false,
"sourceMap": true,
"target": "es2021",
"target": "ES2022",
"module": "es2020",
"moduleResolution": "node",
"moduleResolution": "node16",
"allowSyntheticDefaultImports": true,
"removeComments": false,
"noLib": false,
@@ -27,7 +27,7 @@
"@/*": ["../src/*"]
},
"typeRoots": [
"../node_modules/@types",
"../node_modules/@types"
],
"lib": [
"esnext",
@@ -38,6 +38,6 @@
"compileOnSave": false,
"include": [
"./**/*.ts",
"../src/**/*.vue",
"../src/**/*.vue"
]
}

View File

@@ -9,9 +9,9 @@
"noFallthroughCasesInSwitch": true,
"declaration": false,
"sourceMap": false,
"target": "es2021",
"target": "ES2022",
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "node16",
"removeComments": false,
"noLib": false,
"strict": true,
@@ -23,12 +23,12 @@
"useDefineForClassFields": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@/*": ["./src/*"]
},
"typeRoots": [
"node_modules/@types",
"node_modules/@vue-macros",
"@types",
"@types"
],
"types": [
"vite/client",
@@ -47,6 +47,6 @@
"./**/*.vue"
],
"exclude": [
".storybook/**/*",
".storybook/**/*"
]
}