From 7705a7928e1ea952b7185162844576575c1a4bab Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 7 Aug 2021 20:39:27 +0900 Subject: [PATCH 01/40] fix bug that docs not loading --- src/server/web/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/web/index.ts b/src/server/web/index.ts index a732e7f5b4..30a53a703b 100644 --- a/src/server/web/index.ts +++ b/src/server/web/index.ts @@ -168,7 +168,7 @@ router.get('/docs.json', async ctx => { } docs.push({ - path: path.replace(`${dirPath}/`, '').split('.')[0], + path: path.match(new RegExp(`docs\/${lang}\/(.+?)\.md$`))![1], title: markdown.renderer.render(headingTokens, {}, {}), summary: markdown.renderer.render(firstParagrapfTokens, {}, {}), }); From 39a8942daf6085fbd919e73256d2f688d817ccd4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 7 Aug 2021 22:06:50 +0900 Subject: [PATCH 02/40] :art: --- src/client/ui/default.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/ui/default.vue b/src/client/ui/default.vue index 645f67c123..3fc666c833 100644 --- a/src/client/ui/default.vue +++ b/src/client/ui/default.vue @@ -12,7 +12,7 @@ -
+
@@ -292,7 +292,10 @@ export default defineComponent({ width: 750px; margin: 0 16px 0 0; background: var(--panel); + border-left: solid 1px var(--divider); + border-right: solid 1px var(--divider); border-radius: 0; + overflow: clip; --margin: 12px; > .header { @@ -343,6 +346,7 @@ export default defineComponent({ > .main { margin-top: 0; + border: solid 1px var(--divider); border-radius: var(--radius); } From c968633d155587083d280a48c6b425064f5f44c6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 7 Aug 2021 23:43:42 +0900 Subject: [PATCH 03/40] Update misskey.md --- src/docs/ja-JP/general/misskey.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/docs/ja-JP/general/misskey.md b/src/docs/ja-JP/general/misskey.md index 97ffd23eb2..d364780ec7 100644 --- a/src/docs/ja-JP/general/misskey.md +++ b/src/docs/ja-JP/general/misskey.md @@ -18,7 +18,7 @@ Misskeyはオープンソースの分散型マイクロブログプラットフ ## 常にオープンソース Misskeyはこれまでもこれからも、オープンソースであり続けます。オープンソースとは、簡単に言うとソフトウェアのソースコード(プログラム)が公開されていることです。ソースコードの修正や再配布が可能であることを定義に含めることもあります。 -Misskeyのすべてのソースコードは[AGPL](https://github.com/misskey-dev/misskey/blob/develop/LICENSE)というオープンソースライセンスの下に[公開]((https://github.com/misskey-dev))されていて、誰でも自由に閲覧、使用、修正、改変、再配布をすることができます。 +Misskeyのすべてのソースコードは[AGPL](https://github.com/misskey-dev/misskey/blob/develop/LICENSE)というオープンソースライセンスの下に[公開](https://github.com/misskey-dev)されていて、誰でも自由に閲覧、使用、修正、改変、再配布をすることができます。 オープンソースは、自分で好きなように変えたり、有害な処理が含まれていないことを確認することができたり、誰でも開発に参加できるなどの、様々なメリットがあります。 上述の分散型を実現するためにも、オープンソースであるということは必要不可欠な要素です。 再び引き合いに出しますが、TwitterやFacebookなどの利益を得ているほとんどのサービスはオープンソースではありません。 @@ -84,6 +84,8 @@ Misskeyは分散型なため、各サーバーにそれぞれ異なった運営 他にも、サーバーの規模、ユーザー層、国および言語、運営者が信頼できるかどうか、などの観点があります。 なお、Misskey公式のサーバーというものはありません。自身で新しくサーバーを作成するという選択肢もあります。 +基本的にどのサーバーを選んだとしても、他の全てのサーバーのユーザーと繋がることができます。 + ### サーバーを建てるにはどうしたらいいですか? Misskeyサーバーの作成に興味を持っていただきありがとうございます。 2021年現在、Misskeyのホスティングサービスは存在しないため、サーバーの作成にはある程度の知識が必要です。 From 65858dab3e2656f44b0be668c994781cfb4b419d Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 8 Aug 2021 12:19:10 +0900 Subject: [PATCH 04/40] Improve client --- src/client/components/drive.file.vue | 2 +- src/client/components/drive.vue | 2 +- src/client/components/emoji-picker-dialog.vue | 14 +- src/client/components/note-detailed.vue | 8 +- src/client/components/note.vue | 8 +- src/client/components/post-form-attaches.vue | 2 +- src/client/components/post-form.vue | 2 +- src/client/components/sample.vue | 2 +- src/client/components/ui/button.vue | 2 +- src/client/components/ui/input.vue | 6 +- .../ui/{modal-menu.vue => popup-menu.vue} | 29 +-- src/client/components/ui/popup.vue | 208 ++++++++++++++++++ src/client/components/ui/select.vue | 6 +- src/client/components/ui/textarea.vue | 6 +- src/client/menu.ts | 2 +- src/client/os.ts | 4 +- src/client/pages/advanced-theme-editor.vue | 2 +- src/client/pages/clip.vue | 2 +- src/client/pages/emojis.vue | 2 +- src/client/pages/instance/emojis.vue | 2 +- src/client/pages/instance/index.vue | 2 +- src/client/pages/messaging/index.vue | 2 +- src/client/pages/messaging/messaging-room.vue | 2 +- src/client/pages/settings/accounts.vue | 4 +- src/client/pages/settings/reaction.vue | 2 +- src/client/pages/timeline.vue | 6 +- src/client/pages/user/index.vue | 2 +- src/client/pages/welcome.entrance.a.vue | 2 +- src/client/pages/welcome.entrance.b.vue | 2 +- src/client/pages/welcome.entrance.c.vue | 2 +- src/client/scripts/select-file.ts | 2 +- src/client/ui/_common_/header.vue | 4 +- src/client/ui/_common_/sidebar.vue | 4 +- src/client/ui/chat/note.vue | 8 +- src/client/ui/chat/pages/channel.vue | 2 +- src/client/ui/chat/post-form.vue | 2 +- src/client/ui/default.header.vue | 4 +- src/client/ui/default.sidebar.vue | 4 +- src/client/widgets/timeline.vue | 2 +- 39 files changed, 286 insertions(+), 83 deletions(-) rename src/client/components/ui/{modal-menu.vue => popup-menu.vue} (51%) create mode 100644 src/client/components/ui/popup.vue diff --git a/src/client/components/drive.file.vue b/src/client/components/drive.file.vue index 3d20de23e9..b1be3d0cab 100644 --- a/src/client/components/drive.file.vue +++ b/src/client/components/drive.file.vue @@ -114,7 +114,7 @@ export default defineComponent({ if (this.selectMode) { this.$emit('chosen', this.file); } else { - os.modalMenu(this.getMenu(), ev.currentTarget || ev.target); + os.popupMenu(this.getMenu(), ev.currentTarget || ev.target); } }, diff --git a/src/client/components/drive.vue b/src/client/components/drive.vue index 98f7b54828..5dadf9a11f 100644 --- a/src/client/components/drive.vue +++ b/src/client/components/drive.vue @@ -629,7 +629,7 @@ export default defineComponent({ }, showMenu(ev) { - os.modalMenu(this.getMenu(), ev.currentTarget || ev.target); + os.popupMenu(this.getMenu(), ev.currentTarget || ev.target); }, onContextmenu(ev) { diff --git a/src/client/components/emoji-picker-dialog.vue b/src/client/components/emoji-picker-dialog.vue index 9400819a1f..5860acaa42 100644 --- a/src/client/components/emoji-picker-dialog.vue +++ b/src/client/components/emoji-picker-dialog.vue @@ -1,17 +1,17 @@ - - diff --git a/src/client/components/ui/popup.vue b/src/client/components/ui/popup.vue new file mode 100644 index 0000000000..85df3f432d --- /dev/null +++ b/src/client/components/ui/popup.vue @@ -0,0 +1,208 @@ + + + + + diff --git a/src/client/components/ui/select.vue b/src/client/components/ui/select.vue index 987d4f194c..e9d43d8a64 100644 --- a/src/client/components/ui/select.vue +++ b/src/client/components/ui/select.vue @@ -155,8 +155,7 @@ export default defineComponent({ > .label { font-size: 0.85em; - padding: 0 0 6px 6px; - font-weight: bold; + padding: 0 0 8px 12px; user-select: none; &:empty { @@ -166,7 +165,7 @@ export default defineComponent({ > .caption { font-size: 0.8em; - padding: 6px 0 0 6px; + padding: 8px 0 0 12px; color: var(--fgTransparentWeak); &:empty { @@ -197,6 +196,7 @@ export default defineComponent({ box-shadow: none; box-sizing: border-box; cursor: pointer; + transition: border-color 0.1s ease-out; &:hover { border-color: var(--inputBorderHover); diff --git a/src/client/components/ui/textarea.vue b/src/client/components/ui/textarea.vue index a61324f25f..53a141f011 100644 --- a/src/client/components/ui/textarea.vue +++ b/src/client/components/ui/textarea.vue @@ -176,8 +176,7 @@ export default defineComponent({ > .label { font-size: 0.85em; - padding: 0 0 6px 6px; - font-weight: bold; + padding: 0 0 8px 12px; user-select: none; &:empty { @@ -187,7 +186,7 @@ export default defineComponent({ > .caption { font-size: 0.8em; - padding: 6px 0 0 6px; + padding: 8px 0 0 12px; color: var(--fgTransparentWeak); &:empty { @@ -218,6 +217,7 @@ export default defineComponent({ outline: none; box-shadow: none; box-sizing: border-box; + transition: border-color 0.1s ease-out; &:hover { border-color: var(--inputBorderHover); diff --git a/src/client/menu.ts b/src/client/menu.ts index 0b5341f970..8e65496cf3 100644 --- a/src/client/menu.ts +++ b/src/client/menu.ts @@ -143,7 +143,7 @@ export const menuDef = { title: 'switchUi', icon: 'fas fa-columns', action: (ev) => { - os.modalMenu([{ + os.popupMenu([{ text: i18n.locale.default, action: () => { localStorage.setItem('ui', 'default'); diff --git a/src/client/os.ts b/src/client/os.ts index 987844b2d2..284f982f06 100644 --- a/src/client/os.ts +++ b/src/client/os.ts @@ -368,10 +368,10 @@ export async function openEmojiPicker(src?: HTMLElement, opts, initialTextarea: }); } -export function modalMenu(items: any[], src?: HTMLElement, options?: { align?: string; viaKeyboard?: boolean }) { +export function popupMenu(items: any[], src?: HTMLElement, options?: { align?: string; viaKeyboard?: boolean }) { return new Promise((resolve, reject) => { let dispose; - popup(import('@client/components/ui/modal-menu.vue'), { + popup(import('@client/components/ui/popup-menu.vue'), { items, src, align: options?.align, diff --git a/src/client/pages/advanced-theme-editor.vue b/src/client/pages/advanced-theme-editor.vue index b40d9808ca..c03d88b82d 100644 --- a/src/client/pages/advanced-theme-editor.vue +++ b/src/client/pages/advanced-theme-editor.vue @@ -272,7 +272,7 @@ export default defineComponent({ showTypeMenu(e: MouseEvent) { return new Promise((resolve) => { - os.modalMenu([{ + os.popupMenu([{ text: this.$ts._theme.defaultValue, action: () => resolve(null), }, { diff --git a/src/client/pages/clip.vue b/src/client/pages/clip.vue index 8777975557..e4b00d5e28 100644 --- a/src/client/pages/clip.vue +++ b/src/client/pages/clip.vue @@ -79,7 +79,7 @@ export default defineComponent({ methods: { menu(ev) { - os.modalMenu([this.isOwned ? { + os.popupMenu([this.isOwned ? { icon: 'fas fa-pencil-alt', text: this.$ts.edit, action: async () => { diff --git a/src/client/pages/emojis.vue b/src/client/pages/emojis.vue index 435727e196..391aff8297 100644 --- a/src/client/pages/emojis.vue +++ b/src/client/pages/emojis.vue @@ -80,7 +80,7 @@ export default defineComponent({ methods: { menu(emoji, ev) { - os.modalMenu([{ + os.popupMenu([{ type: 'label', text: ':' + emoji.name + ':', }, { diff --git a/src/client/pages/instance/emojis.vue b/src/client/pages/instance/emojis.vue index e971ca942e..7badc9da02 100644 --- a/src/client/pages/instance/emojis.vue +++ b/src/client/pages/instance/emojis.vue @@ -146,7 +146,7 @@ export default defineComponent({ }, remoteMenu(emoji, ev) { - os.modalMenu([{ + os.popupMenu([{ type: 'label', text: ':' + emoji.name + ':', }, { diff --git a/src/client/pages/instance/index.vue b/src/client/pages/instance/index.vue index 90dd29d55f..612bfa762a 100644 --- a/src/client/pages/instance/index.vue +++ b/src/client/pages/instance/index.vue @@ -167,7 +167,7 @@ export default defineComponent({ }; const lookup = (ev) => { - os.modalMenu([{ + os.popupMenu([{ text: i18n.locale.user, icon: 'fas fa-user', action: () => { diff --git a/src/client/pages/messaging/index.vue b/src/client/pages/messaging/index.vue index 1d4e816fb9..1e0d4dc64c 100644 --- a/src/client/pages/messaging/index.vue +++ b/src/client/pages/messaging/index.vue @@ -116,7 +116,7 @@ export default defineComponent({ }, start(ev) { - os.modalMenu([{ + os.popupMenu([{ text: this.$ts.messagingWithUser, icon: 'fas fa-user', action: () => { this.startUser() } diff --git a/src/client/pages/messaging/messaging-room.vue b/src/client/pages/messaging/messaging-room.vue index 24ed105913..b6a2fbd3d4 100644 --- a/src/client/pages/messaging/messaging-room.vue +++ b/src/client/pages/messaging/messaging-room.vue @@ -320,7 +320,7 @@ const Component = defineComponent({ menu(ev) { const path = this.groupId ? `/my/messaging/group/${this.groupId}` : `/my/messaging/${this.userAcct}`; - os.modalMenu([this.inWindow ? undefined : { + os.popupMenu([this.inWindow ? undefined : { text: this.$ts.openInWindow, icon: 'fas fa-window-maximize', action: () => { diff --git a/src/client/pages/settings/accounts.vue b/src/client/pages/settings/accounts.vue index a3fa0d4eb0..53e28bdf6f 100644 --- a/src/client/pages/settings/accounts.vue +++ b/src/client/pages/settings/accounts.vue @@ -64,7 +64,7 @@ export default defineComponent({ methods: { menu(account, ev) { - os.modalMenu([{ + os.popupMenu([{ text: this.$ts.switch, icon: 'fas fa-exchange-alt', action: () => this.switchAccount(account), @@ -77,7 +77,7 @@ export default defineComponent({ }, addAccount(ev) { - os.modalMenu([{ + os.popupMenu([{ text: this.$ts.existingAccount, action: () => { this.addExistingAccount(); }, }, { diff --git a/src/client/pages/settings/reaction.vue b/src/client/pages/settings/reaction.vue index 9bffd5f903..a0024234e4 100644 --- a/src/client/pages/settings/reaction.vue +++ b/src/client/pages/settings/reaction.vue @@ -94,7 +94,7 @@ export default defineComponent({ }, remove(reaction, ev) { - os.modalMenu([{ + os.popupMenu([{ text: this.$ts.remove, action: () => { this.reactions = this.reactions.filter(x => x !== reaction) diff --git a/src/client/pages/timeline.vue b/src/client/pages/timeline.vue index 55c4743264..a6a0e6987f 100644 --- a/src/client/pages/timeline.vue +++ b/src/client/pages/timeline.vue @@ -147,7 +147,7 @@ export default defineComponent({ this.saveSrc(); } })); - os.modalMenu(items, ev.currentTarget || ev.target); + os.popupMenu(items, ev.currentTarget || ev.target); }, async chooseAntenna(ev) { @@ -161,7 +161,7 @@ export default defineComponent({ this.saveSrc(); } })); - os.modalMenu(items, ev.currentTarget || ev.target); + os.popupMenu(items, ev.currentTarget || ev.target); }, async chooseChannel(ev) { @@ -177,7 +177,7 @@ export default defineComponent({ this.$router.push(`/channels/${channel.id}`); } })); - os.modalMenu(items, ev.currentTarget || ev.target); + os.popupMenu(items, ev.currentTarget || ev.target); }, saveSrc() { diff --git a/src/client/pages/user/index.vue b/src/client/pages/user/index.vue index dec5ec39e2..9cf424b127 100644 --- a/src/client/pages/user/index.vue +++ b/src/client/pages/user/index.vue @@ -338,7 +338,7 @@ export default defineComponent({ }, menu(ev) { - os.modalMenu(getUserMenu(this.user), ev.currentTarget || ev.target); + os.popupMenu(getUserMenu(this.user), ev.currentTarget || ev.target); }, parallaxLoop() { diff --git a/src/client/pages/welcome.entrance.a.vue b/src/client/pages/welcome.entrance.a.vue index da3c694265..299271c347 100644 --- a/src/client/pages/welcome.entrance.a.vue +++ b/src/client/pages/welcome.entrance.a.vue @@ -117,7 +117,7 @@ export default defineComponent({ }, showMenu(ev) { - os.modalMenu([{ + os.popupMenu([{ text: this.$t('aboutX', { x: instanceName }), icon: 'fas fa-info-circle', action: () => { diff --git a/src/client/pages/welcome.entrance.b.vue b/src/client/pages/welcome.entrance.b.vue index d108eb7d94..a5c12f09e2 100644 --- a/src/client/pages/welcome.entrance.b.vue +++ b/src/client/pages/welcome.entrance.b.vue @@ -101,7 +101,7 @@ export default defineComponent({ }, showMenu(ev) { - os.modalMenu([{ + os.popupMenu([{ text: this.$t('aboutX', { x: instanceName }), icon: 'fas fa-info-circle', action: () => { diff --git a/src/client/pages/welcome.entrance.c.vue b/src/client/pages/welcome.entrance.c.vue index 93811e98fb..2c8db6e264 100644 --- a/src/client/pages/welcome.entrance.c.vue +++ b/src/client/pages/welcome.entrance.c.vue @@ -121,7 +121,7 @@ export default defineComponent({ }, showMenu(ev) { - os.modalMenu([{ + os.popupMenu([{ text: this.$t('aboutX', { x: instanceName }), icon: 'fas fa-info-circle', action: () => { diff --git a/src/client/scripts/select-file.ts b/src/client/scripts/select-file.ts index 9d7146e215..f7b971e113 100644 --- a/src/client/scripts/select-file.ts +++ b/src/client/scripts/select-file.ts @@ -69,7 +69,7 @@ export function selectFile(src: any, label: string | null, multiple = false) { }); }; - os.modalMenu([label ? { + os.popupMenu([label ? { text: label, type: 'label' } : undefined, { diff --git a/src/client/ui/_common_/header.vue b/src/client/ui/_common_/header.vue index 24b9046717..67bb3abb93 100644 --- a/src/client/ui/_common_/header.vue +++ b/src/client/ui/_common_/header.vue @@ -31,7 +31,7 @@ From 1c764139bf9dfa5575ea32cfa0a4eecf9690cd7d Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 9 Aug 2021 18:01:12 +0900 Subject: [PATCH 16/40] :art: --- src/client/components/emoji-picker-dialog.vue | 157 ++---------------- src/client/components/emoji-picker.vue | 3 +- src/client/components/poll-editor.vue | 3 +- src/client/components/ui/button.vue | 1 + src/client/components/ui/menu.vue | 24 ++- src/client/components/ui/popup-menu.vue | 4 +- src/client/components/ui/popup.vue | 5 +- src/client/components/ui/window.vue | 1 + src/client/pages/doc.vue | 2 +- src/client/pages/my-lists/index.vue | 15 +- src/client/style.scss | 2 +- 11 files changed, 61 insertions(+), 156 deletions(-) diff --git a/src/client/components/emoji-picker-dialog.vue b/src/client/components/emoji-picker-dialog.vue index 9aca47f547..aa17b8b250 100644 --- a/src/client/components/emoji-picker-dialog.vue +++ b/src/client/components/emoji-picker-dialog.vue @@ -1,6 +1,6 @@ @@ -56,145 +56,20 @@ export default defineComponent({