Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing keys: cannot select keys to import #1863

Closed
micah opened this issue Aug 26, 2020 · 9 comments · Fixed by #3420
Closed

Importing keys: cannot select keys to import #1863

micah opened this issue Aug 26, 2020 · 9 comments · Fixed by #3420
Labels
bug Something isn't working

Comments

@micah
Copy link

micah commented Aug 26, 2020

  • Operating System (Linux/Mac/Windows/iOS/Android): Ubuntu 20.04
  • Delta Chat Version: 1.12.0
  • Expected behavior: I should be able to select the keys to import.
  • Actual behavior: When I am provided the file selection dialog, I can see my keys in my home directory, they are readable by me, but they are 'greyed out', so I cannot select them.
  • Steps to reproduce the problem: Settings->Import Secret Keys
  • Screenshots: I can not figure out how to add an image to an issue in github. I'm not using a window manager that has 'drag and drop', and I see no file picker here :(
@gerryfrancis
Copy link
Contributor

@micah Thank you for reporting. My system does not run Ubuntu, but AFAIK not the key(s) is/are to be selected, but the folder in which the key(s) is/are stored. Could you check if your problem is solved by selecting the folder, and report back, please? Thanks in advance.

@Jikstra
Copy link
Contributor

Jikstra commented Aug 27, 2020

Thanks for reporting, for uploading files without drag&drop:
Screenshot_20200827_125907

@micah
Copy link
Author

micah commented Aug 27, 2020

@gerryfrancis indeed, that looks like it is the issue. If I select the folder where the keys are, then I get what #1792 is to solve.

@micah
Copy link
Author

micah commented Aug 27, 2020

@Jikstra Yeah, but as I said in the original message, I am using a tiling window manager (awesome), that does not have 'drag and drop', nor does it have an icon system where you can copy and paste images.

It seems the only way to do this is to host the image elsewhere, and link to it here.

After an absurd amount of time, I found I could do this:

cat 2020-08-26-195324_1129x827_scrot.png | xclip -selection clipboard -t image/png -i

image

@Simon-Laux
Copy link
Member

@micah just click on the section jikstra showed. it should open the file select dialog.

@micah
Copy link
Author

micah commented Aug 27, 2020

@micah just click on the section jikstra showed. it should open the file select dialog.

Wow, ok, yeah that does work. Great user interface github :D

@Simon-Laux Simon-Laux added the bug Something isn't working label Oct 6, 2020
@kotochor
Copy link

Have the same issue on PopOS. I can only try to import a directory, which has no sense. I should be able to import a text file. Maybe the problem is with an import type.

I tried to find functions that import files. I found onClickImportBackup function. It has argument properties with attribute openFile.

const ImportButton = function ImportButton(_props: any) {
  const tx = useTranslationFunction()

  async function onClickImportBackup() {
    const file = await runtime.showOpenFileDialog({
      title: tx('import_backup_title'),
      properties: ['openFile'],
      filters: [{ name: '.tar or .bak', extensions: ['tar', 'bak'] }],
      defaultPath: runtime.getAppPath('downloads'),
    })

If my assumption correct, then the function that imports keys should have the same argument with the same attribute.
Settings-ManageKeys.tsx

async function onKeysImport() {
  const tx = window.static_translate

  const opts: OpenDialogOptions = {
    title: tx('pref_managekeys_import_secret_keys'),
    defaultPath: runtime.getAppPath('downloads'),
    properties: ['openDirectory'],
  }

@Jikstra
Copy link
Contributor

Jikstra commented Aug 16, 2022

Have the same issue on PopOS. I can only try to import a directory, which has no sense. I should be able to import a text file. Maybe the problem is with an import type.

The api expects a specific format in this folder which is hella annoying but currently how it is. So having a directory makes sense (to some degree). But yes it's confusing and not good ux.

@link2xt
Copy link
Collaborator

link2xt commented Sep 18, 2023

The api expects a specific format in this folder which is hella annoying but currently how it is. So having a directory makes sense (to some degree). But yes it's confusing and not good ux.

I made a core PR that will make it possible to select a file instead: deltachat/deltachat-core-rust#4737

Once it is merged I suggest we change the UI to a file selection dialog for .asc files and never allow to select a directory.

UPD: core 1.123.0 has this API update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants