init: add new project files
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include 'head.html' %}
|
||||
<title>Welcome to Tanabata File Manager!</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/auth.css') }}">
|
||||
</head>
|
||||
<body data-bs-theme="dark">
|
||||
<img src="{{ url_for('static', filename='images/tanabata-left.png') }}" alt="" class="decoration left">
|
||||
<img src="{{ url_for('static', filename='images/tanabata-right.png') }}" alt="" class="decoration right">
|
||||
<form id="auth">
|
||||
<h1>Welcome to Tanabata File Manager!</h1>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control form-control-lg" id="username" name="username" placeholder="Username..." required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="password" class="form-control form-control-lg" id="password" name="password" placeholder="Password..." required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary" id="login">Log in</button>
|
||||
</div>
|
||||
</form>
|
||||
<script src="{{ url_for('static', filename='js/auth.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,28 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="{{ url_for('static', filename='images/apple-icon-57x57.png') }}">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="{{ url_for('static', filename='images/apple-icon-60x60.png') }}">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="{{ url_for('static', filename='images/apple-icon-72x72.png') }}">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="{{ url_for('static', filename='images/apple-icon-76x76.png') }}">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="{{ url_for('static', filename='images/apple-icon-114x114.png') }}">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="{{ url_for('static', filename='images/apple-icon-120x120.png') }}">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="{{ url_for('static', filename='images/apple-icon-144x144.png') }}">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="{{ url_for('static', filename='images/apple-icon-152x152.png') }}">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ url_for('static', filename='images/apple-icon-180x180.png') }}">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="{{ url_for('static', filename='images/android-icon-192x192.png') }}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='images/favicon-32x32.png') }}">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="{{ url_for('static', filename='images/favicon-96x96.png') }}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ url_for('static', filename='images/favicon-16x16.png') }}">
|
||||
<link rel="manifest" href="/tanabata.webmanifest">
|
||||
<meta name="msapplication-TileColor" content="#615880">
|
||||
<meta name="msapplication-TileImage" content="{{ url_for('static', filename='images/ms-icon-144x144.png') }}">
|
||||
<meta name="theme-color" content="#615880">
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: Epilogue;
|
||||
src: url({{ url_for('static', filename='fonts/Epilogue-VariableFont_wght.ttf') }});
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/general.css') }}">
|
||||
<script src="{{ url_for('static', filename='js/jquery-3.6.0.min.js') }}"></script>
|
||||
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include 'head.html' %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/interface.css') }}">
|
||||
<title>New category | Tanabata File Manager</title>
|
||||
</head>
|
||||
<body data-bs-theme="dark">
|
||||
<header>
|
||||
<h1><img src="{{ url_for('static', filename='images/icon-category.svg') }}" alt="Category -" class="icon-header"> New category</h1>
|
||||
<form id="object-add" method="POST" action="/categories/new">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-10">
|
||||
<label for="name">Name</label>
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="color">Color</label>
|
||||
<input type="color" class="form-control form-control-color" name="color" id="color" value="#444455">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="notes">Notes</label>
|
||||
<textarea class="form-control" name="notes" id="notes" rows="3"></textarea>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<label for="is_private" class="form-check-label">Is private</label>
|
||||
<input type="checkbox" name="is_private" id="is_private" class="form-check-input" checked>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Add category</button>
|
||||
</div>
|
||||
</form>
|
||||
</header>
|
||||
<div id="loader" style="display: none">
|
||||
<div class="loader-wrapper">
|
||||
<img src="{{ url_for('static', filename='images/loader.gif') }}" alt="Loading..." class="loader-img">
|
||||
</div>
|
||||
</div>
|
||||
<script src="{{ url_for('static', filename='js/interface.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/add-category.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include 'head.html' %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/interface.css') }}">
|
||||
<title>New file | Tanabata File Manager</title>
|
||||
<style>
|
||||
.tags-container {
|
||||
margin: 15px 0;
|
||||
padding: 10px;
|
||||
height: 200px;
|
||||
background-color: #212529;
|
||||
border: 1px solid #495057;
|
||||
border-radius: .375rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-content: flex-start;
|
||||
align-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
box-sizing: border-box;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.tags-container:after {
|
||||
content: "";
|
||||
flex: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body data-bs-theme="dark">
|
||||
<div class="file">
|
||||
<a href="/static/files/{{ file['id'] }}.{{ file['extension'] }}" class="preview-link" target="_blank">
|
||||
<img src="/static/previews/{{ file['id'] }}.{{ file['extension'] }}" alt="{{ file['id'] }}.{{ file['extension'] }}" class="preview-img">
|
||||
</a>
|
||||
</div>
|
||||
<header>
|
||||
<form id="object-edit">
|
||||
<div class="form-group">
|
||||
<label for="notes">Notes</label>
|
||||
<textarea class="form-control" name="init-notes" rows="3" hidden>{{ file['notes'] }}</textarea>
|
||||
<textarea class="form-control" id="notes" name="notes" rows="3">{{ file['notes'] }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="datetime">Datetime</label>
|
||||
<input type="datetime-local" class="form-control" name="init-datetime" step="1" value="{{ file['datetime'] }}" hidden>
|
||||
<input type="datetime-local" class="form-control" id="datetime" name="datetime" step="1" value="{{ file['datetime'] }}" required>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<label for="is-private" class="form-check-label">Is private</label>
|
||||
<input type="checkbox" class="form-check-input" name="init-is_private" {% if file['is_private'] %}checked{% endif %} hidden>
|
||||
<input type="checkbox" class="form-check-input" name="is_private" {% if file['is_private'] %}checked{% endif %}>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="file-tags">
|
||||
<div class="tags-container tags-container-selected" id="file-tags-selected">
|
||||
{% for tag in tags %}
|
||||
<div class="tag-preview" tag_id="{{ tag['id'] }}"{% if tag['color'] %} style="background-color: #{{ tag['color'] }}"{% elif tag['category_color'] %} style="background-color: #{{ tag['category_color'] }}"{% endif %}>{{ tag['name'] }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<input type="text" class="form-control" id="file-tags-filter" placeholder="Filter tags...">
|
||||
<div class="tags-container" id="file-tags-other">
|
||||
{% for tag in tags_all %}
|
||||
{% if tag not in tags %}
|
||||
<div class="tag-preview" tag_id="{{ tag['id'] }}"{% if tag['color'] %} style="background-color: #{{ tag['color'] }}"{% elif tag['category_color'] %} style="background-color: #{{ tag['category_color'] }}"{% endif %}>{{ tag['name'] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div id="loader" style="display: none">
|
||||
<div class="loader-wrapper">
|
||||
<img src="{{ url_for('static', filename='images/loader.gif') }}" alt="Loading..." class="loader-img">
|
||||
</div>
|
||||
</div>
|
||||
<script src="{{ url_for('static', filename='js/interface.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/file.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include 'head.html' %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/interface.css') }}">
|
||||
<title>New tag | Tanabata File Manager</title>
|
||||
</head>
|
||||
<body data-bs-theme="dark">
|
||||
<header>
|
||||
<h1><img src="{{ url_for('static', filename='images/icon-tag.svg') }}" alt="Tag -" class="icon-header"> New tag</h1>
|
||||
<form id="object-add" method="POST" action="/tags/new">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-10">
|
||||
<label for="name">Name</label>
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="color">Color</label>
|
||||
<input type="color" class="form-control form-control-color" name="color" id="color" value="#444455">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="notes">Notes</label>
|
||||
<textarea class="form-control" name="notes" id="notes" rows="3"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="category">Category</label>
|
||||
<select name="category_id" class="form-control" id="category">
|
||||
<option></option>
|
||||
{% for category in categories %}
|
||||
<option value="{{ category['id'] }}">{{ category['name'] }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<label for="is_private" class="form-check-label">Is private</label>
|
||||
<input type="checkbox" name="is_private" id="is_private" class="form-check-input" checked>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Add tag</button>
|
||||
</div>
|
||||
</form>
|
||||
</header>
|
||||
<div id="loader" style="display: none">
|
||||
<div class="loader-wrapper">
|
||||
<img src="{{ url_for('static', filename='images/loader.gif') }}" alt="Loading..." class="loader-img">
|
||||
</div>
|
||||
</div>
|
||||
<script src="{{ url_for('static', filename='js/interface.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/add-tag.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,15 @@
|
||||
{% extends 'section.html' %}
|
||||
{% set section = 'categories' %}
|
||||
{% set sorting_options = ['name', 'color', 'created'] %}
|
||||
|
||||
{% block Header %}
|
||||
<div class="filtering-wrapper">
|
||||
<input type="text" class="form-control filtering" id="filter" placeholder="Filter {{ section }}...">
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block Main %}
|
||||
{% for category in categories %}
|
||||
<div class="item-preview category-preview" category_id="{{ category['id'] }}"{% if category['color'] %} style="background-color: #{{ category['color'] }}"{% endif %}>{{ category['name'] }}</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,33 @@
|
||||
{% extends 'section.html' %}
|
||||
{% set section = 'files' %}
|
||||
{% set sorting_options = ['mime_name', 'datetime', 'created'] %}
|
||||
|
||||
{% block Header %}
|
||||
<div class="filtering-wrapper">
|
||||
<div class="filtering-tokens" id="files-filter"></div>
|
||||
</div>
|
||||
<div class="filtering-block" style="display: none">
|
||||
<div class="filtering-operators">
|
||||
<div class="filtering-token" val="("><i>(</i></div>
|
||||
<div class="filtering-token" val="&"><i>AND</i></div>
|
||||
<div class="filtering-token" val="!"><i>NOT</i></div>
|
||||
<div class="filtering-token" val="|"><i>OR</i></div>
|
||||
<div class="filtering-token" val=")"><i>)</i></div>
|
||||
</div>
|
||||
<div class="filtering-filter">
|
||||
<input type="text" class="form-control filtering" id="filter-filtering" placeholder="Filter tags...">
|
||||
</div>
|
||||
<div class="filtering-tokens" id="filtering-tokens-all">
|
||||
<div class="filtering-token" val="t=00000000-0000-0000-0000-000000000000"><i>Untagged</i></div>
|
||||
<div class="filtering-token" val="m~image%"><i>MIME: image/*</i></div>
|
||||
<div class="filtering-token" val="m~video%"><i>MIME: video/*</i></div>
|
||||
</div>
|
||||
<div class="form-group btn-row">
|
||||
<button class="btn btn-primary" id="filtering-apply" style="width: 48%;">Apply</button>
|
||||
<button class="btn btn-danger" id="filtering-reset" style="width: 48%;">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block Main %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,35 @@
|
||||
{% extends 'section.html' %}
|
||||
{% set section = 'settings' %}
|
||||
|
||||
{% block Main %}
|
||||
<form id="settings-user">
|
||||
<h2>User settings</h2>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" class="form-control" name="username" id="username" value="{{ 'aboba' }}" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" class="form-control" name="password" id="password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin-top: 14px">
|
||||
<button type="submit" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="sessions-wrapper">
|
||||
<h2>Sessions</h2>
|
||||
<table class="table table-dark table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>User agent</th>
|
||||
<th>Started</th>
|
||||
<th>Expires</th>
|
||||
<th>Terminate</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="sessions-table"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,15 @@
|
||||
{% extends 'section.html' %}
|
||||
{% set section = 'tags' %}
|
||||
{% set sorting_options = ['name', 'color', 'category_name', 'created'] %}
|
||||
|
||||
{% block Header %}
|
||||
<div class="filtering-wrapper">
|
||||
<input type="text" class="form-control filtering" id="filter" placeholder="Filter {{ section }}...">
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block Main %}
|
||||
{% for tag in tags %}
|
||||
<div class="item-preview tag-preview" tag_id="{{ tag['id'] }}"{% if tag['color'] %} style="background-color: #{{ tag['color'] }}"{% elif tag['category_color'] %} style="background-color: #{{ tag['category_color'] }}"{% endif %}>{{ tag['name'] }}</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,117 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include 'head.html' %}
|
||||
<title>{{ section[0]|upper() }}{{ section[1:] }} | Tanabata File Manager</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/interface.css') }}">
|
||||
{% if section == 'files' %}
|
||||
<!-- <script src="{{ url_for('static', filename='js/jquery.lazy.min.js') }}"></script> -->
|
||||
{% endif %}
|
||||
</head>
|
||||
<body data-bs-theme="dark">
|
||||
{% if section != 'settings' %}
|
||||
<header>
|
||||
<div class="sorting">
|
||||
<div class="highlighted" id="select">Select</div>
|
||||
<div id="sorting">Sorting by <span class="highlighted" id="attribute">{{ sorting['key'] }} ({% if sorting['asc'] %}asc{% else %}desc{% endif %})</span> <img src="{{ url_for('static', filename='images/icon-expand.svg') }}" alt="" id="icon-expand"></div>
|
||||
<form id="sorting-options" style="display: none">
|
||||
{% for opt in sorting_options %}
|
||||
<div class="form-check sorting-option">
|
||||
<label class="form-check-label" for="{{ opt }}">{{ opt }}</label>
|
||||
<input type="radio" class="form-check-input" name="sorting" value="{{ opt }}" id="{{ opt }}" {% if opt == sorting['key'] %}checked prev-checked{% endif %}>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<hr>
|
||||
<div class="form-check sorting-option">
|
||||
<label class="form-check-label" for="asc">ascending</label>
|
||||
<input type="radio" class="form-check-input" name="order" value="asc" id="asc" {% if sorting['asc'] %}checked prev-checked{% endif %}>
|
||||
</div>
|
||||
<div class="form-check sorting-option">
|
||||
<label class="form-check-label" for="desc">descending</label>
|
||||
<input type="radio" class="form-check-input" name="order" value="desc" id="desc" {% if not sorting['asc'] %}checked prev-checked{% endif %}>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% block Header %}{% endblock %}
|
||||
</header>
|
||||
{% endif %}
|
||||
<main>
|
||||
{% block Main %}{% endblock %}
|
||||
</main>
|
||||
{% if section != 'settings' %}
|
||||
<div class="selection-manager" style="display: none">
|
||||
<div class="selection-header">
|
||||
<div id="selection-info"><span id="selection-count">0</span> selected</div>
|
||||
{% if section == 'files' %}
|
||||
<div id="selection-edit-tags">Edit tags</div>
|
||||
<div id="selection-add-to-pool">Add to pool</div>
|
||||
{% endif %}
|
||||
<div id="selection-delete">Delete</div>
|
||||
</div>
|
||||
<hr>
|
||||
{% if section == 'files' %}
|
||||
<div class="selection-tags" style="display: none">
|
||||
<div class="tags-container tags-container-selected" id="selection-tags-selected">
|
||||
{% for tag in tags_all %}
|
||||
<div class="tag-preview" tag_id="{{ tag['id'] }}" style="{% if tag['color'] %}background-color: #{{ tag['color'] }};{% elif tag['category_color'] %}background-color: #{{ tag['category_color'] }};{% endif %};display: none">{{ tag['name'] }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<input type="text" class="form-control filtering" id="selection-tags-filter" placeholder="Filter tags...">
|
||||
<div class="tags-container" id="selection-tags-other">
|
||||
{% for tag in tags_all %}
|
||||
<div class="item-preview tag-preview" tag_id="{{ tag['id'] }}"{% if tag['color'] %} style="background-color: #{{ tag['color'] }}"{% elif tag['category_color'] %} style="background-color: #{{ tag['category_color'] }}"{% endif %}>{{ tag['name'] }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if section == 'files' %}
|
||||
<div class="viewer-wrapper" style="display: none">
|
||||
<div class="viewer-nav viewer-nav-close" id="view-close">
|
||||
<div class="viewer-nav-icon" style="background-image: url({{ url_for('static', filename='images/layer-controls.png') }}); background-position: -3px 0;"></div>
|
||||
</div>
|
||||
<div class="viewer-nav viewer-nav-prev" id="view-prev">
|
||||
<div class="viewer-nav-icon" style="background-image: url({{ url_for('static', filename='images/layer-controls.png') }}); background-position: 0-25px;"></div>
|
||||
</div>
|
||||
<div class="viewer-nav viewer-nav-next" id="view-next">
|
||||
<div class="viewer-nav-icon" style="background-image: url({{ url_for('static', filename='images/layer-controls.png') }}); background-position: 0-63px;"></div>
|
||||
</div>
|
||||
<iframe src="" frameborder="0" id="viewer"></iframe>
|
||||
</div>
|
||||
{% endif %}
|
||||
<footer>
|
||||
{% if section == 'categories' %}
|
||||
<a href="/categories/new" class="nav curr"><img src="{{ url_for('static', filename='images/icon-add.svg') }}" alt="Add category" class="navicon"></a>
|
||||
{% else %}
|
||||
<a href="/categories" class="nav"><img src="{{ url_for('static', filename='images/icon-category.svg') }}" alt="Categories" class="navicon"></a>
|
||||
{% endif %}
|
||||
|
||||
{% if section == 'tags' %}
|
||||
<a href="/tags/new" class="nav curr"><img src="{{ url_for('static', filename='images/icon-add.svg') }}" alt="Add tag" class="navicon"></a>
|
||||
{% else %}
|
||||
<a href="/tags" class="nav"><img src="{{ url_for('static', filename='images/icon-tag.svg') }}" alt="Tags" class="navicon"></a>
|
||||
{% endif %}
|
||||
|
||||
{% if section == 'files' %}
|
||||
<a href="/files/new" class="nav curr"><img src="{{ url_for('static', filename='images/icon-add.svg') }}" alt="Add file" class="navicon"></a>
|
||||
{% else %}
|
||||
<a href="/files" class="nav"><img src="{{ url_for('static', filename='images/icon-file.svg') }}" alt="Files" class="navicon"></a>
|
||||
{% endif %}
|
||||
|
||||
{% if section == 'pools' %}
|
||||
<a href="/pools/new" class="nav curr"><img src="{{ url_for('static', filename='images/icon-add.svg') }}" alt="Add pool" class="navicon"></a>
|
||||
{% else %}
|
||||
<a href="/pools" class="nav"><img src="{{ url_for('static', filename='images/icon-pool.svg') }}" alt="Pools" class="navicon"></a>
|
||||
{% endif %}
|
||||
|
||||
{% if section == 'settings' %}
|
||||
<a href="/settings" class="nav curr"><img src="{{ url_for('static', filename='images/icon-settings.svg') }}" alt="Settings" class="navicon"></a>
|
||||
{% else %}
|
||||
<a href="/settings" class="nav"><img src="{{ url_for('static', filename='images/icon-settings.svg') }}" alt="Settings" class="navicon"></a>
|
||||
{% endif %}
|
||||
</footer>
|
||||
<script src="{{ url_for('static', filename='js/interface.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/'+ section + '.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include 'head.html' %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/interface.css') }}">
|
||||
<title>Category - {{ category['name'] }} | Tanabata File Manager</title>
|
||||
</head>
|
||||
<body data-bs-theme="dark">
|
||||
<header>
|
||||
<h1><img src="{{ url_for('static', filename='images/icon-category.svg') }}" alt="Category -" class="icon-header"> {{ category['name'] }}</h1>
|
||||
<form id="object-edit">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-10">
|
||||
<label for="name">Name</label>
|
||||
<input type="text" class="form-control" name="name" id="name" value="{{ category['name'] }}" required>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="color">Color</label>
|
||||
<input type="color" class="form-control form-control-color" name="color" id="color" value="#{% if category['color'] %}{{ category['color'] }}{% else %}444455{% endif %}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="notes">Notes</label>
|
||||
<textarea class="form-control" name="notes" id="notes" rows="3">{{ category['notes'] }}</textarea>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<label for="is_private" class="form-check-label">Is private</label>
|
||||
<input type="checkbox" name="is_private" id="is_private" class="form-check-input" {% if category['is_private'] %}checked{% endif %}>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</form>
|
||||
</header>
|
||||
<div id="loader" style="display: none">
|
||||
<div class="loader-wrapper">
|
||||
<img src="{{ url_for('static', filename='images/loader.gif') }}" alt="Loading..." class="loader-img">
|
||||
</div>
|
||||
</div>
|
||||
<script src="{{ url_for('static', filename='js/interface.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/category.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include 'head.html' %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/interface.css') }}">
|
||||
<title>File - {{ file['id'] }}.{{ file['extension'] }} | Tanabata File Manager</title>
|
||||
</head>
|
||||
<body data-bs-theme="dark">
|
||||
<div class="file">
|
||||
<a href="/static/files/{{ file['id'] }}.{{ file['extension'] }}" class="preview-link" target="_blank">
|
||||
<img src="/static/previews/{{ file['id'] }}.{{ file['extension'] }}" alt="{{ file['id'] }}.{{ file['extension'] }}" class="preview-img">
|
||||
</a>
|
||||
</div>
|
||||
<header>
|
||||
<form id="object-edit">
|
||||
<div class="form-group">
|
||||
<label for="notes">Notes</label>
|
||||
<textarea class="form-control" name="init-notes" rows="3" hidden>{{ file['notes'] }}</textarea>
|
||||
<textarea class="form-control" id="notes" name="notes" rows="3">{{ file['notes'] }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="datetime">Datetime</label>
|
||||
<input type="datetime-local" class="form-control" name="init-datetime" step="1" value="{{ file['datetime'] }}" hidden>
|
||||
<input type="datetime-local" class="form-control" id="datetime" name="datetime" step="1" value="{{ file['datetime'] }}" required>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<label for="is_private" class="form-check-label">Is private</label>
|
||||
<input type="checkbox" class="form-check-input" name="init-is_private" {% if file['is_private'] %}checked{% endif %} hidden>
|
||||
<input type="checkbox" class="form-check-input" id="is_private" name="is_private" {% if file['is_private'] %}checked{% endif %}>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="file-tags">
|
||||
<div class="tags-container" id="file-tags-selected">
|
||||
{% for tag in tags_all %}
|
||||
<div class="tag-preview" tag_id="{{ tag['id'] }}" style="{% if tag['color'] %}background-color: #{{ tag['color'] }};{% elif tag['category_color'] %}background-color: #{{ tag['category_color'] }};{% endif %}{% if tag not in tags %}display: none;{% endif %}">{{ tag['name'] }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<input type="text" class="form-control filtering" id="file-tags-filter" placeholder="Filter tags...">
|
||||
<div class="tags-container" id="file-tags-other">
|
||||
{% for tag in tags_all %}
|
||||
<div class="tag-preview" tag_id="{{ tag['id'] }}" style="{% if tag['color'] %}background-color: #{{ tag['color'] }};{% elif tag['category_color'] %}background-color: #{{ tag['category_color'] }};{% endif %}{% if tag in tags %}display: none;{% endif %}">{{ tag['name'] }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div id="loader" style="display: none">
|
||||
<div class="loader-wrapper">
|
||||
<img src="{{ url_for('static', filename='images/loader.gif') }}" alt="Loading..." class="loader-img">
|
||||
</div>
|
||||
</div>
|
||||
<script src="{{ url_for('static', filename='js/interface.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/file.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include 'head.html' %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/interface.css') }}">
|
||||
<title>Tag - {{ tag['name'] }} | Tanabata File Manager</title>
|
||||
</head>
|
||||
<body data-bs-theme="dark">
|
||||
<header>
|
||||
<h1><img src="{{ url_for('static', filename='images/icon-tag.svg') }}" alt="Tag -" class="icon-header"> {{ tag['name'] }}</h1>
|
||||
<form id="object-edit">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-10">
|
||||
<label for="name">Name</label>
|
||||
<input type="text" class="form-control" name="name" id="name" value="{{ tag['name'] }}" required>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="color">Color</label>
|
||||
<input type="color" class="form-control form-control-color" name="color" id="color" value="#{% if tag['color'] %}{{ tag['color'] }}{% else %}444455{% endif %}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="notes">Notes</label>
|
||||
<textarea class="form-control" name="notes" id="notes" rows="3">{{ tag['notes'] }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="category">Category</label>
|
||||
<select name="category_id" class="form-control" id="category">
|
||||
<option value="00000000-0000-0000-0000-000000000000"></option>
|
||||
{% for category in categories %}
|
||||
<option value="{{ category['id'] }}" {% if category['id'] == tag['category_id'] %}selected{% endif %}>{{ category['name'] }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<label for="is_private" class="form-check-label">Is private</label>
|
||||
<input type="checkbox" name="is_private" id="is_private" class="form-check-input" {% if tag['is_private'] %}checked{% endif %}>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="parent-tags">
|
||||
<div class="tags-container tags-container-selected" id="parent-tags-selected">
|
||||
{% for tag in tags_all %}
|
||||
<div class="tag-preview" tag_id="{{ tag['id'] }}" style="{% if tag['color'] %}background-color: #{{ tag['color'] }};{% elif tag['category_color'] %}background-color: #{{ tag['category_color'] }};{% endif %}{% if tag not in parent_tags %}display: none;{% endif %}">{{ tag['name'] }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<input type="text" class="form-control filtering" id="parent-tags-filter" placeholder="Filter tags...">
|
||||
<div class="tags-container" id="parent-tags-other">
|
||||
{% for tag in tags_all %}
|
||||
<div class="tag-preview" tag_id="{{ tag['id'] }}" style="{% if tag['color'] %}background-color: #{{ tag['color'] }};{% elif tag['category_color'] %}background-color: #{{ tag['category_color'] }};{% endif %}{% if tag in parent_tags %}display: none;{% endif %}">{{ tag['name'] }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div id="loader" style="display: none">
|
||||
<div class="loader-wrapper">
|
||||
<img src="{{ url_for('static', filename='images/loader.gif') }}" alt="Loading..." class="loader-img">
|
||||
</div>
|
||||
</div>
|
||||
<script src="{{ url_for('static', filename='js/interface.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/tag.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user