-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from tv2/UT-206/softDelete
UT-206: Adding soft-delete of thumbnails
- Loading branch information
Showing
23 changed files
with
690 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,3 +56,4 @@ ehthumbs.db | |
# Windows shortcuts # | ||
##################### | ||
*.lnk | ||
/storage/hiddenFiles.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react' | ||
import '../../css/Footer.css' | ||
|
||
|
||
|
||
interface FooterProps { | ||
children: React.ReactNode | ||
} | ||
|
||
export function Footer({ children }: FooterProps): JSX.Element { | ||
return ( | ||
<footer className='Footer'> | ||
{ children } | ||
</footer> | ||
) | ||
} |
33 changes: 33 additions & 0 deletions
33
src/client/components/Footer/OperationModeEditVisibilityFooter.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from "react" | ||
import { OperationMode } from "../../../model/reducers/mediaReducer" | ||
import { reduxState } from "../../../model/reducers/store" | ||
import * as IO from '../../../model/SocketIoConstants' | ||
import { socket } from '../../util/SocketClientHandlers' | ||
import { Footer } from "./Footer" | ||
import "../../css/Operation-mode-edit-visibility-footer.css" | ||
|
||
const BUTTON_TEXT = 'Exit Edit Visibility' | ||
const DESCRIPTION_TEXT = 'You are currently editing the visibility of files.'.toUpperCase() | ||
|
||
function resetOperationMode(): void { | ||
socket.emit( | ||
IO.SET_OPERATION_MODE, | ||
reduxState.appNav[0].activeTab, | ||
OperationMode.CONTROL | ||
) | ||
} | ||
|
||
export function OperationModeEditVisibilityFooter(): JSX.Element { | ||
return ( | ||
<Footer> | ||
<div className="operation-mode-edit-visibility-footer"> | ||
<div className="operation-mode-edit-visibility-footer__text"> | ||
{ DESCRIPTION_TEXT } | ||
</div> | ||
<div className="operation-mode-edit-visibility-footer__controls"> | ||
<button onClick={ resetOperationMode }>{ BUTTON_TEXT }</button> | ||
</div> | ||
</div> | ||
</Footer> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react' | ||
import { useSelector } from 'react-redux' | ||
import { OperationMode } from '../../../model/reducers/mediaReducer' | ||
import { reduxState } from '../../../model/reducers/store' | ||
import { OperationModeEditVisibilityFooter } from './OperationModeEditVisibilityFooter' | ||
|
||
export function OperationModeFooter(): JSX.Element { | ||
const operationMode: OperationMode = useSelector((storeUpdate: any) => | ||
storeUpdate.media[0].output[reduxState.appNav[0].activeTab]?.operationMode) | ||
|
||
switch (operationMode) { | ||
case OperationMode.EDIT_VISIBILITY: { | ||
return <OperationModeEditVisibilityFooter /> | ||
} | ||
case OperationMode.CONTROL: | ||
default: { | ||
return <></> | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.