Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
b372b2e
feat: add always_show_viewer app config value
printminion-co Aug 27, 2024
df5884c
feat: add config module to expose alwaysShowViewer
printminion-co Aug 27, 2024
d2fba27
feat: add default component stub
printminion-co Aug 27, 2024
d6c3bf1
feat: add default viewer
printminion-co Aug 28, 2024
67dd159
feat: enable default viewer
printminion-co Aug 28, 2024
e344ace
feat: extract default mime type to config
printminion-co Sep 3, 2024
a720b92
feat: properly implement default component
fracado Sep 2, 2024
63febbe
feat(Viewer): extract modal title as own method
printminion-co Sep 3, 2024
94d6c47
feat(Viewer): ensure previous and next navigation works with default …
fracado Sep 2, 2024
2cb5bff
feat(Viewer): hide file name in modal header when mime image shown
fracado Sep 2, 2024
889df8b
fix(Viewer): remove directories from fileList
thlehmann-ionos Sep 11, 2024
405d4e4
fix(Viewer): remove contextmenu view action for folders
bromiesTM Sep 12, 2024
02833ae
refactor: use config module, not magic string
thlehmann-ionos Sep 12, 2024
ea97d08
fix: change default mimetype */* -> "all"
thlehmann-ionos Sep 12, 2024
21475a1
fix(Default): define proper text color
thlehmann-ionos Sep 12, 2024
0b8be33
refactor(Images): rename preview load failed state variable
thlehmann-ionos Sep 12, 2024
00fb662
fix(Images): hide loading spinner on failed image load
thlehmann-ionos Sep 12, 2024
a736454
fix(Default): fix width for Safari
fracado Sep 16, 2024
4021734
feat(deps): use custom-npms for icons
tanyaka Dec 3, 2024
9a79451
build(self-hosted): test self-hosted runner
printminion-co Jan 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:

jobs:
changes:
runs-on: ubuntu-latest-low
runs-on: self-hosted
permissions:
contents: read
pull-requests: read
Expand All @@ -45,7 +45,7 @@ jobs:
- '**.vue'

build:
runs-on: ubuntu-latest
runs-on: self-hosted

needs: changes
if: needs.changes.outputs.src != 'false'
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
summary:
permissions:
contents: none
runs-on: ubuntu-latest-low
runs-on: self-hosted
needs: [changes, build]

if: always()
Expand Down
9 changes: 8 additions & 1 deletion lib/Listener/LoadViewerScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use OCA\Files\Event\LoadAdditionalScriptsEvent;
use OCA\Viewer\AppInfo\Application;
use OCA\Viewer\Event\LoadViewer;
use OCP\AppFramework\Services\IAppConfig;
use OCP\AppFramework\Services\IInitialState;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
Expand All @@ -40,22 +41,28 @@
class LoadViewerScript implements IEventListener {
private IInitialState $initialStateService;
private IPreview $previewManager;
private IAppConfig $appConfig;

public function __construct(
IInitialState $initialStateService,
IPreview $previewManager
IPreview $previewManager,
IAppConfig $appConfig
) {
$this->initialStateService = $initialStateService;
$this->previewManager = $previewManager;
$this->appConfig = $appConfig;
}

public function handle(Event $event): void {
if (!($event instanceof LoadViewer || $event instanceof LoadAdditionalScriptsEvent)) {
return;
}

$alwaysShowViewer = $this->appConfig->getAppValue('always_show_viewer', 'no') === 'yes';

Util::addStyle(Application::APP_ID, 'viewer-main');
Util::addScript(Application::APP_ID, 'viewer-main', 'files');
$this->initialStateService->provideInitialState('enabled_preview_providers', array_keys($this->previewManager->getProviders()));
$this->initialStateService->provideInitialState("always_show_viewer", $alwaysShowViewer);
}
}
Loading
Loading