Skip to content

Commit

Permalink
Merge pull request #34 from jhotmann/1.0.0-tweaks
Browse files Browse the repository at this point in the history
Slight UI tweaks
  • Loading branch information
jhotmann authored May 27, 2022
2 parents 0ae8cbc + 68abcc1 commit 4af77d4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/routes/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ router.post('/edit-device/:deviceId', upload.single('avatar'), userMw.one, devMw
await CardSeen.update({ deviceId: req.params.deviceId }, { $set: { seen: false } }); // Force friends to re-download card data (HTTP mode)
if (req.envSettings.mqttEnabled) publishDeviceCards(req.User.username, req.User.friends, [ req.Device ]); // Send card (MQTT mode)
}
const userDevices = await Device.getByUserId(req.User._id);
res.render('user-devices.html', { userDevices });
req.pageData.userDevices = await Device.getByUserId(req.User._id);
res.render('user-devices.html', req.pageData);
});

router.get('/delete-device/:deviceId', userMw.one, devMw.one, async (req, res) => {
Expand Down
4 changes: 2 additions & 2 deletions src/views/user-devices.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<th scope="row">{{ device.name }}</th>
{% if device.httpConfigLink %}
<th scope="row">
<a class="btn btn-info" href="{{ device.httpConfigLink }}" role="button">OwnTracks HTTP Config</a>
<a class="btn btn-info" href="{{ device.httpConfigLink }}" role="button">HTTP</a>
{% if settings.mqttEnabled and device.mqttConfigLink %}
<a class="btn btn-info" href="{{ device.mqttConfigLink }}" role="button">OwnTracks MQTT Config</a>
<a class="btn btn-info ms-1" href="{{ device.mqttConfigLink }}" role="button">MQTT</a>
{% endif %}
</th>
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion src/views/user-groups.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
hx-get="/group/leave/{{ group._id }}" hx-target="#groups-table-body">Leave</button>
{% else %}
<button class="btn btn-success" role="button"
hx-get="/group/accept/{{ group._id }}" hx-target="#groups-table-body">Accept Invite</button>
hx-get="/group/accept/{{ group._id }}" hx-target="#groups-table-body">Accept</button>
<button class="btn btn-danger" role="button"
hx-get="/group/leave/{{ group._id }}" hx-target="#groups-table-body">Decline</button>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions src/views/user-help.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h5 class="card-title">Welcome to Pinpoint!</h5>
<li class="list-group-item">
<div class="container">
<div class="row justify-content-start align-items-center">
<div class="col">📱 Install the OwnTracks app for Android <a href="https://play.google.com/store/apps/details?id=org.owntracks.android" class="btn btn-info ms-3">Google Play</a> <a href="https://github.com/owntracks/android/releases" class="btn btn-dark ms-3">GitHub</a></div>
<div class="col">📱 Install the OwnTracks app for Android (Google Play version is much more battery friendly) <a href="https://play.google.com/store/apps/details?id=org.owntracks.android" class="btn btn-info ms-3">Google Play</a> <a href="https://github.com/owntracks/android/releases" class="btn btn-dark ms-3">GitHub</a></div>
</div>
</div>
</li>
Expand All @@ -27,7 +27,7 @@ <h5 class="card-title">Welcome to Pinpoint!</h5>
<li class="list-group-item">
<div class="container">
<div class="row justify-content-start align-items-center">
<div class="col">📲 Select one of the "OwnTracks Config" links on a device with OwnTracks installed and you will be prompted to import the configuration. MQTT will give you instant updates when a friend updates their location, whereas HTTP polls periodically for updates and uses slightly less battery.</div>
<div class="col">📲 Select one of the "Configuration Links" on a device with OwnTracks installed and you will be prompted to import the configuration. MQTT will give you instant updates when a friend updates their location, whereas HTTP polls periodically for updates and uses slightly less battery.</div>
</div>
</div>
</li>
Expand Down

0 comments on commit 4af77d4

Please sign in to comment.