mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor: modal manager types (#18150)
This commit is contained in:
parent
5250269fa4
commit
894545aeed
9 changed files with 32 additions and 26 deletions
|
|
@ -196,7 +196,7 @@
|
|||
}
|
||||
|
||||
const handleSettingsClick = async () => {
|
||||
const settings = await modalManager.open(MapSettingsModal, { settings: { ...$mapSettings } });
|
||||
const settings = await modalManager.show(MapSettingsModal, { settings: { ...$mapSettings } });
|
||||
if (settings) {
|
||||
const shouldUpdate = !isEqual(omit(settings, 'allowDarkMode'), omit($mapSettings, 'allowDarkMode'));
|
||||
$mapSettings = settings;
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@
|
|||
variant="ghost"
|
||||
size="medium"
|
||||
icon={mdiHelpCircleOutline}
|
||||
onclick={() => info && modalManager.open(HelpAndFeedbackModal, { info })}
|
||||
onclick={() => info && modalManager.show(HelpAndFeedbackModal, { info })}
|
||||
aria-label={$t('support_and_feedback')}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
const { isPurchased } = purchaseStore;
|
||||
|
||||
const openPurchaseModal = async () => {
|
||||
await modalManager.open(PurchaseModal);
|
||||
await modalManager.show(PurchaseModal, {});
|
||||
showMessage = false;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
{#if $connected && version}
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => info && modalManager.open(ServerAboutModal, { versions, info })}
|
||||
onclick={() => info && modalManager.show(ServerAboutModal, { versions, info })}
|
||||
class="dark:text-immich-gray flex gap-1"
|
||||
>
|
||||
{#if isMain}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@
|
|||
};
|
||||
|
||||
const handleCreatePartners = async () => {
|
||||
const users = await modalManager.open(PartnerSelectionModal, { user });
|
||||
const users = await modalManager.show(PartnerSelectionModal, { user });
|
||||
|
||||
if (!users) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
}
|
||||
|
||||
const handleCreate = async () => {
|
||||
const result = await modalManager.open(ApiKeyModal, {
|
||||
const result = await modalManager.show(ApiKeyModal, {
|
||||
title: $t('new_api_key'),
|
||||
apiKey: { name: 'API Key' },
|
||||
submitText: $t('create'),
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
},
|
||||
});
|
||||
|
||||
await modalManager.open(ApiKeySecretModal, { secret });
|
||||
await modalManager.show(ApiKeySecretModal, { secret });
|
||||
} catch (error) {
|
||||
handleError(error, $t('errors.unable_to_create_api_key'));
|
||||
} finally {
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
};
|
||||
|
||||
const handleUpdate = async (key: ApiKeyResponseDto) => {
|
||||
const result = await modalManager.open(ApiKeyModal, {
|
||||
const result = await modalManager.show(ApiKeyModal, {
|
||||
title: $t('api_key'),
|
||||
submitText: $t('save'),
|
||||
apiKey: key,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue