mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Fixed an error and improving css
If the /join command success, an error was thrown, because of a copy-pasted command not well integrated The button of the error on "theme.css" contains now an unicode cross. The :after/:before cross was disformed when opening the room informations.
This commit is contained in:
parent
09fd1a5113
commit
f9f49b7640
@ -23,6 +23,7 @@ import {imageToInfo} from "../common.js";
|
||||
// TODO: remove fallback so default isn't included in bundle for SDK users that have their custom tileClassForEntry
|
||||
// this is a breaking SDK change though to make this option mandatory
|
||||
import {tileClassForEntry as defaultTileClassForEntry} from "./timeline/tiles/index";
|
||||
import {RoomStatus} from "../../../matrix/room/common";
|
||||
|
||||
export class RoomViewModel extends ViewModel {
|
||||
constructor(options) {
|
||||
@ -210,7 +211,7 @@ export class RoomViewModel extends ViewModel {
|
||||
let roomName = args[0];
|
||||
try {
|
||||
const roomId = await this._options.client.session.joinRoom(roomName);
|
||||
await session.observeRoomStatus(roomId).waitFor(status === RoomStatus.Joined);
|
||||
await (await this._options.client.session.observeRoomStatus(roomId)).waitFor(status => status === RoomStatus.Joined);
|
||||
this.navigation.push("room", roomId);
|
||||
} catch (exc) {
|
||||
if ((exc.statusCode ?? exc.status) === 400) {
|
||||
@ -220,7 +221,7 @@ export class RoomViewModel extends ViewModel {
|
||||
} else if ((exc.statusCode ?? exc.status) === 403) {
|
||||
this._sendError = new Error(`/join : you're not invited to join '${roomName}'`);
|
||||
} else {
|
||||
this._sendError = new Error("join syntax: /join <room-id>");
|
||||
this._sendError = exc;
|
||||
}
|
||||
this._timelineError = null;
|
||||
this.emitChange("error");
|
||||
|
@ -559,32 +559,24 @@ a {
|
||||
background : none;
|
||||
border : none;
|
||||
position : relative;
|
||||
border-radius : 5px;
|
||||
transition: 0.1s all ease-out;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.RoomView_error button:hover {
|
||||
background : #cfcfcf;
|
||||
}
|
||||
|
||||
.RoomView_error button:after {
|
||||
content:"";
|
||||
position : absolute;
|
||||
top : 10px;
|
||||
right: 16px;
|
||||
background : red;
|
||||
width : 5px;
|
||||
height : 20px;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.RoomView_error button:before {
|
||||
content:"";
|
||||
content:"\274c";
|
||||
position : absolute;
|
||||
top : 17px;
|
||||
top : 15px;
|
||||
left: 10px;
|
||||
background : red;
|
||||
width : 20px;
|
||||
height : 5px;
|
||||
transform: rotate(45deg);
|
||||
height : 10px;
|
||||
font-size : 10px;
|
||||
align-self : middle;
|
||||
}
|
||||
|
||||
.MessageComposer_replyPreview .Timeline_message {
|
||||
|
Loading…
Reference in New Issue
Block a user