chore: remove s-age dependency

This isn't being used anymore since
4e41fa8767.
In any case, age calculation really doesn't need to involve a 3rd party
library.

Ref: FoundKeyGang/FoundKey#90
This commit is contained in:
Norm 2022-08-28 11:35:18 -04:00
parent 10caf861e8
commit 41414b4576
Signed by untrusted user: norm
GPG key ID: 7123E30E441E80DE
5 changed files with 4 additions and 26 deletions

View file

@ -98,7 +98,6 @@
"require-all": "3.0.0",
"rndstr": "1.0.0",
"rss-parser": "3.12.0",
"s-age": "1.1.2",
"sanitize-html": "2.7.0",
"semver": "7.3.7",
"sharp": "0.29.3",

View file

@ -58,7 +58,6 @@
"reflect-metadata": "0.1.13",
"rndstr": "1.0.0",
"rollup": "2.75.7",
"s-age": "1.1.2",
"sass": "1.53.0",
"seedrandom": "3.0.5",
"strict-event-emitter-types": "2.0.0",

View file

@ -108,21 +108,17 @@
</template>
<script lang="ts" setup>
import { defineAsyncComponent, computed, inject, onMounted, onUnmounted, watch } from 'vue';
import calcAge from 's-age';
import { defineAsyncComponent, onMounted, onUnmounted } from 'vue';
import * as misskey from 'foundkey-js';
import XUserTimeline from './index.timeline.vue';
import XNote from '@/components/note.vue';
import MkFollowButton from '@/components/follow-button.vue';
import MkContainer from '@/components/ui/container.vue';
import MkFolder from '@/components/ui/folder.vue';
import MkRemoteCaution from '@/components/remote-caution.vue';
import MkTab from '@/components/tab.vue';
import MkInfo from '@/components/ui/info.vue';
import { getScrollPosition } from '@/scripts/scroll';
import { getUserMenu } from '@/scripts/get-user-menu';
import number from '@/filters/number';
import { userPage, acct as getAcct } from '@/filters/user';
import { userPage } from '@/filters/user';
import * as os from '@/os';
import { useRouter } from '@/router';
import { i18n } from '@/i18n';
@ -150,10 +146,6 @@ const style = $computed(() => {
};
});
const age = $computed(() => {
return calcAge(props.user.birthday);
});
function menu(ev) {
os.popupMenu(getUserMenu(props.user), ev.currentTarget ?? ev.target);
}

View file

@ -18,14 +18,11 @@
</template>
<script lang="ts" setup>
import { defineAsyncComponent, computed, inject, onMounted, onUnmounted, watch } from 'vue';
import calcAge from 's-age';
import { defineAsyncComponent, computed, watch } from 'vue';
import * as Acct from 'foundkey-js/built/acct';
import * as misskey from 'foundkey-js';
import { getScrollPosition } from '@/scripts/scroll';
import { getUserMenu } from '@/scripts/get-user-menu';
import number from '@/filters/number';
import { userPage, acct as getAcct } from '@/filters/user';
import { acct as getAcct } from '@/filters/user';
import * as os from '@/os';
import { useRouter } from '@/router';
import { definePageMetadata } from '@/scripts/page-metadata';

View file

@ -3928,7 +3928,6 @@ __metadata:
require-all: 3.0.0
rndstr: 1.0.0
rss-parser: 3.12.0
s-age: 1.1.2
sanitize-html: 2.7.0
semver: 7.3.7
sharp: 0.29.3
@ -4974,7 +4973,6 @@ __metadata:
reflect-metadata: 0.1.13
rndstr: 1.0.0
rollup: 2.75.7
s-age: 1.1.2
sass: 1.53.0
seedrandom: 3.0.5
start-server-and-test: 1.14.0
@ -15051,13 +15049,6 @@ __metadata:
languageName: node
linkType: hard
"s-age@npm:1.1.2":
version: 1.1.2
resolution: "s-age@npm:1.1.2"
checksum: cc073977a1ba2c0b78551bbf29f356f1b11b6e47a1786196f2a2990a46627aef424d41fdabbb65974d3bbec168c16e2be4da4f66f6c3b9fad859a14aa162bc7a
languageName: node
linkType: hard
"safari-14-idb-fix@npm:^3.0.0":
version: 3.0.0
resolution: "safari-14-idb-fix@npm:3.0.0"