1- import { SettingSchemaDesc } from "@logseq/libs/dist/LSPlugin.user"
1+ import { SettingSchemaDesc } from "@logseq/libs/dist/LSPlugin.user" ;
22
33export const COMMON_STYLE = `
44#injected-ui-item-git-logseq-git {
55 position: relative;
66}
7- #injected-ui-item-git-logseq-git #logseq-git--git #plugin-git-content-wrapper {
8- position: absolute;
9- top: 36px;
10- left: 50%;
11- transform: translateX(-50%);
7+ .plugin-git-container .plugin-git-mask {
8+ position: fixed;
9+ width: 100vw;
10+ height: 100vh;
11+ left: 0;
12+ top: 0;
13+ z-index: 99;
14+ }
15+ .plugin-git-container .plugin-git-popup {
16+ position: fixed;
17+ z-index: 99;
1218 background-color: var(--ls-secondary-background-color);
1319 padding: 10px;
1420 border-radius: .375rem;
1521 --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),0 4px 6px -2px rgba(0, 0, 0, 0.05);
1622 box-shadow: var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);
17- display: none;
1823}
19- #injected-ui-item- git-logseq-git #logseq-git--git # plugin-git-content-wrapper ::before {
24+ .plugin- git-container . plugin-git-popup ::before {
2025 content: '';
2126 position: absolute;
2227 top: -8px;
@@ -28,33 +33,25 @@ export const COMMON_STYLE = `
2833 border-width: 0 10px 8px 10px;
2934 border-color: transparent transparent var(--ls-secondary-background-color) transparent;
3035}
31- #injected-ui-item-git-logseq-git #logseq-git--git #plugin-git-content-wrapper .plugin-git-mask {
32- position: absolute;
33- z-index: -1;
34- width: 100vw;
35- height: 100vh;
36- top: -36px;
37- left: -70vw;
38- }
39- `
36+ ` ;
4037
4138export const SHOW_POPUP_STYLE = `
42- #injected-ui-item-git-logseq-git #logseq-git--git # plugin-git-content-wrapper {
39+ . plugin-git-container {
4340 display: block;
4441}
45- `
42+ ` ;
4643export const HIDE_POPUP_STYLE = `
47- #injected-ui-item-git-logseq-git #logseq-git--git # plugin-git-content-wrapper {
44+ . plugin-git-container {
4845 display: none;
4946}
50- `
47+ ` ;
5148
5249export const INACTIVE_STYLE = `
5350${ COMMON_STYLE }
5451#injected-ui-item-git-logseq-git::after {
5552 display: none;
5653}
57- `
54+ ` ;
5855export const ACTIVE_STYLE = `
5956${ COMMON_STYLE }
6057#injected-ui-item-git-logseq-git::after {
@@ -68,7 +65,7 @@ ${COMMON_STYLE}
6865 right: 8px;
6966 top: 6px;
7067}
71- `
68+ ` ;
7269
7370export const LOADING_STYLE = `
7471${ COMMON_STYLE }
@@ -95,48 +92,49 @@ ${COMMON_STYLE}
9592 opacity: 0;
9693 }
9794}
98- `
95+ ` ;
9996
10097export const BUTTONS = [
101- { key : ' status' , title : ' Check Status' , event : ' check' } ,
102- { key : ' log' , title : ' Show Log' , event : ' log' } ,
103- { key : ' pull' , title : ' Pull' , event : ' pull' } ,
104- { key : ' pullRebase' , title : ' Pull Rebase' , event : ' pullRebase' } ,
105- { key : ' checkout' , title : ' Checkout' , event : ' checkout' } ,
106- { key : ' commit' , title : ' Commit' , event : ' commit' } ,
107- { key : ' push' , title : ' Push' , event : ' push' } ,
108- { key : ' commitAndPush' , title : ' Commit & Push' , event : ' commitAndPush' } ,
109- ]
98+ { key : " status" , title : " Check Status" , event : " check" } ,
99+ { key : " log" , title : " Show Log" , event : " log" } ,
100+ { key : " pull" , title : " Pull" , event : " pull" } ,
101+ { key : " pullRebase" , title : " Pull Rebase" , event : " pullRebase" } ,
102+ { key : " checkout" , title : " Checkout" , event : " checkout" } ,
103+ { key : " commit" , title : " Commit" , event : " commit" } ,
104+ { key : " push" , title : " Push" , event : " push" } ,
105+ { key : " commitAndPush" , title : " Commit & Push" , event : " commitAndPush" } ,
106+ ] ;
110107
111108export const SETTINGS_SCHEMA : SettingSchemaDesc [ ] = [
112109 {
113- key : ' buttons' ,
114- title : ' Buttons' ,
115- type : ' enum' ,
116- default : [ ' Check Status' , ' Show Log' , ' Pull Rebase' , ' Commit & Push' ] ,
117- description : ' Select buttons to show' ,
118- enumPicker : ' checkbox' ,
110+ key : " buttons" ,
111+ title : " Buttons" ,
112+ type : " enum" ,
113+ default : [ " Check Status" , " Show Log" , " Pull Rebase" , " Commit & Push" ] ,
114+ description : " Select buttons to show" ,
115+ enumPicker : " checkbox" ,
119116 enumChoices : BUTTONS . map ( ( { title } ) => title ) ,
120117 } ,
121118 {
122- key : ' checkWhenDBChanged' ,
123- title : ' Check Status when DB Changed' ,
124- type : ' boolean' ,
119+ key : " checkWhenDBChanged" ,
120+ title : " Check Status when DB Changed" ,
121+ type : " boolean" ,
125122 default : true ,
126- description : ' Check status when DB changed, restart logseq to take effect' ,
123+ description : " Check status when DB changed, restart logseq to take effect" ,
127124 } ,
128125 {
129- key : ' autoCheckSynced' ,
130- title : ' Auto Check If Synced' ,
131- type : ' boolean' ,
126+ key : " autoCheckSynced" ,
127+ title : " Auto Check If Synced" ,
128+ type : " boolean" ,
132129 default : false ,
133- description : 'Automatically check if the local version is the same as the remote' ,
130+ description :
131+ "Automatically check if the local version is the same as the remote" ,
134132 } ,
135133 {
136- key : ' autoPush' ,
137- title : ' Auto Push' ,
138- type : ' boolean' ,
134+ key : " autoPush" ,
135+ title : " Auto Push" ,
136+ type : " boolean" ,
139137 default : false ,
140- description : ' Auto push when logseq hide' ,
138+ description : " Auto push when logseq hide" ,
141139 } ,
142- ]
140+ ] ;
0 commit comments