diff --git a/priv/static/index.html b/priv/static/index.html index e00ef9c18..54f040fd8 100644 --- a/priv/static/index.html +++ b/priv/static/index.html @@ -1 +1 @@ -
{{ $t('user_card.admin_menu.delete_user_confirmation') }}
\n \n \n \n \n for paragraphs, GS uses
between them)\n // as well as approximate line count by counting characters and approximating ~80\n // per line.\n //\n // Using max-height + overflow: auto for status components resulted in false positives\n // very often with japanese characters, and it was very annoying.\n tallStatus () {\n if (this.singleLine || this.compact) return false\n const lengthScore = this.status.raw_html.split(/
20\n },\n longSubject () {\n return this.status.summary.length > 240\n },\n // When a status has a subject and is also tall, we should only have one show more/less button. If the default is to collapse statuses with subjects, we just treat it like a status with a subject; otherwise, we just treat it like a tall status.\n mightHideBecauseSubject () {\n return !!this.status.summary && this.localCollapseSubjectDefault\n },\n mightHideBecauseTall () {\n return this.tallStatus && !(this.status.summary && this.localCollapseSubjectDefault)\n },\n hideSubjectStatus () {\n return this.mightHideBecauseSubject && !this.expandingSubject\n },\n hideTallStatus () {\n return this.mightHideBecauseTall && !this.showingTall\n },\n showingMore () {\n return (this.mightHideBecauseTall && this.showingTall) || (this.mightHideBecauseSubject && this.expandingSubject)\n },\n attachmentTypes () {\n return this.status.attachments.map(file => fileType.fileType(file.mimetype))\n },\n ...mapGetters(['mergedConfig'])\n },\n components: {\n RichContent\n },\n mounted () {\n this.status.attentions && this.status.attentions.forEach(attn => {\n const { id } = attn\n this.$store.dispatch('fetchUserIfMissing', id)\n })\n },\n methods: {\n onParseReady (event) {\n if (this.parseReadyDone) return\n this.parseReadyDone = true\n this.$emit('parseReady', event)\n const { writtenMentions, invisibleMentions } = event\n writtenMentions\n .filter(mention => !mention.notifying)\n .forEach(mention => {\n const { content, url } = mention\n const cleanedString = content.replace(/<[^>]+?>/gi, '') // remove all tags\n if (!cleanedString.startsWith('@')) return\n const handle = cleanedString.slice(1)\n const host = url.replace(/^https?:\\/\\//, '').replace(/\\/.+?$/, '')\n this.$store.dispatch('fetchUserIfMissing', `${handle}@${host}`)\n })\n /* This is a bit of a hack to make current tall status detector work\n * with rich mentions. Invisible mentions are detected at RichContent level\n * and also we generate plaintext version of mentions by stripping tags\n * so here we subtract from post length by each mention that became invisible\n * via MentionsLine\n */\n this.postLength = invisibleMentions.reduce((acc, mention) => {\n return acc - mention.textContent.length - 1\n }, this.postLength)\n },\n toggleShowMore () {\n if (this.mightHideBecauseTall) {\n this.toggleShowingTall()\n } else if (this.mightHideBecauseSubject) {\n this.toggleExpandingSubject()\n }\n },\n generateTagLink (tag) {\n return `/tag/${tag}`\n }\n }\n}\n\nexport default StatusContent\n","import { render } from \"./status_body.vue?vue&type=template&id=56d3fd78\"\nimport script from \"./status_body.js?vue&type=script&lang=js\"\nexport * from \"./status_body.js?vue&type=script&lang=js\"\n\nimport \"./status_body.scss?vue&type=style&index=0&lang=scss\"\n\nimport exportComponent from \"/home/hannah/personal/pleroma-fe/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import Attachment from '../attachment/attachment.vue'\nimport Poll from '../poll/poll.vue'\nimport Gallery from '../gallery/gallery.vue'\nimport StatusBody from 'src/components/status_body/status_body.vue'\nimport LinkPreview from '../link-preview/link-preview.vue'\nimport { mapGetters, mapState } from 'vuex'\nimport { library } from '@fortawesome/fontawesome-svg-core'\nimport {\n faCircleNotch,\n faFile,\n faMusic,\n faImage,\n faLink,\n faPollH\n} from '@fortawesome/free-solid-svg-icons'\n\nlibrary.add(\n faCircleNotch,\n faFile,\n faMusic,\n faImage,\n faLink,\n faPollH\n)\n\nconst camelCase = name => name.charAt(0).toUpperCase() + name.slice(1)\n\nconst controlledOrUncontrolledGetters = list => list.reduce((res, name) => {\n const camelized = camelCase(name)\n const toggle = `controlledToggle${camelized}`\n const controlledName = `controlled${camelized}`\n const uncontrolledName = `uncontrolled${camelized}`\n res[name] = function () {\n return ((this.$data[toggle] !== undefined || this.$props[toggle] !== undefined) && this[toggle]) ? this[controlledName] : this[uncontrolledName]\n }\n return res\n}, {})\n\nconst controlledOrUncontrolledToggle = (obj, name) => {\n const camelized = camelCase(name)\n const toggle = `controlledToggle${camelized}`\n const uncontrolledName = `uncontrolled${camelized}`\n if (obj[toggle]) {\n obj[toggle]()\n } else {\n obj[uncontrolledName] = !obj[uncontrolledName]\n }\n}\n\nconst StatusContent = {\n name: 'StatusContent',\n props: [\n 'status',\n 'compact',\n 'focused',\n 'noHeading',\n 'fullContent',\n 'singleLine',\n 'controlledShowingTall',\n 'controlledExpandingSubject',\n 'controlledToggleShowingTall',\n 'controlledToggleExpandingSubject',\n 'controlledShowingLongSubject',\n 'controlledToggleShowingLongSubject'\n ],\n data () {\n return {\n uncontrolledShowingTall: this.fullContent || (this.inConversation && this.focused),\n uncontrolledShowingLongSubject: false,\n // not as computed because it sets the initial state which will be changed later\n uncontrolledExpandingSubject: !this.$store.getters.mergedConfig.collapseMessageWithSubject\n }\n },\n computed: {\n ...controlledOrUncontrolledGetters(['showingTall', 'expandingSubject', 'showingLongSubject']),\n hideAttachments () {\n return (this.mergedConfig.hideAttachments && !this.inConversation) ||\n (this.mergedConfig.hideAttachmentsInConv && this.inConversation)\n },\n nsfwClickthrough () {\n if (!this.status.nsfw) {\n return false\n }\n if (this.status.summary && this.localCollapseSubjectDefault) {\n return false\n }\n return true\n },\n attachmentSize () {\n if (this.compact) {\n return 'small'\n } else if ((this.mergedConfig.hideAttachments && !this.inConversation) ||\n (this.mergedConfig.hideAttachmentsInConv && this.inConversation) ||\n (this.status.attachments.length > this.maxThumbnails)) {\n return 'hide'\n }\n return 'normal'\n },\n maxThumbnails () {\n return this.mergedConfig.maxThumbnails\n },\n ...mapGetters(['mergedConfig']),\n ...mapState({\n currentUser: state => state.users.currentUser\n })\n },\n components: {\n Attachment,\n Poll,\n Gallery,\n LinkPreview,\n StatusBody\n },\n methods: {\n toggleShowingTall () {\n controlledOrUncontrolledToggle(this, 'showingTall')\n },\n toggleExpandingSubject () {\n controlledOrUncontrolledToggle(this, 'expandingSubject')\n },\n toggleShowingLongSubject () {\n controlledOrUncontrolledToggle(this, 'showingLongSubject')\n },\n setMedia () {\n const attachments = this.attachmentSize === 'hide' ? this.status.attachments : this.galleryAttachments\n return () => this.$store.dispatch('setMedia', attachments)\n }\n }\n}\n\nexport default StatusContent\n","import { render } from \"./status_content.vue?vue&type=template&id=475fea91\"\nimport script from \"./status_content.js?vue&type=script&lang=js\"\nexport * from \"./status_content.js?vue&type=script&lang=js\"\n\nimport \"./status_content.vue?vue&type=style&index=0&id=475fea91&lang=scss\"\n\nimport exportComponent from \"/home/hannah/personal/pleroma-fe/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","export const SECOND = 1000\nexport const MINUTE = 60 * SECOND\nexport const HOUR = 60 * MINUTE\nexport const DAY = 24 * HOUR\nexport const WEEK = 7 * DAY\nexport const MONTH = 30 * DAY\nexport const YEAR = 365.25 * DAY\n\nexport const relativeTime = (date, nowThreshold = 1) => {\n if (typeof date === 'string') date = Date.parse(date)\n const round = Date.now() > date ? Math.floor : Math.ceil\n const d = Math.abs(Date.now() - date)\n let r = { num: round(d / YEAR), key: 'time.years' }\n if (d < nowThreshold * SECOND) {\n r.num = 0\n r.key = 'time.now'\n } else if (d < MINUTE) {\n r.num = round(d / SECOND)\n r.key = 'time.seconds'\n } else if (d < HOUR) {\n r.num = round(d / MINUTE)\n r.key = 'time.minutes'\n } else if (d < DAY) {\n r.num = round(d / HOUR)\n r.key = 'time.hours'\n } else if (d < WEEK) {\n r.num = round(d / DAY)\n r.key = 'time.days'\n } else if (d < MONTH) {\n r.num = round(d / WEEK)\n r.key = 'time.weeks'\n } else if (d < YEAR) {\n r.num = round(d / MONTH)\n r.key = 'time.months'\n }\n // Remove plural form when singular\n if (r.num === 1) r.key = r.key.slice(0, -1)\n return r\n}\n\nexport const relativeTimeShort = (date, nowThreshold = 1) => {\n const r = relativeTime(date, nowThreshold)\n r.key += '_short'\n return r\n}\n","\n \n {{ localDescription }}\n
\n {{ $t('general.flash_content') }}\n
\n\n