Skip to content

Commit

Permalink
refactor: deprecate isFileEditor property on app info interface
Browse files Browse the repository at this point in the history
It seems that this doesn't get used anymore.
  • Loading branch information
Jannik Stehle committed Jul 26, 2024
1 parent 5e8ac91 commit 67ce21c
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 13 deletions.
1 change: 0 additions & 1 deletion docs/extension-system/viewer-editor-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export default defineWebApplication({
name: 'Advanced PDF Viewer',
id: appId,
defaultExtension: 'pdf',
isFileEditor: true,
extensions: [
// This makes sure all files with the "pdf" extension will be routed to your app when being opened.
// See the `ApplicationFileExtension` interface down below for a list of all possible properties.
Expand Down
3 changes: 1 addition & 2 deletions packages/web-app-admin-settings/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ export default defineWebApplication({
name: $gettext('Admin Settings'),
id: appId,
icon: 'settings-4',
color: '#2b2b2b',
isFileEditor: false
color: '#2b2b2b'
}

const menuItems = computed<AppMenuItemExtension[]>(() => {
Expand Down
1 change: 0 additions & 1 deletion packages/web-app-external/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export default defineWebApplication({
const appInfo: ApplicationInformation = {
name: appName,
id: appId,
isFileEditor: true,
extensions: mimeTypes.map((mimeType) => {
const provider = mimeType.app_providers.find((provider) => provider.name === appName)
return {
Expand Down
1 change: 0 additions & 1 deletion packages/web-app-files/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const appInfo: ApplicationInformation = {
id: 'files',
icon: 'resource-type-folder',
color: 'var(--oc-color-swatch-primary-muted)',
isFileEditor: false,
extensions: []
}

Expand Down
3 changes: 1 addition & 2 deletions packages/web-app-ocm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ export default defineWebApplication({
name: $gettext('ScienceMesh'),
id: 'ocm',
color: '#AE291D',
icon: 'contacts-book',
isFileEditor: false
icon: 'contacts-book'
}

router.addRoute({
Expand Down
3 changes: 1 addition & 2 deletions packages/web-app-search/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ const $gettext = (msg: string) => {
const appInfo: ApplicationInformation = {
name: $gettext('Search'),
id: 'search',
icon: 'folder',
isFileEditor: false
icon: 'folder'
}

export default defineWebApplication({
Expand Down
1 change: 0 additions & 1 deletion packages/web-app-text-editor/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ export default defineWebApplication({
id: appId,
icon: 'file-text',
color: '#0D856F',
isFileEditor: true,
defaultExtension: 'txt',
extensions: fileExtensions().map((extensionItem) => {
return {
Expand Down
3 changes: 1 addition & 2 deletions packages/web-app-webfinger/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ function $gettext(msg: string) {
const appInfo = {
name: $gettext('Webfinger'),
id: 'webfinger',
icon: 'fingerprint',
isFileEditor: false
icon: 'fingerprint'
}

const routes = () => [
Expand Down
1 change: 1 addition & 0 deletions packages/web-pkg/src/apps/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export interface ApplicationInformation {
iconFillType?: IconFillType
iconColor?: string
img?: string
/** @deprecated */
isFileEditor?: boolean
extensions?: ApplicationFileExtension[]
defaultExtension?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ function getWrapper({ setup }: { setup: (instance: ReturnType<typeof useFileActi
name: 'Text Editor',
id: 'text-editor',
color: '#0D856F',
isFileEditor: true,
extensions: [
{
extension: 'txt'
Expand Down

0 comments on commit 67ce21c

Please sign in to comment.