Compare commits
No commits in common. "a884c02f29b969c7c3797f54946e2f4f4c556040" and "fd8aa70ee2f9a5e2a659b55ece0f3d821ce4ae3c" have entirely different histories.
a884c02f29
...
fd8aa70ee2
4 changed files with 21 additions and 36 deletions
|
@ -32,8 +32,9 @@
|
|||
.message {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: 6px 6px 6px var(--space-xs);
|
||||
margin-top: 14px;
|
||||
padding: 4px 4px 4px var(--space-xs);
|
||||
margin-top: 16px;
|
||||
overflow-x: hidden;
|
||||
word-wrap: break-word;
|
||||
position: relative;
|
||||
}
|
||||
|
@ -120,15 +121,13 @@
|
|||
.message-actions {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
top: 3px;
|
||||
right: 12px;
|
||||
z-index: 1;
|
||||
background-color: var(--background-color-1);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
.message-actions .icon-button {
|
||||
margin: 7px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
@ -191,14 +190,14 @@
|
|||
{/if}
|
||||
|
||||
<div class="message-actions">
|
||||
<button class="icon-button material-icons-outlined" on:click="{ reply }" aria-label="Reply to Message">
|
||||
reply
|
||||
</button>
|
||||
{#if message._editable}
|
||||
<button class="icon-button material-icons-outlined" on:click="{ () => overlayStore.push(OverlayType.EditMessage, { message }) }" aria-label="Edit Message">
|
||||
edit
|
||||
</button>
|
||||
{/if}
|
||||
<button class="icon-button material-icons-outlined" on:click="{ reply }" aria-label="Reply to Message">
|
||||
reply
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -48,10 +48,7 @@
|
|||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
padding: var(--space-norm);
|
||||
padding-top: var(--space-sm);
|
||||
padding-bottom: var(--space-sm);
|
||||
border-radius: 9999px;
|
||||
background-color: var(--background-color-0);
|
||||
}
|
||||
|
@ -71,20 +68,13 @@
|
|||
}
|
||||
|
||||
.attachment-filename {
|
||||
color: var(--foreground-color-2);
|
||||
margin-right: var(--space-md);
|
||||
color: var(--foreground-color-3);
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.attachment-card .icon-button {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.attachment-card .download {
|
||||
background: var(--purple-1);
|
||||
border-radius: 9999px;
|
||||
padding: var(--space-xs);
|
||||
color: var(--foreground-color-1);
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
@ -96,7 +86,7 @@
|
|||
{:else if renderAs === AttachmentRenderAs.DownloadableFile}
|
||||
<div class="attachment attachment-card">
|
||||
<div class="attachment-filename">{ attachment.file_name }</div>
|
||||
<a class="icon-button material-icons-outlined download" href="{ attachmentUrl(attachment.file) }" target="_blank">download</a>
|
||||
<a class="icon-button material-icons-outlined" href="{ attachmentUrl(attachment.file) }" target="_blank">download</a>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="attachment attachment-card">Couldn't render attachment</div>
|
||||
|
|
|
@ -13,16 +13,6 @@ export const GatewayErrors = {
|
|||
TOO_MANY_SESSIONS: 4008,
|
||||
};
|
||||
|
||||
// this should be in request.js, but putting it here avoids a circular dependency
|
||||
export const RequestStatus = {
|
||||
OK: 0,
|
||||
NETWORK_EXCEPTION: 1,
|
||||
JSON_EXCEPTION: 2,
|
||||
FAILURE_STATUS: 3,
|
||||
RPC_ERROR: 4,
|
||||
INVARIANT_RPC_RESPONSE_COUNT: 5,
|
||||
};
|
||||
|
||||
export const GatewayPayloadType = {
|
||||
Hello: 0,
|
||||
Authenticate: 1, // client
|
||||
|
@ -158,9 +148,6 @@ export default {
|
|||
clearInterval(this.heartbeatInterval);
|
||||
}
|
||||
|
||||
this.waitingSerials.forEach((resolve) => resolve({ status: RequestStatus.NETWORK_EXCEPTION }));
|
||||
this.waitingSerials.clear();
|
||||
|
||||
if (code === GatewayErrors.BAD_AUTH) {
|
||||
this.dispatch(GatewayEventType.BadAuth, 1);
|
||||
if (this.reconnectTimeout)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import gateway, { RequestStatus } from "./gateway";
|
||||
import gateway from "./gateway";
|
||||
import { apiRoute, getItem } from "./storage";
|
||||
|
||||
const method = (methodId, requiresAuthentication) => ({methodId, requiresAuthentication});
|
||||
|
@ -43,6 +43,15 @@ export const RPCError = {
|
|||
INTERNAL_ERROR: { code: 7003, message: "Sorry, we couldn't process this request (internal server error)" },
|
||||
};
|
||||
|
||||
export const RequestStatus = {
|
||||
OK: 0,
|
||||
NETWORK_EXCEPTION: 1,
|
||||
JSON_EXCEPTION: 2,
|
||||
FAILURE_STATUS: 3,
|
||||
RPC_ERROR: 4,
|
||||
INVARIANT_RPC_RESPONSE_COUNT: 5,
|
||||
};
|
||||
|
||||
export const RequestStatusToMessage = {
|
||||
[RequestStatus.OK]: "",
|
||||
[RequestStatus.NETWORK_EXCEPTION]: "We couldn't reach the server right now",
|
||||
|
|
Loading…
Reference in a new issue