Skip to content

Commit a9fcf3d

Browse files
committed
ui
1 parent 37df847 commit a9fcf3d

File tree

7 files changed

+8
-9
lines changed

7 files changed

+8
-9
lines changed

cmd/goatak_server/admin_api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ func getApiAllMissionChangesHandler(app *App) fiber.Handler {
422422

423423
func getApiFilesHandler(app *App) fiber.Handler {
424424
return func(ctx *fiber.Ctx) error {
425-
data := app.dbm.ResourceQuery().Order("created_at DESC").Get()
425+
data := app.dbm.ResourceQuery().Order("scope, created_at DESC").Get()
426426

427427
return ctx.JSON(data)
428428
}

cmd/goatak_server/templates/devices.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ <h4>Device</h4>
3737
<tr>
3838
<th>Scope</th>
3939
<td>
40-
<span class="badge text-bg-success"
41-
>{{ current.scope }}</span
42-
>
40+
<span class="badge text-bg-success">
41+
{{ current.scope }}</span>
4342
</td>
4443
</tr>
4544
<tr>

cmd/goatak_server/templates/files.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ <h4>Resources</h4>
88
<th>File</th>
99
<th>Size</th>
1010
</tr>
11-
<tr v-for="p in all" @click="current = p">
11+
<tr v-for="p in all" @click="current = p" :class="{ 'table-active': p === current }">
1212
<td>{{ dt(p.CreatedAt) }}</td>
1313
<td>{{ p.Scope }}</td>
1414
<td>{{ p.FileName }}</td>

cmd/goatak_server/templates/missions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ <h4>Missions</h4>
77
<th>Scope</th>
88
<th>Creator</th>
99
</tr>
10-
<tr v-for="c in missions" @click="current = c">
10+
<tr v-for="c in missions" @click="current = c" :class="{ 'table-active': c === current }">
1111
<td>{{ c.name }}</td>
1212
<td>{{ c.scope }}</td>
1313
<td>{{ c.creatorUid }}</td>

cmd/goatak_server/templates/points.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h4>Points</h4>
1010
<th>Coords</th>
1111
<th>Created</th>
1212
</tr>
13-
<tr v-for="p in all" @click="current = p">
13+
<tr v-for="p in all" @click="current = p" :class="{ 'table-active': p === current }">
1414
<td>{{ p.Scope }}</td>
1515
<td>{{ p.UID }}</td>
1616
<td>{{ p.Callsign }}</td>

cmd/goatak_server/templates/profiles.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h4>Profiles</h4>
1414
<th>CotType</th>
1515
<th>Options</th>
1616
</tr>
17-
<tr v-for="p in profiles" @click="current = p">
17+
<tr v-for="p in profiles" @click="current = p" :class="{ 'table-active': p === current }">
1818
<td>{{ p.login }}</td>
1919
<td>{{ p.uid }}</td>
2020
<td>{{ p.callsign }}</td>

staticfiles/static/js/files.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const app = Vue.createApp({
2828
return resp.json();
2929
})
3030
.then(data => {
31-
vm.data = data.sort((a, b) => a.Scope.localeCompare(b.Scope) || a.FileName.toLowerCase().localeCompare(b.FileName.toLowerCase()));
31+
vm.data = data;
3232
vm.ts += 1;
3333
});
3434
},

0 commit comments

Comments
 (0)