diff --git a/README.md b/README.md index 3d21b8f0..7cb032b0 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ To use Akkoma-FE in Akkoma, use the [frontend](https://docs.akkoma.dev/stable/ad ```bash # install dependencies -npm install -g yarn +corepack enable yarn # serve with hot reload at localhost:8080 @@ -83,7 +83,7 @@ npm run unit ## For Contributors: -You can create file `/config/local.json` (see [example](https://git.pleroma.social/pleroma/pleroma-fe/blob/develop/config/local.example.json)) to enable some convenience dev options: +You can create file `/config/local.json` (see [example](https://akkoma.dev/AkkomaGang/akkoma-fe/src/branch/develop/config/local.example.json)) to enable some convenience dev options: - `target`: makes local dev server redirect to some existing instance's BE instead of local BE, useful for testing things in near-production environment and searching for real-life use-cases. - `staticConfigPreference`: makes FE's `/static/config.json` take preference of BE-served `/api/statusnet/config.json`. Only works in dev mode. diff --git a/config/local.example.json b/config/local.example.json index 2a3bd00d..43ebd649 100644 --- a/config/local.example.json +++ b/config/local.example.json @@ -1,4 +1,4 @@ { - "target": "https://pleroma.soykaf.com/", + "target": "https://otp.akkoma.dev/", "staticConfigPreference": false } diff --git a/src/App.scss b/src/App.scss index 895432e3..614be3ec 100644 --- a/src/App.scss +++ b/src/App.scss @@ -8,7 +8,7 @@ } html { - font-size: 14px; + font-size: 0.875rem; // overflow-x: clip causes my browser's tab to crash with SIGILL lul } diff --git a/src/components/attachment/attachment.scss b/src/components/attachment/attachment.scss index 484ca0c4..d65f39fb 100644 --- a/src/components/attachment/attachment.scss +++ b/src/components/attachment/attachment.scss @@ -37,7 +37,7 @@ white-space: pre-line; word-break: break-word; text-overflow: ellipsis; - overflow: scroll; + overflow: auto; } &.-static { diff --git a/src/components/mention_link/mention_link.js b/src/components/mention_link/mention_link.js index 55eea195..377f8ea5 100644 --- a/src/components/mention_link/mention_link.js +++ b/src/components/mention_link/mention_link.js @@ -93,9 +93,6 @@ const MentionLink = { this.highlightType ] }, - useAtIcon () { - return this.mergedConfig.useAtIcon - }, isRemote () { return this.userName !== this.userNameFull }, diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 76101865..5ea6ab04 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -151,7 +151,6 @@ > diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss index 3d3408f7..635a0a9b 100644 --- a/src/components/notifications/notifications.scss +++ b/src/components/notifications/notifications.scss @@ -105,9 +105,12 @@ flex: 1; padding-left: 0.8em; min-width: 0; + } + .heading-right, .notification-right { .timeago { - min-width: 3em; + display: inline-block; + min-width: 6em; text-align: right; } } diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 13a3f480..c868ee72 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -143,6 +143,7 @@ const PostStatusForm = { postLanguage: language, sensitiveByDefault, sensitiveIfSubject, + alwaysShowSubjectInput, } = this.$store.getters.mergedConfig let statusParams = { @@ -205,6 +206,10 @@ const PostStatusForm = { } } + // When first loading the form, hide the subject (CW) field if it's disabled or doesn't have a starting value. + // "disableSubject" seems to take priority over "alwaysShowSubjectInput". + const showSubject = !this.disableSubject && (statusParams.spoilerText || alwaysShowSubjectInput) + return { dropFiles: [], uploadingFiles: false, @@ -219,7 +224,10 @@ const PostStatusForm = { preview: null, previewLoading: false, emojiInputShown: false, - idempotencyKey: '' + idempotencyKey: '', + activeEmojiInput: undefined, + activeTextInput: undefined, + subjectVisible: showSubject } }, computed: { @@ -680,8 +688,33 @@ const PostStatusForm = { this.$refs['emoji-input'].resize() }, showEmojiPicker () { - this.$refs['textarea'].focus() - this.$refs['emoji-input'].triggerShowPicker() + if (!this.activeEmojiInput || !this.activeTextInput) + this.focusStatusInput() + + this.$refs[this.activeTextInput].focus() + this.$refs[this.activeEmojiInput].triggerShowPicker() + }, + focusStatusInput() { + this.activeEmojiInput = 'emoji-input' + this.activeTextInput = 'textarea' + }, + focusSubjectInput() { + this.activeEmojiInput = 'subject-emoji-input' + this.activeTextInput = 'subject-input' + }, + toggleSubjectVisible() { + // If hiding CW, then we need to clear the subject and reset focus + if (this.subjectVisible) + { + this.focusStatusInput() + + // "nsfw" property is normally set by the @change listener, but this bypasses it. + // We need to clear it manually instead. + this.newStatus.spoilerText = '' + this.newStatus.nsfw = false + } + + this.subjectVisible = !this.subjectVisible }, clearError () { this.error = null diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 06a16d9e..c676dde9 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -118,13 +118,16 @@ />

+