├── FUNDING.yml ├── scripts ├── vite-env.d.ts ├── create-view.ts ├── create-component.ts └── generatePermFlags.ts ├── src ├── lib │ ├── zoom │ │ ├── index.js │ │ ├── other.js │ │ ├── Zoom.module.scss │ │ └── index.d.ts │ └── filePicker.ts ├── icons │ ├── AutocompleteRowIcon.svg │ ├── default.svg │ ├── ChatIcon.svg │ ├── PlusLargeIcon.svg │ ├── PlusMediumIcon.svg │ ├── PlusSmallIcon.svg │ ├── MinusIcon.svg │ ├── FolderIcon.svg │ ├── TvIcon.svg │ ├── PlayIcon.svg │ ├── CheckmarkLargeIcon.svg │ ├── ChevronSmallDownIcon.svg │ ├── ChevronSmallLeftIcon.svg │ ├── ChevronSmallRightIcon.svg │ ├── ChevronSmallUpIcon.svg │ ├── ArrowSmallLeftIcon.svg │ ├── ArrowSmallUpIcon.svg │ ├── ArrowSmallRightIcon.svg │ ├── LocationIcon.svg │ ├── PauseIcon.svg │ ├── PollsIcon.svg │ ├── ArrowAngleLeftUpIcon.svg │ ├── CheckmarkSmallIcon.svg │ ├── ClockIcon.svg │ ├── MoreHorizontalIcon.svg │ ├── MoreVerticalIcon.svg │ ├── UploadIcon.svg │ ├── RetryIcon.svg │ ├── CloseLargeIcon.svg │ ├── HubIcon.svg │ ├── MagnifyingGlassIcon.svg │ ├── SlashIcon.svg │ ├── DownloadIcon.svg │ ├── VideoIcon.svg │ ├── SendMessageIcon.svg │ ├── ConnectionBadIcon.svg │ ├── BoostTier2SimpleIcon.svg │ ├── DenyIcon.svg │ ├── HeartIcon.svg │ ├── ScreenIcon.svg │ ├── MinimizeIcon.svg │ ├── TagIcon.svg │ ├── HomeIcon.svg │ ├── MaximizeIcon.svg │ ├── PollAnswerSelectedIcon.svg │ ├── LockIcon.svg │ ├── PollAnswerVotedIcon.svg │ ├── GridVerticalIcon.svg │ ├── PollAnswerVictorIcon.svg │ ├── StarIcon.svg │ ├── WaveformIcon.svg │ ├── GridHorizontalIcon.svg │ ├── HeadphonesIcon.svg │ ├── ListBulletsIcon.svg │ ├── MusicIcon.svg │ ├── WrenchIcon.svg │ ├── FolderPlusIcon.svg │ ├── ItalicIcon.svg │ ├── MobilePhoneIcon.svg │ ├── SlashBoxIcon.svg │ ├── FlagIcon.svg │ ├── MicrophoneIcon.svg │ ├── LockUnlockedIcon.svg │ ├── PhoneHangUpIcon.svg │ ├── SignPostIcon.svg │ ├── CircleCheckIcon.svg │ ├── CirclePlayIcon.svg │ ├── CirclePlusIcon.svg │ ├── AngleBracketsIcon.svg │ ├── BookCheckIcon.svg │ ├── InboxIcon.svg │ ├── AnalyticsIcon.svg │ ├── RefreshIcon.svg │ ├── PencilIcon.svg │ ├── ReactionIcon.svg │ ├── VoiceLowIcon.svg │ ├── ConnectionAverageIcon.svg │ ├── FileIcon.svg │ ├── GridSquareIcon.svg │ ├── PaintbrushThinIcon.svg │ ├── WarningIcon.svg │ ├── DoubleCheckmarkLargeIcon.svg │ ├── FullscreenEnterIcon.svg │ ├── FullscreenExitIcon.svg │ ├── TimerIcon.svg │ ├── VoiceXIcon.svg │ ├── CompassIcon.svg │ ├── CrownIcon.svg │ ├── HammerIcon.svg │ ├── VideoSlashIcon.svg │ ├── EnvelopeIcon.svg │ ├── ShieldIcon.svg │ ├── WindowLaunchIcon.svg │ ├── PinUprightIcon.svg │ ├── CircleExclamationPointIcon.svg │ ├── CircleXIcon.svg │ ├── TextIcon.svg │ ├── UserIcon.svg │ ├── CameraIcon.svg │ ├── AttachmentIcon.svg │ ├── ChatPlusIcon.svg │ ├── StarOutlineIcon.svg │ ├── FiltersHorizontalIcon.svg │ ├── BoostTier1SimpleIcon.svg │ ├── ScreenSlashIcon.svg │ ├── CircleInformationIcon.svg │ ├── FriendsIcon.svg │ ├── PinIcon.svg │ ├── TwitterIcon.svg │ ├── ChatCheckIcon.svg │ ├── NitroWheelIcon.svg │ ├── AsteriskIcon.svg │ ├── CopyIcon.svg │ ├── BoldIcon.svg │ ├── BellIcon.svg │ ├── ChatArrowRightIcon.svg │ ├── LinkIcon.svg │ ├── ShieldUserIcon.svg │ ├── GlobeEarthIcon.svg │ ├── HandRequestSpeakIcon.svg │ ├── UserMinusIcon.svg │ ├── MusicSlashIcon.svg │ ├── ObjectIcon.svg │ ├── IdIcon.svg │ ├── ForumIcon.svg │ ├── PhoneCallIcon.svg │ ├── MobilePhoneControllerIcon.svg │ ├── ConnectionFineIcon.svg │ ├── NatureIcon.svg │ ├── ScreenArrowIcon.svg │ ├── ThreadIcon.svg │ ├── UserSquareIcon.svg │ ├── VideoLockIcon.svg │ ├── WaveformSlashIcon.svg │ ├── ScreenXIcon.svg │ ├── TrashIcon.svg │ ├── CircleQuestionIcon.svg │ ├── CalendarIcon.svg │ ├── ChatMarkUnreadIcon.svg │ ├── ChannelListMagnifyingGlassIcon.svg │ ├── PinUprightSlashIcon.svg │ ├── StickerSmallIcon.svg │ ├── DpadIcon.svg │ ├── BicycleIcon.svg │ ├── ChatSpeakIcon.svg │ ├── MicrophoneSlashIcon.svg │ ├── VoiceNormalIcon.svg │ ├── ChatXIcon.svg │ ├── FileUpIcon.svg │ ├── UserPlayIcon.svg │ ├── ServerGridIcon.svg │ ├── SparklesIcon.svg │ ├── InventoryIcon.svg │ ├── StickerIcon.svg │ ├── UserPlusIcon.svg │ ├── AnnouncementsIcon.svg │ ├── ImageIcon.svg │ ├── QuoteIcon.svg │ ├── StickerSadIcon.svg │ ├── TicketIcon.svg │ ├── TrophyIcon.svg │ ├── UserCircleStatusIcon.svg │ ├── ActivitiesIcon.svg │ ├── MicrophoneArrowRightIcon.svg │ ├── GroupIcon.svg │ ├── HeadphonesSlashIcon.svg │ ├── UnknownGameIcon.svg │ ├── EyeIcon.svg │ ├── ChatAlertIcon.svg │ ├── EducationIcon.svg │ ├── ClydeIcon.svg │ ├── BellSlashIcon.svg │ ├── TextLockIcon.svg │ ├── TopicsIcon.svg │ ├── GiftIcon.svg │ ├── StageIcon.svg │ ├── FoodIcon.svg │ ├── BoostTier3SimpleIcon.svg │ ├── GifIcon.svg │ ├── scripts │ │ └── inject.js │ ├── ClipsIcon.svg │ ├── ClockWarningIcon.svg │ ├── DoorExitIcon.svg │ ├── MicrophoneDenyIcon.svg │ ├── ActivitiesPlusIcon.svg │ ├── ForumLockIcon.svg │ ├── VoiceLockIcon.svg │ ├── HandRequestSpeakListIcon.svg │ ├── ShopIcon.svg │ ├── HeadphonesDenyIcon.svg │ ├── ImagesIcon.svg │ ├── GameControllerIcon.svg │ ├── EyePlusIcon.svg │ ├── GroupArrowDownIcon.svg │ ├── TextWarningIcon.svg │ ├── ImageLockIcon.svg │ ├── StrikethroughIcon.svg │ ├── CalendarPlusIcon.svg │ ├── AnnouncementsLockIcon.svg │ ├── BellZIcon.svg │ ├── ImagePlusIcon.svg │ ├── ForumWarningIcon.svg │ ├── QrCodeCameraIcon.svg │ ├── HourglassIcon.svg │ ├── VoiceWarningIcon.svg │ ├── ConnectionUnknownIcon.svg │ ├── StaffBadgeIcon.svg │ ├── SoundboardIcon.svg │ ├── StageLockIcon.svg │ ├── NewUserIcon.svg │ ├── ImageWarningIcon.svg │ ├── ImageSparkleIcon.svg │ ├── AnnouncementsWarningIcon.svg │ ├── SearchBarIcon.svg │ ├── ModerationIcon.svg │ ├── SettingsCircleIcon.svg │ ├── EyeSlashIcon.svg │ ├── BugIcon.svg │ ├── SettingsIcon.svg │ ├── RobotIcon.svg │ ├── SettingsInfoIcon.svg │ ├── SuperReactionIcon.svg │ ├── ScienceIcon.svg │ ├── StretchedSparkleStar.svg │ └── AtIcon.svg ├── views │ ├── modals │ │ ├── Toolshed.module.scss │ │ ├── signals.ts │ │ ├── toast.ts │ │ ├── Fullscreen.module.scss │ │ ├── Modals.tsx │ │ ├── Slide.module.scss │ │ ├── Popup.module.scss │ │ ├── Toast.module.scss │ │ ├── ToastModal.tsx │ │ ├── fullscreen.tsx │ │ └── toolshed.tsx │ ├── IntegrityCheckFailed.module.scss │ ├── components │ │ ├── DateSeparator.tsx │ │ ├── MarqueeOrNot.tsx │ │ ├── Button.module.scss │ │ ├── ReplyBadge.module.scss │ │ ├── ImageViewer.module.scss │ │ ├── Marquee.module.scss │ │ ├── Button.tsx │ │ ├── VoiceRecorderWeb.module.scss │ │ ├── OptionsMenu.module.scss │ │ ├── ActionMesage.module.scss │ │ ├── PinnedMessage.tsx │ │ ├── DateSeparator.module.scss │ │ ├── Tooltip.module.scss │ │ ├── ActionMessage.tsx │ │ ├── IconChangeDMMessage.tsx │ │ ├── NameChangeDMMessage.tsx │ │ ├── Tooltip.tsx │ │ ├── JoinDMMessage.tsx │ │ ├── ReplyBadge.tsx │ │ └── LeaveDMMessage.tsx │ └── Loading.module.scss ├── assets │ ├── icon112.png │ ├── avatars │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ └── index.ts │ ├── rickroll.wav │ ├── status │ │ ├── dnd.png │ │ ├── idle.png │ │ ├── offline.png │ │ ├── online.png │ │ ├── web_dnd.png │ │ ├── mobile_dnd.png │ │ ├── web_idle.png │ │ ├── web_online.png │ │ ├── desktop_dnd.png │ │ ├── desktop_idle.png │ │ ├── mobile_idle.png │ │ ├── desktop_online.png │ │ └── mobile_online.png │ ├── Twemoji Mozilla.ttf │ ├── login_background.png │ ├── group_dm_avatars │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ └── index.ts │ ├── SwitchedOn.svg │ ├── SwitchedOff.svg │ ├── manifest.webapp │ └── manifest.webmanifest ├── workers │ ├── rlottie │ │ ├── wasm │ │ │ ├── index.ts │ │ │ └── rlottie-wasm.wasm │ │ ├── asmjs │ │ │ ├── rlottie-wasm.asm.dev.ts │ │ │ └── rlottie-wasm.js.mem │ │ └── index.ts │ ├── libwebp │ │ ├── libwebp.asm.dev.ts │ │ └── libwebp.js.mem │ └── index.ts ├── vite-env.d.ts └── MainView.tsx ├── public ├── cat.png ├── icon56.png ├── icon112.png ├── backgrounds │ ├── image1.png │ ├── image2.png │ ├── image3.png │ ├── image4.png │ ├── image5.png │ └── image6.png └── vite.svg ├── .vscode ├── extensions.json └── settings.json ├── .gitmodules ├── tsconfig.json ├── README.md ├── tsconfig.node.json ├── .gitignore ├── index.html └── tsconfig.app.json /FUNDING.yml: -------------------------------------------------------------------------------- 1 | ko_fi: cyan2048 2 | -------------------------------------------------------------------------------- /scripts/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /src/lib/zoom/index.js: -------------------------------------------------------------------------------- 1 | export { default as default } from "./zoom"; 2 | -------------------------------------------------------------------------------- /src/icons/AutocompleteRowIcon.svg: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /public/cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/public/cat.png -------------------------------------------------------------------------------- /public/icon56.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/public/icon56.png -------------------------------------------------------------------------------- /public/icon112.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/public/icon112.png -------------------------------------------------------------------------------- /src/views/modals/Toolshed.module.scss: -------------------------------------------------------------------------------- 1 | .Toolshed { 2 | position: fixed; 3 | bottom: 0; 4 | } 5 | -------------------------------------------------------------------------------- /src/assets/icon112.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/icon112.png -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "esbenp.prettier-vscode" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/assets/avatars/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/avatars/0.png -------------------------------------------------------------------------------- /src/assets/avatars/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/avatars/1.png -------------------------------------------------------------------------------- /src/assets/avatars/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/avatars/2.png -------------------------------------------------------------------------------- /src/assets/avatars/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/avatars/3.png -------------------------------------------------------------------------------- /src/assets/avatars/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/avatars/4.png -------------------------------------------------------------------------------- /src/assets/avatars/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/avatars/5.png -------------------------------------------------------------------------------- /src/assets/rickroll.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/rickroll.wav -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "discord"] 2 | path = discord 3 | url = https://github.com/Discord4KaiOS/backend.git 4 | -------------------------------------------------------------------------------- /src/assets/status/dnd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/status/dnd.png -------------------------------------------------------------------------------- /src/assets/status/idle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/status/idle.png -------------------------------------------------------------------------------- /src/workers/rlottie/wasm/index.ts: -------------------------------------------------------------------------------- 1 | const factory = require("./rlottie-wasm.js"); 2 | 3 | export { factory }; 4 | -------------------------------------------------------------------------------- /public/backgrounds/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/public/backgrounds/image1.png -------------------------------------------------------------------------------- /public/backgrounds/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/public/backgrounds/image2.png -------------------------------------------------------------------------------- /public/backgrounds/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/public/backgrounds/image3.png -------------------------------------------------------------------------------- /public/backgrounds/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/public/backgrounds/image4.png -------------------------------------------------------------------------------- /public/backgrounds/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/public/backgrounds/image5.png -------------------------------------------------------------------------------- /public/backgrounds/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/public/backgrounds/image6.png -------------------------------------------------------------------------------- /src/assets/status/offline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/status/offline.png -------------------------------------------------------------------------------- /src/assets/status/online.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/status/online.png -------------------------------------------------------------------------------- /src/assets/status/web_dnd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/status/web_dnd.png -------------------------------------------------------------------------------- /src/workers/libwebp/libwebp.asm.dev.ts: -------------------------------------------------------------------------------- 1 | const factory = require("./libwebp.asm.js"); 2 | 3 | export { factory }; 4 | -------------------------------------------------------------------------------- /src/assets/Twemoji Mozilla.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/Twemoji Mozilla.ttf -------------------------------------------------------------------------------- /src/assets/login_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/login_background.png -------------------------------------------------------------------------------- /src/assets/status/mobile_dnd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/status/mobile_dnd.png -------------------------------------------------------------------------------- /src/assets/status/web_idle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/status/web_idle.png -------------------------------------------------------------------------------- /src/assets/status/web_online.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/status/web_online.png -------------------------------------------------------------------------------- /src/assets/group_dm_avatars/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/group_dm_avatars/0.png -------------------------------------------------------------------------------- /src/assets/group_dm_avatars/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/group_dm_avatars/1.png -------------------------------------------------------------------------------- /src/assets/group_dm_avatars/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/group_dm_avatars/2.png -------------------------------------------------------------------------------- /src/assets/group_dm_avatars/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/group_dm_avatars/3.png -------------------------------------------------------------------------------- /src/assets/group_dm_avatars/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/group_dm_avatars/4.png -------------------------------------------------------------------------------- /src/assets/group_dm_avatars/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/group_dm_avatars/5.png -------------------------------------------------------------------------------- /src/assets/group_dm_avatars/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/group_dm_avatars/6.png -------------------------------------------------------------------------------- /src/assets/group_dm_avatars/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/group_dm_avatars/7.png -------------------------------------------------------------------------------- /src/assets/status/desktop_dnd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/status/desktop_dnd.png -------------------------------------------------------------------------------- /src/assets/status/desktop_idle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/status/desktop_idle.png -------------------------------------------------------------------------------- /src/assets/status/mobile_idle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/status/mobile_idle.png -------------------------------------------------------------------------------- /src/workers/libwebp/libwebp.js.mem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/workers/libwebp/libwebp.js.mem -------------------------------------------------------------------------------- /src/assets/status/desktop_online.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/status/desktop_online.png -------------------------------------------------------------------------------- /src/assets/status/mobile_online.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/assets/status/mobile_online.png -------------------------------------------------------------------------------- /src/workers/rlottie/asmjs/rlottie-wasm.asm.dev.ts: -------------------------------------------------------------------------------- 1 | const factory = require("./rlottie-wasm.asm.js"); 2 | 3 | export { factory }; 4 | -------------------------------------------------------------------------------- /src/workers/rlottie/wasm/rlottie-wasm.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/workers/rlottie/wasm/rlottie-wasm.wasm -------------------------------------------------------------------------------- /src/workers/rlottie/asmjs/rlottie-wasm.js.mem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyan-2048/Discord4KaiOS/HEAD/src/workers/rlottie/asmjs/rlottie-wasm.js.mem -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { "path": "./tsconfig.app.json" }, 5 | { "path": "./tsconfig.node.json" } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | declare module "solid-js/types/server/reactive.js" { 5 | export {}; 6 | } 7 | -------------------------------------------------------------------------------- /src/icons/default.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ChatIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/PlusLargeIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/PlusMediumIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/PlusSmallIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/MinusIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/FolderIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/TvIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/PlayIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/IntegrityCheckFailed.module.scss: -------------------------------------------------------------------------------- 1 | .trolleee { 2 | height: 100vh; 3 | width: 100vw; 4 | 5 | padding: 4px; 6 | 7 | background-color: #ff0000; 8 | color: #fff; 9 | * { 10 | margin-bottom: 3px; 11 | } 12 | } 13 | 14 | .warning { 15 | font-size: 56px; 16 | text-align: center; 17 | } -------------------------------------------------------------------------------- /src/icons/CheckmarkLargeIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ChevronSmallDownIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ChevronSmallLeftIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ChevronSmallRightIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ChevronSmallUpIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ArrowSmallLeftIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ArrowSmallUpIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ArrowSmallRightIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/LocationIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/modals/signals.ts: -------------------------------------------------------------------------------- 1 | import Deferred from "discord/src/lib/Deffered"; 2 | import { createSignal } from "solid-js"; 3 | 4 | interface ToastOptions { 5 | text: string; 6 | duration: number; 7 | promise: Deferred; 8 | } 9 | 10 | export const [toastQueue, setToastQueue] = createSignal([]); 11 | -------------------------------------------------------------------------------- /src/icons/PauseIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/PollsIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/DateSeparator.tsx: -------------------------------------------------------------------------------- 1 | import * as styles from "./DateSeparator.module.scss"; 2 | import { JSXElement } from "solid-js"; 3 | 4 | export default function DateSeparator(props: { children: JSXElement }) { 5 | return ( 6 |
7 | {props.children} 8 |
9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /src/icons/ArrowAngleLeftUpIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/CheckmarkSmallIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ClockIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/MoreHorizontalIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/MoreVerticalIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/UploadIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/avatars/index.ts: -------------------------------------------------------------------------------- 1 | import _0 from "./0.png?url"; 2 | import _1 from "./1.png?url"; 3 | import _2 from "./2.png?url"; 4 | import _3 from "./3.png?url"; 5 | import _4 from "./4.png?url"; 6 | import _5 from "./5.png?url"; 7 | 8 | const DEFAULT_AVATARS = Object.freeze([_0, _1, _2, _3, _4, _5]); 9 | 10 | export default DEFAULT_AVATARS; 11 | -------------------------------------------------------------------------------- /src/icons/RetryIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/CloseLargeIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/HubIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/MagnifyingGlassIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/SlashIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/modals/toast.ts: -------------------------------------------------------------------------------- 1 | import Deferred from "discord/src/lib/Deffered"; 2 | import { setToastQueue } from "./signals"; 3 | 4 | export function toast(message: string, duration: number = 3000) { 5 | const deferred = new Deferred(); 6 | setToastQueue((e) => [...e, { text: message, duration, promise: deferred }]); 7 | return deferred.promise; 8 | } 9 | -------------------------------------------------------------------------------- /src/icons/DownloadIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/VideoIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/SendMessageIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/MarqueeOrNot.tsx: -------------------------------------------------------------------------------- 1 | import Marquee from "./Marquee"; 2 | import { JSX, Show } from "solid-js"; 3 | 4 | export default function MarqueeOrNot(props: { children: JSX.Element; marquee: boolean }) { 5 | return ( 6 | 7 | {props.children} 8 | 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /src/icons/ConnectionBadIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/BoostTier2SimpleIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/DenyIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/HeartIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "prettier.useTabs": true, 3 | "prettier.printWidth": 200, 4 | "editor.defaultFormatter": "esbenp.prettier-vscode", 5 | "editor.formatOnPaste": true, 6 | "editor.formatOnSave": true, 7 | "editor.formatOnSaveMode": "modificationsIfAvailable", 8 | "editor.tabSize": 2, 9 | "files.exclude": { 10 | "**/*.module.scss.d.ts": true 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/icons/ScreenIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/MinimizeIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/TagIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/HomeIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/MaximizeIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/PollAnswerSelectedIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/LockIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/PollAnswerVotedIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/Button.module.scss: -------------------------------------------------------------------------------- 1 | .button { 2 | padding: 5px 7px; 3 | display: flex; 4 | align-items: center; 5 | justify-content: center; 6 | background-color: #5865f2; 7 | color: white; 8 | 9 | border-radius: 3px; 10 | font-size: 12px; 11 | font-weight: 600; 12 | 13 | &.focused { 14 | background-color: #4752c4; 15 | } 16 | 17 | &.disabled { 18 | opacity: 0.5; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/icons/GridVerticalIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/PollAnswerVictorIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/StarIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/WaveformIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/lib/filePicker.ts: -------------------------------------------------------------------------------- 1 | import { Deferred } from "./utils"; 2 | 3 | export default function filePicker() { 4 | const deferred = new Deferred(); 5 | 6 | let input = document.createElement("input"); 7 | input.type = "file"; 8 | input.onchange = () => { 9 | deferred.resolve(input.files![0]); 10 | input.onchange = null; 11 | }; 12 | input.click(); 13 | 14 | return deferred.promise; 15 | } 16 | -------------------------------------------------------------------------------- /src/views/components/ReplyBadge.module.scss: -------------------------------------------------------------------------------- 1 | .badge { 2 | display: flex; 3 | align-items: center; 4 | justify-content: center; 5 | 6 | flex: 0 0 auto; 7 | width: 16px; 8 | height: 16px; 9 | border-radius: 50%; 10 | 11 | color: rgb(181, 186, 193); 12 | background: rgb(30, 31, 34); 13 | 14 | :global(.light) & { 15 | background: rgb(227, 229, 232); 16 | color: rgb(78, 80, 88); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/icons/GridHorizontalIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/group_dm_avatars/index.ts: -------------------------------------------------------------------------------- 1 | import _0 from "./0.png"; 2 | import _1 from "./1.png"; 3 | import _2 from "./2.png"; 4 | import _3 from "./3.png"; 5 | import _4 from "./4.png"; 6 | import _5 from "./5.png"; 7 | import _6 from "./6.png"; 8 | import _7 from "./7.png"; 9 | 10 | const DEFAULT_GROUP_DM_AVATARS = Object.freeze([_0, _1, _2, _3, _4, _5, _6, _7]); 11 | 12 | export default DEFAULT_GROUP_DM_AVATARS; 13 | -------------------------------------------------------------------------------- /src/icons/HeadphonesIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/ImageViewer.module.scss: -------------------------------------------------------------------------------- 1 | .viewer { 2 | position: relative; 3 | top: 0; 4 | left: 0; 5 | width: 100vw; 6 | height: 100vh; 7 | display: grid; 8 | overflow: hidden; 9 | justify-content: center; 10 | align-items: center; 11 | 12 | &.pixelated img { 13 | image-rendering: optimizeSpeed; 14 | image-rendering: pixelated; 15 | } 16 | 17 | img { 18 | position: absolute; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/views/modals/Fullscreen.module.scss: -------------------------------------------------------------------------------- 1 | .fullscreen { 2 | position: fixed; 3 | top: 0; 4 | left: 0; 5 | width: 100vw; 6 | height: 100vh; 7 | background-color: rgba(0, 0, 0, 0.5); 8 | transform: scale(3); 9 | :global(.animate) & { 10 | transition: transform 0.3s, filter 0.3s; 11 | } 12 | filter: opacity(0); 13 | z-index: 99; 14 | } 15 | 16 | .open { 17 | transform: unset; 18 | filter: unset; 19 | } 20 | -------------------------------------------------------------------------------- /src/views/modals/Modals.tsx: -------------------------------------------------------------------------------- 1 | import Toast from "./ToastModal.tsx"; 2 | import FullscreenModal from "./fullscreen"; 3 | import Popup from "./popup"; 4 | import Slide from "./slide"; 5 | import Toolshed from "./toolshed"; 6 | 7 | export default function Modals() { 8 | return ( 9 | <> 10 | 11 | 12 | 13 | 14 | 15 | 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /src/icons/ListBulletsIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/MusicIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/WrenchIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/FolderPlusIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ItalicIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/MobilePhoneIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/SlashBoxIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/FlagIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/MicrophoneIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/LockUnlockedIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/PhoneHangUpIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/SignPostIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/CircleCheckIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/CirclePlayIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/CirclePlusIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/AngleBracketsIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/BookCheckIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/lib/zoom/other.js: -------------------------------------------------------------------------------- 1 | function calculateAspectRatioFit(srcWidth, srcHeight, maxWidth, maxHeight) { 2 | var ratio = Math.min(maxWidth / srcWidth, maxHeight / srcHeight); 3 | 4 | return { width: srcWidth * ratio, height: srcHeight * ratio, ratio }; 5 | } 6 | 7 | function getDistance(touchA, touchB) { 8 | return Math.hypot(touchA.pageX - touchB.pageX, touchA.pageY - touchB.pageY); 9 | } 10 | 11 | export { calculateAspectRatioFit, getDistance }; 12 | -------------------------------------------------------------------------------- /src/icons/InboxIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Kori 2 | 3 | Sveltecord is now on a different branch :) 4 | 5 | [![Discord server](https://invidget.switchblade.xyz/W9DF2q3Vv2)](https://discord.gg/W9DF2q3Vv2) 6 | 7 | 8 | ### Build Instructions 9 | 10 | Dependencies: 11 | - Bun **(Ensure your installation is up to date!)** 12 | - Git 13 | 14 | ``` 15 | git clone --recursive https://github.com/cyan-2048/Discord4KaiOS.git 16 | 17 | cd Discord4KaiOS 18 | 19 | bun i 20 | 21 | bun run build 22 | ``` -------------------------------------------------------------------------------- /src/icons/AnalyticsIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/RefreshIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/PencilIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ReactionIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/VoiceLowIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ConnectionAverageIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/FileIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/GridSquareIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/PaintbrushThinIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/WarningIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 5 | "composite": true, 6 | "skipLibCheck": true, 7 | "module": "ESNext", 8 | "types": ["bun-types"], 9 | "moduleResolution": "bundler", 10 | "allowSyntheticDefaultImports": true, 11 | "allowJs": true, 12 | "outDir": "./dist", 13 | "strict": true 14 | }, 15 | "include": ["vite.config.ts", "scripts/*"] 16 | } 17 | -------------------------------------------------------------------------------- /src/icons/DoubleCheckmarkLargeIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/FullscreenEnterIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/FullscreenExitIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/TimerIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/VoiceXIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/CompassIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/CrownIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/HammerIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/VideoSlashIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/EnvelopeIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ShieldIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/WindowLaunchIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/Marquee.module.scss: -------------------------------------------------------------------------------- 1 | .wrap { 2 | position: relative; 3 | width: 100%; 4 | height: 100%; 5 | overflow: hidden; 6 | font-size: inherit; 7 | 8 | &::before { 9 | content: "i"; 10 | color: rgba(0, 0, 0, 0); 11 | text-shadow: none; 12 | } 13 | 14 | .inner { 15 | position: absolute; 16 | width: 100%; 17 | height: 100%; 18 | top: 0; 19 | left: 0; 20 | white-space: nowrap; 21 | 22 | &.marquee { 23 | transition: transform var(--time) linear; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/icons/PinUprightIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/create-view.ts: -------------------------------------------------------------------------------- 1 | import fs from "fs"; 2 | import path from "path"; 3 | 4 | const viewsFolder = path.resolve(__dirname, "../src/views"); 5 | 6 | const name = process.argv[2]; 7 | 8 | if (!name) { 9 | throw new Error("name was not given"); 10 | } 11 | 12 | const tsx = `import styles from "./${name}.module.scss"; 13 | 14 | export default function ${name}() {} 15 | `; 16 | 17 | Bun.write(path.resolve(viewsFolder, name + ".tsx"), tsx); 18 | Bun.write(path.resolve(viewsFolder, name + ".module.scss"), ""); 19 | -------------------------------------------------------------------------------- /src/icons/CircleExclamationPointIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/CircleXIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/TextIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/UserIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/CameraIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/lib/zoom/Zoom.module.scss: -------------------------------------------------------------------------------- 1 | .zoom { 2 | width: 100%; 3 | height: 100%; 4 | position: absolute; 5 | transform-origin: 0 0; 6 | backface-visibility: hidden; 7 | -moz-backface-visibility: hidden; 8 | } 9 | 10 | .contain { 11 | object-fit: contain; 12 | } 13 | 14 | .no_contain { 15 | object-fit: contain; 16 | } 17 | 18 | .transition { 19 | :global(.animate) & { 20 | transition: transform 0.2s; 21 | } 22 | } 23 | 24 | .visible { 25 | visibility: visible; 26 | } 27 | 28 | .hidden { 29 | visibility: hidden; 30 | } 31 | -------------------------------------------------------------------------------- /src/lib/zoom/index.d.ts: -------------------------------------------------------------------------------- 1 | import { ComponentProps, JSXElement } from "solid-js"; 2 | 3 | export interface ZoomRef { 4 | fireManualZoom(dir: number): void; 5 | zoomIn(): void; 6 | zoomOut(): void; 7 | moveImage(x: number, y: number): void; 8 | scaleValue: number; 9 | } 10 | 11 | type _Zoom = ( 12 | props: Omit, "ref"> & { 13 | maxScale?: number; 14 | scaleValue?: number; 15 | ref?: (e: ZoomRef) => void; 16 | } 17 | ) => JSXElement; 18 | 19 | const Zoom: _Zoom; 20 | 21 | export default Zoom; 22 | -------------------------------------------------------------------------------- /src/icons/AttachmentIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ChatPlusIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/StarOutlineIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/FiltersHorizontalIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/create-component.ts: -------------------------------------------------------------------------------- 1 | import fs from "fs"; 2 | import path from "path"; 3 | 4 | const componentsFolder = path.resolve(__dirname, "../src/views/components"); 5 | 6 | const name = process.argv[2]; 7 | 8 | if (!name) { 9 | throw new Error("name was not given"); 10 | } 11 | 12 | const tsx = `import styles from "./${name}.module.scss"; 13 | 14 | export default function ${name}() {} 15 | `; 16 | 17 | Bun.write(path.resolve(componentsFolder, name + ".tsx"), tsx); 18 | Bun.write(path.resolve(componentsFolder, name + ".module.scss"), ""); 19 | -------------------------------------------------------------------------------- /scripts/generatePermFlags.ts: -------------------------------------------------------------------------------- 1 | import { PermissionFlagsBits } from "discord-api-types/v10"; 2 | 3 | let e = "export const PermissionFlagsBits = Object.freeze({ "; 4 | 5 | const DV = 1 << 28; 6 | 7 | for (const key in PermissionFlagsBits) { 8 | const n = PermissionFlagsBits[key as keyof typeof PermissionFlagsBits]; 9 | const isOutOfBounds = !(-DV <= n && n < DV); 10 | 11 | e = e + ` ${key}: BigInteger.BigInt(${isOutOfBounds ? '"0x' + n.toString(16) + '"' : n.toString(10)}),\n`; 12 | } 13 | 14 | e = e + `});`; 15 | 16 | console.log(e); 17 | -------------------------------------------------------------------------------- /src/icons/BoostTier1SimpleIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ScreenSlashIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/CircleInformationIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/FriendsIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/PinIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/TwitterIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ChatCheckIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/NitroWheelIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/AsteriskIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/CopyIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/BoldIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/BellIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ChatArrowRightIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/LinkIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ShieldUserIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/GlobeEarthIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/HandRequestSpeakIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/UserMinusIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/MusicSlashIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ObjectIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/IdIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ForumIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/PhoneCallIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/workers/rlottie/index.ts: -------------------------------------------------------------------------------- 1 | import * as Comlink from "comlink"; 2 | // @ts-ignore 3 | import type { Exposed } from "./worker"; 4 | import RlottieWorker from "./worker?worker"; 5 | 6 | const wrapped = Comlink.wrap(new RlottieWorker()); 7 | 8 | let rLottieLoaded: Promise | null = null; 9 | 10 | export function loadRlottie() { 11 | if (rLottieLoaded) return rLottieLoaded; 12 | return (rLottieLoaded = wrapped.loadRlottie()); 13 | } 14 | 15 | export const isCached = wrapped.isCached; 16 | export const loadAnimation = wrapped.loadAnimation; 17 | export const requestFrame = wrapped.requestFrame; 18 | -------------------------------------------------------------------------------- /src/icons/MobilePhoneControllerIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/Button.tsx: -------------------------------------------------------------------------------- 1 | import { ComponentProps, splitProps } from "solid-js"; 2 | import * as styles from "./Button.module.scss"; 3 | 4 | export default function Button( 5 | props: ComponentProps<"div"> & { 6 | focused?: boolean; 7 | disabled?: boolean; 8 | } 9 | ) { 10 | const [, _props] = splitProps(props, ["focused", "disabled", "classList"]); 11 | 12 | return ( 13 |
22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /src/icons/ConnectionFineIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-v3 13 | dist-ssr 14 | *.local 15 | private 16 | builds 17 | 18 | # dotenv environment variable files 19 | .env 20 | .env.development.local 21 | .env.test.local 22 | .env.production.local 23 | .env.local 24 | 25 | # Editor directories and files 26 | .vscode/* 27 | !.vscode/extensions.json 28 | !.vscode/settings.json 29 | .idea 30 | .DS_Store 31 | *.suo 32 | *.ntvs* 33 | *.njsproj 34 | *.sln 35 | *.sw? 36 | 37 | # scss 38 | *.module.scss.d.ts 39 | 40 | -------------------------------------------------------------------------------- /src/icons/NatureIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ScreenArrowIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ThreadIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/UserSquareIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/VideoLockIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/WaveformSlashIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ScreenXIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/TrashIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/CircleQuestionIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/modals/Slide.module.scss: -------------------------------------------------------------------------------- 1 | @keyframes fade { 2 | from { 3 | opacity: 0; 4 | } 5 | to { 6 | opacity: 1; 7 | } 8 | } 9 | 10 | .Slide { 11 | position: fixed; 12 | z-index: 9999; 13 | bottom: 0; 14 | height: 100vh; 15 | width: 100vw; 16 | opacity: 0; 17 | background-color: rgba(0, 0, 0, 0.5); 18 | } 19 | 20 | 21 | .container { 22 | transform: translateY(100vh); 23 | position: fixed; 24 | bottom: 0; 25 | } 26 | 27 | .container, .Slide { 28 | transition: transform 0.3s, opacity 0.3s; 29 | transition-timing-function: ease-in-out; 30 | } 31 | 32 | .open { 33 | transform: unset; 34 | opacity: 1; 35 | } -------------------------------------------------------------------------------- /src/assets/SwitchedOn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Layer 1 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/icons/CalendarIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ChatMarkUnreadIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/VoiceRecorderWeb.module.scss: -------------------------------------------------------------------------------- 1 | .timer { 2 | font-size: 24px; 3 | padding: 12px; 4 | text-align: center; 5 | } 6 | 7 | .bar { 8 | display: flex; 9 | padding: 4px; 10 | background-color: rgba(0, 0, 0, 0.1); 11 | 12 | div { 13 | flex-grow: 1; 14 | flex-basis: 0; 15 | display: flex; 16 | 17 | &:nth-child(2) { 18 | justify-content: center; 19 | font-weight: 700; 20 | } 21 | 22 | &:nth-child(3) { 23 | justify-content: flex-end; 24 | } 25 | } 26 | } 27 | 28 | .recorder { 29 | width: 100vw; 30 | background-color: #313338; 31 | :global(.light) & { 32 | background-color: #ffffff; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/icons/ChannelListMagnifyingGlassIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/PinUprightSlashIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/StickerSmallIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/DpadIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/BicycleIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ChatSpeakIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/MicrophoneSlashIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/VoiceNormalIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/SwitchedOff.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Layer 1 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/icons/ChatXIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/FileUpIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/modals/Popup.module.scss: -------------------------------------------------------------------------------- 1 | @keyframes fade { 2 | from { 3 | opacity: 0; 4 | } 5 | to { 6 | opacity: 1; 7 | } 8 | } 9 | 10 | .Popup { 11 | position: fixed; 12 | z-index: 999; 13 | bottom: 0; 14 | height: 100vh; 15 | width: 100vw; 16 | opacity: 0; 17 | display: flex; 18 | justify-content: center; 19 | align-items: center; 20 | background-color: rgba(0, 0, 0, 0.5); 21 | } 22 | 23 | 24 | .container { 25 | transform: scale(1.1); 26 | } 27 | 28 | .container, .Popup { 29 | transition: transform 0.2s, opacity 0.2s; 30 | transition-timing-function: ease-in-out; 31 | } 32 | 33 | .open { 34 | transform: scale(1); 35 | opacity: 1; 36 | } -------------------------------------------------------------------------------- /src/workers/index.ts: -------------------------------------------------------------------------------- 1 | import CustomWorker from "./worker?worker"; 2 | import type { Exposed, Emoji } from "./worker"; 3 | import * as Comlink from "comlink"; 4 | 5 | export type { Emoji }; 6 | 7 | const wrapped = Comlink.wrap(new CustomWorker()); 8 | 9 | export const findByShortCode = wrapped.findByShortCode; 10 | export const fuzzySearch = wrapped.fuzzySearch; 11 | export const preloadSearch = wrapped.preloadSearch; 12 | export const webp = wrapped.webp; 13 | 14 | export const rlottie = { 15 | loadRlottie: wrapped.loadRlottie, 16 | isCached: wrapped.isCached, 17 | loadAnimation: wrapped.loadAnimation, 18 | requestFrame: wrapped.requestFrame, 19 | } as const; 20 | -------------------------------------------------------------------------------- /src/icons/UserPlayIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ServerGridIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/SparklesIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/InventoryIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/StickerIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/UserPlusIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/AnnouncementsIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/icons/ImageIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/QuoteIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/StickerSadIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/TicketIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/TrophyIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/UserCircleStatusIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ActivitiesIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/MicrophoneArrowRightIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/GroupIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/OptionsMenu.module.scss: -------------------------------------------------------------------------------- 1 | .menu { 2 | width: 100vw; 3 | padding: 6px 8px; 4 | background-color: #111214; 5 | 6 | :global(.light) & { 7 | background-color: #ffffff; 8 | } 9 | 10 | .item { 11 | padding: 6px 8px; 12 | font-size: 14px; 13 | border-radius: 2px; 14 | position: relative; 15 | margin: 2px 0; 16 | 17 | .icon { 18 | position: absolute; 19 | right: 8px; 20 | top: 6px; 21 | width: 18px; 22 | height: 18px; 23 | 24 | svg { 25 | width: 18px; 26 | height: 18px; 27 | } 28 | } 29 | 30 | :global(.light) & { 31 | color: #4e5058; 32 | } 33 | 34 | &:focus { 35 | background-color: #5865f2; 36 | color: white; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/icons/HeadphonesSlashIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/UnknownGameIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/EyeIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/ActionMesage.module.scss: -------------------------------------------------------------------------------- 1 | .main { 2 | display: flex; 3 | font-size: 13px; 4 | padding: 2px 0; 5 | padding-right: 5px; 6 | margin: 2px 0; 7 | 8 | .icon { 9 | width: 32px; 10 | display: flex; 11 | flex-shrink: 0; 12 | 13 | color: #99aab5; 14 | 15 | :global { 16 | svg { 17 | width: 18px; 18 | height: 18px; 19 | margin: auto; 20 | transform: scale(0.8); 21 | } 22 | } 23 | } 24 | } 25 | 26 | .user { 27 | font-weight: 500; 28 | } 29 | 30 | .date { 31 | white-space: nowrap; 32 | color: #878d96; 33 | font-size: 10px; 34 | font-weight: 500; 35 | padding: 3px 2px; 36 | line-height: 0.9; 37 | padding-left: 1px; 38 | :global(.light) & { 39 | color: #313338; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/icons/ChatAlertIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/EducationIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ClydeIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/BellSlashIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/TextLockIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/TopicsIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/PinnedMessage.tsx: -------------------------------------------------------------------------------- 1 | import { DiscordGuild, DiscordMessage } from "discord"; 2 | import ActionMessage from "./ActionMessage"; 3 | import Pin from "../../icons/PinIcon.svg"; 4 | import { timeStamp } from "../Messages"; 5 | import * as styles from "./ActionMesage.module.scss"; 6 | 7 | export default function PinnedMessage(props: { $: DiscordMessage; guild?: DiscordGuild | null }) { 8 | return ( 9 | ""} 13 | after={() => ( 14 | <> 15 | {" pinned a message to this channel. "}{" "} 16 | {timeStamp(props.$.$.timestamp)} 17 | 18 | )} 19 | icon={() => } 20 | /> 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /src/icons/GiftIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/StageIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/FoodIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/BoostTier3SimpleIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/GifIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/scripts/inject.js: -------------------------------------------------------------------------------- 1 | // TODO: fix this? 2 | // there's no longer a reliable way to see the names of these Icons 3 | // I don't think I can create a fix at all >_< 4 | 5 | icons = []; 6 | Object.values(Vencord.Webpack.wreq.c).forEach((a) => { 7 | if (!a.exports) return; 8 | Object.keys(a.exports).forEach((key) => { 9 | if (typeof a.exports[key] != "function") return; 10 | if (key.endsWith("Icon") || a.exports[key].toString().includes("svg")) { 11 | try { 12 | const el = document.createElement("div"); 13 | Vencord.Webpack.Common.ReactDOM.render(a.exports[key]({}), el); 14 | const svg = el.firstElementChild; 15 | svg.querySelector("[fill]").setAttribute("fill", "currentColor"); 16 | icons.push([key, svg.outerHTML]); 17 | } catch {} 18 | } 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /src/icons/ClipsIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ClockWarningIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/DoorExitIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/MicrophoneDenyIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/DateSeparator.module.scss: -------------------------------------------------------------------------------- 1 | 2 | .strike { 3 | display: block; 4 | text-align: center; 5 | overflow: hidden; 6 | white-space: nowrap; 7 | width: calc(100vw - 20px); 8 | font-size: 10px; 9 | margin-left: 10px; 10 | color: #a3a6aa; 11 | margin-bottom: 3px; 12 | margin-top: 2px; 13 | } 14 | 15 | .strike > span { 16 | position: relative; 17 | display: inline-block; 18 | } 19 | 20 | .strike > span:before, 21 | .strike > span:after { 22 | content: ""; 23 | position: absolute; 24 | top: 50%; 25 | width: 9999px; 26 | height: 1px; 27 | background: rgba(79, 84, 92, 0.48); 28 | } 29 | 30 | .strike > span:before { 31 | right: 100%; 32 | margin-right: 15px; 33 | } 34 | 35 | .strike > span:after { 36 | left: 100%; 37 | margin-left: 15px; 38 | } 39 | -------------------------------------------------------------------------------- /src/icons/ActivitiesPlusIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ForumLockIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/VoiceLockIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/HandRequestSpeakListIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ShopIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/HeadphonesDenyIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Solidcord 8 | 9 | 10 |
11 |
12 | Preload 13 | Preload 14 | Preload 15 | Preload 16 | 😝 17 |
18 |
19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/icons/ImagesIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/GameControllerIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/EyePlusIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/GroupArrowDownIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/TextWarningIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ImageLockIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/Tooltip.module.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | .tooltip { 4 | font-size: 16px; 5 | display: flex; 6 | flex-direction: row; 7 | position: fixed; 8 | z-index: 999; 9 | 10 | --bg: #111214; 11 | color: white; 12 | 13 | .body { 14 | padding: 8px 12px; 15 | background-color: var(--bg); 16 | border-radius: 5px; 17 | flex: 1; 18 | hyphens: auto; 19 | font-weight: 600; 20 | min-width: 0; 21 | } 22 | 23 | .arrow { 24 | &.left, 25 | &.right { 26 | width: 10px; 27 | flex-shrink: 0; 28 | position: relative; 29 | } 30 | 31 | &.left { 32 | &::after { 33 | content: ""; 34 | position: absolute; 35 | width: 0; 36 | height: 0; 37 | border-width: 5px; 38 | border-style: solid; 39 | border-color: transparent var(--bg) transparent transparent; 40 | top: 50%; 41 | transform: translateY(-50%); 42 | left: 0; 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/icons/StrikethroughIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/CalendarPlusIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/AnnouncementsLockIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/BellZIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ImagePlusIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/ActionMessage.tsx: -------------------------------------------------------------------------------- 1 | import { DiscordGuild, DiscordUser } from "discord"; 2 | import UserLabel from "./UserLabel"; 3 | import * as styles from "./ActionMesage.module.scss"; 4 | import { JSXElement } from "solid-js"; 5 | import { Dynamic } from "solid-js/web"; 6 | 7 | export default function ActionMessage(props: { 8 | color?: string; 9 | icon: () => JSXElement; 10 | before?: () => JSXElement; 11 | after?: () => JSXElement; 12 | $: DiscordUser; 13 | guild?: DiscordGuild | null; 14 | }) { 15 | return ( 16 |
17 |
18 | 19 |
20 |
21 | 22 | 23 | 24 | 25 | 26 |
27 |
28 | ); 29 | } 30 | -------------------------------------------------------------------------------- /src/icons/ForumWarningIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/QrCodeCameraIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/HourglassIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/VoiceWarningIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/IconChangeDMMessage.tsx: -------------------------------------------------------------------------------- 1 | import { DiscordMessage } from "discord"; 2 | import { timeStamp } from "../Messages"; 3 | import ActionMessage from "./ActionMessage"; 4 | import * as styles from "./ActionMesage.module.scss"; 5 | 6 | export default function IconChangeDMMessage(props: { $: DiscordMessage }) { 7 | return ( 8 | ( 11 | 12 | 13 | 14 | 15 | 16 | 17 | )} 18 | after={() => ( 19 | <> 20 | {" "} 21 | changed the group icon. {timeStamp(props.$.$.timestamp)} 22 | 23 | )} 24 | /> 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /src/icons/ConnectionUnknownIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/StaffBadgeIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/modals/Toast.module.scss: -------------------------------------------------------------------------------- 1 | .toast { 2 | position: fixed; 3 | z-index: 99999; 4 | background-color: #323232; 5 | padding: 4px 8px; 6 | border-radius: 16px; 7 | font-size: 14px; 8 | left: 50%; 9 | transform: translateX(-50%); 10 | bottom: 5vh; 11 | max-width: 90vw; 12 | line-height: 1.2; 13 | width: -moz-max-content; 14 | color: white; 15 | 16 | :global(.light) & { 17 | background-color: white; 18 | color: black; 19 | } 20 | box-shadow: rgba(0, 0, 0, 0.1) 0px 3px 5px -1px, rgba(0, 0, 0, 0.04) 0px 6px 10px 0px, 21 | rgba(0, 0, 0, 0.02) 0px 1px 18px 0px; 22 | } 23 | 24 | .hidden { 25 | animation: hidden 0.2s ease-in-out forwards; 26 | pointer-events: none; 27 | } 28 | 29 | @keyframes hidden { 30 | from { 31 | opacity: 1; 32 | } 33 | to { 34 | opacity: 0; 35 | } 36 | } 37 | 38 | @keyframes show { 39 | from { 40 | opacity: 0; 41 | } 42 | to { 43 | opacity: 1; 44 | } 45 | } 46 | 47 | .show { 48 | animation: show 0.2s ease-in-out forwards; 49 | } 50 | -------------------------------------------------------------------------------- /src/icons/SoundboardIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", 4 | "target": "ES6", 5 | "useDefineForClassFields": true, 6 | "module": "ESNext", 7 | "lib": ["ES2020", "DOM", "DOM.Iterable", "WebWorker"], 8 | "skipLibCheck": true, 9 | 10 | /* Bundler mode */ 11 | "moduleResolution": "bundler", 12 | "allowImportingTsExtensions": true, 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "moduleDetection": "force", 16 | "noEmit": true, 17 | "jsx": "preserve", 18 | "jsxImportSource": "solid-js", 19 | 20 | /* Linting */ 21 | "strict": true, 22 | "noUnusedLocals": true, 23 | "noUnusedParameters": true, 24 | "noFallthroughCasesInSwitch": true, 25 | "noUncheckedSideEffectImports": true, 26 | 27 | "baseUrl": ".", 28 | 29 | "paths": { 30 | "@/*": ["src/*"], 31 | "discord": ["discord/index.ts"], 32 | "discord/*": ["discord/*"], 33 | "@workers": ["src/workers/index.ts"] 34 | } 35 | }, 36 | "include": ["src", "discord"] 37 | } 38 | -------------------------------------------------------------------------------- /src/icons/StageLockIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/NewUserIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/modals/ToastModal.tsx: -------------------------------------------------------------------------------- 1 | import { setToastQueue, toastQueue } from "./signals"; 2 | import * as styles from "./Toast.module.scss"; 3 | import { Show, createEffect, createSignal, onCleanup } from "solid-js"; 4 | 5 | export default function Toast() { 6 | const currentToast = () => toastQueue()[0]; 7 | 8 | const [text, setText] = createSignal(""); 9 | const [show, setShow] = createSignal(false); 10 | 11 | createEffect(() => { 12 | let timeout: Timer; 13 | 14 | if (currentToast()) { 15 | setShow(true); 16 | setText(currentToast().text); 17 | timeout = setTimeout(() => { 18 | setShow(false); 19 | timeout = setTimeout(() => { 20 | currentToast().promise.resolve(true); 21 | setToastQueue((e) => e.slice(1)); 22 | }, 200); 23 | }, currentToast().duration); 24 | } 25 | 26 | onCleanup(() => { 27 | clearTimeout(timeout); 28 | }); 29 | }); 30 | 31 | return ( 32 | 33 |
{text()}
34 |
35 | ); 36 | } 37 | -------------------------------------------------------------------------------- /src/icons/ImageWarningIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/ImageSparkleIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/AnnouncementsWarningIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/SearchBarIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/manifest.webapp: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Kori", 3 | "description": "Unofficial Discord Client for KaiOS.", 4 | "version": "1.2.2", 5 | "launch_path": "/index.html", 6 | "theme": "#fff", 7 | "theme_color": "#fff", 8 | "background_color": "#fff", 9 | "orientation": "default", 10 | 11 | "categories": ["social"], 12 | 13 | "icons": { 14 | "56": "/icon56.png", 15 | "112": "/icon112.png" 16 | }, 17 | "developer": { 18 | "name": "cyan-2048", 19 | "url": "https://github.com/Discord4KaiOS" 20 | }, 21 | "origin": "app://korikord.cyankindasus.com", 22 | "type": "privileged", 23 | "permissions": { 24 | "spatialnavigation-app-manage": {}, 25 | "systemXHR": {}, 26 | "audio-capture": {}, 27 | "video-capture": { 28 | "description": "Reading Codes using the Camera" 29 | }, 30 | "desktop-notification": {}, 31 | "udp-socket": { "description": "Required to do any UDP" } 32 | }, 33 | "locales": { 34 | "en-US": { 35 | "name": "Kori", 36 | "subtitle": "Discord for KaiOS", 37 | "description": "Unofficial Discord Client for KaiOS." 38 | } 39 | }, 40 | "default_locale": "en" 41 | } 42 | -------------------------------------------------------------------------------- /src/icons/ModerationIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/SettingsCircleIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/NameChangeDMMessage.tsx: -------------------------------------------------------------------------------- 1 | import { DiscordMessage } from "discord"; 2 | import { timeStamp } from "../Messages"; 3 | import ActionMessage from "./ActionMessage"; 4 | import * as styles from "./ActionMesage.module.scss"; 5 | import { Show } from "solid-js"; 6 | import UserLabel from "./UserLabel"; 7 | 8 | export default function NameChangeDMMessage(props: { $: DiscordMessage }) { 9 | return ( 10 | ( 13 | 14 | 15 | 19 | 20 | 21 | 22 | )} 23 | after={() => ( 24 | <> 25 | {" changed the name to: "} 26 | {props.$.$.content}{" "} 27 | {timeStamp(props.$.$.timestamp)} 28 | 29 | )} 30 | /> 31 | ); 32 | } 33 | -------------------------------------------------------------------------------- /src/icons/EyeSlashIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/BugIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/SettingsIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/Tooltip.tsx: -------------------------------------------------------------------------------- 1 | import * as styles from "./Tooltip.module.scss"; 2 | import { normalizeCSSNumber } from "@/lib/utils"; 3 | import { createEffect, createSignal, JSX } from "solid-js"; 4 | 5 | interface TooltipProps { 6 | maxWidth?: number | null; 7 | maxHeight?: number | null; 8 | x?: number | null; 9 | y?: number | null; 10 | children: JSX.Element; 11 | } 12 | 13 | export default function Tooltip(props: TooltipProps) { 14 | const [top, setTop] = createSignal(null); 15 | 16 | let divRef!: HTMLDivElement; 17 | 18 | createEffect(() => { 19 | if (divRef && typeof props.y == "number") { 20 | const height = divRef.clientHeight; 21 | setTop(props.y - height / 2); 22 | } 23 | }); 24 | 25 | return ( 26 |
36 |
37 |
{props.children}
38 |
39 | ); 40 | } 41 | -------------------------------------------------------------------------------- /src/icons/RobotIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/SettingsInfoIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/SuperReactionIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/Loading.module.scss: -------------------------------------------------------------------------------- 1 | .loading, 2 | :global(.LOADING) { 3 | position: fixed; 4 | bottom: 0; 5 | height: 320px; 6 | max-height: 320px; 7 | width: 100vw; 8 | background-color: #000; 9 | color: white; 10 | 11 | &::before { 12 | content: ""; 13 | position: absolute; 14 | top: 50%; 15 | left: 50%; 16 | background-image: url(../assets/icon112.png); 17 | width: 84.5px; 18 | height: 84.5px; 19 | background-repeat: no-repeat; 20 | background-size: contain; 21 | transform: translate(-50%, -50%); 22 | } 23 | } 24 | 25 | .progressRing { 26 | position: fixed; 27 | bottom: calc(15vh - (24px / 2)); 28 | left: 50%; 29 | transform: translate(-50%, 0); 30 | } 31 | 32 | .progressRing circle { 33 | stroke: white; 34 | fill: none; 35 | stroke-width: 2px; 36 | stroke-linecap: round; 37 | transform-origin: 50% 50%; 38 | transition: all 0.2s ease-in-out 0s; 39 | animation: 2s linear 0s infinite normal none running spin-infinite; 40 | } 41 | 42 | @keyframes spin-infinite { 43 | 0% { 44 | stroke-dasharray: 0.01px, 43.97px; 45 | transform: rotate(0deg); 46 | } 47 | 50% { 48 | stroke-dasharray: 21.99px, 21.99px; 49 | transform: rotate(450deg); 50 | } 51 | 100% { 52 | stroke-dasharray: 0.01px, 43.97px; 53 | transform: rotate(1080deg); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/views/components/JoinDMMessage.tsx: -------------------------------------------------------------------------------- 1 | import { DiscordMessage } from "discord"; 2 | import { timeStamp } from "../Messages"; 3 | import ActionMessage from "./ActionMessage"; 4 | import * as styles from "./ActionMesage.module.scss"; 5 | import { Show } from "solid-js"; 6 | import UserLabel from "./UserLabel"; 7 | 8 | export default function JoinDMMessage(props: { $: DiscordMessage }) { 9 | const mentionedUser = () => 10 | props.$.$.mentions[0]?.id != props.$.author.id 11 | ? props.$.$channel.$client.addUser(props.$.$.mentions[0]) 12 | : null; 13 | 14 | return ( 15 | ( 18 | 19 | 20 | 21 | 22 | 23 | 24 | )} 25 | after={() => ( 26 | 27 | {" "} 28 | added{" "} 29 | 30 | 31 | {" "} 32 | the group. {timeStamp(props.$.$.timestamp)} 33 | 34 | )} 35 | /> 36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /src/assets/manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "id": "korikord", 3 | "name": "Kori", 4 | "short_name": "Kori", 5 | "description": "Unofficial Discord Client for KaiOS.", 6 | 7 | "start_url": "/index.html", 8 | "orientation": "natural", 9 | "dir": "auto", 10 | "lang": "en-US", 11 | "display": "standalone", 12 | 13 | "theme": "#fff", 14 | "theme_color": "#fff", 15 | "background_color": "#fff", 16 | 17 | "categories": ["social", "utilities", "shopping"], 18 | 19 | "icons": [ 20 | { 21 | "src": "/icon56.png", 22 | "type": "image/png", 23 | "sizes": "56x56" 24 | }, 25 | { 26 | "src": "/icon112.png", 27 | "type": "image/png", 28 | "sizes": "112x112" 29 | } 30 | ], 31 | 32 | "type": "privileged", 33 | 34 | "b2g_features": { 35 | "display": "Kori", 36 | "version": "3.2.2", 37 | "type": "privileged", 38 | "default_locale": "en-US", 39 | "developer": { 40 | "name": "cyan-2048", 41 | "url": "https://github.com/Discord4KaiOS" 42 | }, 43 | 44 | "cursor": false, 45 | "fullscreen": false, 46 | 47 | "origin": "korikord", 48 | 49 | "focus_color": "#fff", 50 | 51 | "permissions": { 52 | "systemXHR": {}, 53 | "audio-capture": {}, 54 | "video-capture": { 55 | "description": "Reading Codes using the Camera" 56 | }, 57 | "desktop-notification": {} 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/icons/ScienceIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/modals/fullscreen.tsx: -------------------------------------------------------------------------------- 1 | import { JSXElement, Show, createSignal, untrack } from "solid-js"; 2 | import * as styles from "./Fullscreen.module.scss"; 3 | import { sleep } from "@/lib/utils"; 4 | import { Dynamic } from "solid-js/web"; 5 | import { setTransform } from "@/signals"; 6 | 7 | const [element, setElement] = createSignal<(() => JSXElement) | null>(null); 8 | const [open, setOpen] = createSignal(false); 9 | 10 | export default function FullscreenModal() { 11 | return ( 12 | 13 |
19 | 20 |
21 |
22 | ); 23 | } 24 | 25 | export function fullscreen(content: () => JSXElement) { 26 | if (untrack(element)) return null; 27 | 28 | setElement(() => content); 29 | setTransform("scale(0)"); 30 | sleep(0).then(() => setOpen(true)); 31 | 32 | return async function close() { 33 | setTransform(undefined); 34 | setOpen(false); 35 | // wait for class to be removed 36 | await sleep(0); 37 | // wait for transition to finish 38 | // add 100ms because this jumps on KaiOS 2.5 39 | await sleep(401); 40 | setElement(null); 41 | // wait for element to be removed, so onCleanup will be called 42 | await sleep(1); 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /src/icons/StretchedSparkleStar.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/icons/AtIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/ReplyBadge.tsx: -------------------------------------------------------------------------------- 1 | import { ComponentProps } from "solid-js"; 2 | import * as styles from "./ReplyBadge.module.scss"; 3 | 4 | export default function ReplyBadge(props: Omit, "children">) { 5 | return ( 6 |
7 | 8 | 12 | 13 |
14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /src/views/modals/toolshed.tsx: -------------------------------------------------------------------------------- 1 | import { JSXElement, Show, Suspense, createSignal, onCleanup, onMount, untrack } from "solid-js"; 2 | import * as styles from "./Toolshed.module.scss"; 3 | import { sleep } from "@/lib/utils"; 4 | import { Dynamic } from "solid-js/web"; 5 | import { setTransform } from "@/signals"; 6 | 7 | const [element, setElement] = createSignal<(() => JSXElement) | null>(null); 8 | 9 | function ToolshedContainer() { 10 | let divRef!: HTMLDivElement; 11 | 12 | onMount(() => { 13 | setTransform(`translateY(-${divRef.clientHeight}px)`); 14 | }); 15 | 16 | return ( 17 |
18 | 19 | 20 | 21 |
22 | ); 23 | } 24 | 25 | export default function Toolshed() { 26 | return ( 27 | 28 |
29 | 30 |
31 |
32 | ); 33 | } 34 | 35 | export function toolshed(content: () => JSXElement) { 36 | if (untrack(element)) return null; 37 | 38 | setElement(() => content); 39 | 40 | return async function close() { 41 | // clear the transformation 42 | setTransform(undefined); 43 | // wait for class to be removed 44 | await sleep(0); 45 | // wait for transition to finish 46 | await sleep(301); 47 | setElement(null); 48 | // wait for element to be removed, so onCleanup will be called 49 | await sleep(1); 50 | }; 51 | } 52 | -------------------------------------------------------------------------------- /src/MainView.tsx: -------------------------------------------------------------------------------- 1 | import * as styles from "./MainView.module.scss"; 2 | import Channels from "./views/Channels"; 3 | import Guilds from "./views/Guilds"; 4 | import Messages from "./views/Messages"; 5 | import { discordClient, restartApp, setCurrentView, transform, Views, integrityCheck } from "./signals"; 6 | import { createSignal, onMount, untrack, JSX } from "solid-js"; 7 | import { fullscreen } from "./views/modals/fullscreen"; 8 | import IntegrityCheckFailed from "./views/IntegrityCheckFailed"; 9 | import { sleep } from "./lib/utils"; 10 | 11 | export default function MainView() { 12 | setCurrentView(Views.GUILDS); 13 | 14 | onMount(() => { 15 | untrack(discordClient)!.once("close", () => { 16 | restartApp(); 17 | }); 18 | 19 | integrityCheck.then(async (e) => { 20 | await sleep(1000); 21 | if (!e) { 22 | const actEl = document.activeElement as HTMLElement; 23 | actEl.blur(); 24 | const close = fullscreen(() => ( 25 | { 27 | await close?.(); 28 | actEl.focus(); 29 | }} 30 | /> 31 | )); 32 | } 33 | }); 34 | 35 | document.querySelector(".LOADING")?.style.setProperty("display", "none"); 36 | }); 37 | 38 | return ( 39 |
45 | 46 | 47 | 48 |
49 | ); 50 | } 51 | -------------------------------------------------------------------------------- /public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/components/LeaveDMMessage.tsx: -------------------------------------------------------------------------------- 1 | import { DiscordMessage } from "discord"; 2 | import { timeStamp } from "../Messages"; 3 | import ActionMessage from "./ActionMessage"; 4 | import * as styles from "./ActionMesage.module.scss"; 5 | import { Show } from "solid-js"; 6 | import UserLabel from "./UserLabel"; 7 | 8 | export default function LeaveDMMessage(props: { $: DiscordMessage }) { 9 | const mentionedUser = () => 10 | props.$.$.mentions[0]?.id != props.$.author.id 11 | ? props.$.$channel.$client.addUser(props.$.$.mentions[0]) 12 | : null; 13 | 14 | return ( 15 | ( 18 | 19 | 20 | 21 | 22 | 23 | 24 | )} 25 | after={() => ( 26 | 30 | {" removed "} 31 | 32 | from the group.{" "} 33 | 34 | {timeStamp(props.$.$.timestamp)} 35 | 36 | } 37 | > 38 | {" "} 39 | left the group. {timeStamp(props.$.$.timestamp)} 40 | 41 | )} 42 | /> 43 | ); 44 | } 45 | --------------------------------------------------------------------------------