mirror of
https://github.com/maputnik/editor.git
synced 2026-08-01 10:47:26 +00:00
feat: use FileSystemFileHandle to modify a file on the local filesystem (#965)
## Launch Checklist <!-- Thanks for the PR! Feel free to add or remove items from the checklist. --> - [x] Briefly describe the changes in this PR. - [x] Link to related issues. - [x] Include before/after visuals or gifs if this PR includes visual changes. - [ ] Write tests for all new functionality. - [x] Add an entry to `CHANGELOG.md` under the `## main` section. ## Changes - This pull request makes use of the FileSystemFileHandle API to modify a local file. No need to download it - just click save. - I don't know how to cover this functionality by tests so I need directions in case test coverage is required. - The pull request adds [@types/wicg-file-system-access](https://www.npmjs.com/package/@types/wicg-file-system-access) as a new dev dependency which I am not really pleased about but can't think of a way around it. ## Known Limitations - The used File API is only available in when accessed from https or on localhost. - There is no visual indicator that the file has been saved. Previously the browser showed it as a new download. ## Issue - https://github.com/maplibre/maputnik/issues/964 ## Screenshots ### Menu <img src="https://github.com/user-attachments/assets/dfcfc5c2-0019-4857-ba26-224b5598fc11" /> ### Open modal <img src="https://github.com/user-attachments/assets/4e1293e8-16b6-4b86-925b-3bebb49d8ca6" height="200px" /> ### Save modal <img src="https://github.com/user-attachments/assets/4f10e2c0-2dd3-4726-a613-30e0406619b0" height="200px" /> --------- Co-authored-by: Harel M <harel.mazor@gmail.com>
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
"Map view": "地図画面",
|
||||
"Maputnik on GitHub": "GitHubのMaputnik",
|
||||
"Open": "開く",
|
||||
"Export": "エクスポート",
|
||||
"Save": "保存",
|
||||
"Data Sources": "データソース",
|
||||
"Style Settings": "スタイル設定",
|
||||
"View": "表示",
|
||||
@@ -81,16 +81,14 @@
|
||||
"Close modal": "モーダルを閉じる",
|
||||
"Debug": "デバッグ",
|
||||
"Options": "設定",
|
||||
"Export Style": "スタイルをエクスポート",
|
||||
"Download Style": "スタイルをダウンロード",
|
||||
"Download a JSON style to your computer.": "パソコンにJSONスタイルをダウンロードします。",
|
||||
"Download HTML": "HTMLをダウンロード",
|
||||
"Save Style": "スタイルを保存",
|
||||
"Save the JSON style to your computer.": "JSONスタイルをコンピュータに保存します。",
|
||||
"Save as": "名前を付けて保存",
|
||||
"Create HTML": "HTMLを作成",
|
||||
"Cancel": "キャンセル",
|
||||
"Open Style": "スタイルを開く",
|
||||
"Upload Style": "スタイルをアップロードする",
|
||||
"Upload a JSON style from your computer.": "JSONスタイルをパソコンからアップロードする",
|
||||
"Style file": "スタイルファイル",
|
||||
"Upload": "アップロード",
|
||||
"Open local Style": "ローカルスタイルを開く",
|
||||
"Open a local JSON style from your computer.": "コンピュータからローカルJSONスタイルを開きます。",
|
||||
"Load from URL": "URLから読み込む",
|
||||
"Load from a URL. Note that the URL must have <1>CORS enabled</1>.": "URLから読み込む。注意: URLは <1>CORSを有効にする</1> 必要があります。",
|
||||
"Style URL": "スタイルURL",
|
||||
|
||||
Reference in New Issue
Block a user