11import { contrastColor } from '../utils/color.ts' ;
2- import { toggleClass , toggleElem } from '../utils/dom.ts' ;
32import { createSortable } from '../modules/sortable.ts' ;
43import { POST , request } from '../modules/fetch.ts' ;
54import { fomanticQuery } from '../modules/fomantic/base.ts' ;
6- import { queryElemChildren , queryElems } from '../utils/dom.ts' ;
5+ import { queryElemChildren , queryElems , toggleElem } from '../utils/dom.ts' ;
76import type { SortableEvent } from 'sortablejs' ;
7+ import { toggleFullScreen } from '../utils.ts' ;
88
99function updateIssueCount ( card : HTMLElement ) : void {
1010 const parent = card . parentElement ;
@@ -140,25 +140,6 @@ function initRepoProjectColumnEdit(writableProjectBoard: Element): void {
140140 } ) ;
141141}
142142
143- function toggleProjectViewFullScreen ( fullscreenElementsSelector : string , isFullScreen : boolean ) : void {
144- // hide other elements
145- const headerEl = document . querySelector ( '#navbar' ) ;
146- const contentEl = document . querySelector ( '.page-content' ) ;
147- const footerEl = document . querySelector ( '.page-footer' ) ;
148- toggleElem ( headerEl , ! isFullScreen ) ;
149- toggleElem ( contentEl , ! isFullScreen ) ;
150- toggleElem ( footerEl , ! isFullScreen ) ;
151-
152- const fullScreenEls = document . querySelectorAll ( fullscreenElementsSelector ) ;
153- const outerEl = document . querySelector ( '.full.height' ) ;
154- toggleClass ( fullscreenElementsSelector , 'fullscreen' , isFullScreen ) ;
155- if ( isFullScreen ) {
156- for ( const e of fullScreenEls ) outerEl . append ( e ) ;
157- } else {
158- for ( const e of fullScreenEls ) contentEl . append ( e ) ;
159- }
160- }
161-
162143function initRepoProjectToggleFullScreen ( ) : void {
163144 const enterFullscreenBtn = document . querySelector ( '.screen-full' ) ;
164145 const exitFullscreenBtn = document . querySelector ( '.screen-normal' ) ;
@@ -167,7 +148,7 @@ function initRepoProjectToggleFullScreen(): void {
167148 const fullscreenElementsSelector = enterFullscreenBtn . getAttribute ( 'data-fullscreen-elements-selector' ) ;
168149
169150 const toggleFullscreenState = ( isFullScreen : boolean ) => {
170- toggleProjectViewFullScreen ( fullscreenElementsSelector , isFullScreen ) ;
151+ toggleFullScreen ( fullscreenElementsSelector , isFullScreen ) ;
171152 toggleElem ( enterFullscreenBtn ) ;
172153 toggleElem ( exitFullscreenBtn ) ;
173154 } ;
0 commit comments