Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

fix admin page on mobile (#81)

Guilherme Oenningcd09e167c416
diff --git a/app/pkg/validate/validation.go b/app/pkg/validate/validation.go
index 85ce4cc37..e45608875 100644
--- a/app/pkg/validate/validation.go
+++ b/app/pkg/validate/validation.go
@@ -11,11 +11,6 @@ type Validatable interface {
IsAuthorized(user *models.User) bool
}
-// ValidationContext is the validation context
-type ValidationContext struct {
- Services *app.Services
-}
-
// Result is returned after each validation
type Result struct {
Ok bool
diff --git a/public/pages/admin/AdminHomePage.tsx b/public/pages/admin/AdminHomePage.tsx
index 35b9a1a35..e1c88fcb8 100644
--- a/public/pages/admin/AdminHomePage.tsx
+++ b/public/pages/admin/AdminHomePage.tsx
@@ -49,56 +49,60 @@ export class AdminHomePage extends React.Component<{}, AdminHomePageState> {
<h1 className="ui header">Administration</h1>
<h4 className="ui header">General Settings</h4>
- <div className="ui form">
- <DisplayError fields={['title']} error={this.state.error} />
- <div className="six wide field">
- <label htmlFor="title">Title</label>
- <input id="title"
- type="text"
- placeholder="Title"
- maxLength={60}
- disabled={ !this.session.isAdmin() }
- value={ this.state.title }
- onChange={(e) => this.setState({ title: e.currentTarget.value })}/>
- <p className="info">
- <p>Use this field to change the title that is shown on the top of your page.</p>
- </p>
- </div>
- <DisplayError fields={['welcomeMessage']} error={this.state.error} />
- <div className="six wide field">
- <label htmlFor="welcome-message">Welcome Message</label>
- <textarea id="welcome-message"
- placeholder="Welcome Message"
- disabled={ !this.session.isAdmin() }
- onChange={(e) => this.setState({ welcomeMessage: e.currentTarget.value })}>
- { this.state.welcomeMessage }
- </textarea>
- <p className="info">
- <p>Use this space to change message of your initial page.</p>
- <p>Common use cases for this are to briefly explain what is your Company/Product, why you created this space and how the visitors can collaborate.</p>
- <p>This field is powered by Commonmark, which means you can style and add links to your message. Learn more at <a target="_blank" href="http://commonmark.org/help/">http://commonmark.org/help/</a>.</p>
- </p>
- </div>
- <DisplayError fields={['invitation']} error={this.state.error} />
- <div className="six wide field">
- <label htmlFor="invitation">Invitation</label>
- <input id="invitation"
- type="text"
- placeholder="Invitation"
- maxLength={60}
- disabled={ !this.session.isAdmin() }
- value={ this.state.invitation }
- onChange={(e) => this.setState({ invitation: e.currentTarget.value })}/>
- <p className="info">
- <p>This is your customized message to invite visitors to share their ideas and suggestions.</p>
- </p>
- </div>
- {
- this.session.isAdmin() &&
- <div className="six wide field">
- <Button className="positive" size="tiny" onClick={async () => await this.confirm()}>Confirm</Button>
+ <div className="ui grid">
+ <div className="eight wide computer sixteen wide mobile column">
+ <div className="ui form">
+ <DisplayError fields={['title']} error={this.state.error} />
+ <div className="field">
+ <label htmlFor="title">Title</label>
+ <input id="title"
+ type="text"
+ placeholder="Title"
+ maxLength={60}
+ disabled={ !this.session.isAdmin() }
+ value={ this.state.title }
+ onChange={(e) => this.setState({ title: e.currentTarget.value })}/>
+ <p className="info">
+ <p>Use this field to change the title that is shown on the top of your page.</p>
+ </p>
+ </div>
+ <DisplayError fields={['welcomeMessage']} error={this.state.error} />
+ <div className="field">
+ <label htmlFor="welcome-message">Welcome Message</label>
+ <textarea id="welcome-message"
+ placeholder="Welcome Message"
+ disabled={ !this.session.isAdmin() }
+ onChange={(e) => this.setState({ welcomeMessage: e.currentTarget.value })}>
+ { this.state.welcomeMessage }
+ </textarea>
+ <p className="info">
+ <p>Use this space to change message of your initial page.</p>
+ <p>Common use cases for this are to briefly explain what is your Company/Product, why you created this space and how the visitors can collaborate.</p>
+ <p>This field is powered by Commonmark, which means you can style and add links to your message. Learn more at <a target="_blank" href="http://commonmark.org/help/">http://commonmark.org/help/</a>.</p>
+ </p>
+ </div>
+ <DisplayError fields={['invitation']} error={this.state.error} />
+ <div className="field">
+ <label htmlFor="invitation">Invitation</label>
+ <input id="invitation"
+ type="text"
+ placeholder="Invitation"
+ maxLength={60}
+ disabled={ !this.session.isAdmin() }
+ value={ this.state.invitation }
+ onChange={(e) => this.setState({ invitation: e.currentTarget.value })}/>
+ <p className="info">
+ <p>This is your customized message to invite visitors to share their ideas and suggestions.</p>
+ </p>
+ </div>
+ {
+ this.session.isAdmin() &&
+ <div className="field">
+ <Button className="positive" size="tiny" onClick={async () => await this.confirm()}>Confirm</Button>
+ </div>
+ }
</div>
- }
+ </div>
</div>
</div>
<Footer />