11<template >
2- <div class =" grid app-grid-template h-screen" >
3- <div style =" grid-area : head; background-color : red " >
4- <h1 >
5- Gist User Script Manager
6- </h1 >
7- <AutoLogin />
2+ <div class =" app-grid-template h-screen max-h-full overflow-y-hidden" >
3+ <div style =" grid-area : head;" class =" header-grid-template" >
4+ <div style =" grid-area : content ;" class =" flex flex-col" >
5+ <h1 >
6+ Gist User Script Manager
7+ </h1 >
8+ <div class =" self-end" >
9+ <AutoLogin />
10+ </div >
11+ </div >
12+ <div style =" grid-area : divider;" >
13+ <div class =" w-full h-px border-gray-400 border-t border-solid" >  ; </div >
14+ </div >
815 </div >
9- <div style =" grid-area : nav;" class =" nav-grid-template" >
10- <button @click =" listQuery" class =" w-full mt-2 flex mr-3" >
16+ <div style =" grid-area : nav;" class =" nav-grid-template h-full " >
17+ <button @click =" listQuery" class =" mt-2 flex mr-3" style = " width : calc ( 100 % - 8 px ) " >
1118 <fa type =" fab" icon =" github" class =" h-4 mr-2" />
1219 refresh
1320 </button >
14- <input type =" text" v-model =" filter" class =" form-input w-full mt-2 mr-3" />
21+ <div class =" flex" style =" width : calc (100% - 8px )" >
22+ <input type =" text" v-model =" filter" class =" form-input mt-2 mr-3 flex-grow w-full" />
23+ <fa icon =" filter" class =" h-4 self-center" />
24+ </div >
1525 <div class =" overflow-y-auto w-full mt-2 h-full h-full" >
16- <div v-for =" entry in gistEntries " :key =" entry.id" class =" flex flex-wrap w-full mt-2" >
26+ <div v-for =" entry in filteredGistEntries " :key =" entry.id" class =" flex flex-wrap w-full mt-2" >
1727 <a @click =" code = entry.code" class =" w-full cursor-pointer mr-2" >{{ entry.name }}</a >
1828 <div class =" w-full h-px border-gray-400 border-t border-solid mt-1 mr-2" >  ; </div >
1929 </div >
2030 </div >
2131 </div >
2232 <div style =" grid-area : main; background-color : yellow " >
23- <MonacoEditor :code =" code" style = " height : calc ( 100 % - 50 px ) " />
33+ <MonacoEditor :code =" code" class = " h-full " />
2434 </div >
2535 </div >
2636</template >
2939import {List } from " @/__gen_gql/List" ;
3040import listGql from " @/List.gql" ;
3141import {useGraphQlClient } from " @/useGraphQlClient" ;
32- import {onMounted , ref } from " vue" ;
42+ import {onMounted , ref , computed } from " vue" ;
43+
3344export {default as AutoLogin } from ' ./AutoLogin' ;
3445export {default as MonacoEditor } from ' ./MonacoEditor' ;
3546
@@ -54,6 +65,8 @@ export const code = ref<string>("");
5465
5566export const filter = ref <string >(" " );
5667
68+ export const filteredGistEntries = computed (() => gistEntries .value .filter (({name }) => filter .value === ' ' || name .toLowerCase ().includes (filter .value .toLowerCase ())));
69+
5770onMounted (() => {
5871 listQuery ();
5972});
@@ -62,23 +75,32 @@ onMounted(() => {
6275
6376<style scoped>
6477.app-grid-template {
78+ display : grid ;
6579 grid-template-areas :
6680 " head head head"
6781 " . nav main" ;
6882 grid-template-rows : 70px minmax (0 , 1fr );
6983 grid-template-columns : 8px 160px 1fr ;
70- height : 100vh ;
71- max-height : 100% ;
72- overflow-y : hidden ;
7384}
85+
86+ .header-grid-template {
87+ display : grid ;
88+ grid-template-areas :
89+ " . . ."
90+ " . content ."
91+ " . . ."
92+ " divider divider divider" ;
93+ grid-template-columns : 8px 1fr 8px ;
94+ grid-template-rows : 8px auto 1fr 1px ;
95+ }
96+
7497.nav-grid-template {
7598 display : grid ;
7699 grid-template-areas :
77100 " button"
78101 " filter"
79102 " result" ;
80103 grid-template-rows : auto auto 1fr ;
81- height : 100% ;
82104}
83105 </style >
84106
0 commit comments