Merge branch 'master' of https://github.com/ONLYOFFICE/CommunityServer-AspNetCore
This commit is contained in:
commit
382bfb77ce
@ -1,5 +1,5 @@
|
||||
PUSHD %~dp0
|
||||
start /b call start\stop.bat
|
||||
call start\stop.bat
|
||||
|
||||
PUSHD %~dp0..
|
||||
echo "ASC.Web.Components"
|
||||
|
@ -1,6 +1,8 @@
|
||||
PUSHD %~dp0
|
||||
for /R "..\run\" %%f in (*.bat) do (
|
||||
start nssm install Onlyoffice%%~nf "%%~f"
|
||||
)
|
||||
PUSHD %~dp0..
|
||||
call runasadmin.bat "%~dpnx0"
|
||||
|
||||
pause
|
||||
if %errorlevel% == 0 (
|
||||
for /R "run\" %%f in (*.bat) do (
|
||||
call nssm install Onlyoffice%%~nf "%%~f"
|
||||
)
|
||||
)
|
@ -1,6 +1,8 @@
|
||||
PUSHD %~dp0
|
||||
for /R "..\run\" %%f in (*.bat) do (
|
||||
start nssm remove Onlyoffice%%~nf
|
||||
)
|
||||
PUSHD %~dp0..
|
||||
call runasadmin.bat "%~dpnx0"
|
||||
|
||||
pause
|
||||
if %errorlevel% == 0 (
|
||||
for /R "run\" %%f in (*.bat) do (
|
||||
call nssm remove Onlyoffice%%~nf
|
||||
)
|
||||
)
|
28
build/runasadmin.bat
Normal file
28
build/runasadmin.bat
Normal file
@ -0,0 +1,28 @@
|
||||
@echo off
|
||||
|
||||
:: BatchGotAdmin
|
||||
:-------------------------------------
|
||||
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
|
||||
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
|
||||
) ELSE (
|
||||
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
|
||||
)
|
||||
|
||||
if '%errorlevel%' NEQ '0' (
|
||||
echo Requesting administrative privileges...
|
||||
goto UACPrompt
|
||||
) else ( goto gotAdmin )
|
||||
|
||||
:UACPrompt
|
||||
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
|
||||
set params= %*
|
||||
echo UAC.ShellExecute "cmd.exe", "/c %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs"
|
||||
|
||||
"%temp%\getadmin.vbs"
|
||||
del "%temp%\getadmin.vbs"
|
||||
exit /B 1
|
||||
|
||||
:gotAdmin
|
||||
pushd "%CD%"
|
||||
CD /D "%~dp0"
|
||||
:--------------------------------------
|
@ -1,6 +1,8 @@
|
||||
PUSHD %~dp0
|
||||
for /R "..\run\" %%f in (*.bat) do (
|
||||
start nssm start Onlyoffice%%~nf
|
||||
)
|
||||
PUSHD %~dp0..
|
||||
call runasadmin.bat "%~dpnx0"
|
||||
|
||||
pause
|
||||
if %errorlevel% == 0 (
|
||||
for /R "run\" %%f in (*.bat) do (
|
||||
call nssm start Onlyoffice%%~nf
|
||||
)
|
||||
)
|
@ -1,6 +1,8 @@
|
||||
PUSHD %~dp0
|
||||
for /R "..\run\" %%f in (*.bat) do (
|
||||
start nssm stop Onlyoffice%%~nf
|
||||
)
|
||||
PUSHD %~dp0..
|
||||
call runasadmin.bat "%~dpnx0"
|
||||
|
||||
pause
|
||||
if %errorlevel% == 0 (
|
||||
for /R "run\" %%f in (*.bat) do (
|
||||
call nssm stop Onlyoffice%%~nf
|
||||
)
|
||||
)
|
@ -85,7 +85,6 @@ const NamedAvatar = styled.div`
|
||||
(props.size === 'medium' && '20px') ||
|
||||
(props.size === 'small' && '12px')
|
||||
};
|
||||
line-height: 120px;
|
||||
|
||||
color: ${whiteColor};
|
||||
`;
|
||||
@ -173,7 +172,6 @@ Avatar.propTypes = {
|
||||
role: PropTypes.oneOf(['owner', 'admin','guest', 'user']),
|
||||
source: PropTypes.string,
|
||||
editLabel: PropTypes.string,
|
||||
editAction: PropTypes.function,
|
||||
userName: PropTypes.string,
|
||||
editing: PropTypes.bool
|
||||
};
|
||||
|
@ -9,6 +9,8 @@ import Section from '../../../.storybook/decorators/section';
|
||||
const roleOptions = ['owner', 'admin','guest','user'];
|
||||
const sizeOptions = ['max', 'big', 'medium', 'small'];
|
||||
|
||||
const editAction = () => console.log('Edit action');
|
||||
|
||||
storiesOf('Components|Avatar', module)
|
||||
.addDecorator(withKnobs)
|
||||
.addDecorator(withReadme(Readme))
|
||||
@ -17,6 +19,8 @@ storiesOf('Components|Avatar', module)
|
||||
const editing = size === 'max' ? boolean('editing', false) : false;
|
||||
const editLabel = editing ? text('editLabel', 'Edit photo') : '';
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<Section>
|
||||
<Avatar
|
||||
@ -26,7 +30,7 @@ storiesOf('Components|Avatar', module)
|
||||
userName={text('userName', '')}
|
||||
editing={editing}
|
||||
editLabel={editLabel}
|
||||
editAction={() => console.log('Edit action')}
|
||||
editAction={editAction}
|
||||
/>
|
||||
</Section>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user