@@ -96,15 +96,14 @@ public function getCapabilities(): array {
96
96
'fileId ' => '123456789 ' ,
97
97
'taskTypeId ' => TextToTextSummary::ID ,
98
98
]);
99
+ $ url = str_replace ($ this ->urlGenerator ->getBaseUrl (), '' , $ url );
99
100
$ url = str_replace ('123456789 ' , '{fileId} ' , $ url );
100
101
$ endpoint = [
101
102
'name ' => $ this ->l ->t ('Summarize ' ),
102
103
'url ' => $ url ,
103
104
'method ' => 'POST ' ,
104
105
'mimetype_filters ' => implode (', ' , $ textMimeTypes ),
105
- 'android_icon ' => 'creation ' ,
106
- 'ios_icon ' => 'creation ' ,
107
- 'desktop_icon ' => 'creation ' ,
106
+ 'icon ' => $ this ->urlGenerator ->imagePath (Application::APP_ID , 'declarativeui/summarize.svg ' ),
108
107
];
109
108
$ capabilities ['declarativeui ' ][Application::APP_ID ]['context-menu ' ][] = $ endpoint ;
110
109
}
@@ -115,15 +114,14 @@ public function getCapabilities(): array {
115
114
'fileId ' => '123456789 ' ,
116
115
'taskTypeId ' => \OCP \TaskProcessing \TaskTypes \TextToSpeech::ID ,
117
116
]);
117
+ $ url = str_replace ($ this ->urlGenerator ->getBaseUrl (), '' , $ url );
118
118
$ url = str_replace ('123456789 ' , '{fileId} ' , $ url );
119
119
$ endpoint = [
120
120
'name ' => $ this ->l ->t ('Transcribe audio ' ),
121
121
'url ' => $ url ,
122
122
'method ' => 'POST ' ,
123
123
'mimetype_filters ' => 'audio/ ' ,
124
- 'android_icon ' => 'speech_to_text ' ,
125
- 'ios_icon ' => 'speech_to_text ' ,
126
- 'desktop_icon ' => 'speech_to_text ' ,
124
+ 'icon ' => $ this ->urlGenerator ->imagePath (Application::APP_ID , 'declarativeui/speech_to_text.svg ' ),
127
125
];
128
126
$ capabilities ['declarativeui ' ][Application::APP_ID ]['context-menu ' ][] = $ endpoint ;
129
127
}
@@ -134,15 +132,14 @@ public function getCapabilities(): array {
134
132
'fileId ' => '123456789 ' ,
135
133
'taskTypeId ' => AudioToText::ID ,
136
134
]);
135
+ $ url = str_replace ($ this ->urlGenerator ->getBaseUrl (), '' , $ url );
137
136
$ url = str_replace ('123456789 ' , '{fileId} ' , $ url );
138
137
$ endpoint = [
139
138
'name ' => $ this ->l ->t ('Text to speech ' ),
140
139
'url ' => $ url ,
141
140
'method ' => 'POST ' ,
142
141
'mimetype_filters ' => implode (', ' , $ textMimeTypes ),
143
- 'android_icon ' => 'text_to_speech ' ,
144
- 'ios_icon ' => 'text_to_speech ' ,
145
- 'desktop_icon ' => 'text_to_speech ' ,
142
+ 'icon ' => $ this ->urlGenerator ->imagePath (Application::APP_ID , 'declarativeui/text_to_speech.svg ' ),
146
143
];
147
144
$ capabilities ['declarativeui ' ][Application::APP_ID ]['context-menu ' ][] = $ endpoint ;
148
145
}
0 commit comments