Skip to content

Commit df8a286

Browse files
committed
feat: uservoice
1 parent 06baa00 commit df8a286

File tree

4 files changed

+77
-1
lines changed

4 files changed

+77
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import Component from "@glimmer/component";
2+
import { i18n } from "discourse-i18n";
3+
4+
export default class OnlyofficeWelcomeBanner extends Component {
5+
get shouldShow() {
6+
return window.location.pathname.includes("/admin/plugins/onlyoffice-discourse/settings");
7+
}
8+
9+
<template>
10+
{{#if this.shouldShow}}
11+
<div class="onlyoffice-uservoice">
12+
<h3>{{i18n "admin.onlyoffice.welcome.title"}}</h3>
13+
<p>{{i18n "admin.onlyoffice.welcome.description"}}</p>
14+
<p>
15+
<a
16+
href="https://feedback.onlyoffice.com/forums/966080-your-voice-matters?category_id=519288"
17+
target="_blank"
18+
rel="noopener noreferrer"
19+
>
20+
{{i18n "admin.onlyoffice.welcome.suggest_feature"}}
21+
</a>
22+
</p>
23+
</div>
24+
{{/if}}
25+
{{yield}}
26+
</template>
27+
}

assets/stylesheets/onlyoffice.scss

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,3 +599,40 @@ $onlyoffice-padding-lg: 1.5rem;
599599
.onlyoffice-container {
600600
height: 100%;
601601
}
602+
603+
// Uservoice banner on settings page
604+
.onlyoffice-uservoice {
605+
background: var(--primary-very-low);
606+
border: 1px solid var(--primary-low);
607+
border-radius: $onlyoffice-border-radius;
608+
padding: $onlyoffice-padding-lg;
609+
margin-bottom: 1.5rem;
610+
611+
h3 {
612+
margin: 0 0 0.75rem 0;
613+
font-size: 1.25rem;
614+
font-weight: 600;
615+
color: var(--primary);
616+
}
617+
618+
p {
619+
margin: 0.5rem 0;
620+
color: var(--primary-high);
621+
line-height: 1.5;
622+
623+
&:last-child {
624+
margin-bottom: 0;
625+
}
626+
}
627+
628+
a {
629+
color: var(--tertiary);
630+
text-decoration: none;
631+
font-weight: 500;
632+
633+
&:hover {
634+
color: var(--tertiary-hover);
635+
text-decoration: underline;
636+
}
637+
}
638+
}

config/locales/client.en.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,9 @@ en:
4848
error: "Failed to load editor"
4949
demo_expired: "The 30-day test period is over. You are no longer able to connect to the demo server."
5050
demo_notice: "You are successfully connected to the demo server. It will be available until %{date}. To disable it, uncheck the box in plugin settings."
51+
admin:
52+
onlyoffice:
53+
welcome:
54+
title: "Welcome to ONLYOFFICE Docs!"
55+
description: "Work on all kinds of office documents within Discourse using ONLYOFFICE Docs."
56+
suggest_feature: "Suggest a feature"

config/locales/client.ru.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,10 @@ ru:
4545
can_edit: "Может редактировать"
4646
onlyoffice_editor:
4747
loading: "Загрузка редактора..."
48-
error: "Не удалось загрузить редактор"
48+
error: "Не удалось загрузить редактор"
49+
admin:
50+
onlyoffice:
51+
welcome:
52+
title: "Добро пожаловать в ONLYOFFICE Docs!"
53+
description: "Работайте со всеми видами офисных документов в Discourse с помощью ONLYOFFICE Docs."
54+
suggest_feature: "Предложить функцию"

0 commit comments

Comments
 (0)