Skip to content

Commit

Permalink
Merge pull request #110 from wrike/release-1.9
Browse files Browse the repository at this point in the history
Release 1.9
  • Loading branch information
Chudesnov authored Mar 31, 2019
2 parents ee812b5 + f9041ec commit 34a390d
Show file tree
Hide file tree
Showing 28 changed files with 565 additions and 288 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ class LectureContainerComponent extends StatefulComponent implements OnInit, OnD

String get title => !lecture.section.isCustom ? 'Доклад' : 'Событие';

String getFigure(int number) => '#figure-${number}';

String get endTime => _selectors.getEndTimeText(lecture);

bool get isAuthorized => _selectors.isAuthorized(state);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@
content
class="event">

<div
*ngIf="isWrikeEvent"
class="event__hero">
<svg
class="wrike-event"
aria-hidden="true">

<use
[attr.xlink:href]="getFigure(lecture.figureNumber)">
</use>
</svg>
</div>

<tabs
role="tablist"
aria-orientation="horizontal">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@

// event ---

.event__hero {
height: 176px;
margin-bottom: 24px;
position: relative;

svg {
display: block;
width: 176px;
position: absolute;
top: 0;
right: 0;
pointer-events: none;
}
}

.event__meta {
color: $fg-color-secondary;
margin-bottom: 4px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class LectureTalkComponent extends StatefulComponent {
final Dispatcher _dispatcher;
@HostBinding('class.messages')
final bool isHostMarked = true;
bool get canCreatePost => _authStore.isAuth;
@ViewChild('input')
TalkPostInputComponent input;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
</talk-post>

<talk-post-input
*ngIf="canCreatePost "
#input
(onSend)="onSend($event)"
class="messages__container-input">
Expand Down
5 changes: 5 additions & 0 deletions lib/src/components/containers/lecture_talk/lecture_talk.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@
bottom: 0;
background-image: linear-gradient(to bottom, rgba(242, 243, 250, 0), #f2f3fa5e 24%, #f2f3fa);
}
}

:host-context(html.event)
.messages__container-input {
background: none;
}
Original file line number Diff line number Diff line change
@@ -1,126 +1,6 @@
<loader
[isReady]="isReady">

<div
style="height: 0px; overflow: hidden; visibility: hidden;">

<svg xmlns="http://www.w3.org/2000/svg">

<symbol id="figure-0" viewBox="0 0 113 102">
<g fill="none" fill-rule="evenodd" opacity=".45">
<ellipse cx="24.5" cy="78" fill="#FF5EDD" rx="24.5" ry="24"></ellipse>
<circle cx="64.5" cy="48.5" fill="#5E99FF" r="48.5"></circle>
</g>
</symbol>

<symbol id="figure-1" viewBox="0 0 144 95">
<g fill="none" fill-rule="evenodd" opacity=".45">
<path d="M46.243 94.954L42 90.71 112.711 20l4.243 4.242z" fill="#FFEF5E"></path>
<path d="M79.477 32.576L92.627 92.4 0 22.265 144 0z" fill="#5E99FF"></path>
</g>
</symbol>

<symbol id="figure-2" viewBox="0 0 122 171">
<g fill="none" fill-rule="evenodd" transform="translate(-18.212 -.106)">
<rect fill="#5EFFAE" height="96" opacity=".7" rx="48" transform="rotate(15 67 122.894)" width="96" x="19" y="74.894"></rect>
<path d="M139.616 72.013l-38.777 53.493L39.07.106z" fill="#CB7EF9" opacity=".45"></path>
</g>
</symbol>

<symbol id="figure-3" viewBox="0 0 142 168">
<g fill="none" fill-rule="evenodd" opacity=".45">
<path d="M31.746 28.265l68.418 47.45-100 22.55z" fill="#CB7EF9"></path>
<path d="M126.83.332l14.826 81.93L55 27.498z" fill="#FF5EDD"></path>
<path d="M121.83 85.332l14.826 81.93L50 112.498z" fill="#5E99FF"></path>
</g>
</symbol>

<symbol id="figure-4" viewBox="0 0 150 118">
<g fill="none" fill-rule="evenodd">
<path d="M56.593.235l92.729 24.847-24.847 92.729-92.728-24.847z" fill="#FCDE98"></path>
<path d="M100.164 41.265v47.45l-100 22.55z" fill="#FF625E" opacity=".7"></path>
</g>
</symbol>

<symbol id="figure-5" viewBox="0 0 115 115">
<g fill="none" fill-rule="evenodd">
<path d="M0 90l24.25-14 14 24.25-24.249 14z" fill="#FFEF5E" opacity=".45"></path>
<path d="M15.77 38.9l40.568 10.87-10.87 40.568-40.57-10.87z" fill="#FF625E" opacity=".7"></path>
<path d="M69.254 0l45.255 45.254L69.254 90.51 24 45.254z" fill="#5EFFAE" opacity=".7"></path>
</g>
</symbol>

<symbol id="figure-6" viewBox="0 0 146 106">
<g fill="none" fill-rule="evenodd">
<path d="M31 59.196L34 54l38.971 22.5-3 5.196z" fill="#98FCC1" opacity=".7"></path>
<path d="M7.778 62.598L0 54.82 31.82 23l7.778 7.778z" fill="#FF5EDD" opacity=".45"></path>
<path d="M59 51.732L58 50l86.603-50 1 1.732z" fill="#7BEAEB" opacity=".45"></path>
<path d="M3.8 105.082l-.776-2.898L48.423 90.02l.776 2.898z" fill="#5E99FF" opacity=".45"></path>
</g>
</symbol>

<symbol id="figure-7" viewBox="0 0 115 115">
<g fill="none" fill-rule="evenodd">
<path d="M0 90l24.25-14 14 24.25-24.249 14z" fill="#A698FC" opacity=".7"></path>
<path d="M15.77 38.9l40.568 10.87-10.87 40.568-40.57-10.87z" fill="#98FCC1" opacity=".7"></path>
<path d="M69.254 0l45.255 45.254L69.254 90.51 24 45.254z" fill="#5E99FF" opacity=".45"></path>
</g>
</symbol>

<symbol id="figure-8" viewBox="0 0 134 162">
<g fill="none" fill-rule="evenodd" transform="translate(-.144)">
<ellipse cx="72.644" cy="107" fill="#FF5EDD" opacity=".45" rx="54.5" ry="55"></ellipse>
<ellipse cx="92.644" cy="42" fill="#CB7EF9" opacity=".45" rx="41.5" ry="42"></ellipse>
<path d="M.143 73l27.713-16 16 27.712-27.713 16z" fill="#98FCC1" opacity=".7"></path>
</g>
</symbol>

<symbol id="figure-9" viewBox="0 0 97 80">
<g fill="none" fill-rule="evenodd">
<circle cx="63.5" cy="33.5" fill="#FF625E" opacity=".7" r="33.5"></circle>
<path d="M0 22h58v58H0z" fill="#FFEF5E" opacity=".45"></path>
</g>
</symbol>

<symbol id="figure-10" viewBox="0 0 127 161">
<g fill="none" fill-rule="evenodd">
<path d="M82.21 40l44.323 76.77-76.21 44L5.999 84z" fill="#CB7EF9" opacity=".45"></path>
<path d="M43.093.105L95.42 52.43 52.993 94.857.667 42.53z" fill="#FEB0A5" opacity=".8"></path>
</g>
</symbol>

<symbol id="figure-11" viewBox="0 0 126 158">
<g fill="none" fill-rule="evenodd" transform="translate(-.402 -.52)">
<path d="M81.612 37.52l44.323 76.77-76.21 44L5.4 81.52z" fill="#FFEF5E" opacity=".45"></path>
<path d="M30.402.52l5.196 3-30 51.96-5.196-3z" fill="#FEB0A5"></path>
<ellipse cx="39.902" cy="43.519" fill="#A698FC" opacity=".7" rx="12.5" ry="12"></ellipse>
</g>
</symbol>

<symbol id="figure-12" viewBox="0 0 106 102">
<g fill="none" fill-rule="evenodd" opacity=".7">
<circle cx="17.5" cy="84.5" fill="#A698FC" r="17.5"></circle>
<circle cx="57.5" cy="48.5" fill="#5EFFAE" r="48.5"></circle>
<circle cx="79.5" cy="35.5" fill="#FFF" r="17.5" transform="matrix(1 0 0 -1 0 71)"></circle>
</g>
</symbol>

<symbol id="figure-13" viewBox="0 0 142 160">
<g fill="none" fill-rule="evenodd" transform="translate(-.836)">
<path d="M84.164 106.5l-30.5 52.827-52.828-30.5L31.336 76z" fill="#FF625E" opacity=".7"></path>
<circle cx="98.836" cy="44" fill="#CB7EF9" opacity=".45" r="44"></circle>
</g>
</symbol>

<symbol id="figure-14" viewBox="0 0 181 204">
<g fill="none" fill-rule="evenodd">
<path d="M48.43 72.43l83.14 48-48 83.14-83.14-48z" fill="#FCDE98"></path>
<circle cx="119.5" cy="61.5" fill="#98FCC1" opacity=".7" r="61.5"></circle>
</g>
</symbol>
</svg>
</div>

<layout
[title]="'Расписание'"
[isScroll]="true"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<layout
[title]="'Map'"
[title]="'Карта'"
[state]="state">

<div
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import 'package:angular/angular.dart';
import 'package:angular_router/angular_router.dart';
import 'package:codefest/src/components/containers/rating_container/rating_empty_state/rating_empty_state.dart';
import 'package:codefest/src/components/layout/layout.dart';
import 'package:codefest/src/components/containers/stateful_component.dart';
import 'package:codefest/src/components/loader/loader.dart';
import 'package:codefest/src/components/ui/event_card/event_card.dart';
import 'package:codefest/src/models/lecture.dart';
import 'package:codefest/src/redux/actions/effects/init_action.dart';
import 'package:codefest/src/redux/selectors/selectors.dart';
import 'package:codefest/src/redux/services/dispatcher.dart';
import 'package:codefest/src/redux/services/store_factory.dart';
import 'package:codefest/src/route_paths.dart';

@Component(
selector: 'rating-container',
Expand All @@ -16,7 +20,9 @@ import 'package:codefest/src/redux/services/store_factory.dart';
NgIf,
NgFor,
LayoutComponent,
LoaderComponent,
RatingEmptyStateComponent,
EventCardComponent
],
preserveWhitespace: true,
changeDetection: ChangeDetectionStrategy.OnPush,
Expand All @@ -25,10 +31,13 @@ class RatingContainerComponent extends StatefulComponent implements OnInit {
final Selectors _selectors;
final Dispatcher _dispatcher;

Router _router;

RatingContainerComponent(
NgZone zone,
ChangeDetectorRef cdr,
StoreFactory storeFactory,
this._router,
this._selectors,
this._dispatcher,
) : super(zone, cdr, storeFactory);
Expand All @@ -39,4 +48,14 @@ class RatingContainerComponent extends StatefulComponent implements OnInit {
void ngOnInit() {
_dispatcher.dispatch(InitAction());
}

bool get isReady => _selectors.isReady(state);

void onLectureSelect(Lecture lecture) {
final url = RoutePaths.lecture.toUrl(
parameters: {idParam: lecture.id},
);

_router.navigate(url);
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,53 @@
<layout
[title]="'Рейтинг докладов'"
[state]="state">
<loader
[isReady]="isReady">
<layout
[title]="'Рейтинг докладов'"
[state]="state">

<div
content>
<div class="events__list"
content>
<event-card
*ngFor="let lecture of lectures"
class="rating_event"
[clickable]="true"
[standOut]="true"
[title]="lecture.title"
[speakers]="lecture.speakers"
(onClick)="onLectureSelect(lecture)">
<div
class="like-count"
side>
<svg
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="24" height="24" viewBox="0 0 24 24"
class="icon">
<path d="M15.4 7H20l-7.08 7.06-2.3-2.29L15.41 7zm-6.8 4.04l3.67 3.67L9.97 17 4 11.04h4.6z" fill-rule="evenodd"/>
</svg>

<div
*ngFor="let lecture of lectures">
{{ lecture.likesCount }}
</div>
<span meta>

{{ lecture.title }}
</div>
<!-- Location -->
<span
class="event__meta-item">
{{ lecture.location.title }}
</span>

&ngsp;•&ngsp;

<!-- Section -->
<span
class="event__meta-item"
[style.color]="lecture.section.color">
{{ lecture.section.title }}
</span>
</span>
</event-card>

<rating-empty-state
*ngIf="lectures.isEmpty">
</rating-empty-state>
</div>
</layout>
<rating-empty-state
*ngIf="lectures.isEmpty">
</rating-empty-state>
</div>
</layout>
</loader>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@import "../../../../../web/assets/styles/variables.scss";

:host {
.like-count {
flex-shrink: 0;
margin-left: -8px;
margin-right: 16px;
width: 5ch;
padding-top: 16px;
color: $fg-color-primary;
@include font-title;

.icon {
color: $fg-color-secondary;
vertical-align: top;
transform: translate(0, -3px);
}
}

.events__list {
display: grid;
grid-gap: 8px;
margin: 12px 0;
}
}
Loading

0 comments on commit 34a390d

Please sign in to comment.