mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 01:05:53 -04:00
Add google docs configuration
This commit is contained in:
parent
2fbd655c46
commit
41c887f390
@ -36,6 +36,7 @@ import { ConfigScreenWidgetComponent } from "./configs/widget/config_screen/conf
|
||||
import { EtherpadWidgetConfigComponent } from "./configs/widget/etherpad/etherpad.widget.component";
|
||||
import { NameService } from "./shared/services/name.service";
|
||||
import { GoogleCalendarWidgetConfigComponent } from "./configs/widget/google_calendar/gcal.widget.component";
|
||||
import { GoogleDocsWidgetConfigComponent } from "./configs/widget/google_docs/gdoc.widget.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@ -71,6 +72,7 @@ import { GoogleCalendarWidgetConfigComponent } from "./configs/widget/google_cal
|
||||
CustomWidgetConfigComponent,
|
||||
EtherpadWidgetConfigComponent,
|
||||
GoogleCalendarWidgetConfigComponent,
|
||||
GoogleDocsWidgetConfigComponent,
|
||||
|
||||
// Vendor
|
||||
],
|
||||
|
@ -9,6 +9,7 @@ import { RiotHomeComponent } from "./riot/riot-home/home.component";
|
||||
import { CustomWidgetConfigComponent } from "./configs/widget/custom/custom.widget.component";
|
||||
import { EtherpadWidgetConfigComponent } from "./configs/widget/etherpad/etherpad.widget.component";
|
||||
import { GoogleCalendarWidgetConfigComponent } from "./configs/widget/google_calendar/gcal.widget.component";
|
||||
import { GoogleDocsWidgetConfigComponent } from "./configs/widget/google_docs/gdoc.widget.component";
|
||||
|
||||
const routes: Routes = [
|
||||
{path: "", component: HomeComponent},
|
||||
@ -40,6 +41,11 @@ const routes: Routes = [
|
||||
component: GoogleCalendarWidgetConfigComponent,
|
||||
data: {breadcrumb: "Google Calendar Widgets", name: "Google Calendar Widgets"}
|
||||
},
|
||||
{
|
||||
path: "googledocs",
|
||||
component: GoogleDocsWidgetConfigComponent,
|
||||
data: {breadcrumb: "Google Doc Widgets", name: "Google Doc Widgets"}
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
@ -0,0 +1,11 @@
|
||||
<my-widget-config [widgetComponent]="this">
|
||||
<ng-template #widgetParamsTemplate let-widget="widget">
|
||||
<label class="label-block">
|
||||
Document URL
|
||||
<input type="text" class="form-control"
|
||||
placeholder="https://docs.google.com/document/d/1V0olL42WJ84LNYn0kFBJaPmlRxQ4Trx97a5wfVMuJC8/edit"
|
||||
[(ngModel)]="widget.dimension.newUrl" name="widget-url-{{widget.id}}"
|
||||
[disabled]="isUpdating"/>
|
||||
</label>
|
||||
</ng-template>
|
||||
</my-widget-config>
|
13
web/app/configs/widget/google_docs/gdoc.widget.component.ts
Normal file
13
web/app/configs/widget/google_docs/gdoc.widget.component.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { WidgetComponent } from "../widget.component";
|
||||
import { WIDGET_GOOGLE_DOCS } from "../../../shared/models/widget";
|
||||
import { Component } from "@angular/core";
|
||||
|
||||
@Component({
|
||||
templateUrl: "gdoc.widget.component.html",
|
||||
styleUrls: ["gdoc.widget.component.scss"],
|
||||
})
|
||||
export class GoogleDocsWidgetConfigComponent extends WidgetComponent {
|
||||
constructor() {
|
||||
super(WIDGET_GOOGLE_DOCS, "Google Docs Widget", "generic", "googleDocs");
|
||||
}
|
||||
}
|
@ -147,8 +147,7 @@ export class RiotHomeComponent {
|
||||
this.toaster.pop("error", errorMessage);
|
||||
});
|
||||
} else {
|
||||
// TODO: Navigate to edit screen
|
||||
console.log("EDIT SCREEN FOR " + integration.displayName);
|
||||
console.log("Navigating to edit screen for " + integration.category + " " + integration.type);
|
||||
this.router.navigate(['riot-app', integration.category, integration.type]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user