Compare commits

..

No commits in common. '26b0881a46dcc9de030ceb09b6619ae47c8c34ed' and '4cb539d58ab951daa25c785ef6eecc4d834be360' have entirely different histories.

  1. 16
      components/elements/processes/index.tsx
  2. 4
      hooks/use-token.ts
  3. 4
      plugin/popup/404.html
  4. 1
      plugin/popup/_next/static/J4k37v5qNO58v9nWL4ohq/_buildManifest.js
  5. 0
      plugin/popup/_next/static/J4k37v5qNO58v9nWL4ohq/_ssgManifest.js
  6. 166
      plugin/popup/_next/static/chunks/317-8de8bee0060823fd.js
  7. 166
      plugin/popup/_next/static/chunks/556-56e85e4880bbe04b.js
  8. 1
      plugin/popup/_next/static/chunks/pages/_app-526701f4ebc801df.js
  9. 1
      plugin/popup/_next/static/chunks/pages/_app-891652dd44e1e4e1.js
  10. 1
      plugin/popup/_next/static/chunks/pages/index-84dfafb8f3c7c7ce.js
  11. 1
      plugin/popup/_next/static/chunks/pages/index-b436ed590ac81993.js
  12. 1
      plugin/popup/_next/static/nLD9HgdK0k9krNaPZnuoV/_buildManifest.js
  13. 2
      plugin/popup/index.html

@ -128,10 +128,6 @@ export default function Processes() {
let isCancelled = (process: ProcessInterface) => process.cancelledAt let isCancelled = (process: ProcessInterface) => process.cancelledAt
let isRunning = (process: ProcessInterface) => process.startedAt && !isFinished(process) let isRunning = (process: ProcessInterface) => process.startedAt && !isFinished(process)
const processName = (process: ProcessInterface) => {
return process.name + ' ' + JSON.stringify(process.options)+ ' ' + JSON.stringify(process.arguments)
}
const handleChangePage = (event: any, page: number) => { const handleChangePage = (event: any, page: number) => {
setPage(page); setPage(page);
} }
@ -240,7 +236,7 @@ export default function Processes() {
<TableBody> <TableBody>
{processes.map((process: ProcessInterface, index: number) => ( {processes.map((process: ProcessInterface, index: number) => (
<TableRow key={process.id}> <TableRow key={process.id}>
<TableCell title={processName(process)}>{process.name}</TableCell> <TableCell>{process.name}</TableCell>
<TableCell> <TableCell>
{!process.progress && !isFinished(process) && isRunning(process) && <LinearProgress/>} {!process.progress && !isFinished(process) && isRunning(process) && <LinearProgress/>}
{!process.progress && !isFinished(process) && !isRunning(process) && <LinearProgress variant="determinate" value={0}/>} {!process.progress && !isFinished(process) && !isRunning(process) && <LinearProgress variant="determinate" value={0}/>}
@ -281,16 +277,16 @@ export default function Processes() {
</IconButton>} </IconButton>}
</TableCell> </TableCell>
<TableCell> <TableCell>
{process.canUnlock && token && token?.permissions.indexOf('unlock_process') > -1 && <IconButton onClick={() => openDialog(process, Action.Unlock)} title={`Unlock`} aria-label="Unlock"> {process.canUnlock && token?.permissions.indexOf('unlock_process') > -1 && <IconButton onClick={() => openDialog(process, Action.Unlock)} title={`Unlock`} aria-label="Unlock">
<LockOpenOutlined/> <LockOpenOutlined/>
</IconButton>} </IconButton>}
{process.canApprove && token && token?.permissions.indexOf('approve_process') > -1 && <IconButton onClick={() => openDialog(process, Action.Approve)} title={`Approve`} aria-label="Approve"> {process.canApprove && token?.permissions.indexOf('approve_process') > -1 && <IconButton onClick={() => openDialog(process, Action.Approve)} title={`Approve`} aria-label="Approve">
<ThumbUpAltOutlined/> <ThumbUpAltOutlined/>
</IconButton>} </IconButton>}
{process.canRepeat && token && token?.permissions.indexOf('run_command') > -1 && <IconButton onClick={() => openDialog(process, Action.Repeat)} title={`Repeat`} aria-label="Repeat"> {process.canRepeat && token?.permissions.indexOf('run_command') > -1 && <IconButton onClick={() => openDialog(process, Action.Repeat)} title={`Repeat`} aria-label="Repeat">
<ReplayOutlined/> <ReplayOutlined/>
</IconButton>} </IconButton>}
{process.canKill && token && token?.permissions.indexOf('kill_process') > -1 && <IconButton onClick={() => openDialog(process, Action.Kill)} title={`Kill`} aria-label="Kill"> {process.canKill && token?.permissions.indexOf('kill_process') > -1 && <IconButton onClick={() => openDialog(process, Action.Kill)} title={`Kill`} aria-label="Kill">
<DeleteForeverOutlined/> <DeleteForeverOutlined/>
</IconButton>} </IconButton>}
{process?.outputId && <IconButton title={`Output`} onClick={() => output(process)} aria-label="Output"> {process?.outputId && <IconButton title={`Output`} onClick={() => output(process)} aria-label="Output">
@ -298,7 +294,7 @@ export default function Processes() {
</IconButton>} </IconButton>}
</TableCell> </TableCell>
<TableCell title={new Date(process.createdAt).toLocaleString()}> <TableCell title={new Date(process.createdAt).toLocaleString()}>
{new Date(process.createdAt).toLocaleString()} {new Date(process.createdAt).toLocaleDateString()}
</TableCell> </TableCell>
</TableRow> </TableRow>
))} ))}

@ -12,7 +12,7 @@ export interface UseTokenInterface {
tokens: Token[] tokens: Token[]
switchToken(tokenId: string): void switchToken(tokenId: string): void
deleteToken(tokenId: string): void deleteToken(tokenId: string): void
addToken(tokenId: string): boolean addToken(tokenId: string): void
} }
export function useToken(): UseTokenInterface { export function useToken(): UseTokenInterface {
@ -21,7 +21,7 @@ export function useToken(): UseTokenInterface {
useEffect(() => { useEffect(() => {
setToken(grabToken()?.payload) setToken(grabToken()?.payload)
let tokens = grabTokens().map((tokenData) => tokenData.payload as Token) let tokens = grabTokens().map((tokenData) => tokenData.payload)
setTokens(tokens) setTokens(tokens)
return () => { return () => {

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/961153d3a9f88130.css" as="style"/><link rel="stylesheet" href="/_next/static/css/961153d3a9f88130.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-0b5d8249fb15f5f3.js" defer=""></script><script src="/_next/static/chunks/framework-114634acb84f8baa.js" defer=""></script><script src="/_next/static/chunks/main-66ca454f7bdf962f.js" defer=""></script><script src="/_next/static/chunks/pages/_app-526701f4ebc801df.js" defer=""></script><script src="/_next/static/chunks/pages/_error-8353112a01355ec2.js" defer=""></script><script src="/_next/static/nLD9HgdK0k9krNaPZnuoV/_buildManifest.js" defer=""></script><script src="/_next/static/nLD9HgdK0k9krNaPZnuoV/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:-apple-system, BlinkMacSystemFont, Roboto, &quot;Segoe UI&quot;, &quot;Fira Sans&quot;, Avenir, &quot;Helvetica Neue&quot;, &quot;Lucida Grande&quot;, sans-serif;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style> <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/961153d3a9f88130.css" as="style"/><link rel="stylesheet" href="/_next/static/css/961153d3a9f88130.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-0b5d8249fb15f5f3.js" defer=""></script><script src="/_next/static/chunks/framework-114634acb84f8baa.js" defer=""></script><script src="/_next/static/chunks/main-66ca454f7bdf962f.js" defer=""></script><script src="/_next/static/chunks/pages/_app-891652dd44e1e4e1.js" defer=""></script><script src="/_next/static/chunks/pages/_error-8353112a01355ec2.js" defer=""></script><script src="/_next/static/J4k37v5qNO58v9nWL4ohq/_buildManifest.js" defer=""></script><script src="/_next/static/J4k37v5qNO58v9nWL4ohq/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:-apple-system, BlinkMacSystemFont, Roboto, &quot;Segoe UI&quot;, &quot;Fira Sans&quot;, Avenir, &quot;Helvetica Neue&quot;, &quot;Lucida Grande&quot;, sans-serif;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>
body { margin: 0; color: #000; background: #fff; } body { margin: 0; color: #000; background: #fff; }
.next-error-h1 { .next-error-h1 {
border-right: 1px solid rgba(0, 0, 0, .3); border-right: 1px solid rgba(0, 0, 0, .3);
@ -9,4 +9,4 @@
.next-error-h1 { .next-error-h1 {
border-right: 1px solid rgba(255, 255, 255, .3); border-right: 1px solid rgba(255, 255, 255, .3);
} }
}</style><h1 class="next-error-h1" style="display:inline-block;margin:0;margin-right:20px;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:49px;margin:0;padding:0">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"nLD9HgdK0k9krNaPZnuoV","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html> }</style><h1 class="next-error-h1" style="display:inline-block;margin:0;margin-right:20px;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:49px;margin:0;padding:0">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"J4k37v5qNO58v9nWL4ohq","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>

@ -0,0 +1 @@
self.__BUILD_MANIFEST={__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":["static/chunks/556-56e85e4880bbe04b.js","static/css/758d1a1ad3b56ec4.css","static/chunks/pages/index-84dfafb8f3c7c7ce.js"],"/_error":["static/chunks/pages/_error-8353112a01355ec2.js"],sortedPages:["/","/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{6840:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(2595)}])},7889:function(t,e,n){"use strict";n.d(e,{z:function(){return l}});var r=n(7294);let o=r.createContext({}),l=o.Provider;e.Z=o},4085:function(t,e,n){"use strict";n.d(e,{DR:function(){return c},F8:function(){return d},Y0:function(){return l},gn:function(){return a},mB:function(){return o},rK:function(){return u},se:function(){return i}});let r=()=>!0,o=t=>{var e;if(!r())return;let n=i(t),o=null==n?void 0:null===(e=n.payload)||void 0===e?void 0:e.id;if(!o)return;let l=JSON.parse(window.localStorage.getItem("tokens")||"[]");l&&(window.localStorage.setItem("token",o),window.localStorage.setItem(o,t),l.push(o),window.localStorage.setItem("tokens",JSON.stringify(l)))},l=t=>{if(!r())return;let e=JSON.parse(window.localStorage.getItem("tokens")||"[]");e&&(e=e.filter(e=>e!==t),window.localStorage.setItem("tokens",JSON.stringify(e)),window.localStorage.removeItem(t),t===window.localStorage.getItem("token")&&window.localStorage.removeItem("token"))},u=t=>{r()&&window.localStorage.setItem("token",t)},i=t=>{if(!r())return null;let e=t.split(".");if(3!==e.length)return null;let n=JSON.parse(window.atob(e[1]));if(!n)return null;let o=JSON.parse(window.atob(e[0]));return o?{payload:n,headers:o}:null},a=()=>{if(!r())return null;let t=window.localStorage.getItem("token");return t?window.localStorage.getItem(t):null},d=()=>{let t=a();return t?i(t):null},c=()=>{if(!r())return[];let t=window.localStorage.getItem("tokens"),e=JSON.parse(t||"[]");if(!e)return[];let n=[];return e.forEach(t=>{let e=window.localStorage.getItem(t);if(!e)return!0;let r=i(e);r&&n.push(r)}),n}},2595:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return i}});var r=n(5893);n(4744);var o=n(7889),l=n(7294),u=n(4085);function i(t){let{Component:e,pageProps:n}=t,{token:i,tokens:a,switchToken:d,deleteToken:c,addToken:f}=function(){let[t,e]=(0,l.useState)(null),[n,r]=(0,l.useState)([]);(0,l.useEffect)(()=>{var t;return e(null===(t=(0,u.F8)())||void 0===t?void 0:t.payload),r((0,u.DR)().map(t=>t.payload)),()=>{}},[]);let o=t=>{var n;(0,u.rK)(t),e(null===(n=(0,u.F8)())||void 0===n?void 0:n.payload)},i=t=>{var n;(0,u.Y0)(t),e(null===(n=(0,u.F8)())||void 0===n?void 0:n.payload)},a=t=>{var o,l;return!!(0,u.se)(t)&&((0,u.mB)(t),e(null===(o=(0,u.F8)())||void 0===o?void 0:o.payload),r([...n,null===(l=(0,u.F8)())||void 0===l?void 0:l.payload]),!0)};return{token:t,tokens:n,switchToken:o,deleteToken:i,addToken:a}}();return(0,r.jsx)(o.z,{value:{token:i,tokens:a,switchToken:d,deleteToken:c,addToken:f},children:(0,r.jsx)(e,{...n})})}},4744:function(){}},function(t){var e=function(e){return t(t.s=e)};t.O(0,[774,179],function(){return e(6840),e(880)}),_N_E=t.O()}]);

@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{6840:function(n,u,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return t(3847)}])},3847:function(n,u,t){"use strict";t.r(u),t.d(u,{default:function(){return _}});var r=t(5893);function _(n){let{Component:u,pageProps:t}=n;return(0,r.jsx)(u,{...t})}t(4744)},4744:function(){}},function(n){var u=function(u){return n(n.s=u)};n.O(0,[774,179],function(){return u(6840),u(880)}),_N_E=n.O()}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
self.__BUILD_MANIFEST={__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":["static/chunks/317-8de8bee0060823fd.js","static/css/758d1a1ad3b56ec4.css","static/chunks/pages/index-b436ed590ac81993.js"],"/_error":["static/chunks/pages/_error-8353112a01355ec2.js"],sortedPages:["/","/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save