Skip to content

Commit

Permalink
fix: ui alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzent03 committed Aug 29, 2023
1 parent f07304a commit a9adfff
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/ui/history/components/logFileComponent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
>
<div
class="tree-item-self is-clickable nav-file-title"
data-path={diff.vault_path}
aria-label-position={side}
aria-label={diff.vault_path}
>
Expand All @@ -71,8 +72,7 @@

<style lang="scss">
main {
.nav-file-title-content {
display: flex;
.nav-file-title {
align-items: center;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/ui/sourceControl/components/fileComponent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
>
<div
class="tree-item-self is-clickable nav-file-title"
data-path={change.vault_path}
aria-label-position={side}
aria-label={change.vault_path}
>
Expand Down Expand Up @@ -131,8 +132,7 @@

<style lang="scss">
main {
.nav-file-title-content {
display: flex;
.nav-file-title {
align-items: center;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/ui/sourceControl/components/pulledFileComponent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<!-- svelte-ignore a11y-unknown-aria-attribute -->
<div
class="tree-item-self is-clickable nav-file-title"
data-path={change.vault_path}
aria-label-position={side}
aria-label={change.vault_path}
>
Expand All @@ -51,8 +52,7 @@

<style lang="scss">
main {
.nav-file-title-content {
display: flex;
.nav-file-title {
align-items: center;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/ui/sourceControl/components/stagedFileComponent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
>
<div
class="tree-item-self is-clickable nav-file-title"
data-path={change.vault_path}
aria-label-position={side}
aria-label={change.vault_path}
>
Expand Down Expand Up @@ -92,8 +93,7 @@

<style lang="scss">
main {
.nav-file-title-content {
display: flex;
.nav-file-title {
align-items: center;
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/ui/sourceControl/components/treeComponent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,7 @@

<style lang="scss">
main {
.nav-folder-title-content {
display: flex;
.nav-folder-title {
align-items: center;
}
}
Expand Down
20 changes: 14 additions & 6 deletions src/ui/sourceControl/sourceControl.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { Platform, setIcon } from "obsidian";
import { SOURCE_CONTROL_VIEW_CONFIG } from "src/constants";
import ObsidianGit from "src/main";
import {
FileStatusResult,
Expand Down Expand Up @@ -98,15 +99,18 @@
const unPushedCommits = await plugin.gitManager.getUnpushedCommits();
buttons.forEach((btn) => {
if(Platform.isMobile){
if (Platform.isMobile) {
btn.removeClass("button-border");
if (btn.id == "push" && unPushedCommits > 0) {
btn.addClass("button-border");
}
}else{
btn.firstElementChild?.removeAttribute("color")
} else {
btn.firstElementChild?.removeAttribute("color");
if (btn.id == "push" && unPushedCommits > 0) {
btn.firstElementChild?.setAttr("color","var(--text-accent)")
btn.firstElementChild?.setAttr(
"color",
"var(--text-accent)"
);
}
}
});
Expand Down Expand Up @@ -217,7 +221,7 @@
$: rows = (commitMessage.match(/\n/g) || []).length + 1 || 1;
</script>

<main>
<main data-type={SOURCE_CONTROL_VIEW_CONFIG.type}>
<div class="nav-header">
<div class="nav-buttons-container">
<div
Expand Down Expand Up @@ -403,7 +407,7 @@
{/if}
</div>
<div
class="changes nav-folder"
class="changes tree-item nav-folder"
class:is-collapsed={!changesOpen}
>
<div
Expand Down Expand Up @@ -619,6 +623,10 @@
}
}
.nav-folder-title {
align-items: center;
}
.git-commit-msg-clear-button {
position: absolute;
background: transparent;
Expand Down

0 comments on commit a9adfff

Please sign in to comment.