You've already forked AstralRinth
forked from didirus/AstralRinth
Finish adding omorphia
This commit is contained in:
@@ -9,7 +9,7 @@ import { globIterate } from 'glob'
|
||||
import { match as matchLocale } from '@formatjs/intl-localematcher'
|
||||
import { consola } from 'consola'
|
||||
|
||||
const STAGING_API_URL = 'https://api.modrinth.com/v2/'
|
||||
const STAGING_API_URL = 'https://staging-api.modrinth.com/v2/'
|
||||
|
||||
const preloadedFonts = [
|
||||
'inter/Inter-Regular.woff2',
|
||||
@@ -83,6 +83,7 @@ export default defineNuxtConfig({
|
||||
},
|
||||
},
|
||||
vite: {
|
||||
cacheDir: '../../node_modules/.vite/apps/knossos',
|
||||
plugins: [
|
||||
nxViteTsPaths(),
|
||||
svgLoader({
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</Modal>
|
||||
</template>
|
||||
<script setup>
|
||||
import { XIcon as CrossIcon, CheckIcon, Modal, Button } from 'omorphia'
|
||||
import { XIcon as CrossIcon, CheckIcon, Modal, Button } from '@modrinth/omorphia'
|
||||
|
||||
const router = useNativeRouter()
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { renderString } from 'omorphia'
|
||||
import { renderString } from '@modrinth/omorphia'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg?component'
|
||||
import TrashIcon from '~/assets/images/utils/trash.svg?component'
|
||||
import Modal from '~/components/ui/Modal.vue'
|
||||
|
||||
@@ -341,7 +341,7 @@ import {
|
||||
XIcon as CrossIcon,
|
||||
EyeOffIcon,
|
||||
ExitIcon,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import Categories from '~/components/ui/search/Categories.vue'
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { renderString } from 'omorphia'
|
||||
import { renderString } from '@modrinth/omorphia'
|
||||
import InvitationIcon from '~/assets/images/utils/user-plus.svg?component'
|
||||
import ModerationIcon from '~/assets/images/sidebar/admin.svg?component'
|
||||
import NotificationIcon from '~/assets/images/sidebar/notifications.svg?component'
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</Modal>
|
||||
</template>
|
||||
<script setup>
|
||||
import { XIcon as CrossIcon, CheckIcon, Modal, Button } from 'omorphia'
|
||||
import { XIcon as CrossIcon, CheckIcon, Modal, Button } from '@modrinth/omorphia'
|
||||
|
||||
const router = useNativeRouter()
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ import {
|
||||
Modal,
|
||||
TransferIcon,
|
||||
XIcon,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
|
||||
const modalOpen = ref(null)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import dayjs from 'dayjs'
|
||||
import { formatNumber, formatMoney } from 'omorphia'
|
||||
import { formatNumber, formatMoney } from '@modrinth/omorphia'
|
||||
import VueApexCharts from 'vue3-apexcharts'
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
@@ -298,7 +298,7 @@ import {
|
||||
formatNumber,
|
||||
DropdownSelect,
|
||||
formatCategoryHeader,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import dayjs from 'dayjs'
|
||||
import { defineProps, ref, computed } from 'vue'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import { Card } from 'omorphia'
|
||||
import { Card } from '@modrinth/omorphia'
|
||||
import VueApexCharts from 'vue3-apexcharts'
|
||||
|
||||
// let VueApexCharts
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { OverflowMenu, MarkdownEditor, DropdownIcon } from 'omorphia'
|
||||
import { OverflowMenu, MarkdownEditor, DropdownIcon } from '@modrinth/omorphia'
|
||||
import { useImageUpload } from '~/composables/image-upload.ts'
|
||||
import CopyCode from '~/components/ui/CopyCode.vue'
|
||||
import ReplyIcon from '~/assets/images/utils/reply.svg?component'
|
||||
|
||||
@@ -109,7 +109,7 @@ import {
|
||||
ModrinthIcon,
|
||||
ScaleIcon,
|
||||
renderString,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import Avatar from '~/components/ui/Avatar.vue'
|
||||
import Badge from '~/components/ui/Badge.vue'
|
||||
import { isStaff } from '~/helpers/users.js'
|
||||
|
||||
@@ -15,7 +15,7 @@ import ini from 'highlight.js/lib/languages/ini'
|
||||
import yaml from 'highlight.js/lib/languages/yaml'
|
||||
import xml from 'highlight.js/lib/languages/xml'
|
||||
import properties from 'highlight.js/lib/languages/properties'
|
||||
import { md, configuredXss } from 'omorphia'
|
||||
import { md, configuredXss } from '@modrinth/omorphia'
|
||||
|
||||
/* REGISTRATION */
|
||||
// Scripting
|
||||
|
||||
@@ -427,7 +427,7 @@ import {
|
||||
IssuesIcon,
|
||||
Button,
|
||||
ReportIcon,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import HamburgerIcon from '~/assets/images/utils/hamburger.svg?component'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg?component'
|
||||
import SearchIcon from '~/assets/images/utils/search.svg?component'
|
||||
@@ -755,7 +755,8 @@ function hideStagingBanner() {
|
||||
|
||||
<style lang="scss">
|
||||
@import '~/assets/styles/global.scss';
|
||||
@import 'omorphia/dist/style.css';
|
||||
// TODO: fix this hackery
|
||||
@import '../../../../libs/omorphia/src/assets/omorphia';
|
||||
|
||||
.layout {
|
||||
min-height: 100vh;
|
||||
|
||||
@@ -1079,7 +1079,7 @@ import {
|
||||
isStaff,
|
||||
CheckIcon,
|
||||
XIcon,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import CrownIcon from '~/assets/images/utils/crown.svg?component'
|
||||
import CalendarIcon from '~/assets/images/utils/calendar.svg?component'
|
||||
import DownloadIcon from '~/assets/images/utils/download.svg?component'
|
||||
|
||||
@@ -293,7 +293,7 @@ import {
|
||||
ImageIcon,
|
||||
TransferIcon,
|
||||
ConfirmModal,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import FileInput from '~/components/ui/FileInput.vue'
|
||||
import DropArea from '~/components/ui/DropArea.vue'
|
||||
import Modal from '~/components/ui/Modal.vue'
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Badge, ExitIcon, CheckIcon, IssuesIcon } from 'omorphia'
|
||||
import { Badge, ExitIcon, CheckIcon, IssuesIcon } from '@modrinth/omorphia'
|
||||
import ConversationThread from '~/components/ui/thread/ConversationThread.vue'
|
||||
import {
|
||||
getProjectLink,
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MarkdownEditor } from 'omorphia'
|
||||
import { MarkdownEditor } from '@modrinth/omorphia'
|
||||
import Chips from '~/components/ui/Chips.vue'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg?component'
|
||||
import { renderHighlightedString } from '~/helpers/highlight.js'
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { DropdownSelect } from 'omorphia'
|
||||
import { DropdownSelect } from '@modrinth/omorphia'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg?component'
|
||||
|
||||
const tags = useTags()
|
||||
|
||||
@@ -518,7 +518,7 @@
|
||||
|
||||
<script setup>
|
||||
import { Multiselect } from 'vue-multiselect'
|
||||
import { Avatar, Badge, Card, Checkbox, TransferIcon, CheckIcon, UsersIcon } from 'omorphia'
|
||||
import { Avatar, Badge, Card, Checkbox, TransferIcon, CheckIcon, UsersIcon } from '@modrinth/omorphia'
|
||||
|
||||
import ModalConfirm from '~/components/ui/ModalConfirm.vue'
|
||||
import DropdownIcon from '~/assets/images/utils/dropdown.svg?component'
|
||||
|
||||
@@ -612,7 +612,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { MarkdownEditor } from 'omorphia'
|
||||
import { MarkdownEditor } from '@modrinth/omorphia'
|
||||
import { Multiselect } from 'vue-multiselect'
|
||||
import { acceptFileFromProjectType } from '~/helpers/fileUtils.js'
|
||||
import { inferVersionInfo } from '~/helpers/infer.js'
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
EditIcon,
|
||||
DownloadIcon,
|
||||
LinkIcon,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import Avatar from '~/components/ui/Avatar.vue'
|
||||
import LogoAnimated from '~/components/brand/LogoAnimated.vue'
|
||||
import Badge from '~/components/ui/Badge.vue'
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { Button, XIcon, CheckIcon, Avatar } from 'omorphia'
|
||||
import { Button, XIcon, CheckIcon, Avatar } from '@modrinth/omorphia'
|
||||
import { useBaseFetch } from '@/composables/fetch.js'
|
||||
import { useAuth } from '@/composables/auth.js'
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { SendIcon, MailIcon, KeyIcon } from 'omorphia'
|
||||
import { SendIcon, MailIcon, KeyIcon } from '@modrinth/omorphia'
|
||||
|
||||
const { formatMessage } = useVIntl()
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ import {
|
||||
SSOGitLabIcon,
|
||||
KeyIcon,
|
||||
MailIcon,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
|
||||
const { formatMessage } = useVIntl()
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ import {
|
||||
KeyIcon,
|
||||
MailIcon,
|
||||
SSOGitLabIcon,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
|
||||
const { formatMessage } = useVIntl()
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { SettingsIcon, RightArrowIcon } from 'omorphia'
|
||||
import { SettingsIcon, RightArrowIcon } from '@modrinth/omorphia'
|
||||
|
||||
const { formatMessage } = useVIntl()
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Checkbox, RightArrowIcon } from 'omorphia'
|
||||
import { Checkbox, RightArrowIcon } from '@modrinth/omorphia'
|
||||
|
||||
const { formatMessage } = useVIntl()
|
||||
|
||||
|
||||
@@ -384,7 +384,7 @@ import {
|
||||
UpdatedIcon,
|
||||
LibraryIcon,
|
||||
BoxIcon,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
|
||||
import WorldIcon from 'assets/images/utils/world.svg'
|
||||
import UpToDate from 'assets/images/illustrations/up_to_date.svg'
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { LibraryIcon, ChartIcon } from 'omorphia'
|
||||
import { LibraryIcon, ChartIcon } from '@modrinth/omorphia'
|
||||
import NavStack from '~/components/ui/NavStack.vue'
|
||||
import NavStackItem from '~/components/ui/NavStackItem.vue'
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Avatar, BoxIcon, SearchIcon, XIcon, Button, PlusIcon, LinkIcon, LockIcon } from 'omorphia'
|
||||
import { Avatar, BoxIcon, SearchIcon, XIcon, Button, PlusIcon, LinkIcon, LockIcon } from '@modrinth/omorphia'
|
||||
import WorldIcon from '~/assets/images/utils/world.svg?component'
|
||||
import CollectionCreateModal from '~/components/ui/CollectionCreateModal.vue'
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Button, HistoryIcon } from 'omorphia'
|
||||
import { Button, HistoryIcon } from '@modrinth/omorphia'
|
||||
import {
|
||||
fetchExtraNotificationData,
|
||||
groupNotifications,
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { PlusIcon, Avatar, UsersIcon } from 'omorphia'
|
||||
import { PlusIcon, Avatar, UsersIcon } from '@modrinth/omorphia'
|
||||
|
||||
import { useAuth } from '~/composables/auth.js'
|
||||
import OrganizationCreateModal from '~/components/ui/OrganizationCreateModal.vue'
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { TransferIcon, HistoryIcon, PayPalIcon, SaveIcon, XIcon } from 'omorphia'
|
||||
import { TransferIcon, HistoryIcon, PayPalIcon, SaveIcon, XIcon } from '@modrinth/omorphia'
|
||||
|
||||
const auth = await useAuth()
|
||||
const minWithdraw = ref(0.01)
|
||||
|
||||
@@ -102,7 +102,7 @@ import {
|
||||
UnknownIcon,
|
||||
DropdownSelect,
|
||||
capitalizeString,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import dayjs from 'dayjs'
|
||||
import TremendousIcon from '~/assets/images/external/tremendous.svg?component'
|
||||
import VenmoIcon from '~/assets/images/external/venmo-small.svg?component'
|
||||
|
||||
@@ -194,7 +194,7 @@ import {
|
||||
TransferIcon,
|
||||
Checkbox,
|
||||
Breadcrumbs,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import { all } from 'iso-3166-1'
|
||||
import VenmoIcon from '~/assets/images/external/venmo.svg?component'
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ import {
|
||||
ShieldIcon,
|
||||
CurrencyIcon,
|
||||
CopyrightIcon,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import NavStack from '~/components/ui/NavStack.vue'
|
||||
import NavStackItem from '~/components/ui/NavStackItem.vue'
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ import {
|
||||
Promotion,
|
||||
CheckIcon,
|
||||
XIcon,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import NavStack from '~/components/ui/NavStack.vue'
|
||||
import NavStackItem from '~/components/ui/NavStackItem.vue'
|
||||
import NavRow from '~/components/ui/NavRow.vue'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import { Button, FileInput, TrashIcon, Avatar, UploadIcon, SaveIcon, ConfirmModal } from 'omorphia'
|
||||
import { Button, FileInput, TrashIcon, Avatar, UploadIcon, SaveIcon, ConfirmModal } from '@modrinth/omorphia'
|
||||
|
||||
const {
|
||||
organization,
|
||||
|
||||
@@ -229,7 +229,7 @@ import {
|
||||
UserXIcon as UserRemoveIcon,
|
||||
DropdownIcon,
|
||||
Button,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import { ref } from 'vue'
|
||||
import CrownIcon from '~/assets/images/utils/crown.svg?component'
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@ import {
|
||||
Button,
|
||||
SortAscendingIcon,
|
||||
SortDescendingIcon,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
|
||||
import ModalCreation from '~/components/ui/ModalCreation.vue'
|
||||
import OrganizationProjectTransferModal from '~/components/ui/OrganizationProjectTransferModal.vue'
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Card, Button, MarkdownEditor, DropdownSelect, SaveIcon } from 'omorphia'
|
||||
import { Card, Button, MarkdownEditor, DropdownSelect, SaveIcon } from '@modrinth/omorphia'
|
||||
import { useImageUpload } from '~/composables/image-upload.ts'
|
||||
|
||||
const tags = useTags()
|
||||
|
||||
@@ -344,7 +344,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { Multiselect } from 'vue-multiselect'
|
||||
import { Promotion } from 'omorphia'
|
||||
import { Promotion } from '@modrinth/omorphia'
|
||||
import ProjectCard from '~/components/ui/ProjectCard.vue'
|
||||
import Pagination from '~/components/ui/Pagination.vue'
|
||||
import SearchFilter from '~/components/ui/search/SearchFilter.vue'
|
||||
|
||||
@@ -81,7 +81,7 @@ import {
|
||||
ShieldIcon,
|
||||
KeyIcon,
|
||||
LanguagesIcon,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import NavStack from '~/components/ui/NavStack.vue'
|
||||
import NavStackItem from '~/components/ui/NavStackItem.vue'
|
||||
import MonitorSmartphoneIcon from '~/assets/images/utils/monitor-smartphone.svg?component'
|
||||
|
||||
@@ -401,7 +401,7 @@ import {
|
||||
RightArrowIcon,
|
||||
CheckIcon,
|
||||
ExternalIcon,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import QrcodeVue from 'qrcode.vue'
|
||||
import GitHubIcon from 'assets/icons/auth/sso-github.svg'
|
||||
import MicrosoftIcon from 'assets/icons/auth/sso-microsoft.svg'
|
||||
|
||||
@@ -228,7 +228,7 @@ import {
|
||||
SaveIcon,
|
||||
CopyCode,
|
||||
ConfirmModal,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import Modal from '~/components/ui/Modal.vue'
|
||||
|
||||
import {
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Button, TrashIcon, CheckIcon, ConfirmModal, Avatar } from 'omorphia'
|
||||
import { Button, TrashIcon, CheckIcon, ConfirmModal, Avatar } from '@modrinth/omorphia'
|
||||
import { commonSettingsMessages } from '~/utils/common-messages.ts'
|
||||
import { useScopes } from '~/composables/auth/scopes.ts'
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { CodeIcon, Button, RadioButtonIcon, RadioButtonChecked, SunIcon, MoonIcon } from 'omorphia'
|
||||
import { CodeIcon, Button, RadioButtonIcon, RadioButtonChecked, SunIcon, MoonIcon } from '@modrinth/omorphia'
|
||||
import { formatProjectType } from '~/plugins/shorthands.js'
|
||||
import MessageBanner from '~/components/ui/MessageBanner.vue'
|
||||
import { DARK_THEMES } from '~/composables/theme.js'
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { PlusIcon, XIcon, Checkbox, TrashIcon, EditIcon, SaveIcon, ConfirmModal } from 'omorphia'
|
||||
import { PlusIcon, XIcon, Checkbox, TrashIcon, EditIcon, SaveIcon, ConfirmModal } from '@modrinth/omorphia'
|
||||
|
||||
import { commonSettingsMessages } from '~/utils/common-messages.ts'
|
||||
import {
|
||||
|
||||
@@ -95,7 +95,7 @@ import {
|
||||
UploadIcon,
|
||||
UndoIcon,
|
||||
XIcon,
|
||||
} from 'omorphia'
|
||||
} from '@modrinth/omorphia'
|
||||
import { commonMessages } from '~/utils/common-messages.ts'
|
||||
|
||||
useHead({
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { XIcon } from 'omorphia'
|
||||
import { XIcon } from '@modrinth/omorphia'
|
||||
import { commonSettingsMessages } from '~/utils/common-messages.ts'
|
||||
|
||||
definePageMeta({
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Promotion, LibraryIcon, BoxIcon, LinkIcon, LockIcon, XIcon } from 'omorphia'
|
||||
import { Promotion, LibraryIcon, BoxIcon, LinkIcon, LockIcon, XIcon } from '@modrinth/omorphia'
|
||||
import ProjectCard from '~/components/ui/ProjectCard.vue'
|
||||
import Badge from '~/components/ui/Badge.vue'
|
||||
import { reportUser } from '~/utils/report-helpers.ts'
|
||||
|
||||
Reference in New Issue
Block a user