Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(popup): userscript detail view#447

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
ACTCD wants to merge12 commits intomain
base:main
Choose a base branch
Loading
fromfeat/popup_detail_view
Draft
Changes from1 commit
Commits
Show all changes
12 commits
Select commitHold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
style: adjust buttons
  • Loading branch information
@ACTCD
ACTCD committedMar 11, 2023
commitfc9c7e63d856e413718a454c14d64bcc769d4866
41 changes: 20 additions & 21 deletionssrc/popup/Components/Views/DetailView.svelte
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,8 +18,6 @@
];
let errormsg = itemdata.error;
let metadata = itemdata.metadata;
let variableButton;
let variableButtonClick;

function metadataInit() {
if (metadata) return;
Expand All@@ -39,18 +37,6 @@
if (!metadata) {
metadataInit();
}
if (itemdata.update) {
variableButton = "Update";
variableButtonClick = updateConfirmClick;
}
if (itemdata.filename) {
variableButton = "Delete";
variableButtonClick = deleteConfirmClick;
}
if (itemdata.url) {
variableButton = "Install";
variableButtonClick = installConfirmClick;
}
}
</script>

Expand DownExpand Up@@ -81,7 +67,7 @@
{/if}
{/each}
</ul>
{#if!itemdata.filename}
{#if itemdata.url}
<div class="badge">
<div class="badge--icon">{@html iconWarn}</div>
<div class="badge--text">Be sure you trust the author before installing. Nefarious code can exploit your security and privacy.</div>
Expand All@@ -91,9 +77,21 @@
<button class="cancel" on:click={cancelClick}>
Cancel
</button>
<button class={variableButton} on:click={variableButtonClick}>
{variableButton}
</button>
{#if itemdata.url}
<button class="install" on:click={installConfirmClick}>
{itemdata.installed ? "Reinstall" : "Install"}
</button>
{/if}
{#if itemdata.filename}
<button class="delete" on:click={deleteConfirmClick}>
Delete
</button>
{/if}
{#if itemdata.update}
<button class="update" on:click={updateConfirmClick}>
Update
</button>
{/if}
</div>
{/if}
</div>
Expand DownExpand Up@@ -201,19 +199,20 @@
background-color: #ffffffa6; /* -text-color-secondary */
border-radius: var(--border-radius);
color: var(--color-bg-primary);
font-weight: 600;
flex-grow: 1;
height: 2rem;
}

button.Install {
button.install {
background-color: var(--color-blue);
}

button.Update {
button.update {
background-color: var(--color-yellow);
}

button.Delete {
button.delete {
background-color: var(--color-red);
}
</style>

[8]ページ先頭

©2009-2025 Movatter.jp