Skip to content

Commit

Permalink
Imporved some frontend issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tsoganov committed May 21, 2024
1 parent d74f307 commit 46a21c9
Show file tree
Hide file tree
Showing 21 changed files with 49 additions and 44 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:

upload_coverage:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04 ]
ruby: [ '3.2.2' ]
Expand Down
10 changes: 5 additions & 5 deletions app/assets/stylesheets/components/_address.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
}

&:nth-child(2) {
width: 88px;
width: fit-content;
}

&:nth-child(3) {
width: 88px;
width: fit-content;
}

&:nth-child(4) {
Expand All @@ -81,11 +81,11 @@
}

&:nth-child(2) {
width: 88px;
width: fit-content;
}

&:nth-child(3) {
width: 88px;
width: fit-content;
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/components/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
.c-footer__highlight__info,
.c-footer__highlight__contact {
font-weight: 500;
font-size: rem(16px);
font-size: rem(14px);
line-height: rem(22px);
text-align: left;
color: $white-color;
Expand Down
4 changes: 4 additions & 0 deletions app/assets/stylesheets/components/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@
.c-modal__footer__col {
display: flex;
gap: rem(24px);
.c-btn {
font-size: rem(14px);
cursor: pointer;
}
}

.c-modal--error {
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/components/_table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
order: 2;

@include mq(tablet) {
text-align: center;
text-align: right;
order: 0;
}
}
Expand All @@ -126,7 +126,7 @@
background: 96% center/16px no-repeat;
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.34779 12.0569C3.39471 12.0569 0.992188 9.58191 0.992188 6.5397C0.992188 3.4975 3.39471 1.02246 6.34779 1.02246C9.30087 1.02246 11.7034 3.4975 11.7034 6.5397C11.7034 9.58191 9.30087 12.0569 6.34779 12.0569ZM6.34779 2.12591C3.98543 2.12591 2.06331 4.10605 2.06331 6.5397C2.06331 8.97336 3.98543 10.9535 6.34779 10.9535C8.71015 10.9535 10.6323 8.97336 10.6323 6.5397C10.6323 4.10605 8.71068 2.12591 6.34779 2.12591Z' fill='%23212224'/%3E%3Cpath d='M14.0037 14.9771C13.9334 14.9772 13.8637 14.9629 13.7988 14.9352C13.7338 14.9075 13.6748 14.8668 13.6251 14.8155L9.5045 10.5705C9.45477 10.5193 9.41533 10.4585 9.38842 10.3915C9.36151 10.3246 9.34766 10.2529 9.34766 10.1804C9.34766 10.108 9.36151 10.0362 9.38842 9.96932C9.41533 9.90239 9.45477 9.84158 9.5045 9.79036C9.55422 9.73913 9.61325 9.6985 9.67822 9.67078C9.74318 9.64305 9.81282 9.62878 9.88314 9.62878C9.95346 9.62878 10.0231 9.64305 10.0881 9.67078C10.153 9.6985 10.2121 9.73913 10.2618 9.79036L14.3824 14.0353C14.4575 14.1124 14.5087 14.2107 14.5295 14.3178C14.5503 14.4249 14.5398 14.5359 14.4992 14.6369C14.4587 14.7378 14.3899 14.824 14.3017 14.8846C14.2135 14.9451 14.1098 14.9774 14.0037 14.9771Z' fill='%23212224'/%3E%3C/svg%3E%0A");
line-height: rem(32px);
height: rem(32px);
height: rem(36px);
padding: rem(0 16px);
border: 1px solid $grey-200-color;
border-radius: rem(16px);
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/mixins/_btn.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@mixin btn {
font-weight: 500;
font-size: rem(16px);
font-size: rem(14px);
line-height: rem(32px);
text-align: center;
display: inline-block;
Expand Down
8 changes: 4 additions & 4 deletions app/assets/stylesheets/objects/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
// Custom Checkbox
.o-checkbox {
display: inline-block;
height: rem(16px);
height: rem(19px);
position: relative;
width: rem(30px);
width: rem(33px);

&.u-disabled {
opacity: 0.6;
Expand All @@ -111,11 +111,11 @@
background: $gradient-grey;
bottom: 2px;
content: "";
height: rem(12px);
height: rem(15px);
left: 2px;
position: absolute;
transition: .4s;
width: rem(12px);
width: rem(15px);
}

input:checked + .o-checkbox__slider {
Expand Down
4 changes: 2 additions & 2 deletions app/components/common/footer/component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<%= render 'svg/footer_eis_logo' %>
<div class="c-footer__highlight__grid c-footer__highlight__grid--row-t">
<div class="c-footer__highlight__grid">
<h4 class="c-footer__highlight__title">
<h3 class="c-footer__highlight__title">
<div>
<%= t('common.footer.copyright') %>
</div>
</h4>
</h3>
<div class="c-footer__highlight__info">
<%= Setting.find_by(code: 'invoice_issuer_address').retrieve %><br>
<%= t('reg_no') %>: <%= Setting.find_by(code: 'invoice_issuer_reg_no').retrieve %>
Expand Down
5 changes: 0 additions & 5 deletions app/components/pages/auction/filter/component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
<div class="c-table__filters__search">
<%= component 'common/form/search_field', form: f, attribute: :domain_name, value: params[:domain_name], placeholder: t('search_by_domain_name') %>
</div>


<div class="c-table__filters__more" style="justify-content: flex-end;">
<%= component 'pages/auction/notification_subscribe', current_user: @current_user %>
</div>

<div class="c-auctions__legend">
<div><span class="o-io-icon o-icon--sm"></span> <%= t('auctions.english_auction').downcase %></div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

<% if @current_user&.daily_summary %>
<%= component 'common/links/link_button', link_title: t('auctions.unsubscribe_for_notifications'), href: user_toggle_sub_path, color: 'ghost' %>
<% elsif @current_user %>
<%= component 'common/links/link_button', link_title: t('auctions.subscribe_for_notifications'), href: user_toggle_sub_path(@current_user), color: 'ghost' %>
<% end %>
<% if @current_user.daily_summary %>
<%= component 'common/links/link_button', link_title: t('auctions.unsubscribe_for_notifications'), href: user_toggle_sub_path, color: 'ghost' %>
<% else %>
<%= component 'common/links/link_button', link_title: t('auctions.subscribe_for_notifications'), href: user_toggle_sub_path(@current_user), color: 'ghost' %>
<% end %>

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%= component 'common/table', header_collection: header_collection, options: { class: 'table--black' } do %>
<%= tag.tbody do %>
<tr data-controller="auction-timezone" data-auction-timezone-end-time-value="<%= @offer.auction.ends_at&.iso8601 %>">
<td><strong><%= @offer.auction.domain_name %></strong></td>
<td><h3><%= @offer.auction.domain_name %></h3></td>
<td><span data-auction-timezone-target="endtime"><%= @offer.auction.ends_at %></span></td>
<td><%= t('offers.price_in_currency', price: @offer.price) %></td>
<td><%= t('offers.price_in_currency', price: @offer.total) %></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<%= component 'common/table', header_collection: overview_table_headers, options: { class: 'table--black' } do %>
<%= tag.tbody do %>
<tr>
<td><strong><%= @offer.auction.domain_name %></strong></td>
<td><h3><%= @offer.auction.domain_name %></h3></td>
<td><span data-auction-timezone-target="endtime"><%= @offer.auction.ends_at %></span></td>
<td><%= t('offers.price_in_currency', price: @offer.price) %></td>
<td><%= t('offers.price_in_currency', price: @offer.total) %></td>
Expand Down
2 changes: 1 addition & 1 deletion app/notifications/offer_notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class OfferNotification < Noticed::Base
def webpush_format
{
title: I18n.t('.webpush_title_outbidded'),
body: I18n.t('.participant_outbid_broadcast', name: params[:offer].auction.domain_name),
body: I18n.t('.participant_outbid_broadcast', name: params[:offer]&.auction&.domain_name),
icon: 'https://example.com/icon.png'
}
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/auctions/_auction.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<% english_auction_presenter = EnglishBidsPresenter.new(auction) %>

<td><%= auction.domain_name %></td>
<td><h3><%= auction.domain_name %></h3></td>

<td><%= component 'common/auction_type_icon', auction: auction %></td>

Expand Down
20 changes: 13 additions & 7 deletions app/views/auctions/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@

<%= component 'pages/auction/filter', current_user: current_user %>

<div style='margin: 10px 0;'>
<% if current_page?(auctions_path) || current_page?(root_path) %>
<%= component 'common/links/link_button', link_title: t(:finished_auctions), href: histories_path, color: 'ghost' %>
<% else %>
<%= component 'common/links/link_button', link_title: t(:auctions_name), href: auctions_path, color: 'ghost' %>
<% end %>
</div>
<div style="display: flex; margin: 10px 0;">
<% if current_page?(auctions_path) || current_page?(root_path) %>
<%= component 'common/links/link_button', link_title: t(:finished_auctions), href: histories_path, color: 'ghost' %>
<% else %>
<%= component 'common/links/link_button', link_title: t(:auctions_name), href: auctions_path, color: 'ghost' %>
<% end %>

<% if @current_user %>
<div style="margin-left: auto;">
<%= component 'pages/auction/notification_subscribe', current_user: @current_user %>
</div>
<% end %>
</div>

<!--
These parameters are passed to the Common::Table::Component. These parameters are used to generate headers in the table component. The name "column_name" indicates the name of the column. This is necessary for sorting, so the name of this column should correspond to the name of the column in the database table. If you want to make it so that the data is not sorted by the column, then you should add a nil value. "Caption" is the table header, and "options" are additional parameters that are passed into the tags.
Expand Down
2 changes: 1 addition & 1 deletion app/views/histories/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<% @auctions.each do |auction| %>
<tr class="finished-auctions-table-row" data-controller="auction-timezone"
data-auction-timezone-end-time-value="<%= auction.ends_at&.iso8601 %>" data-auction-timezone-start-time-value="<%= auction.starts_at.iso8601 %>">
<td class="monospace"><%= auction.domain_name %></td>
<td class="monospace"><h3><%= auction.domain_name %></h3></td>
<td><span data-auction-timezone-target="starttime"><%= auction.starts_at %></span></td>
<td><span data-auction-timezone-target="endtime"><%= auction.ends_at %></span></td>
<td><%= auction.currently_winning_offer&.price if auction.platform == 'english' %></td>
Expand Down
4 changes: 2 additions & 2 deletions app/views/offers/_offer.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<%# TODO: Move to component and all logic should be in represent part %>
<tr data-controller="auction-timezone" data-auction-timezone-end-time-value="<%= offer.auction.ends_at&.iso8601 %>">
<td>
<td><h3>
<% if offer.auction.english? %>
<%= link_to offer.auction.domain_name, english_offer_path(offer.uuid), style: 'color: black;', target: '_top' %>
<% else %>
<%= link_to offer.auction.domain_name, offer_path(offer.uuid), style: 'color: black;', target: '_top' %>
<% end %>
</td>
</h3></td>
<td><%= component 'common/auction_type_icon', auction: offer.auction %></td>
<td><b><%= t('.your_last_offer') %>:</b> <%= t('offers.price_in_currency', price: offer.price) %></td>
<td><%= t('offers.price_in_currency', price: offer.total) %></td>
Expand Down
2 changes: 1 addition & 1 deletion app/views/wishlist_items/_editable.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<% if wishlist_item == item %>
<tr>
<td><%= index + 1 %></td>
<td><%= item.domain_name %></td>
<td><h3><%= item.domain_name %></h3></td>
<td data-turbo="true">
<%= form_for wishlist_item, url: wishlist_item_path(uuid: wishlist_item.uuid), method: :patch do |f| %>
<div style='display: flex; gap: 0 10px; align-items: center; margin-right: 5px; width: 200px;'>
Expand Down
2 changes: 1 addition & 1 deletion app/views/wishlist_items/_wishlist_items.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<% wishlist_items.each_with_index do |wishlist_item, index| %>
<tr>
<td><%= index + 1 %></td>
<td><%= wishlist_item.domain_name %></td>
<td><h3><%= wishlist_item.domain_name %></h3></td>
<td data-turbo="true"><%= wishlist_item.price %></td>
<td class="u-text-left u-text-center-l">
<div class="c-btn-group c-btn-group--ghost">
Expand Down
2 changes: 1 addition & 1 deletion config/locales/common.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ en:
notifications: "Notifications"

footer:
copyright: "© 2019 Estonian Internet Foundation"
copyright: "© 2024 Estonian Internet Foundation"
address: "Paldiski mnt 80, 10617 Tallinn, Estonia"
registration_code: "Registration code: 90010019"

Expand Down
2 changes: 1 addition & 1 deletion config/locales/common.et.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ et:
notifications: "Teavitused"

footer:
copyright: "Eesti Interneti Sihtasutus"
copyright: "© 2024 Eesti Interneti Sihtasutus"
address: "Paldiski mnt 80, 10617 Tallinn"
registration_code: "Registrikood: 90010019"

Expand Down

0 comments on commit 46a21c9

Please sign in to comment.