mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 23:55:57 -05:00
2 lines
1.8 KiB
JavaScript
2 lines
1.8 KiB
JavaScript
import{_,o as d,c as u,a as s,z as y,a4 as i,r as f,q as n,d as c,t as l,k as $}from"./index.js";const b={name:"ContentText"},C={class:"section py-3"},v={class:"container"},k={class:"columns is-centered"},q={class:"column is-four-fifths"};function g(e,o,h,p,m,t){return d(),u("section",C,[s("div",v,[s("div",k,[s("div",q,[y(e.$slots,"content")])])])])}const A=_(b,[["render",g]]),S={name:"TabsSearch",props:["query"],computed:{spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},route_query(){return this.query?{type:"track,artist,album,playlist,audiobook,podcast",query:this.query,limit:3,offset:0}:null}},methods:{search_library(){this.$store.commit(i,"library"),this.$router.push({name:"search-library",query:this.route_query})},search_spotify(){this.$store.commit(i,"spotify"),this.$router.push({name:"search-spotify",query:this.route_query})}}},x={key:0,class:"section"},T={class:"container"},z={class:"columns is-centered"},B={class:"column is-four-fifths"},E={class:"tabs is-centered is-small is-toggle is-toggle-rounded"},N=["textContent"],V=["textContent"];function R(e,o,h,p,m,t){const r=f("mdicon");return t.spotify_enabled?(d(),u("section",x,[s("div",T,[s("div",z,[s("div",B,[s("div",E,[s("ul",null,[s("li",{class:n({"is-active":e.$store.state.search_source==="library"})},[s("a",{onClick:o[0]||(o[0]=(...a)=>t.search_library&&t.search_library(...a))},[c(r,{class:"icon is-small",name:"bookshelf",size:"16"}),s("span",{textContent:l(e.$t("page.search.tabs.library"))},null,8,N)])],2),s("li",{class:n({"is-active":e.$store.state.search_source==="spotify"})},[s("a",{onClick:o[1]||(o[1]=(...a)=>t.search_spotify&&t.search_spotify(...a))},[c(r,{class:"icon is-small",name:"spotify",size:"16"}),s("span",{textContent:l(e.$t("page.search.tabs.spotify"))},null,8,V)])],2)])])])])])])):$("",!0)}const D=_(S,[["render",R]]);export{A as C,D as T};
|