-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add "copy profile system location" option to login view (#8162)
Co-authored-by: Begoña Álvarez de la Cruz <balvarez@boxfish.studio>
- Loading branch information
1 parent
7a81d6c
commit 777578e
Showing
4 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
packages/shared/components/modals/InitProfileActionsModal.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script lang="ts"> | ||
import { localize } from '@core/i18n' | ||
import { Icon } from '@lib/auxiliary/icon' | ||
import { MenuItem, Modal } from 'shared/components' | ||
import { showAppNotification } from '@lib/auxiliary/notification' | ||
import { setClipboard } from '@lib/core/utils' | ||
import { activeProfile, getStorageDirectoryOfProfile } from '@lib/core/profile' | ||
export let modal: Modal | undefined | ||
async function handleCopyProfileSystemLocation(): Promise<void> { | ||
const profileDirectory = await getStorageDirectoryOfProfile($activeProfile?.id) | ||
setClipboard(profileDirectory, false) | ||
showAppNotification({ | ||
type: 'info', | ||
message: localize('general.copiedToClipboard'), | ||
}) | ||
modal?.close() | ||
} | ||
</script> | ||
|
||
<Modal bind:this={modal} {...$$restProps}> | ||
<div class="flex flex-col"> | ||
<MenuItem | ||
icon={Icon.Copy} | ||
title={localize('actions.copyProfileSystemLocation')} | ||
onClick={handleCopyProfileSystemLocation} | ||
/> | ||
</div> | ||
</Modal> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters