PageSourceSearch

https://misskey-hub.net/_nuxt/AuItW0Fe.js

js misskey-hub.net collected 2026-09-24 18:45:40 UTC 9,678 bytes, 1 lines download raw bytes

1import{d as R,I as j,Q as h,z as H,a as i,m as w,w as O,k as t,_ as z,b as l,U as f,F as x,f as e,L as E,t as n,E as F,D as V,s as C,G as k,a5 as U,a6 as L,a7 as B}from"./Czo40Pbp.js";import{X as A}from"./DgTtwiOI.js";const M={class:"border border-neutral-300 dark:border-neutral-800 dark:bg-neutral-800 rounded-lg shadow-lg overflow-hidden focus-within:ring-2 ring-accent-500 ring-offset-2"},T={class:"relative aspect-video bg-neutral-200 dark:bg-neutral-600"},G=["src"],X=["src"],Q=["src"],q={class:"absolute h-1/2 bottom-0 left-0 w-full bg-gradient-to-b from-transparent to-black text-white p-4 flex items-end"},J={class:"h-14 w-14 min-w-0 flex-shrink-0 mr-4"},K=["src"],W=["src"],Y={class:"min-w-0 flex flex-col justify-end"},Z={class:"font-bold text-2xl whitespace-nowrap truncate"},ee={class:"opacity-90 text-sm truncate"},te={class:"p-4"},se=["title"],ne={class:"grid grid-cols-3 text-center"},oe={class:"text-xs opacity-90"},ie=["title"],le={class:"text-xs opacity-90"},ae=["title"],re={class:"text-xs opacity-90"},ce={class:"font-bold text-accent-600"},de={class:"absolute h-full w-4/5 top-0 left-0 overflow-hidden"},ue=["src"],_e=["src"],me={class:"relative flex w-full items-center p-2"},pe={class:"h-14 w-14 min-w-0 flex-shrink-0 mr-4"},fe=["src"],ge={class:"truncate"},ve={class:"font-bold text-xl whitespace-nowrap truncate"},be={class:"opacity-90 hidden sm:block text-sm truncate"},he={class:"text-sm flex sm:hidden space-x-2"},we={class:"flex space-x-1"},$e={class:"opacity-90"},ye={class:"font-bold text-accent-600"},ke={class:"flex space-x-1"},xe={class:"opacity-90"},Ce={class:"font-bold text-accent-600"},Ue={class:"ml-auto flex-shrink-0 hidden min-w-[17rem] sm:grid grid-cols-3 text-center"},Le={class:"text-xs opacity-90"},Be={class:"font-bold text-accent-600"},Ae={class:"text-xs opacity-90"},Re={class:"font-bold text-accent-600"},Se={class:"text-xs opacity-90"},Pe={class:"font-bold text-accent-600"},De=R({__name:"Item",props:{instance:{},view:{default:"grid"},disableDomParser:{type:Boolean,default:!1},manualIcon:{default:null},manualBackground:{default:null}},setup(d){const c=E(),_=d,{instance:s}=j(_);function g(o){return new Promise(p=>{if(_.disableDomParser){p(o);return}const v=new DOMParser().parseFromString(o,"text/html");p(v.body.textContent||"")})}async function m(){_.instance.description?u.value=await g(_.instance.description):u.value=""}const u=h("");return H(s,m,{immediate:!0}),(o,p)=>{const v=z;return l(),i("div",M,[w(v,{to:`https://${t(s).url}`,target:"_blank",class:"relative"},{default:O(()=>[d.view==="grid"?(l(),i(x,{key:0},[e("div",T,[d.manualBackground?(l(),i("img",{key:0,src:d.manualBackground,class:"w-full h-full object-cover"},null,8,G)):t(s).background?(l(),i("img",{key:1,loading:"lazy",src:`${t(c).public.serverListApiBaseUrl}/instance-backgrounds/${t(s).url}.webp`,class:"w-full h-full object-cover"},null,8,X)):t(s).banner?(l(),i("img",{key:2,loading:"lazy",src:`${t(c).public.serverListApiBaseUrl}/instance-banners/${t(s).url}.webp`,class:"w-full h-full object-cover"},null,8,Q)):f("",!0),e("div",q,[e("div",J,[d.manualIcon?(l(),i("img",{key:0,src:d.manualIcon,class:"w-full h-full rounded"},null,8,K)):t(s).icon?(l(),i("img",{key:1,src:`${t(c).public.serverListApiBaseUrl}/instance-icons/${t(s).url}.webp`,class:"w-full h-full rounded"},null,8,W)):f("",!0)]),e("div",Y,[e("h2",Z,n(t(s).name),1),e("p",ee,n(t(s).url)+" / v."+n(t(s).nodeinfo?.software.version),1)])])]),e("div",te,[e("p",{title:t(u),class:"h-12 line-clamp-2 mb-2"},n(t(u)),9,se),e("div",ne,[e("dl",null,[e("dt",oe,n(o.$t("_servers._statistics.notes")),1),e("dd",{title:t(s).stats?.originalNotesCount?o.$n(t(s).stats.originalNotesCount):void 0,class:"font-bold text-accent-600"},n(t(s).stats?.originalNotesCount?o.$n(t(s).stats.originalNotesCount,t(s).stats.originalNotesCount>=1e5?{notation:"compact",maximumFractionDigits:1}:{notation:"standard"}):""),9,ie)]),e("dl",null,[e("dt",le,n(o.$t("_servers._statistics.users")),1),e("dd",{title:t(s).stats?.originalUsersCount?o.$n(t(s).stats.originalUsersCount):void 0,class:"font-bold text-accent-600"},n(t(s).stats?.originalUsersCount?o.$n(t(s).stats.originalUsersCount,t(s).stats.originalUsersCount>=1e5?{notation:"compact",maximumFractionDigits:1}:{notation:"standard"}):""),9,ae)]),e("dl",null,[e("dt",re,n(o.$t("_servers._registerAcceptance.title")),1),e("dd",ce,n(t(s).meta?.disableRegistration?o.$t("_servers._registerAcceptance.inviteOnly"):o.$t("_servers._registerAcceptance.public")),1)])])])],64)):d.view==="list"?(l(),i(x,{key:1},[e("div",de,[t(s).background?(l(),i("img",{key:0,loading:"lazy",src:`${t(c).public.serverListApiBaseUrl}/instance-backgrounds/${t(s).url}.webp`,class:"h-full w-full object-cover object-center opacity-40 blur-md"},null,8,ue)):t(s).banner?(l(),i("img",{key:1,loading:"lazy",src:`${t(c).public.serverListApiBaseUrl}/instance-banners/${t(s).url}.webp`,class:"h-full w-full object-cover object-center opacity-40 blur-md"},null,8,_e)):f("",!0),p[0]||(p[0]=e("div",{class:"absolute top-0 left-0 h-full w-full bg-gradient-to-r from-transparent to-white dark:to-neutral-800"},null,-1))]),e("div",me,[e("div",pe,[t(s).icon?(l(),i("img",{key:0,src:`${t(c).public.serverListApiBaseUrl}/instance-icons/${t(s).url}.webp`,class:"w-full h-full rounded"},null,8,fe)):f("",!0)]),e("div",ge,[e("h2",ve,n(t(s).name),1),e("p",be,n(t(s).url)+" / v."+n(t(s).nodeinfo?.software.version),1
1),e("div",he,[e("dl",we,[e("dt",$e,n(o.$t("_servers._statistics.users")),1),e("dd",ye,n(t(s).stats?.originalUsersCount.toLocaleString()),1)]),e("dl",ke,[e("dt",xe,n(o.$t("_servers._registerAcceptance.title")),1),e("dd",Ce,n(t(s).meta?.disableRegistration?o.$t("_servers._registerAcceptance.inviteOnly"):o.$t("_servers._registerAcceptance.public")),1)])])]),e("div",Ue,[e("dl",null,[e("dt",Le,n(o.$t("_servers._statistics.notes")),1),e("dd",Be,n(t(s).stats?.originalNotesCount.toLocaleString()),1)]),e("dl",null,[e("dt",Ae,n(o.$t("_servers._statistics.users")),1),e("dd",Re,n(t(s).stats?.originalUsersCount.toLocaleString()),1)]),e("dl",null,[e("dt",Se,n(o.$t("_servers._registerAcceptance.title")),1),e("dd",Pe,n(t(s).meta?.disableRegistration?o.$t("_servers._registerAcceptance.inviteOnly"):o.$t("_servers._registerAcceptance.public")),1)])])])],64)):f("",!0)]),_:1},8,["to"])])}}}),Ie={class:"container mx-auto max-w-screen-xl px-6 py-6"},Ne={class:"text-2xl lg:text-3xl font-bold mb-4"},je={class:"rounded-lg grid md:grid-cols-2 gap-4"},He={class:"space-y-4"},Oe={class:"p-6 space-y-4 rounded-lg bg-white dark:bg-neutral-950"},ze={class:"-mt-6 -mx-6 px-6 py-3 font-bold text-lg border-b"},Ee={inert:""},Fe={class:"space-y-4"},Ve={class:"p-6 space-y-4 rounded-lg bg-white dark:bg-neutral-950"},Me={class:"-mt-6 -mx-6 px-6 py-3 font-bold text-lg border-b"},Te={class:"space-y-6"},Ge={for:"name",class:"mb-1"},Xe={for:"description",class:"mb-1"},Qe={for:"icon",class:"mb-1"},qe={class:"input-group"},Je={for:"bg",class:"mb-1"},Ke={class:"input-group"},We={class:"form-text"},et=R({__name:"hub-servers-preview",setup(d){const{t:c}=F(),_=V(),s=h(""),g=h(""),m=h(null),u=C(null),o=k(()=>m.value?URL.createObjectURL(m.value):null);function p(a){const r=a.target;r.files&&r.files.length>0&&(m.value=r.files[0])}function v(){m.value=null,u.value&&(u.value.value="")}const b=h(null),$=C(null),S=k(()=>b.value?URL.createObjectURL(b.value):null);function P(a){const r=a.target;r.files&&r.files.length>0&&(b.value=r.files[0])}function D(){b.value=null,$.value&&($.value.value="")}const I=k(()=>({url:"misskey.example.com",langs:[],value:0,meta:{disableRegistration:!1},nodeinfo:{software:{version:"2025.0.0"}},stats:{notesCount:1e7,originalNotesCount:1e7,usersCount:1e6,originalUsersCount:1e6,instances:0,driveUsageLocal:0,driveUsageRemote:0},npd15:146602.4,name:s.value||"Misskey",description:g.value||"The most powerful, flexible, and customizable open-source social network software.",isAlive:!0,background:!1,icon:!1,banner:!1}));return _.meta.title=c("_miHubServerListPreview.title"),_.meta.description=c("_miHubServerListPreview.description"),(a,r)=>{const N=De;return l(),i("div",Ie,[e("h1",Ne,n(a.$t("_miHubServerListPreview.title")),1),e("div",je,[e("div",He,[e("div",Oe,[e("header",ze,n(a.$t("preview")),1),e("div",Ee,[w(N,{class:"max-w-[380px] mx-auto",instance:t(I),disableDomParser:!0,manualIcon:t(o),manualBackground:t(S)},null,8,["instance","manualIcon","manualBackground"])])])]),e("div",Fe,[e("div",Ve,[e("header",Me,n(a.$t("settings")),1),e("div",Te,[e("div",null,[e("label",Ge,n(a.$t("_miHubServerListPreview.name")),1),U(e("input",{"onUpdate:modelValue":r[0]||(r[0]=y=>B(s)?s.value=y:null),type:"text",id:"name",class:"form-control"},null,512),[[L,t(s)]])]),e("div",null,[e("label",Xe,n(a.$t("_miHubServerListPreview.serverDescription")),1),U(e("textarea",{"onUpdate:modelValue":r[1]||(r[1]=y=>B(g)?g.value=y:null),id:"description",class:"form-control"},null,512),[[L,t(g)]])]),e("div",null,[e("label",Qe,n(a.$t("_miHubServerListPreview.icon")),1),e("div",qe,[e("input",{ref_key:"iconEl",ref:u,type:"file",accept:"image/*",id:"icon",class:"form-control",onChange:p},null,544),t(m)!==null?(l(),i("button",{key:0,type:"button",class:"btn btn-outline-primary",onClick:v},[w(t(A),{class:"stroke-1 stroke-current"})])):f("",!0)])]),e("div",null,[e("label",Je,n(a.$t("_miHubServerListPreview.bannerOrBg")),1),e("div",Ke,[e("input",{ref_key:"bgEl",ref:$,type:"file",accept:"image/*",id:"bg",class:"form-control",onChange:P},null,544),t(b)!==null?(l(),i("button",{key:0,type:"button",class:"btn btn-outline-primary",onClick:D},[w(t(A),{class:"stroke-1 stroke-current"})])):f("",!0)]),e("div",We,n(a.$t("_miHubServerListPreview.bannerOrBgDescription")),1)])])])])])])}}});
1export{et 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.