mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: add features (#504)
This commit is contained in:
1 parent
b84a6426dd
commit
37ac2f80f7
9 files changed
+49
-1
No files matched your search
@@ -20,11 +20,21 @@ $send-button-width = 50px
|
|||||||
overflow: auto
|
overflow: auto
|
||||||
height: rem($list-height)
|
height: rem($list-height)
|
||||||
|
|
||||||
.messagepad__content
|
.messagepad__header
|
||||||
position: absolute
|
position: absolute
|
||||||
left: rem($sidebar-width)
|
left: rem($sidebar-width)
|
||||||
right: 0
|
right: 0
|
||||||
top: 0
|
top: 0
|
||||||
|
height: rem(30px)
|
||||||
|
padding: rem(5px)
|
||||||
|
text-align: center
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
|
||||||
|
.messagepad__content
|
||||||
|
position: absolute
|
||||||
|
left: rem($sidebar-width)
|
||||||
|
right: 0
|
||||||
|
top: rem(30px)
|
||||||
bottom: rem($input-height)
|
bottom: rem($input-height)
|
||||||
overflow: auto
|
overflow: auto
|
||||||
padding: rem(30px)
|
padding: rem(30px)
|
||||||
|
|||||||
@@ -90,9 +90,19 @@ export default connect(mapStateToProps)(class MessagePadDialogueContentContainer
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<div className="messagepad__header">
|
||||||
|
{ this.props.item
|
||||||
|
&& (
|
||||||
|
<a className="messagepad__content__header__title" href={`/user/${this.props.item.udoc._id}`}>
|
||||||
|
{`${this.props.item.udoc.uname}(UID: ${this.props.item.udoc._id})`}
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
<ol className="messagepad__content" ref="list">
|
<ol className="messagepad__content" ref="list">
|
||||||
{this.renderInner()}
|
{this.renderInner()}
|
||||||
</ol>
|
</ol>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -29,6 +29,7 @@ const page = new NamedPage('home_messages', () => {
|
|||||||
const { Provider, store } = await loadReactRedux(MessagePadReducer);
|
const { Provider, store } = await loadReactRedux(MessagePadReducer);
|
||||||
|
|
||||||
reduxStore = store;
|
reduxStore = store;
|
||||||
|
window.store = reduxStore;
|
||||||
|
|
||||||
const sock = new WebSocket(`${UiContext.ws_prefix}home/messages-conn`);
|
const sock = new WebSocket(`${UiContext.ws_prefix}home/messages-conn`);
|
||||||
sock.onmessage = (message) => {
|
sock.onmessage = (message) => {
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
.page--homepage
|
||||||
|
.more
|
||||||
|
text-align: center
|
||||||
|
a
|
||||||
|
color: #a7a7a7
|
||||||
|
font-size: rem($font-size-secondary)
|
||||||
|
text-decoration: none
|
||||||
|
border-bottom: 2px solid $pager-border-color
|
||||||
|
transition: border-bottom .2s linear, color .2s linear
|
||||||
|
&:hover
|
||||||
|
color: #666;
|
||||||
|
border-color: #5f9fd6
|
||||||
@@ -41,5 +41,8 @@
|
|||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ol>
|
</ol>
|
||||||
|
<div class="section__footer more">
|
||||||
|
<a href="{{ url('contest_main') }}">{{ _('More') }} ></a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -6,5 +6,8 @@
|
|||||||
<h1 class="section__title">{{ _('Discussion') }}</h1>
|
<h1 class="section__title">{{ _('Discussion') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
{% include "partials/discussion_list.html" %}
|
{% include "partials/discussion_list.html" %}
|
||||||
|
<div class="section__footer more">
|
||||||
|
<a href="{{ url('discussion_main') }}">{{ _('More') }} ></a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -38,5 +38,8 @@
|
|||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ol>
|
</ol>
|
||||||
|
<div class="section__footer more">
|
||||||
|
<a href="{{ url('homework_main') }}">{{ _('More') }} ></a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -34,5 +34,8 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="section__footer more">
|
||||||
|
<a href="{{ url('ranking') }}">{{ _('More') }} ></a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -43,5 +43,8 @@
|
|||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ol>
|
</ol>
|
||||||
|
<div class="section__footer more">
|
||||||
|
<a href="{{ url('training_main') }}">{{ _('More') }} ></a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
Reference in new issue
Block a user