aboutsummaryrefslogtreecommitdiffstats
path: root/src/internal-server/resources
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-01 11:07:57 +0000
committerLibravatar GitHub <noreply@github.com>2021-08-01 16:37:57 +0530
commit419933f6505caf4c5e685f8436b1ff735185e55a (patch)
tree152dcb9d2b35d29f862cc57a605b9ae2a0f7c300 /src/internal-server/resources
parentRemoved duplicated contributors badge. (diff)
downloadferdium-app-419933f6505caf4c5e685f8436b1ff735185e55a.tar.gz
ferdium-app-419933f6505caf4c5e685f8436b1ff735185e55a.tar.zst
ferdium-app-419933f6505caf4c5e685f8436b1ff735185e55a.zip
Moved 'internal-server' into a sub-folder as opposed to a git submodule. (#1715)
* Ignored tests in 'internal-server' folder since there are none. * Linter fixes
Diffstat (limited to 'src/internal-server/resources')
-rw-r--r--src/internal-server/resources/views/import.edge18
-rw-r--r--src/internal-server/resources/views/index.edge19
-rw-r--r--src/internal-server/resources/views/layouts/main.edge19
-rw-r--r--src/internal-server/resources/views/transfer.edge32
4 files changed, 88 insertions, 0 deletions
diff --git a/src/internal-server/resources/views/import.edge b/src/internal-server/resources/views/import.edge
new file mode 100644
index 000000000..561021a0c
--- /dev/null
+++ b/src/internal-server/resources/views/import.edge
@@ -0,0 +1,18 @@
1@layout('layouts.main')
2
3@section('content')
4<h1>Import a Franz account</h1>
5<p>Please login using your Franz account. We will import your services and workspaces.</p>
6<form action="import" method="post">
7 <label for="email">E-Mail address</label><br />
8 <input type="email" name="email" placeholder="joe@example.com" required><br />
9
10 <label for="password">Password</label><br />
11 <input type="password" name="password" placeholder="********" required><br />
12
13 <label for="server">API Server to import from</label><br />
14 <input type="text" name="server" value="https://api.franzinfra.com" required><br />
15
16 <button type="submit" id="submitbutton">Import Franz account</button>
17</form>
18@endsection
diff --git a/src/internal-server/resources/views/index.edge b/src/internal-server/resources/views/index.edge
new file mode 100644
index 000000000..b01bd7569
--- /dev/null
+++ b/src/internal-server/resources/views/index.edge
@@ -0,0 +1,19 @@
1@layout('layouts.main')
2
3@section('content')
4<style>
5 ol,
6 p {
7 margin: 0.5rem 0;
8 }
9
10</style>
11<h1>Internal Ferdi Server</h1>
12<p>You are accessing the local server instance of your Ferdi application. This server is used to enable Ferdi's "Use without an Account" feature.</p>
13<p>
14 To use Ferdi without an account, log out of your current account (if you are already logged in) and choose "Use Ferdi without an Account".
15</p>
16<p>
17 Alternatively, you can <a href="/import">import your account from a remote server</a> or <a href="/transfer">import your data from a ".ferdi-data" file</a> or <a href="/transfer">export your data to a ".ferdi-data" file</a>.
18</p>
19@endsection
diff --git a/src/internal-server/resources/views/layouts/main.edge b/src/internal-server/resources/views/layouts/main.edge
new file mode 100644
index 000000000..8856b5d1e
--- /dev/null
+++ b/src/internal-server/resources/views/layouts/main.edge
@@ -0,0 +1,19 @@
1<!DOCTYPE html>
2<html lang="en">
3
4<head>
5 <meta charset="UTF-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <meta http-equiv="X-UA-Compatible" content="ie=edge">
8 <title>ferdi-internal-server</title>
9
10 {{ style('css/vanilla') }}
11 {{ style('css/main') }}
12</head>
13
14<body>
15 <img src='images/logo.png' width='300' />
16 @!section('content')
17</body>
18
19</html>
diff --git a/src/internal-server/resources/views/transfer.edge b/src/internal-server/resources/views/transfer.edge
new file mode 100644
index 000000000..58febb24b
--- /dev/null
+++ b/src/internal-server/resources/views/transfer.edge
@@ -0,0 +1,32 @@
1@layout('layouts.main')
2
3@section('content')
4<h2>Import/Export data from another Ferdi server</h2>
5@if(success === true)
6 <div class="alert" style="background-color:#28C76F;">
7 Sucessfully imported your account data
8 </div>
9@endif
10
11<h3>Import data</h3>
12<div>
13 <label>Account data</label>
14 <div>
15 <input type="file" name="file" id="file" value="" accept=".json,.ferdi-data" required>
16 </div>
17</div>
18
19<form action="/transfer" method="POST">
20 <input type="hidden" name="file" id="fileoutput" value="">
21 <div>
22 <button style="background-color:#28C76F;margin-bottom:1rem;" id="submit" disabled>Import data</button>
23 </div>
24</form>
25
26<h3>Export data</h3>
27<a class="button" style="background-color:#28C76F;margin-bottom:1rem;" href="/export">Export data</a>
28
29</div>
30<script src="/js/transfer.js"></script>
31
32@endsection \ No newline at end of file