Skip to content

Commit

Permalink
Bump to v0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
breadthe committed Feb 11, 2023
1 parent 1931d28 commit 875a544
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 23 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
## 0.6.0
### Features
* Configurable notification threshold.
* Open the event location in geojson.io.
* Improved app logo.


## 0.5.0
### Features
* Desktop notifications when a new earthquake event happens.
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ Note that I may not implement all of these.
- <label><input type="checkbox" checked />Fetch the feed periodically (60s).</label>
- <label><input type="checkbox" checked />Configurable feed refresh frequency.</label>
- <label><input type="checkbox" checked />Desktop notifications for significant events (Mac only).</label>
- <label><input type="checkbox" />Configurable notification threshold.</label>
- <label><input type="checkbox" checked />Configurable notification threshold.</label>
- <label><input type="checkbox" checked />Dark mode.</label>
- <label><input type="checkbox" checked />Open location in geojson.io map.</label>
- <label><input type="checkbox" />Optional color coding of events according to severity.</label>
- <label><input type="checkbox" />Timestamp for last feed refresh.</label>
- <label><input type="checkbox" />Display more event parameters from the feed (such as tsunami warning).</label>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "seismic",
"private": true,
"version": "0.5.0",
"version": "0.6.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
21 changes: 20 additions & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "seismic"
version = "0.5.0"
description = "USGS earthquake tracker"
version = "0.6.0"
description = "USGS earthquake tracker (unofficial)"
authors = ["breadthe"]
license = "MIT"
repository = ""
Expand All @@ -17,7 +17,7 @@ tauri-build = { version = "1.2.1", features = [] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.2.4", features = ["http-request", "notification-all", "system-tray"] }
tauri = { version = "1.2.4", features = ["http-request", "notification-all", "shell-open", "system-tray"] }

[target.'cfg(target_os = "macos")'.dependencies]
cocoa = "0.24"
Expand Down
7 changes: 5 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"package": {
"productName": "seismic",
"version": "0.5.0"
"version": "0.6.0"
},
"tauri": {
"allowlist": {
Expand All @@ -20,6 +20,9 @@
},
"notification": {
"all": true
},
"shell": {
"open": "^https?://"
}
},
"bundle": {
Expand All @@ -38,7 +41,7 @@
"icons/icon.ico"
],
"identifier": "com.seismic.dev",
"longDescription": "USGS earthquake tracker",
"longDescription": "USGS earthquake tracker (unofficial)",
"macOS": {
"entitlements": null,
"exceptionDomain": "",
Expand Down
55 changes: 41 additions & 14 deletions src/Main.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,50 @@
<div class="w-full h-full min-h-screen bg-white dark:bg-gray-800">
{#each $feedData.features as feature (feature.properties.code)}
<div
class="flex items-center justify-between border-b dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-900 p-2"
class="flex items-center justify-between border-b dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-900 py-1"
>
<div class="w-full flex items-center gap-4">
<div class="w-8 text-center">
<span class:font-bold={feature.properties.mag >= 4.5} class:text-red-600={feature.properties.mag >= 7}>
{round1(feature.properties.mag)}
</span>
</div>
<div class="flex-1">
<p class:font-bold={feature.properties.mag >= 4.5} class:text-red-600={feature.properties.mag >= 7}>
{feature.properties.place}
</p>
<small class="text-xs text-gray-600 dark:text-gray-400">{timestampToLocalString(feature.properties.time)}</small>
</div>
<!-- Magnitude -->
<div class="px-4">
<span class:font-bold={feature.properties.mag >= 4.5} class:text-red-600={feature.properties.mag >= 7}>
{round1(feature.properties.mag)}
</span>
</div>

<div class="w-24 text-right">
<!-- Location -->
<div class="flex-1 w-full flex flex-col">
<p class="flex items-center gap-2">
<span class:font-bold={feature.properties.mag >= 4.5} class:text-red-600={feature.properties.mag >= 7}
>{feature.properties.place}</span
>
<a
href={`http://geojson.io/#data=data:application/json,${encodeURIComponent(JSON.stringify(feature))}`}
target="_blank"
rel="noreferrer"
class="text-blue-600"
title="View on geojson.io"
use:tooltip={{ theme: "dark-border" }}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="15"
height="15"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" /><circle cx="12" cy="10" r="3" /></svg
>
</a>
</p>
<small class="text-xs text-gray-600 dark:text-gray-400">
{timestampToLocalString(feature.properties.time)}
</small>
</div>

<!-- Depth -->
<div class="w-24 px-2 text-right">
<small class="text-xs text-gray-600 dark:text-gray-400" title="Depth">
{round1(feature.geometry.coordinates[2])} km
</small>
Expand Down

0 comments on commit 875a544

Please sign in to comment.