mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-08-31 14:12:08 +00:00
Add a hint as to how to get to your sticker packs from the landing page
Part of #156
This commit is contained in:
parent
7a0af05ac4
commit
d2c672cf00
@ -6,6 +6,10 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="!isLoading && !isError">
|
||||
<div class="stickerpacks" *ngIf="hasStickerPacks">
|
||||
Looking for your sticker packs? <a routerLink="stickerpicker">Click here</a>.
|
||||
</div>
|
||||
|
||||
<!-- ------------------------ -->
|
||||
<!-- EMPTY/ENCRYPTED STATES -->
|
||||
<!-- ------------------------ -->
|
||||
@ -14,9 +18,8 @@
|
||||
<strong>Integrations are not encrypted!</strong>
|
||||
This means that some information about yourself and the
|
||||
room may be leaked to the bot, bridge, or widget. This information includes the room ID, your display
|
||||
name,
|
||||
your username, your avatar, information about Riot, and other similar details. Add integrations with
|
||||
caution.
|
||||
name, your username, your avatar, information about Riot, and other similar details. Add integrations
|
||||
with caution.
|
||||
</div>
|
||||
<div class="alert alert-warning" *ngIf="!hasIntegrations() && isRoomEncrypted">
|
||||
<h4>This room is encrypted</h4>
|
||||
@ -25,8 +28,7 @@
|
||||
<div class="alert alert-warning" *ngIf="!hasIntegrations() && !isRoomEncrypted">
|
||||
<h4>No integrations available</h4>
|
||||
This room does not have any compatible integrations. Please contact the server owner if you're seeing
|
||||
this
|
||||
message.
|
||||
this message.
|
||||
</div>
|
||||
|
||||
<!-- ------------------------ -->
|
||||
|
@ -1 +1,8 @@
|
||||
// component styles are encapsulated and only applied to their components
|
||||
.stickerpacks {
|
||||
position: relative;
|
||||
top: -15px;
|
||||
padding-left: 10px;
|
||||
font-size: 0.8em;
|
||||
color: #525252;
|
||||
}
|
@ -11,6 +11,7 @@ import { IntegrationsApiService } from "../../shared/services/integrations/integ
|
||||
import { Modal, overlayConfigFactory } from "ngx-modialog";
|
||||
import { ConfigSimpleBotComponent, SimpleBotConfigDialogContext } from "../../configs/simple-bot/simple-bot.component";
|
||||
import { ToasterService } from "angular2-toaster";
|
||||
import { StickerApiService } from "../../shared/services/integrations/sticker-api.service";
|
||||
|
||||
const CATEGORY_MAP = {
|
||||
"Widgets": ["widget"],
|
||||
@ -28,6 +29,7 @@ export class RiotHomeComponent {
|
||||
public isError = false;
|
||||
public errorMessage: string;
|
||||
public isRoomEncrypted: boolean;
|
||||
public hasStickerPacks = false;
|
||||
|
||||
private roomId: string;
|
||||
private userId: string;
|
||||
@ -40,6 +42,7 @@ export class RiotHomeComponent {
|
||||
private scalarApi: ScalarServerApiService,
|
||||
private scalar: ScalarClientApiService,
|
||||
private integrationsApi: IntegrationsApiService,
|
||||
private stickerApi: StickerApiService,
|
||||
private adminApi: AdminApiService,
|
||||
private router: Router,
|
||||
private modal: Modal,
|
||||
@ -188,6 +191,12 @@ export class RiotHomeComponent {
|
||||
this.isLoading = false;
|
||||
this.errorMessage = "Unable to set up Dimension. This version of Riot may not supported or there may be a problem with the server.";
|
||||
});
|
||||
|
||||
this.stickerApi.getPacks().then(packs => {
|
||||
this.hasStickerPacks = packs.length > 0;
|
||||
}).catch(err => {
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
private tryOpenConfigScreen() {
|
||||
|
Loading…
Reference in New Issue
Block a user