Rename changes and report
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Elias Jansson
2025-09-27 19:31:54 +02:00
parent 9299e29ea6
commit 335112e044
5 changed files with 34 additions and 26 deletions

View File

@@ -2,17 +2,17 @@ using Aberwyn.Data;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
public class TorrentController : Controller public class RssController : Controller
{ {
private readonly ITorrentService _torrentService; private readonly ITorrentService _torrentService;
private readonly ILogger<TorrentController> _logger; private readonly ILogger<RssController> _logger;
private readonly DelugeClient _deluge; private readonly DelugeClient _deluge;
private readonly MovieMetadataService _movieMetadataService; private readonly MovieMetadataService _movieMetadataService;
private readonly ApplicationDbContext _context; private readonly ApplicationDbContext _context;
public TorrentController( public RssController(
ITorrentService torrentService, ITorrentService torrentService,
ILogger<TorrentController> logger, ILogger<RssController> logger,
DelugeClient delugeClient, DelugeClient delugeClient,
MovieMetadataService movieMetadataService, MovieMetadataService movieMetadataService,
ApplicationDbContext context) ApplicationDbContext context)

View File

@@ -7,7 +7,7 @@
<link rel="stylesheet" href="~/css/budget-overview.css" /> <link rel="stylesheet" href="~/css/budget-overview.css" />
</head> </head>
<body ng-app="budgetApp" ng-controller="BudgetOverviewController" ng-cloak> <body ng-app="budgetApp" ng-controller="BudgetOverviewController" class="budget-report-overview-body" ng-cloak>
<h2>Visa kolumner</h2> <h2>Visa kolumner</h2>
@@ -78,7 +78,11 @@
<input type="checkbox" ng-model="splitByYear" /> Dela upp per år <input type="checkbox" ng-model="splitByYear" /> Dela upp per år
</label> </label>
</div> </div>
<div class="budget-column-selector">
<label>
<input type="checkbox" ng-model="showTotals" /> Visa Inkomst / Utgift / Netto
</label>
</div>
<div ng-if="!years.length" class="budget-loading-indicator">Laddar data…</div> <div ng-if="!years.length" class="budget-loading-indicator">Laddar data…</div>
@@ -90,9 +94,9 @@
<!-- Header --> <!-- Header -->
<div class="budget-sheet-header"> <div class="budget-sheet-header">
<div class="budget-sheet-cell month">Månad</div> <div class="budget-sheet-cell month">Månad</div>
<div class="budget-sheet-cell income">Inkomst</div> <div class="budget-sheet-cell income" ng-if="showTotals">Inkomst</div>
<div class="budget-sheet-cell expense">Utgift</div> <div class="budget-sheet-cell expense" ng-if="showTotals">Utgift</div>
<div class="budget-sheet-cell net">Netto</div> <div class="budget-sheet-cell net" ng-if="showTotals">Netto</div>
<div class="budget-extra-columns"> <div class="budget-extra-columns">
<div class="budget-sheet-cell other" <div class="budget-sheet-cell other"
@@ -122,14 +126,18 @@
<!-- Rader --> <!-- Rader -->
<div class="budget-sheet-row" ng-repeat="month in yearData.months | filter:filterMonths track by month.id"> <div class="budget-sheet-row" ng-repeat="month in yearData.months | filter:filterMonths track by month.id">
<div class="budget-sheet-cell month">{{ month.year }} - {{ monthNames[month.month-1] }}</div> <div class="budget-sheet-cell month">{{ month.year }} - {{ monthNames[month.month-1] }}</div>
<div class="budget-sheet-cell income" ng-class="{'budget-positive': month.income >=0, 'budget-negative': month.income <0}"> <div class="budget-sheet-cell income" ng-if="showTotals"
ng-class="{'budget-positive': month.income >=0, 'budget-negative': month.income <0}">
{{ month.income | number:0 }} {{ month.income | number:0 }}
</div> </div>
<div class="budget-sheet-cell expense" ng-class="{'budget-positive': month.expense >=0, 'budget-negative': month.expense <0}"> <div class="budget-sheet-cell expense" ng-if="showTotals"
ng-class="{'budget-positive': month.expense >=0, 'budget-negative': month.expense <0}">
{{ month.expense | number:0 }} {{ month.expense | number:0 }}
</div> </div>
<div class="budget-sheet-cell net" ng-class="{'budget-positive': month.net >=0, 'budget-negative': month.net <0}"> <div class="budget-sheet-cell net" ng-if="showTotals"
ng-class="{'budget-positive': month.net >=0, 'budget-negative': month.net <0}">
{{ month.net | number:0 }} {{ month.net | number:0 }}
</div> </div>
@@ -164,9 +172,15 @@
<!-- Totalsumma --> <!-- Totalsumma -->
<div class="budget-sheet-row budget-total-row" ng-if="yearData.months.length"> <div class="budget-sheet-row budget-total-row" ng-if="yearData.months.length">
<div class="budget-sheet-cell month">Total</div> <div class="budget-sheet-cell month">Total</div>
<div class="budget-sheet-cell income">{{ getYearTotal(yearData.months, 'income') | number:0 }}</div> <div class="budget-sheet-cell income" ng-if="showTotals">
<div class="budget-sheet-cell expense">{{ getYearTotal(yearData.months, 'expense') | number:0 }}</div> {{ getYearTotal(yearData.months, 'income') | number:0 }}
<div class="budget-sheet-cell net">{{ getYearTotal(yearData.months, 'net') | number:0 }}</div> </div>
<div class="budget-sheet-cell expense" ng-if="showTotals">
{{ getYearTotal(yearData.months, 'expense') | number:0 }}
</div>
<div class="budget-sheet-cell net" ng-if="showTotals">
{{ getYearTotal(yearData.months, 'net') | number:0 }}
</div>
<div class="budget-extra-columns"> <div class="budget-extra-columns">
<div class="budget-sheet-cell other" <div class="budget-sheet-cell other"

View File

@@ -51,7 +51,7 @@
@if (User.IsInRole("Admin")) @if (User.IsInRole("Admin"))
{ {
<li> <li>
<a asp-controller="torrent" asp-action="Index"> T <a asp-controller="Rss" asp-action="Index"> Rss
@if (ViewBag.NewTorrentCount > 0) @if (ViewBag.NewTorrentCount > 0)
{ {
<span class="new-badge">@ViewBag.NewTorrentCount</span> <span class="new-badge">@ViewBag.NewTorrentCount</span>

View File

@@ -1,11 +1,5 @@
/* ===================== Budget Overview CSS ===================== */ /* ===================== Budget Overview CSS ===================== */
body {
font-family: sans-serif;
font-size: 13px;
line-height: 1.4;
margin: 16px;
}
/* -------- Column selectors -------- */ /* -------- Column selectors -------- */
.budget-column-selector-wrapper { .budget-column-selector-wrapper {
@@ -126,13 +120,13 @@ body {
/* Positive/Negative coloring */ /* Positive/Negative coloring */
.budget-positive { .budget-positive {
color: #2a9d8f; color: #014903;
font-weight: 300; font-weight: 470;
} }
.budget-negative { .budget-negative {
color: #e63946; color: #960000;
font-weight: 300; font-weight: 470;
} }
/* Loading indicator */ /* Loading indicator */