diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Application.php | 21 | ||||
-rw-r--r-- | core/css/apps.scss | 42 | ||||
-rw-r--r-- | core/css/icons.scss | 4 | ||||
-rw-r--r-- | core/css/styles.scss | 61 | ||||
-rw-r--r-- | core/img/actions/close-white.svg | 4 | ||||
-rw-r--r-- | core/l10n/es.js | 3 | ||||
-rw-r--r-- | core/l10n/es.json | 3 | ||||
-rw-r--r-- | core/l10n/ja.js | 1 | ||||
-rw-r--r-- | core/l10n/ja.json | 1 | ||||
-rw-r--r-- | core/l10n/pt_BR.js | 2 | ||||
-rw-r--r-- | core/l10n/pt_BR.json | 2 | ||||
-rw-r--r-- | core/search/js/search.js | 4 | ||||
-rw-r--r-- | core/templates/layout.user.php | 1 |
13 files changed, 105 insertions, 44 deletions
diff --git a/core/Application.php b/core/Application.php index dad7546dcb8..6621964c289 100644 --- a/core/Application.php +++ b/core/Application.php @@ -30,7 +30,9 @@ namespace OC\Core; +use OC\Core\Controller\OCJSController; use OC\Security\IdentityProof\Manager; +use OC\Server; use OCP\AppFramework\App; use OC\Core\Controller\CssController; use OCP\AppFramework\Utility\ITimeFactory; @@ -66,5 +68,24 @@ class Application extends App { $container->query(ITimeFactory::class) ); }); + $container->registerService(OCJSController::class, function () use ($container) { + /** @var Server $server */ + $server = $container->getServer(); + return new OCJSController( + $container->query('appName'), + $server->getRequest(), + $server->getL10N('core'), + // This is required for the theming to overwrite the `OC_Defaults`, see + // https://github.com/nextcloud/server/issues/3148 + $server->getThemingDefaults(), + $server->getAppManager(), + $server->getSession(), + $server->getUserSession(), + $server->getConfig(), + $server->getGroupManager(), + $server->getIniWrapper(), + $server->getURLGenerator() + ); + }); } } diff --git a/core/css/apps.scss b/core/css/apps.scss index bb9326fd22d..f1ddc95e092 100644 --- a/core/css/apps.scss +++ b/core/css/apps.scss @@ -62,12 +62,26 @@ em { -ms-user-select: none; user-select: none; border-right: 1px solid #eee; + display: flex; + flex-direction: column; > ul { position: relative; height: 100%; width: inherit; overflow: auto; box-sizing: border-box; + > li { + &:focus, + &:hover, + &.active, + a.selected { + &, + > a { + opacity: 1; + box-shadow: inset 2px 0 #0082c9; + } + } + } } li { position: relative; @@ -104,16 +118,6 @@ em { color: #000; opacity: .57; } - li:hover > a, - li:focus > a, - a:focus, - .selected, - .selected a, - .active, - .active a { - opacity: 1; - box-shadow: inset 2px 0 #0082c9; - } li > a:first-child img { margin-bottom: -3px; margin-right: 11px; @@ -559,7 +563,6 @@ em { background-color: #fff; color: #333; border-radius: 3px; - border-top-right-radius: 0; z-index: 110; margin: 5px; margin-top: -5px; @@ -592,7 +595,6 @@ em { transform: translateX(50%); right: 50%; margin-right: 0; - border-top-right-radius: 3px; &:after { right: 50%; transform: translateX(50%); @@ -603,8 +605,6 @@ em { right: auto; left: 0; margin-right: 0; - border-top-left-radius: 0; - border-top-right-radius: 3px; &:after { left: 6px; right: auto; @@ -639,6 +639,7 @@ em { margin: 0; font-weight: inherit; box-shadow: none; + color: #333 !important; /* Overwrite app-navigation li */ /* prevent .action class to break the design */ &.action { padding: inherit !important; @@ -653,15 +654,15 @@ em { cursor: pointer; white-space: nowrap; } + span { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=70)' !important; + filter: alpha(opacity = 70) !important; + opacity: .7 !important; + } > p { width: 150px; line-height: 1.6em; padding: 8px 0; - > span { - -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=70)' !important; - filter: alpha(opacity = 70) !important; - opacity: .7 !important; - } } /* Add padding if contains icon+text */ &:not(:empty) { @@ -680,7 +681,8 @@ em { padding: 18px 0 18px 36px; min-width: 0; /* Overwrite icons*/ min-height: 0; - background-position: 10px center + background-position: 10px center; + opacity: 0.7; /* Default button icon override */ } } } diff --git a/core/css/icons.scss b/core/css/icons.scss index 1e72b71ad3d..28f6bd9bbb8 100644 --- a/core/css/icons.scss +++ b/core/css/icons.scss @@ -138,6 +138,10 @@ img, object, video, button, textarea, input, select { background-image: url('../img/actions/close.svg?v=1'); } +.icon-close-white { + background-image: url('../img/actions/close-white.svg?v=1'); +} + .icon-comment { background-image: url('../img/actions/comment.svg?v=1'); } diff --git a/core/css/styles.scss b/core/css/styles.scss index a709ef56152..d958a01655b 100644 --- a/core/css/styles.scss +++ b/core/css/styles.scss @@ -170,28 +170,49 @@ body { /* Searchbox */ -.searchbox input[type='search'] { +.searchbox { position: relative; - font-size: 1.2em; - padding: 3px; - padding-left: 25px; - background: transparent url('../img/actions/search-white.svg?v=1') no-repeat 6px center; - color: #fff; - border: 0; - border-radius: 3px; - margin-top: 3px; - width: 0; - cursor: pointer; - -webkit-transition: all 100ms; - transition: all 100ms; - -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=70)'; - opacity: .7; - &:focus, &:active, &:valid { + input[type='search'] { + position: relative; + font-size: 1.2em; + padding: 3px; + padding-left: 25px; + background: transparent url('../img/actions/search-white.svg?v=1') no-repeat 6px center; color: #fff; - width: 155px; - cursor: text; - background-color: #0082c9 !important; - border: 1px solid rgba(255, 255, 255, 0.5) !important; + border: 0; + border-radius: 3px; + margin-top: 3px; + width: 0; + cursor: pointer; + -webkit-transition: all 100ms; + transition: all 100ms; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=70)'; + opacity: .7; + &:focus, &:active, &:valid { + color: #fff; + width: 155px; + cursor: text; + background-color: #0082c9 !important; + border: 1px solid rgba(255, 255, 255, 0.5) !important; + } + & ~ .icon-close-white { + display: inline; + position: absolute; + width: 15px; + height: 32px; + right: 3px; + top: 0; + &, &:focus, &:active, &:hover { + border: none; + background-color: transparent; + } + } + &:not(:valid) ~ .icon-close-white { + display: none; + } + &::-webkit-search-cancel-button { + -webkit-appearance: none; + } } } diff --git a/core/img/actions/close-white.svg b/core/img/actions/close-white.svg new file mode 100644 index 00000000000..cd2a8c62468 --- /dev/null +++ b/core/img/actions/close-white.svg @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1"> + <path fill="#fff" d="m12.95 11.536l-1.414 1.414-3.536-3.536-3.535 3.536-1.415-1.414 3.536-3.536-3.536-3.536 1.415-1.414 3.535 3.536 3.516-3.555 1.434 1.434-3.536 3.535z"/> +</svg> diff --git a/core/l10n/es.js b/core/l10n/es.js index 90a007b3658..9844386dd2b 100644 --- a/core/l10n/es.js +++ b/core/l10n/es.js @@ -41,7 +41,7 @@ OC.L10N.register( "Reset log level" : "Restablecer el nivel de registro", "Starting code integrity check" : "Comenzando comprobación de integridad de código", "Finished code integrity check" : "Terminando comprobación de integridad de código", - "%s (3rdparty)" : "%s (tercer parte)", + "%s (3rdparty)" : "%s (tercero)", "%s (incompatible)" : "%s (incompatible)", "Following apps have been disabled: %s" : "Siguiendo aplicaciones ha sido deshabilitado: %s", "Already up to date" : "Ya actualizado", @@ -60,6 +60,7 @@ OC.L10N.register( "seconds ago" : "hace segundos", "Logging in …" : "Iniciando sesión ...", "The link to reset your password has been sent to your email. If you do not receive it within a reasonable amount of time, check your spam/junk folders.<br>If it is not there ask your local administrator." : "Se ha enviado un enlace para restablecer su contraseña a su correo electrónico. Si usted no lo recibe en un tiempo razonable, revise su carpeta de spam/chatarra/basura.<br>Si no lo encuentra, consulte a su administrador local.", + "Your files are encrypted. There will be no way to get your data back after your password is reset.<br />If you are not sure what to do, please contact your administrator before you continue. <br />Do you really want to continue?" : "Sus archivos han sido cifrados. No habrá forma de recuperar sus datos tras resetear la contraseña.<br /> Si no está seguro de qué hacer, contacte con su administrador antes de continuar. ¿Está seguro de qué quiere continuar?", "I know what I'm doing" : "Sé lo que estoy haciendo", "Password can not be changed. Please contact your administrator." : "La contraseña no se puede cambiar. Por favor, contacte a su administrador.", "No" : "No", diff --git a/core/l10n/es.json b/core/l10n/es.json index bfea7c92f8f..4be7f957aab 100644 --- a/core/l10n/es.json +++ b/core/l10n/es.json @@ -39,7 +39,7 @@ "Reset log level" : "Restablecer el nivel de registro", "Starting code integrity check" : "Comenzando comprobación de integridad de código", "Finished code integrity check" : "Terminando comprobación de integridad de código", - "%s (3rdparty)" : "%s (tercer parte)", + "%s (3rdparty)" : "%s (tercero)", "%s (incompatible)" : "%s (incompatible)", "Following apps have been disabled: %s" : "Siguiendo aplicaciones ha sido deshabilitado: %s", "Already up to date" : "Ya actualizado", @@ -58,6 +58,7 @@ "seconds ago" : "hace segundos", "Logging in …" : "Iniciando sesión ...", "The link to reset your password has been sent to your email. If you do not receive it within a reasonable amount of time, check your spam/junk folders.<br>If it is not there ask your local administrator." : "Se ha enviado un enlace para restablecer su contraseña a su correo electrónico. Si usted no lo recibe en un tiempo razonable, revise su carpeta de spam/chatarra/basura.<br>Si no lo encuentra, consulte a su administrador local.", + "Your files are encrypted. There will be no way to get your data back after your password is reset.<br />If you are not sure what to do, please contact your administrator before you continue. <br />Do you really want to continue?" : "Sus archivos han sido cifrados. No habrá forma de recuperar sus datos tras resetear la contraseña.<br /> Si no está seguro de qué hacer, contacte con su administrador antes de continuar. ¿Está seguro de qué quiere continuar?", "I know what I'm doing" : "Sé lo que estoy haciendo", "Password can not be changed. Please contact your administrator." : "La contraseña no se puede cambiar. Por favor, contacte a su administrador.", "No" : "No", diff --git a/core/l10n/ja.js b/core/l10n/ja.js index 3ac40cc49be..8b411db8077 100644 --- a/core/l10n/ja.js +++ b/core/l10n/ja.js @@ -60,6 +60,7 @@ OC.L10N.register( "seconds ago" : "数秒前", "Logging in …" : "ログイン中...", "The link to reset your password has been sent to your email. If you do not receive it within a reasonable amount of time, check your spam/junk folders.<br>If it is not there ask your local administrator." : "パスワードをリセットするリンクをクリックしたので、メールを送信しました。しばらくたってもメールが届かなかった場合は、スパム/ジャンクフォルダーを確認してください。<br>それでも見つからなかった場合は、管理者に問合わせてください。", + "Your files are encrypted. There will be no way to get your data back after your password is reset.<br />If you are not sure what to do, please contact your administrator before you continue. <br />Do you really want to continue?" : "ファイルが暗号化されています。パスワードをリセットした場合、データを元に戻す方法はありません。<br />どういうことか分からない場合は、操作を継続する前に管理者に問い合わせてください。<br />続けてよろしいでしょうか?", "I know what I'm doing" : "どういう操作をしているか理解しています", "Password can not be changed. Please contact your administrator." : "パスワードは変更できません。管理者に問い合わせてください。", "No" : "いいえ", diff --git a/core/l10n/ja.json b/core/l10n/ja.json index fcf71a2a46b..03bfcd2173e 100644 --- a/core/l10n/ja.json +++ b/core/l10n/ja.json @@ -58,6 +58,7 @@ "seconds ago" : "数秒前", "Logging in …" : "ログイン中...", "The link to reset your password has been sent to your email. If you do not receive it within a reasonable amount of time, check your spam/junk folders.<br>If it is not there ask your local administrator." : "パスワードをリセットするリンクをクリックしたので、メールを送信しました。しばらくたってもメールが届かなかった場合は、スパム/ジャンクフォルダーを確認してください。<br>それでも見つからなかった場合は、管理者に問合わせてください。", + "Your files are encrypted. There will be no way to get your data back after your password is reset.<br />If you are not sure what to do, please contact your administrator before you continue. <br />Do you really want to continue?" : "ファイルが暗号化されています。パスワードをリセットした場合、データを元に戻す方法はありません。<br />どういうことか分からない場合は、操作を継続する前に管理者に問い合わせてください。<br />続けてよろしいでしょうか?", "I know what I'm doing" : "どういう操作をしているか理解しています", "Password can not be changed. Please contact your administrator." : "パスワードは変更できません。管理者に問い合わせてください。", "No" : "いいえ", diff --git a/core/l10n/pt_BR.js b/core/l10n/pt_BR.js index dfc4ef87ad7..7f5bea95d53 100644 --- a/core/l10n/pt_BR.js +++ b/core/l10n/pt_BR.js @@ -283,7 +283,7 @@ OC.L10N.register( "To avoid timeouts with larger installations, you can instead run the following command from your installation directory:" : "Para evitar tempos de espera com instalações maiores, você pode em vez disso executar o seguinte comando a partir do diretório de instalação:", "Detailed logs" : "Logs detalhados", "Update needed" : "Atualização necessária", - "Please use the command line updater because you have a big instance." : "Por favor, use a atualização de linha de comando, porque você tem um grande exemplo.", + "Please use the command line updater because you have a big instance." : "Por favor, use a atualização de linha de comando, porque você tem muitos dados em sua instância.", "For help, see the <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">documentation</a>." : "Para obter ajuda, consulte a <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">documentação</a>.", "This %s instance is currently in maintenance mode, which may take a while." : "Esta instância %s está em modo de manutenção, o que pode demorar um pouco.", "This page will refresh itself when the %s instance is available again." : "Esta página será atualizada automaticamente quando esta instância %s estiver disponível novamente.", diff --git a/core/l10n/pt_BR.json b/core/l10n/pt_BR.json index cafdfbef0e0..caa468c1de4 100644 --- a/core/l10n/pt_BR.json +++ b/core/l10n/pt_BR.json @@ -281,7 +281,7 @@ "To avoid timeouts with larger installations, you can instead run the following command from your installation directory:" : "Para evitar tempos de espera com instalações maiores, você pode em vez disso executar o seguinte comando a partir do diretório de instalação:", "Detailed logs" : "Logs detalhados", "Update needed" : "Atualização necessária", - "Please use the command line updater because you have a big instance." : "Por favor, use a atualização de linha de comando, porque você tem um grande exemplo.", + "Please use the command line updater because you have a big instance." : "Por favor, use a atualização de linha de comando, porque você tem muitos dados em sua instância.", "For help, see the <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">documentation</a>." : "Para obter ajuda, consulte a <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">documentação</a>.", "This %s instance is currently in maintenance mode, which may take a while." : "Esta instância %s está em modo de manutenção, o que pode demorar um pouco.", "This page will refresh itself when the %s instance is available again." : "Esta página será atualizada automaticamente quando esta instância %s estiver disponível novamente.", diff --git a/core/search/js/search.js b/core/search/js/search.js index 4dd29ef917f..44a69842374 100644 --- a/core/search/js/search.js +++ b/core/search/js/search.js @@ -405,6 +405,10 @@ $(document).ready(function() { OC.Search = new OCA.Search($('#searchbox'), $('#searchresults')); }); } + $('#searchbox + .icon-close-white').click(function() { + OC.Search.clear(); + $('#searchbox').focus(); + }); }); /** diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 6cf4a0b8f2d..4842a94897d 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -69,6 +69,7 @@ <input id="searchbox" type="search" name="query" value="" required autocomplete="off" tabindex="5"> + <button class="icon-close-white" type="reset"></button> </form> <div id="settings"> <div id="expand" tabindex="6" role="link" class="menutoggle"> |