From 6769f2125abd1716723568e7ee5ce63053fc1110 Mon Sep 17 00:00:00 2001 From: cutls
Date: Sat, 29 Jun 2024 19:42:48 +0900
Subject: [PATCH] feat: Add compose button position
---
locales/en/translation.json | 7 +++++++
locales/ja/translation.json | 7 +++++++
renderer/components/Navigator.tsx | 15 +++++++++++----
renderer/components/settings/Settings.tsx | 10 ++++++++++
renderer/entities/settings.ts | 2 ++
5 files changed, 37 insertions(+), 4 deletions(-)
diff --git a/locales/en/translation.json b/locales/en/translation.json
index c822de5..ebaaa9d 100644
--- a/locales/en/translation.json
+++ b/locales/en/translation.json
@@ -104,6 +104,8 @@
"settings": {
"settings": {
"title": "Settings",
+ "require_reload": "Required to reload after changing",
+ "reload": "Whole Reload",
"appearance": {
"title": "Appearance",
"font_size": "Font size",
@@ -125,6 +127,11 @@
},
"compose": {
"title": "Compose",
+ "btnPosition": {
+ "title": "Compose button on bottom-bar position",
+ "left": "Left",
+ "right": "Right"
+ },
"afterPost": {
"title": "After posting, compose box will be...",
"close": "Close",
diff --git a/locales/ja/translation.json b/locales/ja/translation.json
index e1619ac..11ae858 100644
--- a/locales/ja/translation.json
+++ b/locales/ja/translation.json
@@ -104,6 +104,8 @@
"settings": {
"settings": {
"title": "設定",
+ "require_reload": "変更後は再読み込みが必要です",
+ "reload": "全体を再読み込み",
"appearance": {
"title": "外観",
"font_size": "フォントサイズ",
@@ -125,6 +127,11 @@
},
"compose": {
"title": "投稿",
+ "btnPosition": {
+ "title": "ボトムバーの投稿ボタンの位置",
+ "left": "左",
+ "right": "右"
+ },
"afterPost": {
"title": "投稿後投稿ボックスの挙動",
"close": "しまう",
diff --git a/renderer/components/Navigator.tsx b/renderer/components/Navigator.tsx
index 4acc74d..2c75386 100644
--- a/renderer/components/Navigator.tsx
+++ b/renderer/components/Navigator.tsx
@@ -14,7 +14,8 @@ import { type Dispatch, type ReactElement, type SetStateAction, useContext, useE
import { BsDice1, BsDice2, BsDice3, BsDice4, BsDice5, BsDice6, BsGear, BsPencilSquare, BsPlus, BsSearch } from 'react-icons/bs'
import { FormattedMessage, useIntl } from 'react-intl'
import { Avatar, Badge, Button, Dropdown, FlexboxGrid, Popover, Sidebar, Sidenav, Stack, Text, Whisper, useToaster } from 'rsuite'
-import { addTimeline, listTimelines, removeServer, updateAccountColor } from 'utils/storage'
+import { addTimeline, listTimelines, readSettings, removeServer, updateAccountColor } from 'utils/storage'
+import { type Settings, defaultSetting } from '@/entities/settings'
type NavigatorProps = {
servers: Array