aboutsummaryrefslogtreecommitdiffhomepage
path: root/template/html/integrations.html
blob: 8c597eeff3f0d0422c000c1911809cc71acbe48a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{{ define "title"}}{{ t "Integrations" }}{{ end }}

{{ define "content"}}
<section class="page-header">
    <h1>{{ t "Integrations" }}</h1>
    <ul>
        <li>
            <a href="{{ route "settings" }}">{{ t "Settings" }}</a>
        </li>
        <li>
            <a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
        </li>
        {{ if .user.IsAdmin }}
        <li>
            <a href="{{ route "users" }}">{{ t "Users" }}</a>
        </li>
        {{ end }}
        <li>
            <a href="{{ route "about" }}">{{ t "About" }}</a>
        </li>
    </ul>
</section>

<form method="post" autocomplete="off" action="{{ route "updateIntegration" }}">
    <input type="hidden" name="csrf" value="{{ .csrf }}">

    {{ if .errorMessage }}
        <div class="alert alert-error">{{ t .errorMessage }}</div>
    {{ end }}

    <h3>Fever</h3>
    <div class="form-section">
        <label>
            <input type="checkbox" name="fever_enabled" value="1" {{ if .form.FeverEnabled }}checked{{ end }}> {{ t "Activate Fever API" }}
        </label>

        <label for="form-fever-username">{{ t "Fever Username" }}</label>
        <input type="text" name="fever_username" id="form-fever-username" value="{{ .form.FeverUsername }}">

        <label for="form-fever-password">{{ t "Fever Password" }}</label>
        <input type="password" name="fever_password" id="form-fever-password" value="{{ .form.FeverPassword }}">

        <p>{{ t "Fever API endpoint:" }} <strong>{{ baseURL }}{{ route "feverEndpoint" }}</strong></p>
    </div>

    <h3>Pinboard</h3>
    <div class="form-section">
        <label>
            <input type="checkbox" name="pinboard_enabled" value="1" {{ if .form.PinboardEnabled }}checked{{ end }}> {{ t "Save articles to Pinboard" }}
        </label>

        <label for="form-pinboard-token">{{ t "Pinboard API Token" }}</label>
        <input type="password" name="pinboard_token" id="form-pinboard-token" value="{{ .form.PinboardToken }}">

        <label for="form-pinboard-tags">{{ t "Pinboard Tags" }}</label>
        <input type="text" name="pinboard_tags" id="form-pinboard-tags" value="{{ .form.PinboardTags }}">

        <label>
            <input type="checkbox" name="pinboard_mark_as_unread" value="1" {{ if .form.PinboardMarkAsUnread }}checked{{ end }}> {{ t "Mark bookmark as unread" }}
        </label>
    </div>

    <h3>Instapaper</h3>
    <div class="form-section">
        <label>
            <input type="checkbox" name="instapaper_enabled" value="1" {{ if .form.InstapaperEnabled }}checked{{ end }}> {{ t "Save articles to Instapaper" }}
        </label>

        <label for="form-instapaper-username">{{ t "Instapaper Username" }}</label>
        <input type="text" name="instapaper_username" id="form-instapaper-username" value="{{ .form.InstapaperUsername }}">

        <label for="form-instapaper-password">{{ t "Instapaper Password" }}</label>
        <input type="password" name="instapaper_password" id="form-instapaper-password" value="{{ .form.InstapaperPassword }}">
    </div>

    <h3>Wallabag</h3>
    <div class="form-section">
        <label>
            <input type="checkbox" name="wallabag_enabled" value="1" {{ if .form.WallabagEnabled }}checked{{ end }}> {{ t "Save articles to Wallabag" }}
        </label>

        <label for="form-wallabag-url">{{ t "Wallabag API Endpoint" }}</label>
        <input type="url" name="wallabag_url" id="form-wallabag-url" value="{{ .form.WallabagURL }}" placeholder="http://v2.wallabag.org/">

        <label for="form-wallabag-client-id">{{ t "Wallabag Client ID" }}</label>
        <input type="text" name="wallabag_client_id" id="form-wallabag-client-id" value="{{ .form.WallabagClientID }}">

        <label for="form-wallabag-client-secret">{{ t "Wallabag Client Secret" }}</label>
        <input type="password" name="wallabag_client_secret" id="form-wallabag-client-secret" value="{{ .form.WallabagClientSecret }}">

        <label for="form-wallabag-username">{{ t "Wallabag Username" }}</label>
        <input type="text" name="wallabag_username" id="form-wallabag-username" value="{{ .form.WallabagUsername }}">

        <label for="form-wallabag-password">{{ t "Wallabag Password" }}</label>
        <input type="password" name="wallabag_password" id="form-wallabag-password" value="{{ .form.WallabagPassword }}">
    </div>

    <div class="buttons">
        <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button>
    </div>
</form>

<h3>{{ t "Miniflux API" }}</h3>
<div class="panel">
    <ul>
        <li>
            {{ t "API Endpoint" }} = <strong>{{ baseURL }}/v1/</strong>
        </li>
        <li>
            {{ t "Username" }} = <strong>{{ .user.Username }}</strong>
        </li>
        <li>
            {{ t "Password" }} = <strong>{{ t "Your account password" }}</strong>
        </li>
    </ul>
</div>

<h3>{{ t "Bookmarklet" }}</h3>
<div class="panel">
    <p>{{ t "This special link allows you to subscribe to a website directly by using a bookmark in your web browser." }}</p>

    <div class="bookmarklet">
        <a href="javascript:location.href='{{ baseURL }}{{ route "bookmarklet" }}?uri='+encodeURIComponent(window.location.href)">{{ t "Add to Miniflux" }}</a>
    </div>

    <p>{{ t "Drag and drop this link to your bookmarks." }}</p>
</div>

{{ end }}