Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fixed width for inline attachments

ammarahm-ed0d167b60f006
diff --git a/apps/mobile/html/Web.bundle/site/constants.js b/apps/mobile/html/Web.bundle/site/constants.js
index aa1b592d5..bb7bb02d5 100755
--- a/apps/mobile/html/Web.bundle/site/constants.js
+++ b/apps/mobile/html/Web.bundle/site/constants.js
@@ -255,7 +255,7 @@ span.attachment {
position: relative;
z-index: 1;
user-select: none;
- display: inline;
+ display: inline-flex;
align-items: center;
background-color: ${pageTheme.colors.nav};
padding: 0px 5px 0px 22px;
@@ -264,6 +264,13 @@ span.attachment {
font-size: 0.85rem;
cursor: pointer !important;
word-break: break-all;
+ max-width: 250px;
+}
+
+span.attachment .filename {
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
}
span.attachment:not([data-progress])::after {
@@ -280,6 +287,22 @@ span.attachment[data-progress]::after {
font-size: 0.7rem;
}
+span.attachment::before {
+ display: inline-block;
+ z-index: -1;
+ position: absolute;
+ top: 0;
+ left: 0;
+ content: "";
+ width: var(--progress, 0px);
+ height: 100%;
+ transition: width 100ms ease-in;
+ background-size: 15px 15px;
+ background-repeat: no-repeat;
+ background-position: 5px 1.5px;
+ background-color: var(--border);
+}
+
span.attachment em::before {
content: "";
position: absolute;
@@ -293,6 +316,24 @@ span.attachment em::before {
mask-size: 15px 15px;
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M7.5,18A5.5,5.5 0 0,1 2,12.5A5.5,5.5 0 0,1 7.5,7H18A4,4 0 0,1 22,11A4,4 0 0,1 18,15H9.5A2.5,2.5 0 0,1 7,12.5A2.5,2.5 0 0,1 9.5,10H17V11.5H9.5A1,1 0 0,0 8.5,12.5A1,1 0 0,0 9.5,13.5H18A2.5,2.5 0 0,0 20.5,11A2.5,2.5 0 0,0 18,8.5H7.5A4,4 0 0,0 3.5,12.5A4,4 0 0,0 7.5,16.5H17V18H7.5Z'%3E%3C/path%3E%3C/svg%3E");
}
+
+.mce-content-body code[data-mce-selected="inline-boundary"] {
+ background-color: ${pageTheme.colors.nav} !important;
+}
+
+.mce-content-body code {
+ background-color: ${pageTheme.colors.nav} !important;
+ border: 1px solid var(--border);
+ border-radius: 5px;
+ padding: 3px 5px 0px 5px;
+}
+
+code {
+ font-family: ui-monospace, SFMono-Regular, SF Mono, Consolas, Liberation Mono,
+ Menlo, monospace !important;
+ font-size:10pt !important
+}
+
`;
let editorHead = tinymce.activeEditor.contentDocument.getElementsByTagName(