"use strict";(self.webpackChunkpleroma_fe=self.webpackChunkpleroma_fe||[]).push([[6464],{16464:(t,e,a)=>{a.r(e),a.d(e,{CURRENT_UPDATE_COUNTER:()=>T,default:()=>N});var n=a(66252),o=a(3577),s=a(49963),i={class:"panel-heading"},r={class:"title"},l={class:"panel-body"},u=["src"],p=(0,n._)("div",{class:"spacer-top"},null,-1),c={class:"text"},d={ref:"animatedText",class:"extra-info-group"},g={target:"_blank",href:"https://git.pleroma.social/"},h={target:"_blank",href:"https://pleroma.social/announcements/"},m={class:"art-credit"},_=(0,n._)("a",{target:"_blank",href:"https://post.ebin.club/users/pipivovott"},"pipivovott",-1),f=(0,n._)("div",{class:"spacer-bottom"},null,-1),w={class:"panel-footer"},v=a(58312),S=a(9382),b=a(31934),k=a(95326),$=a(43011),C=a(68789),y=a(84131);S.vI.add(y.NBC);var T=1;const M={data:function(){return{showingImage:!1,pleromaTanVariant:Math.random()>.5?b:k,showingMore:!1}},components:{Modal:v.Z},computed:{pleromaTanStyles:function(){return{"shape-outside":"url("+(this.pleromaTanVariant===b?$:C)+")"}},shouldShow:function(){return!this.$store.state.instance.disableUpdateNotification&&this.$store.state.users.currentUser&&this.$store.state.serverSideStorage.flagStorage.updateCounter<T&&!this.$store.state.serverSideStorage.prefsStorage.simple.dontShowUpdateNotifs}},methods:{toggleShow:function(){this.showingMore=!this.showingMore},neverShowAgain:function(){this.toggleShow(),this.$store.commit("setFlag",{flag:"updateCounter",value:T}),this.$store.commit("setPreference",{path:"simple.dontShowUpdateNotifs",value:!0}),this.$store.dispatch("pushServerSideStorage")},dismiss:function(){this.$store.commit("setFlag",{flag:"updateCounter",value:T}),this.$store.dispatch("pushServerSideStorage")}},mounted:function(){var t=this;this.contentHeightNoImage=this.$refs.animatedText.scrollHeight;var e=new Image;e.onload=function(){setTimeout((function(){t.showingImage=!0}),100)},e.src=this.pleromaTanVariant===b?$:C}},N=(0,a(83744).Z)(M,[["render",function(t,e,a,v,S,b){var k=(0,n.up)("i18n-t"),$=(0,n.up)("Modal");return(0,n.wg)(),(0,n.j4)($,{"is-open":!!t.shouldShow,class:"UpdateNotification","no-background":!0},{default:(0,n.w5)((function(){return[(0,n._)("div",{class:(0,o.C_)(["UpdateNotificationModal panel",{"-peek":!t.showingMore}])},[(0,n._)("div",i,[(0,n._)("span",r,(0,o.zw)(t.$t("update.big_update_title")),1)]),(0,n._)("div",l,[(0,n._)("div",{class:(0,o.C_)(["content",{"-noImage":!t.showingImage}])},[t.showingImage?((0,n.wg)(),(0,n.iD)("img",{key:0,class:"pleroma-tan",src:t.pleromaTanVariant,style:(0,o.j5)(t.pleromaTanStyles)},null,12,u)):(0,n.kq)("",!0),p,(0,n._)("div",c,[(0,n._)("p",null,(0,o.zw)(t.$t("update.big_update_content")),1),(0,n._)("div",d,[(0,n.Wm)(k,{keypath:"update.update_bugs",tag:"p"},{pleromaGitlab:(0,n.w5)((function(){return[(0,n._)("a",g,(0,o.zw)(t.$t("update.update_bugs_gitlab")),1)]})),_:1}),(0,n.Wm)(k,{keypath:"update.update_changelog",tag:"p"},{theFullChangelog:(0,n.w5)((function(){return[(0,n._)("a",h,(0,o.zw)(t.$t("update.update_changelog_here")),1)]})),_:1}),(0,n._)("p",m,[(0,n.Wm)(k,{keypath:"update.art_by",tag:"small"},{linkToArtist:(0,n.w5)((function(){return[_]})),_:1})])],512)]),f],2)]),(0,n._)("div",w,[(0,n._)("button",{class:"button-default",onClick:e[0]||(e[0]=(0,s.iM)((function(){return t.neverShowAgain&&t.neverShowAgain.apply(t,arguments)}),["prevent"]))},(0,o.zw)(t.$t("general.never_show_again")),1),t.showingMore?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)("button",{key:0,class:"button-default",onClick:e[1]||(e[1]=(0,s.iM)((function(){return t.toggleShow&&t.toggleShow.apply(t,arguments)}),["prevent"]))},(0,o.zw)(t.$t("general.show_more")),1)),(0,n._)("button",{class:"button-default",onClick:e[2]||(e[2]=(0,s.iM)((function(){return t.dismiss&&t.dismiss.apply(t,arguments)}),["prevent"]))},(0,o.zw)(t.$t("general.dismiss")),1)])],2)]})),_:1},8,["is-open"])}]])}}]);
//# sourceMappingURL=6464.2ababce187697ee8b1e9.js.map