Merge branch 'deps/moment-to-luxon' into 'develop'
Migrate from deprecated moment to luxon See merge request pleroma/admin-fe!273
This commit is contained in:
commit
a9d1304ba4
8 changed files with 16 additions and 20 deletions
|
@ -32,7 +32,6 @@ lint:
|
|||
stage: test
|
||||
before_script: &before-yarn
|
||||
- apk --no-cache add git python3 build-base
|
||||
- yarn cache clean
|
||||
- yarn
|
||||
cache:
|
||||
key: '$CI_COMMIT_SHORT_SHA'
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
"lodash": "4.17.21",
|
||||
"lodash.debounce": "4.0.8",
|
||||
"marked": "0.8.2",
|
||||
"moment": "2.29.4",
|
||||
"luxon": "3.0.1",
|
||||
"normalize.css": "7.0.0",
|
||||
"nprogress": "0.2.0",
|
||||
"numeral": "2.0.6",
|
||||
|
|
|
@ -51,8 +51,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
|
||||
import { DateTime } from 'luxon'
|
||||
export default {
|
||||
name: 'ChatMessage',
|
||||
props: {
|
||||
|
@ -79,7 +78,7 @@ export default {
|
|||
return account[property]
|
||||
},
|
||||
parseTimestamp(timestamp) {
|
||||
return moment(timestamp).format('YYYY-MM-DD HH:mm')
|
||||
return DateTime.fromISO(timestamp).toFormat('yyyy-MM-dd HH:mm')
|
||||
},
|
||||
deleteMessage() {
|
||||
this.$confirm('Are you sure you want to delete this message?', 'Warning', {
|
||||
|
|
|
@ -135,8 +135,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
|
||||
import { DateTime } from 'luxon'
|
||||
export default {
|
||||
name: 'Status',
|
||||
props: {
|
||||
|
@ -233,7 +232,7 @@ export default {
|
|||
return +(pollOption.votes_count / allVotes * 100).toFixed(1)
|
||||
},
|
||||
parseTimestamp(timestamp) {
|
||||
return moment(timestamp).format('YYYY-MM-DD HH:mm')
|
||||
return DateTime.fromISO(timestamp).toFormat('yyyy-MM-dd HH:mm')
|
||||
},
|
||||
propertyExists(account, property, _secondProperty) {
|
||||
if (_secondProperty) {
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
import { DateTime } from 'luxon'
|
||||
import _ from 'lodash'
|
||||
import debounce from 'lodash.debounce'
|
||||
import RebootButton from '@/components/RebootButton'
|
||||
|
@ -128,7 +128,7 @@ export default {
|
|||
this.$store.dispatch('FetchModerationLog', filters)
|
||||
},
|
||||
normalizeTimestamp(timestamp) {
|
||||
return moment(timestamp * 1000).format('YYYY-MM-DD HH:mm')
|
||||
return DateTime.fromSeconds(timestamp).toFormat('yyyy-MM-dd HH:mm')
|
||||
},
|
||||
propertyExists(account, property) {
|
||||
return account[property]
|
||||
|
|
|
@ -29,8 +29,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
|
||||
import { DateTime } from 'luxon'
|
||||
export default {
|
||||
name: 'NoteCard',
|
||||
props: {
|
||||
|
@ -63,7 +62,7 @@ export default {
|
|||
})
|
||||
},
|
||||
parseTimestamp(timestamp) {
|
||||
return moment(timestamp).format('YYYY-MM-DD HH:mm')
|
||||
return DateTime.fromISO(timestamp).toFormat('yyyy-MM-dd HH:mm')
|
||||
},
|
||||
propertyExists(account, property) {
|
||||
return account[property]
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
import { DateTime } from 'luxon'
|
||||
import ModerateUserDropdown from './ModerateUserDropdown'
|
||||
import ReportContent from './ReportContent'
|
||||
|
||||
|
@ -98,7 +98,7 @@ export default {
|
|||
this.$store.dispatch('FetchReports', page)
|
||||
},
|
||||
parseTimestamp(timestamp) {
|
||||
return moment(timestamp).format('L HH:mm')
|
||||
return DateTime.fromISO(timestamp).toFormat('yyyy-MM-dd HH:mm')
|
||||
},
|
||||
propertyExists(account, property, _secondProperty) {
|
||||
if (_secondProperty) {
|
||||
|
|
10
yarn.lock
10
yarn.lock
|
@ -6919,6 +6919,11 @@ lru-cache@^5.1.1:
|
|||
dependencies:
|
||||
yallist "^3.0.2"
|
||||
|
||||
luxon@3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.0.1.tgz#6901111d10ad06fd267ad4e4128a84bef8a77299"
|
||||
integrity sha512-hF3kv0e5gwHQZKz4wtm4c+inDtyc7elkanAsBq+fundaCdUBNJB1dHEGUZIM6SfSBUlbVFduPwEtNjFK8wLtcw==
|
||||
|
||||
make-dir@^1.0.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c"
|
||||
|
@ -7216,11 +7221,6 @@ mkdirp@0.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.6, mkdirp@~
|
|||
dependencies:
|
||||
minimist "^1.2.6"
|
||||
|
||||
moment@2.29.4:
|
||||
version "2.29.4"
|
||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
|
||||
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==
|
||||
|
||||
move-concurrently@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
|
||||
|
|
Loading…
Reference in a new issue