Skip to content

Commit

Permalink
BIG UPDATE
Browse files Browse the repository at this point in the history
Optimistic posting is back, new tooltips, post drafts, lots of bug fixes, more tweaks to improve load times, dynamic text sizes, non-binary theme, more language things.

Co-authored-by: Tnix <[email protected]>
  • Loading branch information
3r1s-s and tnix100 committed Aug 5, 2024
1 parent f5c975a commit 6998d40
Show file tree
Hide file tree
Showing 9 changed files with 584 additions and 607 deletions.
2 changes: 1 addition & 1 deletion emoji.js
Original file line number Diff line number Diff line change
Expand Up @@ -1874,7 +1874,7 @@ function groupcat() {
pageContainer.innerHTML =
`
<h1>GROUP CAT ATTICU EDITION</h1>
<button onclick="loadhome()" class="button blockeduser">AAAH THERE'S TOO MANY</button>
<button onclick="loadchat('home')" class="button blockeduser">AAAH THERE'S TOO MANY</button>
<div class="groupcat">
<img class="groupcat-cat" alt="MEOW" title="MEOW" src="images/atticu.png" height="100" style="left: 56.6652vw; top: 50.9331vh; animation-delay: -6.49979s; animation-duration: 14.2032s;">
<img class="groupcat-cat" alt="MEOW" title="MEOW" src="images/atticu.png" height="100" style="left: 4.91153vw; top: 18.259vh; animation-delay: -1.32871s; animation-duration: 14.3195s;">
Expand Down
20 changes: 19 additions & 1 deletion glass.css
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,18 @@
mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, 0) 100%);
}

.nonb-theme #page::after {
content: '';
position: fixed;
top: 0;
z-index: -1;
width: 100%;
height: var(--grad-height);
background: linear-gradient(90deg, rgb(252, 244, 52) 0%, rgb(255, 255, 255) 50%, rgb(156, 89, 209) 100%);
-webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, 0) 100%);
mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, 0) 100%);
}

.theme-button.trans-theme {
background: linear-gradient(90deg, rgb(27, 111, 133) 0%, rgb(138, 82, 93) 25%, rgb(113, 113, 113) 50%, rgb(138, 82, 93) 75%, rgb(27, 111, 133) 100%);
background-size: cover;
Expand All @@ -200,8 +212,14 @@
background-size: cover;
}

.theme-button.nonb-theme {
background: linear-gradient(90deg, rgb(198, 192, 40) 0%, rgb(166, 166, 166) 50%, rgb(121, 68, 162) 100%);
background-size: cover;
}

.pride-theme .settings > h1,
.trans-theme .settings > h1
.trans-theme .settings > h1,
.nonb-theme .settings > h1
{
background: transparent;
position: static;
Expand Down
40 changes: 28 additions & 12 deletions lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function setlang(lang) {
const en = {
"reh": "English, US", // future reference for people adding languages disregard the reh
"language": "English, US", // Replace this with that the language is called in that language (ie: "Español" instead of "Spanish")
"page_home": "Home",
"page_home": "Home", // To update a language easier I suggest looking at the diff between en and the language you're editing (sorry I don't have a better solution)
"page_start": "Start",
"page_explore": "Explore",
"page_inbox": "Inbox",
Expand Down Expand Up @@ -217,11 +217,15 @@ const en = {
"favorite": "Favorite",
"download": "Download",
"add": "Add",
"adduser": "Add Member", // update
"transfer": "Transfer Ownership", // update
"bug": "Report Bug", // update
"datarequest": "Request Data", // update
"discuss": "Discuss", // update
"adduser": "Add Member",
"transfer": "Transfer Ownership",
"bug": "Report Bug",
"datarequest": "Request Data",
"discuss": "Discuss",
"ping": "Ping",
"moddel": "Mod Delete",
"modpost": "Moderate Post",
"message": "Message",
},
"info": {
"accexists": "Username Already Taken!",
Expand Down Expand Up @@ -1851,6 +1855,10 @@ const owo = {
"bug": "Wepowt Bug~", // update
"datarequest": "Wequest Data~", // update
"discuss": "Discuss~", // update
"ping": "Pwing",
"moddel": "Mod Dewete",
"modpost": "Mod Powost",
"message": "Message~ >.<",
},
"info": {
"accexists": "Usename Awweady Taken! >w<",
Expand Down Expand Up @@ -2072,11 +2080,15 @@ const eris = {
"favorite": "favourite",
"download": "download",
"add": "add",
"adduser": "add someone (mistake)", // update
"transfer": "make someone else owner (mistake)", // update
"bug": "i found a problem", // update
"datarequest": "i love collecting infomation", // update
"discuss": "discuss", // update
"adduser": "add someone (mistake)",
"transfer": "make someone else owner (mistake)",
"bug": "i found a problem",
"datarequest": "i love collecting infomation",
"discuss": "discuss",
"ping": "@everyone",
"moddel": "banish post",
"modpost": "banish",
"message": "annoy",
},
"info": {
"accexists": "someone already sniped that one",
Expand Down Expand Up @@ -2139,7 +2151,7 @@ const eris = {
"profilecolor": "colour",
"profilepic": "pfp",
},
"chats": { // update
"chats": {
"owner": "owner",
"members": "members"
}
Expand Down Expand Up @@ -2303,6 +2315,10 @@ const goobert = {
"bug": "goobert",
"datarequest": "goobert",
"discuss": "goobert",
"ping": "goobert",
"moddel": "goobert",
"modpost": "goobert",
"message": "goobert",
},
"info": {
"accexists": "goobert",
Expand Down
31 changes: 21 additions & 10 deletions markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function erimd(content) {

function meowerEmojis(content, emojis) {
for (const emoji of emojis) {
content = content.replaceAll(`&lt;:${emoji._id}&gt;`, `<img src="https://uploads.meower.org/emojis/${emoji._id}" alt="${emoji.name}" title="${emoji.name}" class="emoji">`);
content = content.replaceAll(`&lt;:${emoji._id}&gt;`, `<div class="emoji-outer"><img src="https://uploads.meower.org/emojis/${emoji._id}" alt="${emoji.name}" title="${emoji.name}" class="emoji"></div>`);
}
return content;
}
Expand All @@ -59,6 +59,8 @@ function loadinputs() {
setTop()
let textin

pendingAttachments = [];

textin = `
<textarea type="text" oninput="autoresize()" class="message-input text" id="msg" rows="1" autocomplete="false" placeholder="${lang().meo_messagebox}" aria-label="Message Input"></textarea>
`
Expand Down Expand Up @@ -186,7 +188,7 @@ function attach(attachment) {

let embeddedElement;

if (attachment.mime.includes("image")) {
if (attachment.mime.includes("image/") && attachment.size < (10 << 20)) {
if (whitelist.some(source => link.includes(source))) {
const element = document.createElement("div");
element.classList.add("image-outer");
Expand All @@ -204,7 +206,7 @@ function attach(attachment) {
element.appendChild(imgElement);
embeddedElement = element;
}
} else if (attachment.mime.includes("video")) {
} else if (attachment.mime.includes("video/")) {
const element = document.createElement("div");
element.classList.add("media-outer");

Expand All @@ -219,7 +221,7 @@ function attach(attachment) {

element.appendChild(mediaElement);
embeddedElement = element;
} else if (attachment.mime.includes("audio")) {
} else if (attachment.mime.includes("audio/")) {

const element = document.createElement("div");
element.classList.add("media-outer");
Expand Down Expand Up @@ -390,28 +392,30 @@ function createButtonContainer(p) {
}
buttonContainer.innerHTML = `
<div class='toolbarContainer'>
<div class='toolButton' onclick='sharepost()' aria-label="share" title="share" tabindex="0">
<div class='toolButton tooltip' onclick='sharepost()' aria-label="share" data-tooltip="${lang().action.share}" title="share" tabindex="0">
<svg viewBox='0 0 20 20' fill='currentColor' width='19' height='19'><path d='M12.9297 3.25007C12.7343 3.05261 12.4154 3.05226 12.2196 3.24928L11.5746 3.89824C11.3811 4.09297 11.3808 4.40733 11.5739 4.60245L16.5685 9.64824C16.7614 9.84309 16.7614 10.1569 16.5685 10.3517L11.5739 15.3975C11.3808 15.5927 11.3811 15.907 11.5746 16.1017L12.2196 16.7507C12.4154 16.9477 12.7343 16.9474 12.9297 16.7499L19.2604 10.3517C19.4532 10.1568 19.4532 9.84314 19.2604 9.64832L12.9297 3.25007Z'></path><path d='M8.42616 4.60245C8.6193 4.40733 8.61898 4.09297 8.42545 3.89824L7.78047 3.24928C7.58466 3.05226 7.26578 3.05261 7.07041 3.25007L0.739669 9.64832C0.5469 9.84314 0.546901 10.1568 0.739669 10.3517L7.07041 16.7499C7.26578 16.9474 7.58465 16.9477 7.78047 16.7507L8.42545 16.1017C8.61898 15.907 8.6193 15.5927 8.42616 15.3975L3.43155 10.3517C3.23869 10.1569 3.23869 9.84309 3.43155 9.64824L8.42616 4.60245Z'></path></svg>
</div>
<div class='toolButton' onclick='reportModal("${p._id}")' aria-label="report" title="report" tabindex="0">
${p.post_origin !== 'inbox' ? `<div class='toolButton tooltip' onclick='reportModal("${p._id}")' aria-label="report" data-tooltip="${lang().action.report}" title="report" tabindex="0">
<svg width="20" height="20" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M20 6.00201H14V3.00201C14 2.45001 13.553 2.00201 13 2.00201H4C3.447 2.00201 3 2.45001 3 3.00201V22.002H5V14.002H10.586L8.293 16.295C8.007 16.581 7.922 17.011 8.076 17.385C8.23 17.759 8.596 18.002 9 18.002H20C20.553 18.002 21 17.554 21 17.002V7.00201C21 6.45001 20.553 6.00201 20 6.00201Z"></path></svg>
</div>
<div class='toolButton' onclick='pingusr(event)' aria-label="ping" title="ping" tabindex="0">
<div class='toolButton tooltip' onclick='pingusr(event)' aria-label="ping" data-tooltip="${lang().action.ping}" title="ping" tabindex="0">
<svg height="24" width="24" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.486 2 2 6.486 2 12C2 17.515 6.486 22 12 22C14.039 22 15.993 21.398 17.652 20.259L16.521 18.611C15.195 19.519 13.633 20 12 20C7.589 20 4 16.411 4 12C4 7.589 7.589 4 12 4C16.411 4 20 7.589 20 12V12.782C20 14.17 19.402 15 18.4 15L18.398 15.018C18.338 15.005 18.273 15 18.209 15H18C17.437 15 16.6 14.182 16.6 13.631V12C16.6 9.464 14.537 7.4 12 7.4C9.463 7.4 7.4 9.463 7.4 12C7.4 14.537 9.463 16.6 12 16.6C13.234 16.6 14.35 16.106 15.177 15.313C15.826 16.269 16.93 17 18 17L18.002 16.981C18.064 16.994 18.129 17 18.195 17H18.4C20.552 17 22 15.306 22 12.782V12C22 6.486 17.514 2 12 2ZM12 14.599C10.566 14.599 9.4 13.433 9.4 11.999C9.4 10.565 10.566 9.399 12 9.399C13.434 9.399 14.6 10.565 14.6 11.999C14.6 13.433 13.434 14.599 12 14.599Z"></path></svg>
</div>
<div class='toolButton' onclick='reply("${p._id}")' aria-label="reply" title="reply" tabindex="0">
<div class='toolButton tooltip left' onclick='reply("${p._id}")' aria-label="reply" data-tooltip="${lang().action.reply}" title="reply" tabindex="0">
<svg width='24' height='24' viewBox='0 0 24 24'><path d='M10 8.26667V4L3 11.4667L10 18.9333V14.56C15 14.56 18.5 16.2667 21 20C20 14.6667 17 9.33333 10 8.26667Z' fill='currentColor'></path></svg>
</div>
</div>` : ''}
</div>
`;
let nwbtn
if (p.u === localStorage.getItem("username")) {
if (p.u === localStorage.getItem("username") && p.post_origin !== "inbox") {
nwbtn = document.createElement("div");
nwbtn.classList.add("toolButton");
nwbtn.setAttribute("onclick", `editPost('${p.post_origin}', '${p._id}')`);
nwbtn.setAttribute("title", `edit`);
nwbtn.setAttribute("aria-label", `edit post`);
nwbtn.setAttribute("tabindex", "0");
nwbtn.classList.add("tooltip");
nwbtn.setAttribute("data-tooltip", `${lang().action.edit}`);
nwbtn.innerHTML = `
<svg width="20" height="20" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.2929 9.8299L19.9409 9.18278C21.353 7.77064 21.353 5.47197 19.9409 4.05892C18.5287 2.64678 16.2292 2.64678 14.817 4.05892L14.1699 4.70694L19.2929 9.8299ZM12.8962 5.97688L5.18469 13.6906L10.3085 18.813L18.0201 11.0992L12.8962 5.97688ZM4.11851 20.9704L8.75906 19.8112L4.18692 15.239L3.02678 19.8796C2.95028 20.1856 3.04028 20.5105 3.26349 20.7337C3.48669 20.9569 3.8116 21.046 4.11851 20.9704Z" fill="currentColor"></path></svg>
`;
Expand All @@ -421,6 +425,9 @@ function createButtonContainer(p) {
nwbtn.setAttribute("onclick", `deletePost("${p._id}")`);
nwbtn.setAttribute("title", `delete`);
nwbtn.setAttribute("aria-label", `delete post`);
nwbtn.setAttribute("tabindex", "0");
nwbtn.classList.add("tooltip");
nwbtn.setAttribute("data-tooltip", `${lang().action.delete}`);
nwbtn.innerHTML = `
<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"></path><path fill="currentColor" d="M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z"></path></svg>
`;
Expand All @@ -432,6 +439,8 @@ function createButtonContainer(p) {
nwbtn.setAttribute("title", `mod delete`);
nwbtn.setAttribute("aria-label", `mod delete`);
nwbtn.setAttribute("tabindex", "0");
nwbtn.classList.add("tooltip");
nwbtn.setAttribute("data-tooltip", `${lang().action.moddel}`);
nwbtn.innerHTML = `
<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"></path><path fill="currentColor" d="M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z"></path></svg>
`;
Expand All @@ -445,6 +454,8 @@ function createButtonContainer(p) {
nwbtn.setAttribute("title", `moderate`);
nwbtn.setAttribute("aria-label", `moderate post`);
nwbtn.setAttribute("tabindex", "0");
nwbtn.classList.add("tooltip");
nwbtn.setAttribute("data-tooltip", `${lang().action.modpost}`);
nwbtn.innerHTML = `
<svg width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M19 6.00001C15.56 6.00001 12.826 2.43501 12.799 2.39801C12.421 1.89801 11.579 1.89801 11.201 2.39801C11.174 2.43501 8.44 6.00001 5 6.00001C4.447 6.00001 4 6.44801 4 7.00001V14C4 17.807 10.764 21.478 11.534 21.884C11.68 21.961 11.84 21.998 12 21.998C12.16 21.998 12.32 21.96 12.466 21.884C13.236 21.478 20 17.807 20 14V7.00001C20 6.44801 19.553 6.00001 19 6.00001ZM15 16L12 14L9 16L10 13L8 11H11L12 8.00001L13 11H16L14 13L15 16Z"></path></svg>
`;
Expand Down
8 changes: 5 additions & 3 deletions profile/script.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
let meourl = 'https://eris.pages.dev/meo'

function fetchprofile() {
const urlParams = new URLSearchParams(window.location.search);
const username = urlParams.get('u');
Expand Down Expand Up @@ -56,7 +58,7 @@ This message was created by meo.
if (data._id === localStorage.getItem('username')) {
profilecont.innerHTML += `
<div class="usr-header">
<h2 class="username" onclick="copy('https://eris.pages.dev/meo/profile?u=${data._id}')">${data._id}</h2>
<h2 class="username" onclick="copy('${meourl}/profile?u=${data._id}')">${data._id}</h2>
</div>
<hr>
`
Expand All @@ -76,7 +78,7 @@ This message was created by meo.
if (localStorage.getItem('permissions') === "1") {
profilecont.innerHTML += `
<div class="usr-header">
<h2 class="username" onclick="copy('https://eris.pages.dev/meo/profile?u=${data._id}')">${data._id}</h2>
<h2 class="username" onclick="copy('${meourl}/profile?u=${data._id}')">${data._id}</h2>
<button class="button dm-btn" onclick="openmdusr('${data._id}');" aria-label="moderate user" title="Moderate">
<svg width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M19 6.00001C15.56 6.00001 12.826 2.43501 12.799 2.39801C12.421 1.89801 11.579 1.89801 11.201 2.39801C11.174 2.43501 8.44 6.00001 5 6.00001C4.447 6.00001 4 6.44801 4 7.00001V14C4 17.807 10.764 21.478 11.534 21.884C11.68 21.961 11.84 21.998 12 21.998C12.16 21.998 12.32 21.96 12.466 21.884C13.236 21.478 20 17.807 20 14V7.00001C20 6.44801 19.553 6.00001 19 6.00001ZM15 16L12 14L9 16L10 13L8 11H11L12 8.00001L13 11H16L14 13L15 16Z"></path></svg>
</button>
Expand All @@ -89,7 +91,7 @@ This message was created by meo.
} else {
profilecont.innerHTML += `
<div class="usr-header">
<h2 class="username" onclick="copy('https://eris.pages.dev/meo/profile?u=${data._id}')">${data._id}</h2>
<h2 class="username" onclick="copy('${meourl}/profile?u=${data._id}')">${data._id}</h2>
<button class="button dm-btn" onclick="parent.opendm('${data._id}');" aria-label="dm user" title="DM">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M12 22a10 10 0 1 0-8.45-4.64c.13.19.11.44-.04.61l-2.06 2.37A1 1 0 0 0 2.2 22H12Z" class=""></path></svg>
</button>
Expand Down
Loading

0 comments on commit 6998d40

Please sign in to comment.