Skip to content

Commit

Permalink
Merge branch 'master' into feat/oauth2/userinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
hardviper authored Feb 20, 2024
2 parents f5b90e2 + 60d9f30 commit 48592c2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
18 changes: 14 additions & 4 deletions apps/files/src/components/NavigationQuota.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,17 @@ export default {
},
mounted() {
// Warn the user if the available storage is 0 on page load
if (this.storageStats?.free <= 0) {
// If the user has a quota set, warn if the available account storage is <=0
//
// NOTE: This doesn't catch situations where actual *server*
// disk (non-quota) space is low, but those should probably
// be handled differently anyway since a regular user can't
// can't do much about them (If we did want to indicate server disk
// space matters to users, we'd probably want to use a warning
// specific to that situation anyhow. So this covers warning covers
// our primary day-to-day concern (individual account quota usage).
//
if (this.storageStats?.quota > 0 && this.storageStats?.free <= 0) {
this.showStorageFullWarning()
}
},
Expand Down Expand Up @@ -122,8 +131,9 @@ export default {
throw new Error('Invalid storage stats')
}
// Warn the user if the available storage changed from > 0 to 0
if (this.storageStats?.free > 0 && response.data.data?.free <= 0) {
// Warn the user if the available account storage changed from > 0 to 0
// (unless only because quota was intentionally set to 0 by admin in the interim)
if (this.storageStats?.free > 0 && response.data.data?.free <= 0 && response.data.data?.quota > 0) {
this.showStorageFullWarning()
}
Expand Down
10 changes: 5 additions & 5 deletions apps/files_trashbin/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\ILogger;
use OCP\IServerContainer;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;

class Application extends App implements IBootstrap {
public const APP_ID = 'files_trashbin';
Expand Down Expand Up @@ -77,7 +77,7 @@ public function boot(IBootContext $context): void {
\OCP\Util::connectHook('OC_Filesystem', 'delete', 'OCA\Files_Trashbin\Trashbin', 'ensureFileScannedHook');
}

public function registerTrashBackends(IServerContainer $serverContainer, ILogger $logger, IAppManager $appManager, ITrashManager $trashManager) {
public function registerTrashBackends(ContainerInterface $serverContainer, LoggerInterface $logger, IAppManager $appManager, ITrashManager $trashManager): void {
foreach ($appManager->getInstalledApps() as $app) {
$appInfo = $appManager->getAppInfo($app);
if (isset($appInfo['trash'])) {
Expand All @@ -87,10 +87,10 @@ public function registerTrashBackends(IServerContainer $serverContainer, ILogger
$for = $backend['@attributes']['for'];

try {
$backendObject = $serverContainer->query($class);
$backendObject = $serverContainer->get($class);
$trashManager->registerBackend($for, $backendObject);
} catch (\Exception $e) {
$logger->logException($e);
$logger->error($e->getMessage(), ['exception' => $e]);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

0 comments on commit 48592c2

Please sign in to comment.