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uE,GAG0C,QAAtCf,EAAAA,GAAG,8BAAD,G,WAGVU,EAAAA,EAAAA,IAUSC,EAAAA,CATPC,QAAQ,0BACRC,IAAI,K,CAEOG,kBAAgB,SACzB,iBAG6C,EAH7CxE,EAAAA,EAAAA,GAG6C,IAH7CyE,GAG6C,QAAzCjB,EAAAA,GAAG,iCAAD,G,WAGVxD,EAAAA,EAAAA,GAYI,IAZJ0E,EAYI,EAXFR,EAAAA,EAAAA,IAUSC,EAAAA,CATPC,QAAQ,gBACRC,IAAI,S,CAEOM,cAAY,SACrB,iBAGe,CAHfC,E,oBASVC,GAA6B,MAGjC7E,EAAAA,EAAAA,GAoBM,MApBN8E,EAoBM,EAnBJ9E,EAAAA,EAAAA,GAKS,UAJPD,MAAM,iBACLgF,QAAK,wCAAUvB,EAAAA,gBAAAA,EAAAA,eAAAA,MAAAA,EAAAA,UAAc,mB,QAE3BA,EAAAA,GAAG,6BAAD,GAGEA,EAAAA,aAIF,iBAJa,WADpBK,EAAAA,EAAAA,IAMS,U,MAJP9D,MAAM,iBACLgF,QAAK,wCAAUvB,EAAAA,YAAAA,EAAAA,WAAAA,MAAAA,EAAAA,UAAU,mB,QAEvBA,EAAAA,GAAG,sBAAD,KAEPxD,EAAAA,EAAAA,GAKS,UAJPD,MAAM,iBACLgF,QAAK,wCAAUvB,EAAAA,SAAAA,EAAAA,QAAAA,MAAAA,EAAAA,UAAO,mB,QAEpBA,EAAAA,GAAG,oBAAD,S","sources":["webpack://pleroma_fe/./src/components/update_notification/update_notification.vue","webpack://pleroma_fe/./src/components/update_notification/update_notification.js","webpack://pleroma_fe/./src/components/update_notification/update_notification.vue?27aa"],"sourcesContent":["<template>\n <Modal\n :is-open=\"!!shouldShow\"\n class=\"UpdateNotification\"\n :no-background=\"true\"\n >\n <div\n class=\"UpdateNotificationModal panel\"\n :class=\"{ '-peek': !showingMore }\"\n >\n <div class=\"panel-heading\">\n <span class=\"title\">\n {{ $t('update.big_update_title') }}\n </span>\n </div>\n <div class=\"panel-body\">\n <div\n class=\"content\"\n :class=\"{ '-noImage': !showingImage }\"\n >\n <img\n v-if=\"showingImage\"\n class=\"pleroma-tan\"\n :src=\"pleromaTanVariant\"\n :style=\"pleromaTanStyles\"\n >\n <div class=\"spacer-top\" />\n <div class=\"text\">\n <p>\n {{ $t('update.big_update_content') }}\n </p>\n <div\n ref=\"animatedText\"\n class=\"extra-info-group\"\n >\n <i18n-t\n keypath=\"update.update_bugs\"\n tag=\"p\"\n >\n <template #pleromaGitlab>\n <a\n target=\"_blank\"\n href=\"https://git.pleroma.social/\"\n >{{ $t('update.update_bugs_gitlab') }}</a>\n </template>\n </i18n-t>\n <i18n-t\n keypath=\"update.update_changelog\"\n tag=\"p\"\n >\n <template #theFullChangelog>\n <a\n target=\"_blank\"\n href=\"https://pleroma.social/announcements/\"\n >{{ $t('update.update_changelog_here') }}</a>\n </template>\n </i18n-t>\n <p class=\"art-credit\">\n <i18n-t\n keypath=\"update.art_by\"\n tag=\"small\"\n >\n <template #linkToArtist>\n <a\n target=\"_blank\"\n href=\"https://post.ebin.club/users/pipivovott\"\n >pipivovott</a>\n </template>\n </i18n-t>\n </p>\n </div>\n </div>\n <div class=\"spacer-bottom\" />\n </div>\n </div>\n <div class=\"panel-footer\">\n <button\n class=\"button-default\"\n @click.prevent=\"neverShowAgain\"\n >\n {{ $t(\"general.never_show_again\") }}\n </button>\n <button\n v-if=\"!showingMore\"\n class=\"button-default\"\n @click.prevent=\"toggleShow\"\n >\n {{ $t(\"general.show_more\") }}\n </button>\n <button\n class=\"button-default\"\n @click.prevent=\"dismiss\"\n >\n {{ $t(\"general.dismiss\") }}\n </button>\n </div>\n </div>\n </Modal>\n</template>\n\n<script src=\"./update_notification.js\"></script>\n\n<style src=\"./update_notification.scss\" lang=\"scss\"></style>\n","import Modal from 'src/components/modal/modal.vue'\nimport { library } from '@fortawesome/fontawesome-svg-core'\nimport pleromaTan from 'src/assets/pleromatan_apology.png'\nimport pleromaTanFox from 'src/assets/pleromatan_apology_fox.png'\nimport pleromaTanMask from 'src/assets/pleromatan_apology_mask.png'\nimport pleromaTanFoxMask from 'src/assets/pleromatan_apology_fox_mask.png'\n\nimport {\n faTimes\n} from '@fortawesome/free-solid-svg-icons'\nlibrary.add(\n faTimes\n)\n\nexport const CURRENT_UPDATE_COUNTER = 1\n\nconst UpdateNotification = {\n data () {\n return {\n showingImage: false,\n pleromaTanVariant: Math.random() > 0.5 ? pleromaTan : pleromaTanFox,\n showingMore: false\n }\n },\n components: {\n Modal\n },\n computed: {\n pleromaTanStyles () {\n const mask = this.pleromaTanVariant === pleromaTan ? pleromaTanMask : pleromaTanFoxMask\n return {\n 'shape-outside': 'url(' + mask + ')'\n }\n },\n shouldShow () {\n return !this.$store.state.instance.disableUpdateNotification &&\n this.$store.state.users.currentUser &&\n this.$store.state.serverSideStorage.flagStorage.updateCounter < CURRENT_UPDATE_COUNTER &&\n !this.$store.state.serverSideStorage.prefsStorage.simple.dontShowUpdateNotifs\n }\n },\n methods: {\n toggleShow () {\n this.showingMore = !this.showingMore\n },\n neverShowAgain () {\n this.toggleShow()\n this.$store.commit('setFlag', { flag: 'updateCounter', value: CURRENT_UPDATE_COUNTER })\n this.$store.commit('setPreference', { path: 'simple.dontShowUpdateNotifs', value: true })\n this.$store.dispatch('pushServerSideStorage')\n },\n dismiss () {\n this.$store.commit('setFlag', { flag: 'updateCounter', value: CURRENT_UPDATE_COUNTER })\n this.$store.dispatch('pushServerSideStorage')\n }\n },\n mounted () {\n this.contentHeightNoImage = this.$refs.animatedText.scrollHeight\n\n // Workaround to get the text height only after mask loaded. A bit hacky.\n const newImg = new Image()\n newImg.onload = () => {\n setTimeout(() => { this.showingImage = true }, 100)\n }\n newImg.src = this.pleromaTanVariant === pleromaTan ? pleromaTanMask : pleromaTanFoxMask\n }\n}\n\nexport default UpdateNotification\n","import { render } from \"./update_notification.vue?vue&type=template&id=653a2178\"\nimport script from \"./update_notification.js?vue&type=script&lang=js\"\nexport * from \"./update_notification.js?vue&type=script&lang=js\"\n\nimport \"./update_notification.scss?vue&type=style&index=0&lang=scss\"\n\nimport exportComponent from \"/builds/pleroma/pleroma-fe/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"names":["class","_createElementVNode","ref","target","href","library","faTimes","CURRENT_UPDATE_COUNTER","data","showingImage","pleromaTanVariant","Math","random","pleromaTan","pleromaTanFox","showingMore","components","Modal","computed","pleromaTanStyles","this","pleromaTanMask","pleromaTanFoxMask","shouldShow","$store","state","instance","disableUpdateNotification","users","currentUser","serverSideStorage","flagStorage","updateCounter","prefsStorage","simple","dontShowUpdateNotifs","methods","toggleShow","neverShowAgain","commit","flag","value","path","dispatch","dismiss","mounted","contentHeightNoImage","$refs","animatedText","scrollHeight","newImg","Image","onload","setTimeout","src","_createBlock","_component_Modal","_ctx","_normalizeClass","_hoisted_1","_hoisted_2","_hoisted_3","_createElementBlock","style","_hoisted_5","_hoisted_6","_hoisted_7","_createVNode","_component_i18n_t","keypath","tag","pleromaGitlab","_hoisted_8","theFullChangelog","_hoisted_9","_hoisted_10","linkToArtist","_hoisted_11","_hoisted_12","_hoisted_13","onClick"],"sourceRoot":""}