f7cloud_client/apps/photos/js/ActionFavorite-bRkKTDIn.chunk.mjs
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

3 lines
1.5 KiB
JavaScript

import{d as o,t as s}from"./vue.runtime.esm-Ct3_M7aQ.chunk.mjs";import{N as i}from"./NcActionButton-CuVNJJtW-78GF8FR5.chunk.mjs";import{S as r,f as a,n as l}from"./icons-VGG7keIQ.chunk.mjs";const c=o({name:"ActionFavorite",components:{Star:a,StarOutline:r,NcActionButton:i},props:{selectedFileIds:{type:Array,required:!0}},computed:{files(){return this.$store.state.files.files},shouldFavoriteSelection(){return this.selectedFileIds.some(t=>this.files[t].attributes.favorite===0)}},methods:{async favoriteSelection(){await this.$store.dispatch("toggleFavoriteForFiles",{fileIds:this.selectedFileIds,favoriteState:1})},async unFavoriteSelection(){await this.$store.dispatch("toggleFavoriteForFiles",{fileIds:this.selectedFileIds,favoriteState:0})},t:s}});var n=function(){var t=this,e=t._self._c;return t._self._setupProxy,t.shouldFavoriteSelection?e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Mark selection as favorite")},on:{click:t.favoriteSelection}},[t._v(" "+t._s(t.t("photos","Add selection to favorites"))+" "),e("StarOutline",{attrs:{slot:"icon"},slot:"icon"})],1):e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Remove selection from favorites")},on:{click:t.unFavoriteSelection}},[t._v(" "+t._s(t.t("photos","Remove selection from favorites"))+" "),e("Star",{attrs:{slot:"icon"},slot:"icon"})],1)},f=[],v=l(c,n,f,!1,null,null);const h=v.exports;export{h as A};
//# sourceMappingURL=ActionFavorite-bRkKTDIn.chunk.mjs.map