Shorter copies

This commit is contained in:
Lim Chee Aun 2023-02-16 19:10:26 +08:00
parent 74a02ee388
commit 4dae1d1576
5 changed files with 7 additions and 16 deletions

View file

@ -311,8 +311,8 @@ function Account({ account, instance: propInstance, onClose }) {
if (following || requested) { if (following || requested) {
const yes = confirm( const yes = confirm(
requested requested
? 'Are you sure that you want to withdraw follow request?' ? 'Withdraw follow request?'
: 'Are you sure that you want to unfollow this account?', : `Unfollow @${info.acct || info.username}?`,
); );
if (yes) { if (yes) {
newRelationship = newRelationship =

View file

@ -264,8 +264,7 @@ function Compose({
const formRef = useRef(); const formRef = useRef();
const beforeUnloadCopy = const beforeUnloadCopy = 'You have unsaved changes. Discard this post?';
'You have unsaved changes. Are you sure you want to discard this post?';
const canClose = () => { const canClose = () => {
const { value, dataset } = textareaRef.current; const { value, dataset } = textareaRef.current;

View file

@ -103,9 +103,7 @@ function Drafts() {
onClick={() => { onClick={() => {
(async () => { (async () => {
try { try {
const yes = confirm( const yes = confirm('Delete this draft?');
'Are you sure you want to delete this draft?',
);
if (yes) { if (yes) {
await db.drafts.del(key); await db.drafts.del(key);
reload(); reload();
@ -161,9 +159,7 @@ function Drafts() {
disabled={uiState === 'loading'} disabled={uiState === 'loading'}
onClick={() => { onClick={() => {
(async () => { (async () => {
const yes = confirm( const yes = confirm('Delete all drafts?');
'Are you sure you want to delete all drafts?',
);
if (yes) { if (yes) {
setUIState('loading'); setUIState('loading');
try { try {

View file

@ -531,9 +531,7 @@ function Status({
} }
try { try {
if (!reblogged) { if (!reblogged) {
const yes = confirm( const yes = confirm('Boost this post?');
'Are you sure that you want to boost this post?',
);
if (!yes) { if (!yes) {
return; return;
} }

View file

@ -125,9 +125,7 @@ function Settings({ onClose }) {
<MenuItem <MenuItem
disabled={!isCurrent} disabled={!isCurrent}
onClick={() => { onClick={() => {
const yes = confirm( const yes = confirm('Log out?');
'Are you sure you want to log out?',
);
if (!yes) return; if (!yes) return;
accounts.splice(i, 1); accounts.splice(i, 1);
store.local.setJSON('accounts', accounts); store.local.setJSON('accounts', accounts);