diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 5ae21482a7..ba46dfdc72 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,13 +1,32 @@ -## Summary + + - +# What + + + +# Why + + + +# Additional info (optional) + + diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index c1e9f660ec..7d5d4b03e4 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -766,6 +766,12 @@ customCssWarn: "この設定は必ず知識のある方が行ってください global: "グローバル" squareAvatars: "アイコンを四角形で表示" +_docs: + continueReading: "続きを読む" + features: "機能" + generalTopics: "一般的なトピック" + advancedTopics: "高度なトピック" + _ad: back: "戻る" reduceFrequencyOfThisAd: "この広告の表示頻度を下げる" diff --git a/src/client/components/drive.vue b/src/client/components/drive.vue index 16aa9dc1a8..98f7b54828 100644 --- a/src/client/components/drive.vue +++ b/src/client/components/drive.vue @@ -10,6 +10,7 @@ {{ folder.name }} +
nav { - display: block; + display: flex; z-index: 2; width: 100%; padding: 0 8px; @@ -696,6 +701,10 @@ export default defineComponent({ } } } + + > .menu { + margin-left: auto; + } } > .main { diff --git a/src/client/pages/doc.vue b/src/client/pages/doc.vue index a4cf25033e..58b352d638 100644 --- a/src/client/pages/doc.vue +++ b/src/client/pages/doc.vue @@ -107,6 +107,7 @@ export default defineComponent({ padding: 32px; max-width: 800px; margin: 0 auto; + background: var(--panel); &.max-width_500px { padding: 16px; diff --git a/src/client/pages/docs.vue b/src/client/pages/docs.vue index e51528f83d..e677fe0cbe 100644 --- a/src/client/pages/docs.vue +++ b/src/client/pages/docs.vue @@ -1,14 +1,38 @@ @@ -16,8 +40,15 @@ import { defineComponent } from 'vue'; import { url, lang } from '@client/config'; import * as symbols from '@client/symbols'; +import MkFolder from '@client/components/ui/folder.vue'; +import MkInput from '@client/components/ui/input.vue'; export default defineComponent({ + components: { + MkFolder, + MkInput, + }, + data() { return { [symbols.PAGE_INFO]: { @@ -25,6 +56,15 @@ export default defineComponent({ icon: 'fas fa-question-circle' }, docs: [], + query: null, + } + }, + + watch: { + query() { + fetch(`${url}/docs.json?lang=${lang}&q=${this.query}`).then(res => res.json()).then(docs => { + this.docs = docs; + }); } }, @@ -35,3 +75,48 @@ export default defineComponent({ }, }); + + diff --git a/src/client/pages/drive.vue b/src/client/pages/drive.vue index 753114f725..9ee1ea8859 100644 --- a/src/client/pages/drive.vue +++ b/src/client/pages/drive.vue @@ -20,7 +20,6 @@ export default defineComponent({ [symbols.PAGE_INFO]: { title: computed(() => this.folder ? this.folder.name : this.$ts.drive), icon: 'fas fa-cloud', - menu: () => this.$refs.drive.getMenu() }, folder: null, }; diff --git a/src/client/pages/user-info.vue b/src/client/pages/user-info.vue index 51bd5016bb..503982652b 100644 --- a/src/client/pages/user-info.vue +++ b/src/client/pages/user-info.vue @@ -167,13 +167,13 @@ export default defineComponent({ }, async resetPassword() { - os.apiWithDialog('admin/reset-password', { + const { password } = await os.api('admin/reset-password', { userId: this.user.id, - }, undefined, ({ password }) => { - os.dialog({ - type: 'success', - text: this.$t('newPasswordIs', { password }) - }); + }); + + os.dialog({ + type: 'success', + text: this.$t('newPasswordIs', { password }) }); }, diff --git a/src/client/pages/user/index.vue b/src/client/pages/user/index.vue index f5c5a0694c..ab92407a55 100644 --- a/src/client/pages/user/index.vue +++ b/src/client/pages/user/index.vue @@ -237,8 +237,8 @@ import Progress from '@client/scripts/loading'; import { parseAcct } from '@/misc/acct'; import { getScrollPosition } from '@client/scripts/scroll'; import { getUserMenu } from '@client/scripts/get-user-menu'; -import number from '../../filters/number'; -import { userPage, acct as getAcct } from '../../filters/user'; +import number from '@client/filters/number'; +import { userPage, acct as getAcct } from '@client/filters/user'; import * as os from '@client/os'; import * as symbols from '@client/symbols'; @@ -282,7 +282,6 @@ export default defineComponent({ share: { title: this.user.name, }, - menu: () => getUserMenu(this.user), } : null), user: null, error: null, diff --git a/src/client/router.ts b/src/client/router.ts index 4c3aa765e6..2081c1020c 100644 --- a/src/client/router.ts +++ b/src/client/router.ts @@ -31,7 +31,7 @@ export const router = createRouter({ { path: '/docs', component: page('docs') }, { path: '/theme-editor', component: page('theme-editor') }, { path: '/advanced-theme-editor', component: page('advanced-theme-editor') }, - { path: '/docs/:doc', component: page('doc'), props: route => ({ doc: route.params.doc }) }, + { path: '/docs/:doc(.*)', component: page('doc'), props: route => ({ doc: route.params.doc }) }, { path: '/explore', component: page('explore') }, { path: '/explore/tags/:tag', props: true, component: page('explore') }, { path: '/search', component: page('search') }, diff --git a/src/client/scripts/paging.ts b/src/client/scripts/paging.ts index bcb0d7f2b0..194c2e8003 100644 --- a/src/client/scripts/paging.ts +++ b/src/client/scripts/paging.ts @@ -94,7 +94,11 @@ export default (opts) => ({ for (let i = 0; i < items.length; i++) { const item = items[i]; markRaw(item); - if (i === 3) item._shouldInsertAd_ = true; + if (this.pagination.reversed) { + if (i === items.length - 2) item._shouldInsertAd_ = true; + } else { + if (i === 3) item._shouldInsertAd_ = true; + } } if (!this.pagination.noPaging && (items.length > (this.pagination.limit || 10))) { items.pop(); @@ -133,7 +137,11 @@ export default (opts) => ({ for (let i = 0; i < items.length; i++) { const item = items[i]; markRaw(item); - if (i === 10) item._shouldInsertAd_ = true; + if (this.pagination.reversed) { + if (i === items.length - 9) item._shouldInsertAd_ = true; + } else { + if (i === 10) item._shouldInsertAd_ = true; + } } if (items.length > SECOND_FETCH_LIMIT) { items.pop(); diff --git a/src/client/style.scss b/src/client/style.scss index 578e7543c7..02f794fba4 100644 --- a/src/client/style.scss +++ b/src/client/style.scss @@ -239,8 +239,7 @@ hr { ._panel { background: var(--panel); border-radius: var(--radius); - //border: var(--panelBorder); - box-shadow: var(--panelShadow); + border: var(--panelBorder); overflow: clip; } @@ -357,7 +356,7 @@ hr { ._flat_ { --root-margin: 0px; --baseContentWidth: 100%; - --panelShadow: none; + --panelBorder: none; ._block { //border-top: solid 0.5px var(--divider); diff --git a/src/client/themes/_dark.json5 b/src/client/themes/_dark.json5 index 6414a7ad42..fb0fe80146 100644 --- a/src/client/themes/_dark.json5 +++ b/src/client/themes/_dark.json5 @@ -26,8 +26,7 @@ panelHeaderBg: ':lighten<3<@panel', panelHeaderFg: '@fg', panelHeaderDivider: 'rgba(0, 0, 0, 0)', - panelBorder: 'rgba(0, 0, 0, 0)', - panelShadow: '" 0 8px 24px rgba(0, 0, 0, 0.12)', + panelBorder: '" solid 1px var(--divider)', acrylicPanel: ':alpha<0.5<@panel', shadow: 'rgba(0, 0, 0, 0.3)', header: ':alpha<0.7<@panel', diff --git a/src/client/themes/_light.json5 b/src/client/themes/_light.json5 index 0438b54a49..db971ba0e4 100644 --- a/src/client/themes/_light.json5 +++ b/src/client/themes/_light.json5 @@ -26,8 +26,7 @@ panelHeaderBg: ':lighten<3<@panel', panelHeaderFg: '@fg', panelHeaderDivider: 'rgba(0, 0, 0, 0)', - panelBorder: 'rgba(0, 0, 0, 0)', - panelShadow: '" 0 8px 24px rgb(21 43 75 / 8%)', + panelBorder: '" solid 1px var(--divider)', acrylicPanel: ':alpha<0.5<@panel', shadow: 'rgba(0, 0, 0, 0.1)', header: ':alpha<0.7<@panel', diff --git a/src/client/themes/d-astro.json5 b/src/client/themes/d-astro.json5 index a88e949c3c..c9818f2c5c 100644 --- a/src/client/themes/d-astro.json5 +++ b/src/client/themes/d-astro.json5 @@ -39,8 +39,7 @@ navHoverFg: ':lighten<17<@fg', dateLabelFg: '@fg', inputBorder: '#959da2', - panelBorder: 'rgba(0, 0, 0, 0)', - panelShadow: '" 0 8px 24px rgba(0, 0, 0, 0.12)', + panelBorder: '" solid 1px var(--divider)', accentDarken: ':darken<10<@accent', acrylicPanel: ':alpha<0.5<@panel', navIndicator: '@accent', diff --git a/src/client/themes/d-black.json5 b/src/client/themes/d-black.json5 index 2608891e73..f4b93cdcbc 100644 --- a/src/client/themes/d-black.json5 +++ b/src/client/themes/d-black.json5 @@ -11,7 +11,6 @@ panel: '#131313', panelHeaderBg: '@panel', panelHeaderDivider: '@divider', - panelShadow: '" 0 8px 24px rgb(0 0 0 / 25%)', shadow: 'rgba(255, 255, 255, 0.05)', modalBg: 'rgba(255, 255, 255, 0.1)', messageBg: '#1d1d1d', diff --git a/src/client/themes/d-dark.json5 b/src/client/themes/d-dark.json5 index fba7fe7582..d24ce4df69 100644 --- a/src/client/themes/d-dark.json5 +++ b/src/client/themes/d-dark.json5 @@ -13,7 +13,6 @@ fgHighlighted: '#fff', divider: 'rgba(255, 255, 255, 0.14)', panel: '#2d2d2d', - panelShadow: '" 0 8px 24px rgb(0 0 0 / 25%)', panelHeaderBg: '@panel', panelHeaderDivider: '@divider', header: ':alpha<0.7<@panel', diff --git a/src/client/themes/d-persimmon.json5 b/src/client/themes/d-persimmon.json5 index a1ebaf59eb..11e9994f5e 100644 --- a/src/client/themes/d-persimmon.json5 +++ b/src/client/themes/d-persimmon.json5 @@ -13,7 +13,6 @@ fgHighlighted: '#fff', divider: 'rgba(255, 255, 255, 0.14)', panel: 'rgb(41, 43, 41)', - panelShadow: '" 0 8px 24px rgb(0 0 0 / 25%)', infoFg: '@fg', infoBg: '#333c3b', navBg: '#141714', diff --git a/src/client/themes/l-light.json5 b/src/client/themes/l-light.json5 index 27a973c88a..f85bee3b06 100644 --- a/src/client/themes/l-light.json5 +++ b/src/client/themes/l-light.json5 @@ -14,7 +14,6 @@ header: ':alpha<0.7<@panel', navBg: '#fff', panel: '#fff', - panelShadow: '" 0 8px 24px rgb(21 43 75 / 8%)', panelHeaderDivider: '@divider', messageBg: '#dedede', }, diff --git a/src/client/themes/l-vivid.json5 b/src/client/themes/l-vivid.json5 index a21e053b0a..0d6255d300 100644 --- a/src/client/themes/l-vivid.json5 +++ b/src/client/themes/l-vivid.json5 @@ -42,8 +42,7 @@ navHoverFg: ':darken<17<@fg', dateLabelFg: '@fg', inputBorder: '#dae0e4', - panelBorder: 'rgba(0, 0, 0, 0)', - panelShadow: '" 0 8px 24px rgb(21 43 75 / 8%)', + panelBorder: '" solid 1px var(--divider)', accentDarken: ':darken<10<@accent', acrylicPanel: ':alpha<0.5<@panel', navIndicator: '@accent', diff --git a/src/client/ui/chat/date-separated-list.vue b/src/client/ui/chat/date-separated-list.vue index bc7fc91d38..12638cd230 100644 --- a/src/client/ui/chat/date-separated-list.vue +++ b/src/client/ui/chat/date-separated-list.vue @@ -1,17 +1,23 @@