Shorter copies
This commit is contained in:
parent
74a02ee388
commit
4dae1d1576
5 changed files with 7 additions and 16 deletions
|
@ -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 =
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue