-
Notifications
You must be signed in to change notification settings - Fork 312
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
fix: ドラッグアンドドロップでプロジェクトファイルやテキストファイルが読み込めなかったのを直す #2433
The head ref may contain hidden characters: "\u30C9\u30E9\u30C3\u30B0\u30A2\u30F3\u30C9\u30C9\u30ED\u30C3\u30D7\u3067\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30D5\u30A1\u30A4\u30EB\u3084\u30C6\u30AD\u30B9\u30C8\u30D5\u30A1\u30A4\u30EB\u304C\u8AAD\u307F\u8FBC\u3081\u306A\u304B\u3063\u305F\u306E\u3092\u76F4\u3059"
fix: ドラッグアンドドロップでプロジェクトファイルやテキストファイルが読み込めなかったのを直す #2433
Conversation
action(payload: { filePath?: string }): void; | ||
action( | ||
payload: | ||
| { type: "dialog" } | ||
| { type: "path"; filePath: string } | ||
| { type: "file"; file: File }, | ||
): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filePath
が指定されていなかったらダイアログが開かれる実装だったけど、ややこしいので経路を選べるようにしました。
🚀 プレビュー用ページを作成しました 🚀 更新時点でのコミットハッシュ: |
4565d2c
to
82a7c9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 13 changed files in this pull request and generated no comments.
Files not reviewed (8)
- src/components/Talk/TalkEditor.vue: Evaluated as low risk
- src/components/Talk/ToolBar.vue: Evaluated as low risk
- src/components/App.vue: Evaluated as low risk
- src/components/Menu/MenuBar/MenuBar.vue: Evaluated as low risk
- src/components/Talk/menuBarData.ts: Evaluated as low risk
- src/backend/electron/preload.ts: Evaluated as low risk
- src/plugins/ipcMessageReceiverPlugin.ts: Evaluated as low risk
- src/store/audio.ts: Evaluated as low risk
Comments suppressed due to low confidence (1)
src/type/ipc.ts:247
- Changing
filePath
from optional to required might cause issues if there are any calls toLOAD_PROJECT_FILE
without afilePath
. Ensure that all calls toLOAD_PROJECT_FILE
are updated accordingly.
args: [obj: { filePath: string }];
たぶん大丈夫だと思うのでマージします! |
内容
の解決プルリクエストです。
一応このプルリクエストが先に必要です。
経緯はissue側のコメントに書いています。
解決方法として、ブラウザ側に持ってこられたFileはelectronの関数を使ってパスを取得できるぽかったので、その経路を用意しました。
ブラウザの時はこの関数が使えないので、代わりにそのままFileオブジェクトを渡せるようにしました。
関連 Issue
close #2431
その他
ついでにブラウザでのドラッグ&ドロップも動くようになったはず。便利。