this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Allow arrange accounts

+87 -29
+1
src/components/ICONS.jsx
··· 16 16 }, 17 17 'arrow-up': () => import('@iconify-icons/mingcute/arrow-up-line'), 18 18 'arrow-down': () => import('@iconify-icons/mingcute/arrow-down-line'), 19 + 'arrow-to-up-line': () => import('@iconify-icons/mingcute/arrow-to-up-line'), 19 20 earth: () => import('@iconify-icons/mingcute/earth-line'), 20 21 lock: () => import('@iconify-icons/mingcute/lock-line'), 21 22 unlock: () => import('@iconify-icons/mingcute/unlock-line'),
+20 -14
src/locales/en.po
··· 117 117 #: src/components/status.jsx:2598 118 118 #: src/components/status.jsx:2601 119 119 #: src/pages/account-statuses.jsx:526 120 - #: src/pages/accounts.jsx:113 120 + #: src/pages/accounts.jsx:114 121 121 #: src/pages/hashtag.jsx:202 122 122 #: src/pages/list.jsx:171 123 123 #: src/pages/public.jsx:116 ··· 469 469 #: src/components/status.jsx:3100 470 470 #: src/components/status.jsx:3340 471 471 #: src/components/status.jsx:3849 472 - #: src/pages/accounts.jsx:40 472 + #: src/pages/accounts.jsx:41 473 473 #: src/pages/catchup.jsx:1584 474 474 #: src/pages/filters.jsx:225 475 475 #: src/pages/list.jsx:302 ··· 1076 1076 1077 1077 #: src/components/generic-accounts.jsx:154 1078 1078 #: src/components/notification.jsx:449 1079 - #: src/pages/accounts.jsx:45 1079 + #: src/pages/accounts.jsx:46 1080 1080 #: src/pages/search.jsx:334 1081 1081 #: src/pages/search.jsx:367 1082 1082 msgid "Accounts" ··· 1983 1983 msgstr "" 1984 1984 1985 1985 #: src/components/shortcuts-settings.jsx:351 1986 + #: src/pages/accounts.jsx:201 1986 1987 msgid "Move up" 1987 1988 msgstr "" 1988 1989 1989 1990 #: src/components/shortcuts-settings.jsx:367 1991 + #: src/pages/accounts.jsx:216 1990 1992 msgid "Move down" 1991 1993 msgstr "" 1992 1994 ··· 2688 2690 msgid "Month" 2689 2691 msgstr "" 2690 2692 2691 - #: src/pages/accounts.jsx:59 2693 + #: src/pages/accounts.jsx:60 2692 2694 msgid "Current" 2693 2695 msgstr "" 2694 2696 2695 - #: src/pages/accounts.jsx:105 2697 + #: src/pages/accounts.jsx:106 2696 2698 msgid "Default" 2697 2699 msgstr "" 2698 2700 2699 - #: src/pages/accounts.jsx:127 2701 + #: src/pages/accounts.jsx:128 2700 2702 msgid "Switch to this account" 2701 2703 msgstr "Switch to this account" 2702 2704 2703 - #: src/pages/accounts.jsx:136 2705 + #: src/pages/accounts.jsx:137 2704 2706 msgid "Switch in new tab/window" 2705 2707 msgstr "Switch in new tab/window" 2706 2708 2707 - #: src/pages/accounts.jsx:150 2709 + #: src/pages/accounts.jsx:151 2708 2710 msgid "View profile…" 2709 2711 msgstr "" 2710 2712 2711 - #: src/pages/accounts.jsx:167 2713 + #: src/pages/accounts.jsx:169 2712 2714 msgid "Set as default" 2713 2715 msgstr "" 2714 2716 2717 + #: src/pages/accounts.jsx:185 2718 + msgid "Move to top" 2719 + msgstr "Move to top" 2720 + 2715 2721 #. placeholder {0}: account.info.acct 2716 - #: src/pages/accounts.jsx:177 2722 + #: src/pages/accounts.jsx:228 2717 2723 msgid "Log out <0>@{0}</0>?" 2718 2724 msgstr "" 2719 2725 2720 - #: src/pages/accounts.jsx:206 2726 + #: src/pages/accounts.jsx:257 2721 2727 msgid "Log out…" 2722 2728 msgstr "" 2723 2729 2724 2730 #. placeholder {0}: niceDateTime(account.createdAt) 2725 - #: src/pages/accounts.jsx:213 2731 + #: src/pages/accounts.jsx:264 2726 2732 msgid "Connected on {0} (<0/>)" 2727 2733 msgstr "Connected on {0} (<0/>)" 2728 2734 2729 - #: src/pages/accounts.jsx:230 2735 + #: src/pages/accounts.jsx:281 2730 2736 msgid "Add an existing account" 2731 2737 msgstr "" 2732 2738 2733 - #: src/pages/accounts.jsx:237 2739 + #: src/pages/accounts.jsx:288 2734 2740 msgid "Note: <0>Default</0> account will always be used for first load. Switched accounts will persist during the session." 2735 2741 msgstr "" 2736 2742
+66 -15
src/pages/accounts.jsx
··· 29 29 const accounts = store.local.getJSON('accounts'); 30 30 const currentAccount = getCurrentAccountID(); 31 31 const moreThanOneAccount = accounts.length > 1; 32 + const moreThanThreeAccounts = accounts.length > 3; 32 33 33 34 const [_, reload] = useReducer((x) => x + 1, 0); 34 35 const [accountsListParent] = useAutoAnimate(); ··· 152 153 </MenuItem> 153 154 <MenuDivider /> 154 155 {moreThanOneAccount && ( 155 - <MenuItem 156 - disabled={isDefault} 157 - onClick={() => { 158 - // Move account to the top of the list 159 - accounts.splice(i, 1); 160 - accounts.unshift(account); 161 - store.local.setJSON('accounts', accounts); 162 - reload(); 163 - }} 164 - > 165 - <Icon icon="check-circle" /> 166 - <span> 167 - <Trans>Set as default</Trans> 168 - </span> 169 - </MenuItem> 156 + <> 157 + <MenuItem 158 + disabled={isDefault} 159 + onClick={() => { 160 + // Move account to the top of the list 161 + accounts.splice(i, 1); 162 + accounts.unshift(account); 163 + store.local.setJSON('accounts', accounts); 164 + reload(); 165 + }} 166 + > 167 + <Icon icon="check-circle" /> 168 + <span> 169 + <Trans>Set as default</Trans> 170 + </span> 171 + </MenuItem> 172 + {moreThanThreeAccounts && ( 173 + <MenuItem 174 + disabled={i <= 2} 175 + onClick={() => { 176 + // Move account to position 1 (right below default) 177 + accounts.splice(i, 1); 178 + accounts.splice(1, 0, account); 179 + store.local.setJSON('accounts', accounts); 180 + reload(); 181 + }} 182 + > 183 + <Icon icon="arrow-to-up-line" /> 184 + <span> 185 + <Trans>Move to top</Trans> 186 + </span> 187 + </MenuItem> 188 + )} 189 + <MenuItem 190 + disabled={i <= 1} 191 + onClick={() => { 192 + // Move account one position up 193 + accounts.splice(i, 1); 194 + accounts.splice(i - 1, 0, account); 195 + store.local.setJSON('accounts', accounts); 196 + reload(); 197 + }} 198 + > 199 + <Icon icon="arrow-up" /> 200 + <span> 201 + <Trans>Move up</Trans> 202 + </span> 203 + </MenuItem> 204 + <MenuItem 205 + disabled={i === 0 || i === accounts.length - 1} 206 + onClick={() => { 207 + // Move account one position down 208 + accounts.splice(i, 1); 209 + accounts.splice(i + 1, 0, account); 210 + store.local.setJSON('accounts', accounts); 211 + reload(); 212 + }} 213 + > 214 + <Icon icon="arrow-down" /> 215 + <span> 216 + <Trans>Move down</Trans> 217 + </span> 218 + </MenuItem> 219 + <MenuDivider /> 220 + </> 170 221 )} 171 222 <MenuConfirm 172 223 subMenu