PageSourceSearch

https://www.berrycast.com/assets/UserLocalRecords.88373df8.js

js berrycast.com collected 2026-09-24 08:56:09 UTC 5,782 bytes, 2 lines download raw bytes

1import{D as c}from"./datetime.520a7f7e.js";import{h as p,aA as m,aH as n,C as u,P as _,U as v,a0 as g,n as f}from"./index.a83a0d04.js";import{W as h}from"./WebappLayout.17d2cc6e.js";import{L as y}from"./LocalRecordRetryHelper.9e7eaa5c.js";import{T as b}from"./TimeHelper.9422cdcd.js";import"./PendingInvitationsService.ddada549.js";import"./ModalContainerMixin.2ed26b84.js";import"./ConversationHelper.3fafe44f.js";import"./ConversationService.f0bdeae5.js";import"./ClipboardService.dfe219e9.js";import"./IconClose.62c6f632.js";import"./UiField.3a8c4792.js";import"./InfiniteScroller.0e513df9.js";import"./ico-bell.41985c99.js";import"./ProviderOauth2Service.2b1c4223.js";import"./berrycast-tag.cccf157f.js";import"./ico-back.4464a8d5.js";import"./ico-download.da4a7294.js";import"./SmartImage.f30efac4.js";import"./ImageService.686448c3.js";import"./default_thumbnail.6f7d6858.js";import"./UserDropMenu.dc960523.js";import"./UiDivider.40509c76.js";import"./TheUserAvatar.f898e11d.js";import"./ico-videos.7227efc9.js";var w=Object.defineProperty,C=Object.getOwnPropertyDescriptor,S=(e,r,t,s)=>{for(var a=s>1?void 0:s?C(r,t):r,o=e.length-1,i;o>=0;o--)(i=e[o])&&(a=(s?i(r,t,a):i(a))||a);return s&&a&&w(r,t,a),a};let l=class extends p(_){constructor(){super(...arguments),this.selectLocalRecordData=null}get showDeleteModal(){return!!this.selectLocalRecordData}getReadableCreateDate(e){const r=c.fromMillis(e.recordDate),t=r.toLocaleString(c.DATE_FULL),s=r.toFormat("HH:mm");return`${t} - ${s}`}getReadableSize(e){const t=["Bytes","KB","MB","GB"],s=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,s)).toFixed(2))} ${t[s]}`}getRemainingTime(e){return b.secondsToString(e.progress.eta)}getSpeedStats(e){return`${this.getReadableSize(e.progress.speed)} / s (${this.getReadableSize(e.progress.transferred)} / ${this.getReadableSize(e.progress.length)})
2    `}async retry(e){var r;try{await y.retry(e)}catch(t){const s=(r=t==null?void 0:t.response)==null?void 0:r.status;m.showHttpErrorMessage(s)}}async download(e){const r=window.require("electron");var t={title:"Save file",buttonLabel:"Save",filters:[{name:"Video",extensions:["mp4"]}]};const s=await r.remote.dialog.showSaveDialog(t);s.canceled||window.require("fs").copyFileSync(e.files[0].localFileFullPath,s.filePath)}async deleteLocalRecord(e){window.require("electron").ipcRenderer.send("localRecordData:delete",{recordId:e.recordId}),this.selectLocalRecordData=null}isFailed(e){return e.state===n.FAILED}isReadyToUpload(e){return e.state===n.READY_TO_UPLOAD}isReadyToProcess(e){return e.state===n.READY_TO_PROCESS}};l=S([u({components:{UiButton:v,WebappLayout:h,UiHeading:g}})],l);var L=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("WebappLayout",{staticClass:"user-local-record"},[t("template",{slot:"header"},[t("UiHeading",{attrs:{size:"3"}},[e._v("Unuploaded Videos")])],1),t("table",{staticClass:"w-full"},[t("thead",[t("tr",{staticClass:"text-left border-b border-gray-400"},[t("th",[e._v("Record date")]),t("th",[e._v("# Upload Attempts")]),t("th",[e._v("Status")]),t("th",[e._v("Actions")])])]),t("tbody",[e.$modules.localRecordDatas.readyList.length===0?t("tr",[t("span",[e._v("There is no local record right now")])]):e._e(),e._l(e.$modules.localRecordDatas.readyList,function(s){return t("tr",{key:s.recordId,staticClass:"align-top border-b border-gray-200"},[t("td",{staticClass:"py-3"},[t("span",[e._v(e._s(e.getReadableCreateDate(s)))]),t("br"),e.isReadyToUpload(s)?t("div",{staticClass:"text-sm italic text-gray-300"},[t("span",{attrs:{title:"Record duration"}},[e._v(e._s(e._f("toTime")(s.recordDurationInSeconds)))])]):e._e()]),t("td",{staticClass:"py-3"},[e._v(e._s(s.numberOfUploadAttempts))]),t("td",{staticClass:"py-3",staticStyle:{width:"280px"}},[s.progress&&e.isReadyToUpload(s)?t("div",{attrs:{title:e.getSpeedStats(s)}},[t("span",[e._v("Uploading... ("+e._s(Math.round(s.progress.percentage))+"%)")]),t("br"),t("span",{staticClass:"text-sm italic text-gray-300"},[e._v("Remaining time : "+e._s(e.getRemainingTime(s)))])]):s.progress&&e.isReadyToProcess(s)?t("div",[t("span",[e._v("Processing... ("+e._s(Math.round(s.progress.percentage))+"%)")])]):e.isFailed(s)?t("div",[t("span",[e._v("Failed")])]):t("span",{attrs:{title:"The record will be process soon, please wait."}},[e._v("Standby")])]),t("td",{staticClass:"py-3",staticStyle:{width:"200px"}},[t("ul",{staticClass:"flex flex-row"},[s.params.conversationUuid?t("li",{staticClass:"mr-4"},[t("ui-button",{attrs:{size:"sm",variant:"text",to:{name:"Conversation",params:{uuid:s.params.conversationUuid}}}}
2,[e._v("View")])],1):e._e(),e.isFailed(s)?t("li",{staticClass:"mr-4"},[t("ui-button",{attrs:{size:"sm",variant:"text"},on:{click:function(a){return e.retry(s)}}},[e._v("Retry")])],1):e._e(),s.progress?e._e():t("li",{on:{click:function(a){e.selectLocalRecordData=s}}},[t("ui-button",{staticClass:"text-red-300",attrs:{size:"sm",variant:"text"}},[e._v("Delete")])],1)])])])})],2)]),t("portal",{attrs:{to:"modals"}},[t("modal",{attrs:{width:"420px"},on:{close:function(s){e.showDeleteModal=!1}},model:{value:e.showDeleteModal,callback:function(s){e.showDeleteModal=s},expression:"showDeleteModal"}},[t("p",[e._v("You record will be delete forever. Are you sure?")]),t("div",{staticClass:"flex items-center justify-end",attrs:{slot:"modal-actions"},slot:"modal-actions"},[t("button",{staticClass:"btn btn--cancel",on:{click:function(s){e.selectLocalRecordData=null}}},[e._v("Cancel")]),t("button",{staticClass:"btn btn--danger",on:{click:function(s){return e.deleteLocalRecord(e.selectLocalRecordData)}}},[e._v("Delete forever")])])])],1)],2)},x=[];const d={};var T=f(l,L,x,!1,R,"339b59c1",null,null);function R(e){for(let r in d)this[r]=d[r]}var Z=function(){return T.exports}();export{Z as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.