(Go: >> BACK << -|- >> HOME <<)

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Dark Mode and Custom Theme #283

Merged
merged 11 commits into from
Jan 23, 2023
Prev Previous commit
Next Next commit
feat(theme): add theme colors to paginaion with some cleanup
  • Loading branch information
Joxit committed Jan 19, 2023
commit 8c402442c258cbaac06305b2531e10ba464b345a
29 changes: 24 additions & 5 deletions src/components/dialogs/add-registry-url.riot
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,33 @@
<material-popup opened="{ props.opened }" onClick="{ props.onClose }">
<div class="material-popup-title">Add your Server ?</div>
<div class="material-popup-content">
<material-input onkeyup="{ onKeyUp }" label="Server URL" text-color="var(--primary-text)" label-color="var(--neutral-text)" color="var(--accent-text)" valid="{ registryUrlValidator }"></material-input>
<material-input
onkeyup="{ onKeyUp }"
label="Server URL"
text-color="var(--primary-text)"
label-color="var(--neutral-text)"
color="var(--accent-text)"
valid="{ registryUrlValidator }"
></material-input>
<span>Write your URL without /v2</span>
</div>
<div class="material-popup-action">
<material-button class="dialog-button" waves-color="var(--hover-background)" onClick="{ add }" color="inherit" text-color="var(--primary-text)">
<material-button
class="dialog-button"
waves-color="var(--hover-background)"
onClick="{ add }"
color="inherit"
text-color="var(--primary-text)"
>
Add
</material-button>
<material-button class="dialog-button" waves-color="var(--hover-background)" onClick="{ props.onClose }" color="inherit" text-color="var(--primary-text)">
<material-button
class="dialog-button"
waves-color="var(--hover-background)"
onClick="{ props.onClose }"
color="inherit"
text-color="var(--primary-text)"
>
Cancel
</material-button>
</div>
Expand Down Expand Up @@ -56,8 +75,8 @@
setTimeout(() => router.updateUrlQueryParam(url), 100);
},
registryUrlValidator(input) {
return /^https?:\/\//.test(input) && !/\/v2\/?$/.test(input)
}
return /^https?:\/\//.test(input) && !/\/v2\/?$/.test(input);
},
};
</script>
</add-registry-url>
18 changes: 15 additions & 3 deletions src/components/dialogs/change-registry-url.riot
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,22 @@
</select>
</div>
<div class="material-popup-action">
<material-button class="dialog-button" waves-color="var(--hover-background)" onClick="{ change }" color="inherit" text-color="var(--primary-text)">
<material-button
class="dialog-button"
waves-color="var(--hover-background)"
onClick="{ change }"
color="inherit"
text-color="var(--primary-text)"
>
Change
</material-button>
<material-button class="dialog-button" waves-color="var(--hover-background)" onClick="{ props.onClose }" color="inherit" text-color="var(--primary-text)">
<material-button
class="dialog-button"
waves-color="var(--hover-background)"
onClick="{ props.onClose }"
color="inherit"
text-color="var(--primary-text)"
>
Cancel
</material-button>
</div>
Expand Down Expand Up @@ -65,7 +77,7 @@
font-size: 1em;
line-height: 24px;
height: 24px;
border-bottom: 1px solid #2f6975;
border-bottom: 1px solid var(--accent-text);
appearance: none;
-moz-appearance: none;
-webkit-appearance: none;
Expand Down
16 changes: 14 additions & 2 deletions src/components/dialogs/confirm-delete-image.riot
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,22 @@
</ul>
</div>
<div class="material-popup-action">
<material-button class="dialog-button" waves-color="var(--hover-background)" onClick="{ deleteImages }" color="inherit" text-color="var(--primary-text)">
<material-button
class="dialog-button"
waves-color="var(--hover-background)"
onClick="{ deleteImages }"
color="inherit"
text-color="var(--primary-text)"
>
Delete
</material-button>
<material-button class="dialog-button" waves-color="var(--hover-background)" onClick="{ props.onClick }" color="inherit" text-color="var(--primary-text)">
<material-button
class="dialog-button"
waves-color="var(--hover-background)"
onClick="{ props.onClick }"
color="inherit"
text-color="var(--primary-text)"
>
Cancel
</material-button>
</div>
Expand Down
11 changes: 8 additions & 3 deletions src/components/dialogs/remove-registry-url.riot
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</ul>
</div>
<div class="material-popup-action">
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ props.onClose }" color="inherit" text-color="var(--primary-text)">
<material-button
class="dialog-button"
waves-color="rgba(158,158,158,.4)"
onClick="{ props.onClose }"
color="inherit"
text-color="var(--primary-text)"
>
Close
</material-button>
</div>
Expand All @@ -48,10 +54,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
export default {
remove(url) {
return (event) => {
console.log(url, event)
removeRegistryServers(url);
setTimeout(() => this.update(), 100);
}
};
},
getRegistryServers,
};
Expand Down
7 changes: 6 additions & 1 deletion src/components/search-bar.riot
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<search-bar>
<material-input label="Search in page" text-color="var(--header-text)" label-color="var(--neutral-text)" color="var(--accent-text)"></material-input>
<material-input
label="Search in page"
text-color="var(--header-text)"
label-color="var(--neutral-text)"
color="var(--accent-text)"
></material-input>
<script>
import { router } from '@riotjs/route';

Expand Down
5 changes: 3 additions & 2 deletions src/components/tag-list/pagination.riot
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div class="pagination-centered">
<material-button
aria-label="page-{ p.page }"
color="rgba(0, 0, 0, { p.current ? 0.12 : 0 } )"
text-color="#000"
color="{ p.current ? 'var(--accent-text)' : 'rgba(0, 0, 0, 0 )' }"
text-color="{ p.current ? 'var(--accent-text)' : 'var(--primary-text)' }"
waves-color="rgba(158,158,158,.4)"
each="{ (p, idx) in props.pages}"
class="{ p.current ? 'current' : ''} { p['space-left'] ? 'space-left' : '' } { p['space-right'] ? 'space-right' : ''}"
Expand All @@ -45,6 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
:host material-button > :first-child {
padding: 0;
min-width: 40px;
min-height: 44px;
}

:host material-button > :first-child .content {
Expand Down
6 changes: 3 additions & 3 deletions src/components/tag-list/tag-table.riot
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<material-button
if="{ state.toDelete.size > 0 && !state.singleDeleteAction }"
waves-center="true"
color="#fff"
text-color="#777"
waves-color="#ddd"
color="inherit"
text-color="var(--neutral-background)"
waves-color="var(--hover-background)"
title="This will delete selected images."
onClick="{ deleteImages }"
icon
Expand Down