Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor CSS variables to use existing color variables for consistenc… #150

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Angor/Client/Components/Icon.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[Parameter] public string IconName { get; set; }
[Parameter] public int Width { get; set; } = 32;
[Parameter] public int Height { get; set; } = 32;
[Parameter] public string Color { get; set; } = "var(--bs-primary)";
[Parameter] public string Color { get; set; } = "var(--angor-primary)";
private string svgContent;

protected override async Task OnParametersSetAsync()
Expand Down
2 changes: 1 addition & 1 deletion src/Angor/Client/Pages/Browse.razor
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--bs-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
</span>
<span class="text-white" data-cy="projectsGrid">No projects found.</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Angor/Client/Pages/Founder.razor
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--bs-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
</span>
<span class="text-white">No projects found.</span>
</div>
Expand Down
12 changes: 7 additions & 5 deletions src/Angor/Client/Pages/Invest.razor
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--bs-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
</span>
<span class="text-white">
You already invested.
Expand All @@ -84,7 +84,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--bs-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
</span>
<span class="text-white">
You are the founder.
Expand All @@ -101,7 +101,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--bs-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
</span>
<span class="text-white">
The project was not found.
Expand Down Expand Up @@ -180,7 +180,9 @@
@if (showCreateModal)
{
<!-- Confirmation Modal -->
<div class="modal fade show d-block" tabindex="-1" style="background: rgba(0, 0, 0, 0.5)">

<div class="modal-wrapper">
<div class="modal fade show d-block" tabindex="-1" style="background: rgba(0, 0, 0, 0.5)">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
Expand Down Expand Up @@ -243,7 +245,7 @@
</div>
</div>
</div>

</div>
}

<!-- Stages Breakdown -->
Expand Down
2 changes: 1 addition & 1 deletion src/Angor/Client/Pages/Penalties.razor
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--bs-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
</span>
<span class="text-white">No penalties found</span>
</div>
Expand Down
14 changes: 7 additions & 7 deletions src/Angor/Client/Pages/Settings.razor
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<div>

<button class="btn btn-warning" @onclick="() => showChangeNetworkModal = true">
<Icon IconName="change" Height="24" Width="24" Color="var(--bs-primary-btn-icon)"></Icon>
<Icon IconName="change" Height="24" Width="24" Color="var(--angor-primary-btn-icon)"></Icon>
</button>

@if (showChangeNetworkModal)
Expand Down Expand Up @@ -147,7 +147,7 @@
</div>
<div>
<a class="btn btn-success" href="@_networkConfiguration.GetDefaultExplorerUrl().First().Url" target="_blank">
<Icon IconName="link" Height="24" Width="24" Color="var(--bs-primary-btn-icon)"></Icon>
<Icon IconName="link" Height="24" Width="24" Color="var(--angor-primary-btn-icon)"></Icon>
</a>
</div>
</div>
Expand All @@ -173,7 +173,7 @@
</div>
<button class="btn btn-success" @onclick="Refresh" disabled="@refreshSpinner">
<span role="status" aria-hidden="true" class="@(refreshSpinner ? "rotate-icon" : "")">
<Icon IconName="refresh" Height="24" Width="24" Color="var(--bs-primary-btn-icon)"></Icon>
<Icon IconName="refresh" Height="24" Width="24" Color="var(--angor-primary-btn-icon)"></Icon>
</span>
</button>
</div>
Expand Down Expand Up @@ -217,7 +217,7 @@
</td>
<td class="text-end">
<button class="btn btn-danger btn-sm" @onclick="() => RemoveIndexer(indexer.Url)">
<Icon IconName="remove" Height="20" Width="20" Color="var(--bs-primary-btn-icon)"></Icon>
<Icon IconName="remove" Height="20" Width="20" Color="var(--angor-primary-btn-icon)"></Icon>
</button>
</td>
</tr>
Expand Down Expand Up @@ -245,7 +245,7 @@
</div>
<button class="btn btn-success" @onclick="Refresh" disabled="@refreshSpinner">
<span role="status" aria-hidden="true" class="@(refreshSpinner ? "rotate-icon" : "")">
<Icon IconName="refresh" Height="24" Width="24" Color="var(--bs-primary-btn-icon)"></Icon>
<Icon IconName="refresh" Height="24" Width="24" Color="var(--angor-primary-btn-icon)"></Icon>
</span>
</button>
</div>
Expand Down Expand Up @@ -293,7 +293,7 @@
</td>
<td class="text-end">
<button class="btn btn-danger btn-sm" @onclick="() => RemoveRelay(relay.Url)">
<Icon IconName="remove" Height="20" Width="20" Color="var(--bs-primary-btn-icon)"></Icon>
<Icon IconName="remove" Height="20" Width="20" Color="var(--angor-primary-btn-icon)"></Icon>
</button>
</td>
</tr>
Expand Down Expand Up @@ -359,7 +359,7 @@
</div>
<div>
<button class="btn btn-danger" @onclick="() => showWipeallModal = true">
<Icon IconName="remove" Height="24" Width="24" Color="var(--bs-primary-btn-icon)"></Icon>
<Icon IconName="remove" Height="24" Width="24" Color="var(--angor-primary-btn-icon)"></Icon>
</button>
@if (showWipeallModal)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Angor/Client/Pages/Signatures.razor
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--bs-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
</span>
<span class="text-white" data-cy="projectsGrid">No pending signatures yet...</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Angor/Client/Pages/View.razor
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--bs-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
</span>
<span class="text-white">@error</span>
</div>
Expand Down
44 changes: 21 additions & 23 deletions src/Angor/Client/Pages/Wallet.razor
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--bs-primary-btn-icon)"/>
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)"/>
</span>
<span class="text-white">No Wallet Found</span>
</div>
Expand Down Expand Up @@ -118,7 +118,7 @@
<button class="btn btn-secondary w-100" @onclick="GenerateNewWalletWords">
<div class="d-flex align-items-center justify-content-center">
<span class="me-1" data-cy="generate-wallet-words">
<Icon IconName="plus" Height="24" Width="24" Color="var(--bs-primary-btn-icon)"></Icon>
<Icon IconName="plus" Height="24" Width="24" Color="var(--angor-primary-btn-icon)"></Icon>
</span>
<span> Generate New Wallet Words</span>
</div>
Expand Down Expand Up @@ -464,18 +464,30 @@ else
<!-- The tick boxes and amounts will go here -->

<p>Total amount selected = @Money.Satoshis(_sendInfo.SendUtxos.Sum(s => s.Value.UtxoData.value)).ToUnit(MoneyUnit.BTC) @network.CoinTicker</p>

@foreach (var addressInfo in accountBalanceInfo.AccountInfo.AddressesInfo.Union(accountBalanceInfo.AccountInfo.ChangeAddressesInfo))
{
@foreach (var addressUtxoItem in addressInfo.UtxoData)
foreach (var addressUtxoItem in addressInfo.UtxoData)
{
var isTicked = _sendInfo.SendUtxos.ContainsKey(addressUtxoItem.outpoint.ToString());
<input type="checkbox" id="@addressUtxoItem.outpoint.ToString()" @bind="@isTicked" @onclick="() => HandleCheckboxChange(addressUtxoItem, addressInfo.HdPath)">
<label class="fs-lable-s" for="@addressUtxoItem.outpoint.ToString()">
@($"{addressUtxoItem.outpoint} - {Money.Satoshis(addressUtxoItem.value).ToUnit(MoneyUnit.BTC)} {network.CoinTicker}")
var outpointStr = addressUtxoItem.outpoint.ToString();
var outpointLength = outpointStr.Length;
var shortenedOutpoint = outpointLength > 20
? $"{outpointStr.Substring(0, 10)} ... {outpointStr.Substring(outpointLength - 10)}"
: outpointStr;

var valueInBTC = Money.Satoshis(addressUtxoItem.value).ToUnit(MoneyUnit.BTC);
var coinTicker = network.CoinTicker;
var isTicked = _sendInfo.SendUtxos.ContainsKey(outpointStr);

<input type="checkbox" id="@outpointStr" @bind="@isTicked" @onclick="() => HandleCheckboxChange(addressUtxoItem, addressInfo.HdPath)">
<label class="fs-lable-s" for="@outpointStr">
@($"{shortenedOutpoint} - {valueInBTC} {coinTicker}")
</label>
}
}

</div>
<div class="modal-footer">
<button class="btn btn-warning" @onclick="() => coinControlModal = false" >Submit</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -620,21 +632,7 @@ else
<tr @onclick="() => ToggleCollapse(addressInfo.Address)" class="clickable-row" data-cy="adress-row" aria-expanded="@IsExpanded(addressInfo.Address).ToString().ToLower()" aria-controls="@($"collapse-{addressInfo.Address}")">
<td>@addressInfo.Address</td>
<td>
@{
// Attempt to get the fiat value from the dictionary
if (fiatValues.TryGetValue(addressInfo.Address, out var fiatValue))
{
<BalanceDisplay BtcBalance="@Money.Satoshis(total).ToUnit(MoneyUnit.BTC)"
BtcBalanceInFiat="@fiatValue"
PreferredCurrency="@storage.GetCurrencyDisplaySetting()"
ShowFiatInline="false"/>
}
else
{
// Handle missing fiat value
<span>Loading...</span>
}
}
@Money.Satoshis(total).ToUnit(MoneyUnit.BTC) @network.CoinTicker
</td>
<td>@addressInfo.HdPath</td>
<td>@count</td>
Expand Down
2 changes: 1 addition & 1 deletion src/Angor/Client/Shared/NotificationComponent.razor
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
Error
</h5>
<span type="button" @onclick="ClearErrorMessage">
<Icon IconName="close-circle" Color="var(--bs-primary-btn-icon)" />
<Icon IconName="close-circle" Color="var(--angor-primary-btn-icon)" />
</span>
</div>
<div class="modal-body modal-body-scroll">
Expand Down
Loading
Loading