forked from Wassup789/YouTube-Notifications
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for uploading files for Linux
Temporary fix, currently Chrome closes the popup upon an upload file attempt. This is circumvented by opening a popup in place as the popup will not be closed when the file dialog appears. This resolves Wassup789#13.
- Loading branch information
Showing
8 changed files
with
405 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
* { | ||
box-sizing:border-box; | ||
-webkit-user-select: none; | ||
} | ||
.selectable {-webkit-user-select: text;} | ||
.noninteractable {pointer-events: none;} | ||
|
||
body{ | ||
font-size:12px; | ||
color:#252525; | ||
padding: 0; | ||
margin: 0; | ||
text-shadow: none; | ||
font-family: Roboto, Arial, sans-serif; | ||
font-weight: 400; | ||
overflow-x:hidden; | ||
background: #efefef; | ||
width: 100%; | ||
height: 100%; | ||
box-sizing:border-box; | ||
} | ||
.unscrollable {overflow: hidden!important;} | ||
|
||
a, .link{ | ||
text-decoration: none; | ||
cursor:pointer; | ||
color: #448aff; | ||
font-weight: 500; | ||
} | ||
|
||
::-webkit-scrollbar { | ||
width: 5px; | ||
} | ||
|
||
::-webkit-scrollbar-thumb { | ||
border-radius: 5px; | ||
background: rgba(0,0,0,0.4); | ||
} | ||
#launch_screen { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100vw; | ||
height: 100vh; | ||
background: #FFFFFF; | ||
z-index: 10000; | ||
} | ||
#launch_screen-header { | ||
height: 56px; | ||
background: #f44336; | ||
} | ||
#launch_screen-logo { | ||
position: absolute; | ||
height: 128px; | ||
width: 128px; | ||
top: calc(50% + 28px - 64px); | ||
left: calc(50% - 64px); | ||
background: url("../img/128.png"); | ||
animation: shakeAnimation 4s linear infinite; | ||
z-index: 1; | ||
} | ||
@keyframes shakeAnimation { | ||
0% {transform: rotate( 0deg);} | ||
25% {transform: rotate( 0deg);} | ||
30% {transform: rotate( 5deg);} | ||
35% {transform: rotate(-5deg);} | ||
40% {transform: rotate( 5deg);} | ||
45% {transform: rotate(-5deg);} | ||
50% {transform: rotate( 5deg);} | ||
55% {transform: rotate(-5deg);} | ||
60% {transform: rotate( 5deg);} | ||
65% {transform: rotate(-5deg);} | ||
70% {transform: rotate( 5deg);} | ||
75% {transform: rotate( 0deg);} | ||
100% {transform: rotate( 0deg);} | ||
} | ||
#launch_screen-ripple { | ||
position: absolute; | ||
top: calc(50% + 28px); | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
width: 100px; | ||
height: 100px; | ||
border-radius: 50%; | ||
background: rgba(244,67,54,0.3); | ||
animation: rippleAnimation 1.5s linear infinite; | ||
} | ||
@keyframes rippleAnimation { | ||
0% { | ||
width: 50px; | ||
height: 50px; | ||
opacity: 0; | ||
} | ||
25% { | ||
opacity: 1; | ||
} | ||
50% { | ||
width: 200px; | ||
height: 200px; | ||
} | ||
100% { | ||
width: 350px; | ||
height: 350px; | ||
opacity: 0; | ||
} | ||
} | ||
|
||
#header_img { | ||
height: 32px; | ||
} | ||
|
||
#content { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 30px 0; | ||
} | ||
|
||
.label[i18n] { | ||
font-size: 14px; | ||
font-weight: bold; | ||
} | ||
|
||
.label[i18n]:after {content: ":";margin-right: 4px;} | ||
|
||
#content paper-card .card-content {padding-top: 5px;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<script src="../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script> | ||
|
||
<link rel="import" href="../bower_components/iron-pages/iron-pages.html"> | ||
<link rel="import" href="../bower_components/paper-header-panel/paper-header-panel.html"> | ||
<link rel="import" href="../bower_components/paper-toolbar/paper-toolbar.html"> | ||
<link rel="import" href="../bower_components/paper-card/paper-card.html"> | ||
<link rel="import" href="../bower_components/paper-button/paper-button.html"> | ||
<link rel="import" href="../bower_components/paper-toast/paper-toast.html"> | ||
<link rel="import" href="../bower_components/paper-dropdown-menu/paper-dropdown-menu.html"> | ||
<link rel="import" href="../bower_components/paper-listbox/paper-listbox.html"> | ||
<link rel="import" href="../bower_components/paper-item/paper-item.html"> | ||
<link rel="import" href="../bower_components/iron-icon/iron-icon.html"> | ||
<link rel="import" href="../bower_components/iron-icons/iron-icons.html"> | ||
<link rel="import" href="../bower_components/iron-icons/av-icons.html"> | ||
|
||
<link rel="stylesheet" type="text/css" href="upload-file.css" /> | ||
<script type="text/javascript" src="../js/jquery.min.js"></script> | ||
<script type="text/javascript" src="upload-file_edit.js"></script> | ||
</head> | ||
<body> | ||
<div id="launch_screen"> | ||
<div id="launch_screen-header"></div> | ||
<div id="launch_screen-logo"></div> | ||
<div id="launch_screen-ripple"></div> | ||
</div> | ||
<dom-module id="main-element"> | ||
<template> | ||
<style> | ||
:host { | ||
--primary-color: var(--paper-red-500); | ||
--light-primary-color: var(--paper-red-100); | ||
--dark-primary-color: var(--paper-red-700); | ||
} | ||
paper-toolbar .title { | ||
margin-left: 5px; | ||
} | ||
paper-header-panel { | ||
min-height: 100vh; | ||
} | ||
paper-slider { | ||
--paper-slider-active-color: var(--dark-primary-color); | ||
--paper-slider-secondary-color: var(--primary-color); | ||
--paper-slider-knob-color: var(--primary-color); | ||
--paper-slider-pin-color: var(--dark-primary-color); | ||
cursor: pointer; | ||
} | ||
paper-button[raised] { | ||
background-color: var(--primary-color); | ||
color: white; | ||
} | ||
paper-button iron-icon { | ||
margin: 0 6px 0 2px; | ||
} | ||
paper-card { | ||
--paper-card-header: { | ||
border-bottom: 1px solid #D4D4D4; | ||
} | ||
} | ||
paper-card .card-actions { | ||
color: var(--primary-color); | ||
} | ||
</style> | ||
<input id="fileUploader" type="file" accept="audio/*" hidden> | ||
<paper-toast text="" class="fit-bottom"></paper-toast> | ||
<paper-header-panel mode="standard"> | ||
<paper-toolbar id="toolbar"> | ||
<img id="header_img" src="../img/yt_logo.png" /> | ||
<span class="title">Notifications - <span i18n="settings_editSettings_notificationSound"></span></span> | ||
</paper-toolbar> | ||
<div id="content" class="fit"> | ||
|
||
<paper-card> | ||
<div class="card-content"> | ||
<span class="label" i18n="settings_editSettings_notificationSound"></span> | ||
<paper-dropdown-menu id="settings_sound_list"> | ||
<paper-listbox class="dropdown-content"></paper-listbox> | ||
</paper-dropdown-menu> | ||
<paper-button id="settings_sound_upload" raised> | ||
<iron-icon icon="icons:file-upload"></iron-icon> | ||
<span i18n="settings_editSettings_uploadSound"></span> | ||
</paper-button> | ||
</div> | ||
</paper-card> | ||
</div> | ||
</paper-header-panel> | ||
</template> | ||
<script> | ||
HTMLImports.whenReady(function () { | ||
Polymer({ | ||
is: "main-element" | ||
}); | ||
}); | ||
</script> | ||
</dom-module> | ||
<main-element></main-element> | ||
</body> | ||
</html> |
Oops, something went wrong.