UNPKG

p3x-redis-ui-material

Version:

💿 P3X Redis UI triple frontend — Angular + React/MUI + Vue/Vuetify with 54 languages, 7 themes, Socket.IO, desktop notifications, and full feature parity

2 lines • 4.14 kB
import {X}from'./chunk-DeaQoucA.js';import {X as Xe,f as fQ,D,b as bi,Q,_ as _e,m as mb,Y as Yt,W as Wt,Z as Zt,u,a as f,y as yt,n as no,B as Ba,I as IS,v as vf,h as hv,H as HT,r as ro,c as In,p as pv,R as Rv,U as UT,J as JT}from'./chunk-BwlFOdbx.js';import'./main-HNF44SV3.js';var w=(e,l)=>l.code,O=(e,l)=>l.key;function $(e,l){if(e&1&&(Ba(0,"mat-list-item")(1,"div",2)(2,"div",3)(3,"kbd",10),IS(4),vf()(),Ba(5,"div",4),IS(6),vf()()(),hv(7,"mat-divider")),e&2){let t=l.$implicit;In(4),Rv(t.key),In(2),Rv(t.description);}}function P(e,l){if(e&1&&(Ba(0,"p3xr-ng-accordion",9)(1,"div",1)(2,"mat-list"),HT(3,$,8,2,null,null,O),vf()()(),hv(5,"br")),e&2){let t=JT();pv("title",t.strings().label?.keyboardShortcuts),In(3),UT(t.shortcutsList);}}function F(e,l){if(e&1&&(Ba(0,"mat-list-item")(1,"div",2)(2,"div",3),IS(3),vf(),Ba(4,"div",4),IS(5),vf()()(),hv(6,"mat-divider")),e&2){let t=JT();In(3),Rv(t.strings().label?.redisVersion),In(2),Rv(t.redisVersion);}}function K(e,l){if(e&1&&(Ba(0,"mat-list-item")(1,"div",2)(2,"div",3),IS(3),vf(),Ba(4,"div",4),IS(5),vf()()(),hv(6,"mat-divider")),e&2){let t=JT();In(3),Rv(t.strings().label?.modules),In(2),Rv(t.modules.join(", "));}}function V(e,l){if(e&1&&(Ba(0,"mat-list-item")(1,"div",2)(2,"div",3)(3,"kbd",11),IS(4),vf()(),Ba(5,"div",4),IS(6),vf()()(),hv(7,"mat-divider")),e&2){let t=l.$implicit;In(4),Rv(t.code),In(2),Rv(t.name);}}var U=(()=>{class e{i18n;shortcutsService;socket;state;strings;isElectron;shortcutsList=[];get version(){return this.state.version()||""}get isConnected(){return !!this.state.connection()}get redisVersion(){return this.state.info()?.server?.redis_version||"-"}get modules(){return (this.state.modules()||[]).map(t=>t.name)}get languageList(){let t=this.strings()?.language||{};return Object.keys(t).sort().map(m=>({code:m,name:t[m]}))}unsubs=[];constructor(t,m,a,T){this.i18n=t,this.shortcutsService=m,this.socket=a,this.state=T,this.strings=this.i18n.strings,this.isElectron=this.shortcutsService.isEnabled(),this.shortcutsList=this.shortcutsService.getShortcutsWithDescriptions();}ngOnInit(){let t=this.socket.redisDisconnected$.subscribe(()=>{});this.unsubs.push(()=>t.unsubscribe());}ngOnDestroy(){this.unsubs.forEach(t=>t());}static \u0275fac=function(m){return new(m||e)(Xe(fQ),Xe(D),Xe(bi),Xe(Q))};static \u0275cmp=_e({type:e,selectors:[["p3xr-info"]],decls:42,vars:9,consts:[["accordionKey","info-about",3,"title"],["content",""],[1,"p3xr-settings-pair-row"],[1,"p3xr-settings-row-label"],[1,"p3xr-settings-row-value"],["href","https://github.com/patrikx3/redis-ui","target","_blank"],["href","https://www.paypal.me/patrikx3","target","_blank"],["href","https://github.com/patrikx3/redis-ui/blob/master/change-log.md#change-log","target","_blank"],["accordionKey","info-languages",3,"title"],["accordionKey","info-shortcuts",3,"title"],[1,"p3xr-kbd"],[1,"p3xr-kbd","p3xr-kbd-small"]],template:function(m,a){m&1&&(no(0,P,6,1),Ba(1,"p3xr-ng-accordion",0)(2,"div",1)(3,"mat-list")(4,"mat-list-item")(5,"div",2)(6,"div",3),IS(7),vf(),Ba(8,"div",4),IS(9),vf()()(),hv(10,"mat-divider"),no(11,F,7,2),no(12,K,7,2),Ba(13,"mat-list-item")(14,"div",2)(15,"div",3),IS(16,"GitHub"),vf(),Ba(17,"div",4)(18,"a",5),IS(19,"patrikx3/redis-ui"),vf()()()(),hv(20,"mat-divider"),Ba(21,"mat-list-item")(22,"div",2)(23,"div",3),IS(24),vf(),Ba(25,"div",4)(26,"a",6),IS(27,"PayPal"),vf()()()(),hv(28,"mat-divider"),Ba(29,"mat-list-item")(30,"div",2)(31,"div",3),IS(32),vf(),Ba(33,"div",4)(34,"a",7),IS(35,"change-log.md"),vf()()()()()()(),hv(36,"br"),Ba(37,"p3xr-ng-accordion",8)(38,"div",1)(39,"mat-list"),HT(40,V,8,2,null,null,w),vf()()()),m&2&&(ro(a.isElectron?0:-1),In(),pv("title",a.strings().label?.about),In(6),Rv(a.strings().label?.version),In(2),Rv(a.version),In(2),ro(a.isConnected?11:-1),In(),ro(a.isConnected&&a.modules.length>0?12:-1),In(12),Rv(a.strings().title?.donate),In(8),Rv(a.strings().intention?.githubChangelog),In(5),pv("title",a.strings().label?.supportedLanguages+" ("+a.languageList.length+")"),In(3),UT(a.languageList));},dependencies:[mb,Yt,Wt,Zt,u,f,yt,X],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:1})}return e})(); export{U as InfoComponent};