Better backup ui + make available on akkoma
This commit is contained in:
parent
d3bb93c8de
commit
cf7681b67e
|
@ -3,7 +3,7 @@ import { defineMessages, useIntl } from 'react-intl';
|
|||
|
||||
import { fetchBackups, createBackup } from 'soapbox/actions/backups';
|
||||
import ScrollableList from 'soapbox/components/scrollable_list';
|
||||
import { Button, FormActions, Text } from 'soapbox/components/ui';
|
||||
import { Button, FormActions, Text, Spinner } from 'soapbox/components/ui';
|
||||
import { useAppDispatch, useAppSelector } from 'soapbox/hooks';
|
||||
|
||||
import Column from '../ui/components/better_column';
|
||||
|
@ -53,24 +53,33 @@ const Backups = () => {
|
|||
scrollKey='backups'
|
||||
emptyMessage={intl.formatMessage(messages.emptyMessage, { action: emptyMessageAction })}
|
||||
>
|
||||
{backups.map((backup) => (
|
||||
<div
|
||||
className='p-4'
|
||||
key={backup.id}
|
||||
>
|
||||
{backup.processed
|
||||
? <a href={backup.url} target='_blank'>{backup.inserted_at}</a>
|
||||
: <Text theme='subtle'>{intl.formatMessage(messages.pending)}: {backup.inserted_at}</Text>
|
||||
}
|
||||
</div>
|
||||
))}
|
||||
{backups.map((backup) => {
|
||||
const insertedAt = new Date(backup.inserted_at).toLocaleDateString(undefined, { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit' });
|
||||
return (
|
||||
<div
|
||||
className='p-2 mb-3 rounded bg-gray-100 dark:bg-slate-900 flex justify-between items-center'
|
||||
key={backup.id}
|
||||
>
|
||||
<div>
|
||||
{backup.processed
|
||||
? <a href={backup.url} target='_blank'>{insertedAt}</a>
|
||||
: <Text theme='subtle'>{insertedAt} - {intl.formatMessage(messages.pending)}</Text>
|
||||
}
|
||||
</div>
|
||||
{
|
||||
!backup.processed && <Spinner withText={false} size={15} />
|
||||
}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</ScrollableList>
|
||||
|
||||
<FormActions>
|
||||
<Button theme='primary' disabled={isLoading} onClick={handleCreateBackup}>
|
||||
{intl.formatMessage(messages.create)}
|
||||
</Button>
|
||||
</FormActions>
|
||||
<div className='mt-4'>
|
||||
<FormActions>
|
||||
<Button theme='primary' disabled={isLoading} onClick={handleCreateBackup}>
|
||||
{intl.formatMessage(messages.create)}
|
||||
</Button>
|
||||
</FormActions>
|
||||
</div>
|
||||
</Column>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -173,10 +173,10 @@
|
|||
"auth.invalid_credentials": "Wrong username or password",
|
||||
"auth.logged_out": "Logged out.",
|
||||
"auth_layout.register": "Create an account",
|
||||
"backups.actions.create": "Create backup",
|
||||
"backups.empty_message": "No backups found. {action}",
|
||||
"backups.empty_message.action": "Create one now?",
|
||||
"backups.pending": "Pending",
|
||||
"backups.actions.create": "Créer une sauvegarde",
|
||||
"backups.empty_message": "Pas de sauvegarde. {action}",
|
||||
"backups.empty_message.action": "Créer une sauvegarde maintenant ?",
|
||||
"backups.pending": "Sauvegarde en cours",
|
||||
"birthday_panel.title": "Birthdays",
|
||||
"birthdays_modal.empty": "None of your friends have birthday today.",
|
||||
"boost_modal.combo": "Vous pouvez appuyer sur {combo} pour passer ceci, la prochaine fois",
|
||||
|
@ -213,7 +213,7 @@
|
|||
"column.aliases.subheading_add_new": "Ajouter un alias",
|
||||
"column.aliases.subheading_aliases": "Alias courants",
|
||||
"column.app_create": "Create app",
|
||||
"column.backups": "Backups",
|
||||
"column.backups": "Sauvegardes",
|
||||
"column.birthdays": "Birthdays",
|
||||
"column.blocks": "Comptes bloqués",
|
||||
"column.bookmarks": "Marque-pages",
|
||||
|
@ -508,18 +508,18 @@
|
|||
"empty_column.search.statuses": "Il n'y a pas de statuts correspondant à la recherche \"{term}\"",
|
||||
"empty_column.test": "The test timeline is empty.",
|
||||
"export_data.actions.export": "Export",
|
||||
"export_data.actions.export_blocks": "Export blocks",
|
||||
"export_data.actions.export_follows": "Export follows",
|
||||
"export_data.actions.export_mutes": "Export mutes",
|
||||
"export_data.blocks_label": "Blocks",
|
||||
"export_data.actions.export_blocks": "Exporter les comptes bloqués",
|
||||
"export_data.actions.export_follows": "Exporter les comptes suivis",
|
||||
"export_data.actions.export_mutes": "Exporter les comptes masqués",
|
||||
"export_data.blocks_label": "Comptes bloqués",
|
||||
"export_data.follows_label": "Comptes suivis",
|
||||
"export_data.hints.blocks": "Obtenez un fichier csv contenant la liste des comptes bloqués",
|
||||
"export_data.hints.follows": "Obtenez un fichier csv contenant la liste des comptes suivis",
|
||||
"export_data.hints.mutes": "Obtenez un fichier csv contenant la liste des comptes masqués",
|
||||
"export_data.mutes_label": "Mutes",
|
||||
"export_data.success.blocks": "Blocks exported successfully",
|
||||
"export_data.success.followers": "Followers exported successfully",
|
||||
"export_data.success.mutes": "Mutes exported successfully",
|
||||
"export_data.mutes_label": "Comptes masqués",
|
||||
"export_data.success.blocks": "Comptes bloqués exportés",
|
||||
"export_data.success.followers": "Comptes suivis exportés",
|
||||
"export_data.success.mutes": "Comptes masqués exportés",
|
||||
"federation_restriction.federated_timeline_removal": "Fediverse timeline removal",
|
||||
"federation_restriction.followers_only": "Hidden except to followers",
|
||||
"federation_restriction.full_media_removal": "Full media removal",
|
||||
|
|
|
@ -171,7 +171,7 @@ const getInstanceFeatures = (instance: Instance) => {
|
|||
* @see GET /api/v1/pleroma/backups
|
||||
* @see POST /api/v1/pleroma/backups
|
||||
*/
|
||||
backups: v.software === PLEROMA,
|
||||
backups: v.software === PLEROMA || v.software === AKKOMA,
|
||||
|
||||
/**
|
||||
* Set your birthday and view upcoming birthdays.
|
||||
|
|
Loading…
Reference in New Issue