chore: formatting

This commit is contained in:
ThatOneCalculator 2023-04-12 17:19:14 -07:00
parent a52fdea655
commit b62549cf69
5 changed files with 140 additions and 129 deletions

View file

@ -53,7 +53,7 @@
"json5": "2.2.3",
"katex": "0.16.4",
"matter-js": "0.18.0",
"mfm-js": "0.23.2",
"mfm-js": "0.23.3",
"photoswipe": "5.3.4",
"prettier": "2.8.7",
"prettier-plugin-vue": "1.1.6",

View file

@ -161,12 +161,12 @@ const menuDef = $computed(() => [
},
]
: []),
{
type: "button",
icon: "ph-list-magnifying-glass ph-bold ph-lg",
text: i18n.ts.indexPosts,
action: indexPosts,
},
{
type: "button",
icon: "ph-list-magnifying-glass ph-bold ph-lg",
text: i18n.ts.indexPosts,
action: indexPosts,
},
],
},
{
@ -369,7 +369,7 @@ async function lookupNote() {
"notes/show",
q.startsWith("http://") || q.startsWith("https://")
? { url: q.trim() }
: { noteId: q.trim() },
: { noteId: q.trim() }
)
.then((note) => {
os.pageWindow(`/notes/${note.id}`);
@ -384,7 +384,6 @@ async function lookupNote() {
});
}
const lookup = (ev) => {
os.popupMenu(
[

View file

@ -6,87 +6,87 @@
:tabs="headerTabs"
:display-back-button="true"
/></template>
<MkSpacer :content-max="800" class="mk-messaging-room">
<div class="body">
<MkPagination
v-if="pagination"
ref="pagingComponent"
:key="userAcct || groupId"
:pagination="pagination"
>
<template #empty>
<div class="_fullinfo">
<img
src="/static-assets/badges/info.png"
class="_ghost"
alt="Info"
/>
<div>{{ i18n.ts.noMessagesYet }}</div>
</div>
</template>
<template
#default="{ items: messages, fetching: pFetching }"
>
<XList
v-if="messages.length > 0"
v-slot="{ item: message }"
:class="{
messages: true,
'deny-move-transition': pFetching,
}"
:items="messages"
direction="up"
reversed
>
<XMessage
:key="message.id"
:message="message"
:is-group="group != null"
/>
</XList>
</template>
</MkPagination>
</div>
<footer>
<div v-if="typers.length > 0" class="typers">
<I18n
:src="i18n.ts.typingUsers"
text-tag="span"
class="users"
>
<template #users>
<b
v-for="typer in typers"
:key="typer.id"
class="user"
>{{ typer.username }}</b
>
</template>
</I18n>
<MkEllipsis />
</div>
<transition :name="animation ? 'fade' : ''">
<div v-show="showIndicator" class="new-message">
<button
class="_buttonPrimary"
@click="onIndicatorClick"
>
<i
class="fas ph-fw ph-lg ph-arrow-circle-down ph-bold ph-lg"
></i
>{{ i18n.ts.newMessageExists }}
</button>
<MkSpacer :content-max="800" class="mk-messaging-room">
<div class="body">
<MkPagination
v-if="pagination"
ref="pagingComponent"
:key="userAcct || groupId"
:pagination="pagination"
>
<template #empty>
<div class="_fullinfo">
<img
src="/static-assets/badges/info.png"
class="_ghost"
alt="Info"
/>
<div>{{ i18n.ts.noMessagesYet }}</div>
</div>
</transition>
<XForm
v-if="!fetching"
ref="formEl"
:user="user"
:group="group"
class="form"
/>
</footer>
</MkSpacer>
</template>
<template
#default="{ items: messages, fetching: pFetching }"
>
<XList
v-if="messages.length > 0"
v-slot="{ item: message }"
:class="{
messages: true,
'deny-move-transition': pFetching,
}"
:items="messages"
direction="up"
reversed
>
<XMessage
:key="message.id"
:message="message"
:is-group="group != null"
/>
</XList>
</template>
</MkPagination>
</div>
<footer>
<div v-if="typers.length > 0" class="typers">
<I18n
:src="i18n.ts.typingUsers"
text-tag="span"
class="users"
>
<template #users>
<b
v-for="typer in typers"
:key="typer.id"
class="user"
>{{ typer.username }}</b
>
</template>
</I18n>
<MkEllipsis />
</div>
<transition :name="animation ? 'fade' : ''">
<div v-show="showIndicator" class="new-message">
<button
class="_buttonPrimary"
@click="onIndicatorClick"
>
<i
class="fas ph-fw ph-lg ph-arrow-circle-down ph-bold ph-lg"
></i
>{{ i18n.ts.newMessageExists }}
</button>
</div>
</transition>
<XForm
v-if="!fetching"
ref="formEl"
:user="user"
:group="group"
class="form"
/>
</footer>
</MkSpacer>
</MkStickyContainer>
</template>
@ -343,12 +343,12 @@ onBeforeUnmount(() => {
await fetch();
definePageMetadata(
computed(() => ({
title: group != null ? group.name : user?.name,
icon: "ph-chats-teardrop ph-bold ph-lg",
avatar: group != null ? null : user,
}))
);
computed(() => ({
title: group != null ? group.name : user?.name,
icon: "ph-chats-teardrop ph-bold ph-lg",
avatar: group != null ? null : user,
}))
);
</script>
<style lang="scss" scoped>

View file

@ -9,7 +9,9 @@ export async function lookupInstance() {
os.api(
"federation/show-instance",
q.startsWith("http://") || q.startsWith("https://") ? { host: q.replace("https://", "") } : { host: q }
q.startsWith("http://") || q.startsWith("https://")
? { host: q.replace("https://", "") }
: { host: q },
)
.then((instance) => {
os.pageWindow(`/instance-info/${instance.host}`);

View file

@ -783,8 +783,8 @@ importers:
specifier: 0.18.0
version: 0.18.0
mfm-js:
specifier: 0.23.2
version: 0.23.2
specifier: 0.23.3
version: 0.23.3
photoswipe:
specifier: 5.3.4
version: 5.3.4
@ -1890,7 +1890,7 @@ packages:
chalk: 4.1.2
emittery: 0.8.1
exit: 0.1.2
graceful-fs: 4.2.10
graceful-fs: 4.2.11
jest-changed-files: 27.5.1
jest-config: 27.5.1(ts-node@10.4.0)
jest-haste-map: 27.5.1
@ -1966,7 +1966,7 @@ packages:
collect-v8-coverage: 1.0.1
exit: 0.1.2
glob: 7.2.3
graceful-fs: 4.2.10
graceful-fs: 4.2.11
istanbul-lib-coverage: 3.2.0
istanbul-lib-instrument: 5.2.1
istanbul-lib-report: 3.0.0
@ -1990,7 +1990,7 @@ packages:
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
dependencies:
callsites: 3.1.0
graceful-fs: 4.2.10
graceful-fs: 4.2.11
source-map: 0.6.1
dev: true
@ -2009,7 +2009,7 @@ packages:
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
dependencies:
'@jest/test-result': 27.5.1
graceful-fs: 4.2.10
graceful-fs: 4.2.11
jest-haste-map: 27.5.1
jest-runtime: 27.5.1
transitivePeerDependencies:
@ -2026,7 +2026,7 @@ packages:
chalk: 4.1.2
convert-source-map: 1.9.0
fast-json-stable-stringify: 2.1.0
graceful-fs: 4.2.10
graceful-fs: 4.2.11
jest-haste-map: 27.5.1
jest-regex-util: 27.5.1
jest-util: 27.5.1
@ -4297,7 +4297,7 @@ packages:
engines: {node: '>= 6'}
dependencies:
glob: 7.2.3
graceful-fs: 4.2.10
graceful-fs: 4.2.11
lazystream: 1.0.1
lodash.defaults: 4.2.0
lodash.difference: 4.5.0
@ -4640,7 +4640,7 @@ packages:
babel-plugin-istanbul: 6.1.1
babel-preset-jest: 27.5.1(@babel/core@7.21.4)
chalk: 4.1.2
graceful-fs: 4.2.10
graceful-fs: 4.2.11
slash: 3.0.0
transitivePeerDependencies:
- supports-color
@ -5977,8 +5977,8 @@ packages:
requiresBuild: true
dev: false
/core-js@3.29.0:
resolution: {integrity: sha512-VG23vuEisJNkGl6XQmFJd3rEG/so/CNatqeE+7uZAwTSwFeB/qaO0be8xZYUNWprJ/GIwL8aMt9cj1kvbpTZhg==}
/core-js@3.30.0:
resolution: {integrity: sha512-hQotSSARoNh1mYPi9O2YaWeiq/cEB95kOrFb4NCrO4RIFt1qqNpKsaE+vy/L3oiqvND5cThqXzUU3r9F7Efztg==}
requiresBuild: true
dev: true
@ -6394,7 +6394,7 @@ packages:
decompress-tarbz2: 4.1.1
decompress-targz: 4.1.1
decompress-unzip: 4.0.1
graceful-fs: 4.2.10
graceful-fs: 4.2.11
make-dir: 1.3.0
pify: 2.3.0
strip-dirs: 2.1.0
@ -7744,7 +7744,7 @@ packages:
resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==}
engines: {node: '>=12'}
dependencies:
graceful-fs: 4.2.10
graceful-fs: 4.2.11
jsonfile: 6.1.0
universalify: 2.0.0
dev: true
@ -7753,7 +7753,7 @@ packages:
resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==}
engines: {node: '>=6 <7 || >=8'}
dependencies:
graceful-fs: 4.2.10
graceful-fs: 4.2.11
jsonfile: 4.0.0
universalify: 0.1.2
dev: true
@ -7794,7 +7794,7 @@ packages:
resolution: {integrity: sha512-+vSd9frUnapVC2RZYfL3FCB2p3g4TBhaUmrsWlSudsGdnxIuUvBB2QM1VZeBtc49QFwrp+wQLrDs3+xxDgI5gQ==}
engines: {node: '>= 0.10'}
dependencies:
graceful-fs: 4.2.10
graceful-fs: 4.2.11
through2: 2.0.5
dev: true
@ -8194,6 +8194,9 @@ packages:
/graceful-fs@4.2.10:
resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==}
/graceful-fs@4.2.11:
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
/grapheme-splitter@1.0.4:
resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==}
@ -9319,7 +9322,7 @@ packages:
'@jest/types': 27.5.1
chalk: 4.1.2
exit: 0.1.2
graceful-fs: 4.2.10
graceful-fs: 4.2.11
import-local: 3.1.0
jest-config: 27.5.1(ts-node@10.4.0)
jest-util: 27.5.1
@ -9351,7 +9354,7 @@ packages:
ci-info: 3.7.1
deepmerge: 4.2.2
glob: 7.2.3
graceful-fs: 4.2.10
graceful-fs: 4.2.11
jest-circus: 27.5.1
jest-environment-jsdom: 27.5.1
jest-environment-node: 27.5.1
@ -9456,7 +9459,7 @@ packages:
'@types/node': 18.11.18
anymatch: 3.1.3
fb-watchman: 2.0.2
graceful-fs: 4.2.10
graceful-fs: 4.2.11
jest-regex-util: 27.5.1
jest-serializer: 27.5.1
jest-util: 27.5.1
@ -9518,7 +9521,7 @@ packages:
'@jest/types': 27.5.1
'@types/stack-utils': 2.0.1
chalk: 4.1.2
graceful-fs: 4.2.10
graceful-fs: 4.2.11
micromatch: 4.0.5
pretty-format: 27.5.1
slash: 3.0.0
@ -9567,7 +9570,7 @@ packages:
dependencies:
'@jest/types': 27.5.1
chalk: 4.1.2
graceful-fs: 4.2.10
graceful-fs: 4.2.11
jest-haste-map: 27.5.1
jest-pnp-resolver: 1.2.3(jest-resolve@27.5.1)
jest-util: 27.5.1
@ -9589,7 +9592,7 @@ packages:
'@types/node': 18.11.18
chalk: 4.1.2
emittery: 0.8.1
graceful-fs: 4.2.10
graceful-fs: 4.2.11
jest-docblock: 27.5.1
jest-environment-jsdom: 27.5.1
jest-environment-node: 27.5.1
@ -9625,7 +9628,7 @@ packages:
collect-v8-coverage: 1.0.1
execa: 5.1.1
glob: 7.2.3
graceful-fs: 4.2.10
graceful-fs: 4.2.11
jest-haste-map: 27.5.1
jest-message-util: 27.5.1
jest-mock: 27.5.1
@ -9644,7 +9647,7 @@ packages:
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
dependencies:
'@types/node': 18.11.18
graceful-fs: 4.2.10
graceful-fs: 4.2.11
dev: true
/jest-snapshot@27.5.1:
@ -9663,7 +9666,7 @@ packages:
babel-preset-current-node-syntax: 1.0.1(@babel/core@7.21.4)
chalk: 4.1.2
expect: 27.5.1
graceful-fs: 4.2.10
graceful-fs: 4.2.11
jest-diff: 27.5.1
jest-get-type: 27.5.1
jest-haste-map: 27.5.1
@ -9685,7 +9688,7 @@ packages:
'@types/node': 18.11.18
chalk: 4.1.2
ci-info: 3.7.1
graceful-fs: 4.2.10
graceful-fs: 4.2.11
picomatch: 2.3.1
dev: true
@ -9979,21 +9982,21 @@ packages:
/jsonfile@4.0.0:
resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==}
optionalDependencies:
graceful-fs: 4.2.10
graceful-fs: 4.2.11
/jsonfile@5.0.0:
resolution: {integrity: sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w==}
dependencies:
universalify: 0.1.2
optionalDependencies:
graceful-fs: 4.2.10
graceful-fs: 4.2.11
/jsonfile@6.1.0:
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==}
dependencies:
universalify: 2.0.0
optionalDependencies:
graceful-fs: 4.2.10
graceful-fs: 4.2.11
dev: true
/jsonld@6.0.0:
@ -10464,7 +10467,7 @@ packages:
resolution: {integrity: sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==}
engines: {node: '>=0.10.0'}
dependencies:
graceful-fs: 4.2.10
graceful-fs: 4.2.11
parse-json: 2.2.0
pify: 2.3.0
pinkie-promise: 2.0.1
@ -10809,6 +10812,13 @@ packages:
resolution: {integrity: sha512-lfYvsMr6FIYbt0ZDL+nY+GWWqmcXpe9jrYLBLy5vvQHwGfPALpx43uNHj8hZsakgM82hPMo/zdx0e9tj+4Z4IA==}
dependencies:
twemoji-parser: 14.0.0
dev: false
/mfm-js@0.23.3:
resolution: {integrity: sha512-o8scYmbey6rMUmWAlT3k3ntt6khaCLdxlmHhAWV5wTTMj2OK1atQvZfRUq0SIVm1Jig08qlZg/ps71xUqrScNA==}
dependencies:
twemoji-parser: 14.0.0
dev: true
/micromatch@3.1.10:
resolution: {integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==}
@ -11296,7 +11306,7 @@ packages:
dependencies:
env-paths: 2.2.1
glob: 7.2.3
graceful-fs: 4.2.10
graceful-fs: 4.2.11
make-fetch-happen: 10.2.1
nopt: 6.0.0
npmlog: 6.0.2
@ -11909,7 +11919,7 @@ packages:
resolution: {integrity: sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==}
engines: {node: '>=0.10.0'}
dependencies:
graceful-fs: 4.2.10
graceful-fs: 4.2.11
pify: 2.3.0
pinkie-promise: 2.0.1
dev: true
@ -15118,7 +15128,7 @@ packages:
dependencies:
append-buffer: 1.0.2
convert-source-map: 1.9.0
graceful-fs: 4.2.10
graceful-fs: 4.2.11
normalize-path: 2.1.1
now-and-later: 2.0.1
remove-bom-buffer: 3.0.0
@ -15857,7 +15867,7 @@ packages:
name: plyr
version: 3.7.0
dependencies:
core-js: 3.29.0
core-js: 3.30.0
custom-event-polyfill: 1.0.7
loadjs: 4.2.0
rangetouch: 2.0.1