| 1 |
import{aO as e,S as t,T as a,a7 as s,bJ as r,bx as o,bE as n,bF as i,bG as l,bH as d,bI as p}from"../vendor.js?ver=2.1.0";import{p as f,m,g as u,b as _,s as c,t as b,c as w,d as g,f as v,e as h,h as $,v as y,i as P,j as V,k as j,$ as B,R as I,l as T,S as A,o as k,r as x,n as F}from"../UpgradeUrl.js?ver=2.1.0";import{_ as S}from"../descriptionToPlainText.js?ver=2.1.0";import{k as E,l as C,m as D,n as L}from"../vendor-element-plus.js?ver=2.1.0";const Q=S({name:"SingleBoard",components:{TaskDashboard:f},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(r,o,n,i,l,d){const p=e("task-dashboard");return l.boardId?(t(),a(p,{key:0,shortcodeId:l.boardId},null,8,["shortcodeId"])):s("",!0)}]]),U=r(),M=o(Q),O=r();M.config.globalProperties.appVars=window.fluentAddonVars,M.config.globalProperties.appVars.isFrontView="front"===window.fluentAddonVars.render_in,window.Fuse=n,window.moment=m;const R=()=>window.fluentAddonVars&&window.fluentAddonVars.is_rtl?"bottom-left":"bottom-right";M.mixin({data:()=>({Storage:A,hasPro:!!window.fluentAddonVars.has_pro,isTouchScreen:"ontouchstart"in window||navigator.maxTouchPoints>0}),methods:{$get:I.get,$post:I.post,$put:I.put,$del:I.delete,$uploadFile:I.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:B,$humanTimeDiff:j,$handleError:V,handleError:V,convertToText:P,$validateEmail:y,smartDate:$,$smartDate:w,$checkOverdue:h,$formatDate:v,$smartDateRange:g,smartDateWithYear:w,taskGroupingByStages:b,sortTaskByPosition:c,$getPref:(e,t="")=>A.get(e,t),$setPref(e,t){A.set(e,t)},$getUpgradeUrl(e){return T(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=>{E({...e,position:R(),style:{}})},M.config.globalProperties.$notify.success=e=>{E({...e,position:R(),type:"success",style:{}})},M.config.globalProperties.$notify.error=e=>{E({...e,position:R(),title:B("Error"),type:"error",style:{}})},M.config.globalProperties.$notify.warning=e=>{E({...e,position:R(),title:B("Warning"),type:"warning",style:{}})},M.config.globalProperties.$confirm=C.confirm,M.config.globalProperties.emitter=U;const W=i({routes:x,history:l(),scrollBehavior:k}),q=d();q.use(p),M.use(W),M.use(D),M.use(q),M.provide("eventBus",O),M.directive("prevent-context-menu",F);for(const[G,N]of Object.entries(L))M.component(G,N);M.mount("#fluent-framework-app"),W.beforeEach((e,t,a)=>{window.fbsPreviousRoute=t,a()}),W.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")}); |