mirror of
https://github.com/smolgrrr/TAO.git
synced 2024-09-20 01:11:25 +00:00
rm media
This commit is contained in:
parent
c664a20681
commit
7346368a2b
@ -180,38 +180,6 @@ const NewNoteCard = ({
|
|||||||
)}
|
)}
|
||||||
<PlusCircleIcon className="h-4 w-4 text-neutral-400 cursor-pointer" onClick={pickEmoji} />
|
<PlusCircleIcon className="h-4 w-4 text-neutral-400 cursor-pointer" onClick={pickEmoji} />
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center">
|
|
||||||
<ServerIcon
|
|
||||||
className="h-4 w-4 text-neutral-400 cursor-pointer"
|
|
||||||
onClick={() => document.getElementById("file_input")?.click()}
|
|
||||||
/>
|
|
||||||
<input
|
|
||||||
type="file"
|
|
||||||
name="file_input"
|
|
||||||
id="file_input"
|
|
||||||
style={{ display: "none" }}
|
|
||||||
onChange={async (e) => {
|
|
||||||
const file_input = e.target.files?.[0];
|
|
||||||
if (file_input) {
|
|
||||||
// Check if file size is greater than 2.5MB
|
|
||||||
if (file_input.size > 2.5 * 1024 * 1024) {
|
|
||||||
setFileSizeError(true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
setUploadingFile(true);
|
|
||||||
const attachedFile = await attachFile(file_input);
|
|
||||||
setFile(attachedFile);
|
|
||||||
setUploadingFile(false);
|
|
||||||
setFileSizeError(false);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
{uploadingFile ? (
|
|
||||||
<div className="flex animate-spin text-sm text-gray-300">
|
|
||||||
<ArrowPathIcon className="h-4 w-4 ml-auto" />
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
</div>
|
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
className={`bg-black border h-9 inline-flex items-center justify-center px-4 rounded-lg text-white font-medium text-sm ${doingWorkProp || uploadingFile ? 'cursor-not-allowed' : ''}`}
|
className={`bg-black border h-9 inline-flex items-center justify-center px-4 rounded-lg text-white font-medium text-sm ${doingWorkProp || uploadingFile ? 'cursor-not-allowed' : ''}`}
|
||||||
|
@ -11,8 +11,6 @@ type Subscribe = {
|
|||||||
unsub?: boolean;
|
unsub?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const blacklistUrl = ["lain.la", "casualcrypto.date", "files.catbox.moe", "i.ibb.co", "matrix", "dump.li", "files.v0l.io"];
|
|
||||||
|
|
||||||
const subList: Array<Subscription> = [];
|
const subList: Array<Subscription> = [];
|
||||||
const currentSubList: Array<Subscribe> = [];
|
const currentSubList: Array<Subscribe> = [];
|
||||||
const relayMap = new Map<string, Relay>();
|
const relayMap = new Map<string, Relay>();
|
||||||
@ -42,9 +40,7 @@ const subscribe = (
|
|||||||
) => {
|
) => {
|
||||||
const sub = relay.subscribe([filter], {
|
const sub = relay.subscribe([filter], {
|
||||||
onevent(event) {
|
onevent(event) {
|
||||||
if (!blacklistUrl.some(blacklistedUrl => event.content.includes(blacklistedUrl))) {
|
cb(event, relay.url);
|
||||||
cb(event, relay.url);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
subList.push(sub);
|
subList.push(sub);
|
||||||
|
Loading…
Reference in New Issue
Block a user