Skip to content

Commit

Permalink
[add] (4.0 compatibility) add regacy 'toot' button for single column …
Browse files Browse the repository at this point in the history
…mode

- 'toot' (not 'publish' in handon.club) button appears in single column mode
- If vanilla theme is selected, this button may be disabled
  • Loading branch information
highemerly committed Nov 18, 2023
1 parent 0b26bcc commit 43aae19
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const messages = defineMessages({
bookmarks: { id: 'navigation_bar.bookmarks', defaultMessage: 'Bookmarks' },
lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' },
preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },
publish: { id: 'compose_form.publish', defaultMessage: 'Toot!' },
followsAndFollowers: { id: 'navigation_bar.follows_and_followers', defaultMessage: 'Follows and followers' },
about: { id: 'navigation_bar.about', defaultMessage: 'About' },
search: { id: 'navigation_bar.search', defaultMessage: 'Search' },
Expand Down Expand Up @@ -108,6 +109,7 @@ class NavigationPanel extends Component {
<hr />

<ColumnLink transparent href='/settings/preferences' icon='cog' text={intl.formatMessage(messages.preferences)} />
<ColumnLink transparent to='/publish' icon='pencil' text={intl.formatMessage(messages.publish)} />
</>
)}

Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"compose_form.poll.remove_option": "Remove this choice",
"compose_form.poll.switch_to_multiple": "Change poll to allow multiple choices",
"compose_form.poll.switch_to_single": "Change poll to allow for a single choice",
"compose_form.publish": "Publish",
"compose_form.publish": "Toot",
"compose_form.publish_form": "New post",
"compose_form.publish_loud": "{publish}!",
"compose_form.save_changes": "Save changes",
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"compose_form.poll.remove_option": "この項目を削除",
"compose_form.poll.switch_to_multiple": "複数選択に変更",
"compose_form.poll.switch_to_single": "単一選択に変更",
"compose_form.publish": "投稿",
"compose_form.publish": "トゥート",
"compose_form.publish_form": "投稿",
"compose_form.publish_loud": "{publish}!",
"compose_form.save_changes": "変更を保存",
Expand Down
1 change: 1 addition & 0 deletions app/javascript/styles/contrast.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import 'contrast/variables';
@import 'application';
@import 'contrast/diff';
@import 'handon/compatibility';
2 changes: 2 additions & 0 deletions app/javascript/styles/default.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import 'application';
@import 'handon/compatibility';
8 changes: 8 additions & 0 deletions app/javascript/styles/handon/compatibility.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.drawer__inner__mastodon > img {
display: none;
}

div.columns-area__panels__pane__inner a.column-link[href='/publish'] {
display: none;
width: 0;
}
14 changes: 14 additions & 0 deletions app/javascript/styles/handon/handon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@
width: auto !important;
}

/**** compatibility 4.0 or before ****/

/* Add post button to side bar */
div.columns-area__panels__pane__inner a.column-link[href='/publish'] {
background-color: #595aff;
border: 6px;
border-radius: 6px;
color: $white;
}

div.columns-area__panels__pane__inner a.column-link.active[href='/publish'] {
display: none;
}

/**** misc ****/

/* Change color of display-name who is belong to handon.club */
Expand Down
1 change: 1 addition & 0 deletions app/javascript/styles/mastodon-light.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import 'mastodon-light/variables';
@import 'application';
@import 'mastodon-light/diff';
@import 'handon/compatibility';
2 changes: 1 addition & 1 deletion config/themes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ contrast: styles/handon-contrast.scss
mastodon-light: styles/handon-light.scss
blacklead: styles/handon-blacklead.scss
cantadark: styles/handon-cantadark.scss
vanilla-default: styles/application.scss
vanilla-default: styles/default.scss
vanilla-contrast: styles/contrast.scss
vanilla-light: styles/mastodon-light.scss

0 comments on commit 43aae19

Please sign in to comment.