| 1 |
import{aO as e,S as t,T as a,a7 as r,bG as o,bx as s,bB as i,bC as n,bD as l,bE as d,bF as p}from"../vendor.js?ver=2.0.0";import{p as m,m as f,g as u,b as _,s as b,t as c,c as g,d as w,f as v,e as h,h as $,v as y,i as P,j,k as B,$ as V,R as T,l as I,S as k,o as x,r as A,n as F}from"../UpgradeUrl.js?ver=2.0.0";import{_ as S}from"../descriptionToPlainText.js?ver=2.0.0";import{k as C,l as D,m as E,n as L}from"../vendor-element-plus.js?ver=2.0.0";const Q=S({name:"SingleBoard",components:{TaskDashboard:m},data:()=>({boardId:null}),methods:{updateViewClass(){if(document.querySelector(".fluent_boards_frontend")){const e=document.getElementById("fluent-boards-app"),t=e.offsetWidth;t<=530?(e.classList.add("fbs_app_mobile_view"),e.classList.remove("fbs_app_tablet_view","fbs_app_laptop_view")):t<=809?(e.classList.add("fbs_app_tablet_view"),e.classList.remove("fbs_app_mobile_view","fbs_app_laptop_view")):t<=1024?(e.classList.add("fbs_app_laptop_view"),e.classList.remove("fbs_app_mobile_view","fbs_app_tablet_view")):e.classList.remove("fbs_app_mobile_view","fbs_app_tablet_view","fbs_app_laptop_view")}}},mounted(){const e=document.querySelector(".fluent_board_single_board_app_wrapper");if(e){const t=parseInt(e.getAttribute("data-board-id"));if(t)this.boardId=t;else{const t=e.id;this.boardId=t.split("-").pop()}}this.updateViewClass()}},[["render",function(o,s,i,n,l,d){const p=e("task-dashboard");return l.boardId?(t(),a(p,{key:0,shortcodeId:l.boardId},null,8,["shortcodeId"])):r("",!0)}]]),U=o(),M=s(Q),O=o();M.config.globalProperties.appVars=window.fluentAddonVars,M.config.globalProperties.appVars.isFrontView="front"===window.fluentAddonVars.render_in,window.Fuse=i,window.moment=f,M.mixin({data:()=>({Storage:k,hasPro:!!window.fluentAddonVars.has_pro,isTouchScreen:"ontouchstart"in window||navigator.maxTouchPoints>0}),methods:{$get:T.get,$post:T.post,$put:T.put,$del:T.delete,$uploadFile:T.uploadFile,formatNumber:(e,t=!1)=>!e&&t?"":(e||(e="0"),new Intl.NumberFormat("en-US").format(e)),$changeTitle(e=null){null!=e?jQuery("head title").text(e+" - FluentBoards"):jQuery("head title").text("FluentBoards")},$t:V,$humanTimeDiff:B,$handleError:j,handleError:j,convertToText:P,$validateEmail:y,smartDate:$,$smartDate:g,$checkOverdue:h,$formatDate:v,$smartDateRange:w,smartDateWithYear:g,taskGroupingByStages:c,sortTaskByPosition:b,$getPref:(e,t="")=>k.get(e,t),$setPref(e,t){k.set(e,t)},$getUpgradeUrl(e){return I(this.appVars.upgrade_url,e)},$formatMinutes(e){let t=parseInt(e);if(!t)return"--";const a=Math.floor(t/60);return t%=60,a?t?`${a}h ${t}m`:`${a}h`:`${t}m`},$getTaskUrl:_,$getBoardUrl:u,$isAdmin(){let e=window.fluentAddonVars.me.fluent_boards_role;return"wordpress_admin"===e||"fluent_boards_admin"===e},$isMember:()=>"member"===window.fluentAddonVars.me.fluent_boards_role,$isBoardManager(e){const t=window.fluentAddonVars.me.fluent_boards_capabilities.find(t=>t.board_id==e);return!!t&&"board_admin"===t.role},$canCreateBoard:()=>!!window.fluentAddonVars.me.can_create_board}}),M.config.globalProperties.$notify=e=>{C({...e,position:"bottom-right",style:{}})},M.config.globalProperties.$notify.success=e=>{C({...e,position:"bottom-right",type:"success",style:{}})},M.config.globalProperties.$notify.error=e=>{C({...e,position:"bottom-right",title:"Error",type:"error",style:{}})},M.config.globalProperties.$notify.warning=e=>{C({...e,position:"bottom-right",title:"Warning",type:"warning",style:{}})},M.config.globalProperties.$confirm=D.confirm,M.config.globalProperties.emitter=U;const R=n({routes:A,history:l(),scrollBehavior:x}),W=d();W.use(p),M.use(R),M.use(E),M.use(W),M.provide("eventBus",O),M.directive("prevent-context-menu",F);for(const[q,G]of Object.entries(L))M.component(q,G);M.mount("#fluent-framework-app"),R.beforeEach((e,t,a)=>{window.fbsPreviousRoute=t,a()}),R.afterEach((e,t)=>{const a=e.meta.active_menu;jQuery(".fframe_menu li").removeClass("active_item"),jQuery(".fframe_menu li.fframe_item_"+a).addClass("active_item"),jQuery(".toplevel_page_fluent_frame li").removeClass("current"),jQuery(".toplevel_page_fluent_frame li.fluent_frame_"+a).addClass("current"),e.meta.title&&jQuery("head title").text(e.meta.title+" - Fluent Boards")}); |